[Swift-devel] variable command line options
Veronika V. Nefedova
nefedova at mcs.anl.gov
Fri Mar 2 12:47:12 CST 2007
At 12:32 PM 3/2/2007, Ben Clifford wrote:
>On Thu, 1 Mar 2007, Veronika V. Nefedova wrote:
>
> > The application I am working with accepts a variable number of arguments:
> > could be 10, could be 15 (i.e. some of them are optional). I need to
> call this
> > application N times with 17 input command line parameters, M times with 18
> > parameters, and X times with 20 parameters. Do I need to define 3
> functions,
> > one for each set of parameters ? Or there is a better way ? Input
> parameters
> > is a combination of strings, filenames and stdin input.
>
>it is possible to make SwiftScript procedures have parameters with default
>values. that isn't exactly what you are asking for, but might be related:
>
>http://www.ci.uchicago.edu/swift/guides/tutorial.php#id2784846
>
yes, I am already doing that since my apps have a lot of default parameters.
>But that doesn't let you change the parameters going to the application
>itself.
>
>Can you give a couple of example command-lines and explain what the
>differences are?
The input parameters to the application are keyword-driven:
This is how the app could be called:
charmm pstep:700 dirname:solv_chg_a8 system:solv_m001 stitle:m001
cpddata:../alamines rtffile:parm03_gaff_all.rtf
paramfile:parm03_gaffnb_all.prm gaff:m001_am1 vac: restart:NONE
inputdir:../inputs faster:off rwater:15 chem:chem minstep:0 rforce:0
ligcrd:lyz stage:chg urandseed:762192 < solv.inp > solv_chg_a8.out
or this way:
charmm pstep:700 dirname:solv_repu0_0.2_a1 system:solv_m001 stitle:m001
cpddata:../alamines rtffile:parm03_gaff_all.rtf
paramfile:parm03_gaffnb_all.prm gaff:m001_am1 vac: restart:NONE
inputdir:../inputs faster:off rwater:15 chem:chem minstep:0 rforce:0
ligcrd:lyz stage:repu rcut1:0 rcut2:0.2 urandseed:1522709 < solv.inp >
solv_repu0_0.2_a1.out
Or this way:
charmm system:solv_m001 title:solv stitle:m001 rtffile:parm03_gaff_all.rtf
paramfile:parm03_gaffnb_all.prm gaff:m001_am1 nwater:400 ligcrd:lyz
rforce:0 iseed:3131887 rwater:15 nstep:100 minstep:100 skipstep:100
startstep:10000 < equil_solv.inp > equil_solv.out
Some of these parameters are constants (default), but majority are not. And
the number of those that change vary from call to call.
Nika
>--
More information about the Swift-devel
mailing list