[gmx-developers] cmdline parsing / index files

Erik Lindahl lindahl at stanford.edu
Mon Mar 11 18:14:55 CET 2002


Anton Feenstra wrote:

>David van der Spoel wrote:
>
>>On Mon, 11 Mar 2002, Anton Feenstra wrote:
>>
>>>Alternatively, a file option could be multiple, so that we would
>>>type:
>>>trjcat -f 1.xtc 2.xtc -o all.xtc
>>>or possibly
>>>trjcat -f 1.xtc -f 2.xtc -o all.xtc
>>>
>>For files it would have to be added in the filenm bit of parsing I would
>>think.
>>
>
>Yes. So we'd have an ffMULT 1<<5, and an ffRDMULT flag in types/filenm.h
>and perhaps an int nf in t_filenm? *fn would then point to the first of
>a set of strings consecutive in memory... Or would we change *fn to
>**fn?
>
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).

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!

Cheers,

Erik









More information about the gromacs.org_gmx-developers mailing list