[gmx-developers] options file handling in master

Teemu Murtola teemu.murtola at gmail.com
Fri Nov 8 16:25:04 CET 2013

Feel free to add types you need; that should be trivial. The current list
simply includes those currently used; there is no other reason for leaving
things out.

The original reason for the different enumeration was that the code in
filenm.* was not reusable enough. That is no longer the case, but the
separate enumeration still makes sense to provide understandable names for
the file types. The types of file options may not always coincide 1-to-1 to
actual file types (the existing ef??X types are one example), and this
additional enumeration provides this abstraction.
On Nov 8, 2013 2:47 PM, "David van der Spoel" <spoel at xray.bmc.uu.se> wrote:

> Hi,
> I'm trying to implement new analysis tools using Teemu's framework. For
> some reason this only supports a subset of all gromacs files, and uses new
> enumerated types to distinguish them. E.g.:
> options->addOption(FileNameOption("sfac").filetype(eftGenericData)
>                    .inputFile().required()
>                    .store(&fnSfactor_).defaultBasename("sfactor")
>                    .description("Structure factors"));
> I would like this file to have the .xml extension, however in
> options/filenameoption.cpp we only have:
> FileTypeRegistry::FileTypeRegistry()
> {
>     filetypes_.resize(eftOptionFileType_NR);
>     registerType(eftTopology,    efTPS);
>     registerType(eftTrajectory,  efTRX);
>     registerType(eftPDB,         efPDB);
>     registerType(eftIndex,       efNDX);
>     registerType(eftPlot,        efXVG);
>     registerType(eftGenericData, efDAT);
> }
> note that the eftXXX are different from efXXX in fileio/filenm.h.
> Main question therefore is:
> Why would we not allow all the old field types?
> --
> David van der Spoel, Ph.D., Professor of Biology
> Dept. of Cell & Molec. Biol., Uppsala University.
> Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
> spoel at xray.bmc.uu.se    http://folding.bmc.uu.se
> --
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the www
> interface or send it to gmx-developers-request at gromacs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20131108/8112e88d/attachment.html>

More information about the gromacs.org_gmx-developers mailing list