rmcgibbo / openmm-cmd

OpenMM Command Line Application
7 stars 3 forks source link

when deserializing a system.xml, config.out.ini isn't set correctly. #11

Closed rmcgibbo closed 10 years ago

rmcgibbo commented 11 years ago

It's all just set with the defaults, because when the system.xml is deserialized, it does not interact with the config system.

cc @mpharrigan

leeping commented 10 years ago

I created PR #23 which hopefully addresses this problem. I saw a mistake under "General" options, where we were incorrectly printing out the options "protein" and "water" even when deserializing a system XML. I think I already fixed this problem in the other sections (i.e. "System" and "Dynamics" options).

The commented-out lines in config.out.ini will still be left at default values that are inconsistent with the system XML, but since they are completely inactive and not relevant to the simulation, it's not particularly bad. The user cannot change these settings even when uncommenting them.

We could extract some options from the system XML and print them to the commented lines in config.out.ini to avoid confusion, but it might create additional confusion because the user might think these options can be changed. Maybe it's better to just print another comment line "System XML file overrides this option".

leeping commented 10 years ago

Now when loading a system XML file, certain options look like this:

# Activate a barostat for pressure coupling. The MC barostat requires
# temperature control (stochastic integrator or Andersen thermostat) to be in
# effect as well.
# Choices: [MonteCarlo, MonteCarloAnisotropic, None]
# NOTE: Deactivated because system is being loaded from an XML file.
# barostat = None
rmcgibbo commented 10 years ago

Should I close this now? This looks good.

leeping commented 10 years ago

Sure, go ahead.