quantaosun / Dock-MD-FEP

Open Source, Automated free binding free energy calculation between protein and small molecule. An all-in-one workflow, free energy pertubation with OpenMM.
MIT License
46 stars 9 forks source link

NaN error when using explicit solvent. #3

Open quantaosun opened 2 years ago

quantaosun commented 2 years ago

This error will not be encountered unless you use explicit-1000_per_interation_doubled_lambda.yml instead of the default implicit-1000_per_interation_doubled_lambda.yml.

This issue is a reminder to myself, and you are welcome to solve this if you have a better position than me.

This issue is doubted to be related to the PBC setting from Amber files used in OpenMM. The way openMM expected PBC and the way Amber defines PBC might conflict. But I must say, sometimes it just works, and sometimes it does not, so the nature of this error is unclear to me.

One thing for sure is once we switch explicit solvent to implicit, this error is gone.

quantaosun commented 1 year ago
simulation = Simulation(prmtop.topology, system, integrator)
simulation.context.setPositions(inpcrd.positions)

This might be helpful to reset the PBC