[gmx-developers] changes in filename option handling

Teemu Murtola teemu.murtola at gmail.com
Sun Jul 27 06:55:35 CEST 2014


Hi,


On Fri, Jul 25, 2014 at 5:26 PM, Jan Henning Peters <jpeters at gwdg.de> wrote:

> Since my last rebase, I noticed a change in the handling of default
> filenames that I believe might be unintended.
>
> As far as I can see, the FileNameOption class only has a method
> defaultBasename (attempting to call defaultValue results in a compiler
> error), which does not allow supplying a file extension - if a
> "filename.ext" is given, this is taken as the basename, and a standard
> file extension is appended. The default file extension is then appended
> by the framework based on the filetype set. Unfortunately,
> eftTrajectory for example this limits the default filetype to .xtc -
> setting a .trr or .pdb file as default output is not possible any more
> for the developer.
>

If that ever worked with FileNameOption, it was purely unintentional. ;)
 As the name of the method suggests, it is meant for specifying the base
name, and there never has been a method to do anything else. I now added
one in <https://gerrit.gromacs.org/#/c/3826/>.

There seems to be a similar problem even with the older modules, I
> noticed that gmx covar now by default produces a file named
> average.pdb.gro.
>

That is also fixed in the above change. I hadn't noticed that although ~95%
of the t_filenm declarations only specified the default base name, the
remaining ~5% had an extension, which was not handled properly. Of those
5%, 80% only specified the default extension, though, so to make the code
use the same approach everywhere, I removed those cases in <
https://gerrit.gromacs.org/#/c/3825/>. The remaining 1% should be properly
working as well after these changes are merged.

Best regards,
Teemu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20140727/a96a3473/attachment.html>


More information about the gromacs.org_gmx-developers mailing list