[gmx-developers] cmdline parsing / index files

Anton Feenstra feenstra at chem.vu.nl
Tue Mar 12 09:52:51 CET 2002


Erik Lindahl wrote:
> 
> I'd definitely prefer a solution where we have a general input
> structure, and functions to return the number of arguments given for
> each flag (e.g. "-f"), and another function that returns the n:th
> argument/filename, given the flag (or filetype, of course).

I've already added a ffRDMULT flag for file options, and opt2fns
and ftp2fns functions that return the number of files, and allocate
a pointer to an array of filenames. It's already in the CVS and
implemented for trjcat. eneconv will folow, but that needs a bit
more thinking since it already has a -f option.

I also realise now that the printing routine doesn't yet tell you
that it is a multiple file option. I'll fix that also... Done!

So try it and tell me what you think.

> There are a number of programs (eneconv & trjcat come to mind) that rely
> on different ways of handling multiple files, so make sure they don't break!

The current way (using PCA_NOEXIT_ON_ARGS) is still possible, 
and still used by eneconv. 

By the way, why has mdrun PCA_NOEXIT_ON_ARGS set?

-- 
Groetjes,

Anton
 ________ ___________________________________________________________
|        | Anton Feenstra                                            |
| .      | Dept. of Pharmacochemistry - Free University Amsterdam    |
| |----  | De Boelelaan 1083 - 1081 HV Amsterdam - The Netherlands   |
| |----  | Tel: +31 20 44 47608 - Fax: +31 20 44 47610               |
| ' __   | Feenstra at chem.vu.nl - http://www.chem.vu.nl/afdelingen/FAR|
|  /  \  |-----------------------------------------------------------|
| (    ) | Dept. of Biophysical Chemistry - University of Groningen  |
|  \__/  | Nijenborgh 4 - 9747 AG Groningen - The Netherlands        |
|   __   | Tel +31 50 363 4327 - Fax +31 50 363 4800                 |
|  /  \  | K.A.Feenstra at chem.rug.nl - http://md.chem.rug.nl/~anton   |
| (    ) |-----------------------------------------------------------|
|  \__/  | "Ease Myself Into the Body Bag" (P.J. Harvey)             |
|________|___________________________________________________________|



More information about the gromacs.org_gmx-developers mailing list