Becksteinlab / MDPOW

Calculation of water/solvent partition coefficients with Gromacs.
https://mdpow.readthedocs.io
GNU General Public License v3.0
25 stars 10 forks source link

setting different temperature in MDP files leads to incorrect free energies #266

Open orbeckst opened 1 year ago

orbeckst commented 1 year ago

The current code is not set up to change temperature or timestep via yml file. As described in teh issue, you have to use custom MDP files for each step (equilibration, FEP). This leads to problems with the analysis because the Temperature in the .fep pickle file that is associated with the run is not the same as in the MDP file.

Thus, if one uses mdpow with the scripts and yaml files and changed the temperature in custom MDP files then your analysis results will be incorrect.

Discussed in https://github.com/Becksteinlab/MDPOW/discussions/211

Originally posted by **eacoba** August 16, 2022 For thier simplicity, I prefer to use yml files to run mdpow. But I have some doubts about how to control temperature and time steps using yml files. 1. I wanted to simulate at 310 K, so I edited the mdp files changing temperature, and simulation (relaxed and NPT) mdps are in 310 K. But, I'm not sure if this is also taking in account to calculate fep. I edited two scripts, in the following lines: mdpow/fep.py `486 self.Temperature = kwargs.pop('temperature', **300.0**)` ---> `486 self.Temperature = kwargs.pop('temperature', 310.0)` mdpow/analysis.py `179 def gsolv2logpow(Gwat, Goct, unit='kcal/mol', temperature=**300**.)` ---> `179 def gsolv2logpow(Gwat, Goct, unit='kcal/mol', temperature=310.)` `638 temperature = kwargs.pop('temperature', **300.0**)` ---> `temperature = kwargs.pop('temperature', 310.0)` 2. Working with octanol NPT simulations, I had several problems with LINCS, so I decided to change time step to 1 fs using mdp files, but this does not change in simulation files. How is possible to do it? I'm not sure if is important, but I'm using a pip installation.
VOD555 commented 1 year ago

This problem is mainly due to in the script we don't have any input for temperature (see here2). And the scripts which are used to calculate solvation free energies don't take the yml file as input.

I think it's better to also make these scripts use the yml file as the input file and add temperature as a keyword.

orbeckst commented 1 year ago

I think the scripts don't need to read the temperature because they use water.fep and oct.fep files, which store all simulation data, including temperature. However, there's no way to set the temperature via yaml/scripts.