Sire icon indicating copy to clipboard operation
Sire copied to clipboard

SOMD example config gives incorrect units for parameters

Open lohedges opened this issue 7 years ago • 2 comments

SOMD can be used to generate an example configuration file with default parameters, i.e.

$HOME/sire.app/bin/somd --help-config

However, for parameters that have units, e.g. times, temperatures, etc., the unit names are incorrect and SOMD will not run if these are used. This is because SOMD uses Sire.Units for unit handling and the unit names must match the exact names from this package. For example, the configuration output gives the following defaults:

temperature = 25 C
timestep = 0.002 ps

In order for these to work, the names must be changed to:

temperature = 25 celsius
timestep = 0.002 picosecond

Also note that the variables are not assigned a default unit if no unit is present, i.e. when the value is just a float or integer. This means that SOMD will fail if the user configuration file doesn't use the exact unit name. (No abbreviations, alternative spellings, etc, are allowed.)

This could be fixed by having some kind of regex handling and unit checking within the resolveParameters decorator from here (the most flexible option), or by updating the ouput of --help-config to display the correct unit names (the simplest short-term fix).

lohedges avatar Oct 02 '18 08:10 lohedges

It would be good to improve the SOMD configuration file parsing for the 2019.2.0 release. A basic improvement would be not silently ignoring invalid keywords and making sure that the defaults shown in the help output have the correct naming for the units.

lohedges avatar May 03 '19 11:05 lohedges

Yep that makes sense! I'll try and work on it, when the simulations are running properly.

ppxasjsm avatar May 03 '19 14:05 ppxasjsm