Temperature is required in input for both AMBER parsers (extract_dHdl and extract_u_nk), but also system temperature is already automatically read from the output file (reading temp0). I understand making T optional create a problem with the decorator that adds T to the argument of the output from the parsers, so I think still requiring T as a parameter is fine.
Currently, if temp0 is not found we log that 'Non-constant temperature MD not currently supported.' I don't think that this is right, as temp0 is set even in non-constant temperature MD, so I think that the check as it is is meaningless. As a note, it could be possible to check if the simulation was performed not at constant T, but it's not as easy because this information is written at the end of the file in a format that it's not easy to catch with current SectionParser. This shouldn't be a big problem I think, as the user should know if the simulation he/she performed was done at constant T, and I don't know if other parsers make this check at all (maybe it was a left-over from copying from alchemical-analysis?).
Still, we can benefit from reading temp0, and issue a WARNING to the user if the T in input is different from what is read from the file.
Related to that, I noticed we set T=300 in test_amber.py, but the simulations are run at T=298.0 K, so this should be fixed as well.
RECAP of what can be done:
still require T in input for the parser
still read temp0 from AMBER output
remove the WARNING about non-constant T simulation
add a WARNING if temp0 != T
fix test_amber.py with T=298.0
Let me know if this is OK, I can do it as soon as PR #224 is successfully closed.
Temperature is required in input for both AMBER parsers (
extract_dHdl
andextract_u_nk
), but also system temperature is already automatically read from the output file (readingtemp0
). I understand makingT
optional create a problem with the decorator that addsT
to the argument of the output from the parsers, so I think still requiringT
as a parameter is fine.Currently, if
temp0
is not found we log that 'Non-constant temperature MD not currently supported.' I don't think that this is right, astemp0
is set even in non-constant temperature MD, so I think that the check as it is is meaningless. As a note, it could be possible to check if the simulation was performed not at constant T, but it's not as easy because this information is written at the end of the file in a format that it's not easy to catch with current SectionParser. This shouldn't be a big problem I think, as the user should know if the simulation he/she performed was done at constant T, and I don't know if other parsers make this check at all (maybe it was a left-over from copying fromalchemical-analysis
?).Still, we can benefit from reading
temp0
, and issue a WARNING to the user if theT
in input is different from what is read from the file.Related to that, I noticed we set
T=300
intest_amber.py
, but the simulations are run at T=298.0 K, so this should be fixed as well.RECAP of what can be done:
T
in input for the parsertemp0
from AMBER outputtemp0
!=T
test_amber.py
with T=298.0Let me know if this is OK, I can do it as soon as PR #224 is successfully closed.