-
Notifications
You must be signed in to change notification settings - Fork 85
Description
Hello,
I get different energies from OpenMM systems built with
espaloma.graphs.deploy.openmm_system_from_graph()
EspalomaTemplateGenerator
There are differences in relative energies between conformers of the same molecule. For a large small molecule (lenacapavir) the difference in relative energy between conformers was about 1.5 kJ/mol. For a few other molecules the difference was negligible (a few hundreds of a kJ/mol).
The only difference I could find in the code paths is a call to regenerate_impropers
from espaloma.graphs.utils.regenerate_impropers import regenerate_impropers |
With the template generator, which calls regenerate_impropers()
, the number of impropers is halved, and the central atom is the first of the four atoms defining the dihedral. With espaloma.graphs.deploy.openmm_system_from_graph()
, which does not call regenerate_impropers()
, the central atom is the second atom.
See code attached, which can be run with python builder.py lenacapavir.sdf
and prints the following
espaloma.__version__='0+untagged.16.g804d3cc.dirty'
openff.toolkit.__version__='0.14.5'
openmm.__version__='8.2'
openmmforcefields.__version__='0.14.1'
rdkit.__version__='2024.03.4'
espaloma system
len(bonds)=102
len(angles)=185
len(propers)=1620
len(impropers)=312
central_atoms={'b'}
generator system
len(bonds)=102
len(angles)=185
len(propers)=1620
len(impropers)=156
central_atoms={'a'}
energy diff (espaloma) 36.61758804321289 kJ/mol
energy diff (generator) 35.141313552856445 kJ/mol