So this time I'm looking to remove the native PeriodicTorsionForce and replace it with a CustomTorsionForce (same reason - for tempering the force).
Implementing it seemed easy and I got accurate potential energy when I compared alanine dipeptide with and without the replacement force. But metadynamics shows a substantially different FES for the phi/psi angles.
Here's what I have for the CustomTorsionForce. Does this energy expression look correct? Should a different expression be used with AMBER? I've looked all through the github for the definition of the PeriodicTorsionForce but I'm not sure it's defined in the same way. Closest I found was: https://github.com/openmm/openmm/blob/e ... onForce.cc
Thanks for your time!
Code: Select all
energy_expression += "0.5*k*(1-cos(periodicity*theta-theta0))"
custom_torsion_force = CustomTorsionForce(energy_expression)
custom_torsion_force.addPerTorsionParameter("k");
custom_torsion_force.addPerTorsionParameter("periodicity")
custom_torsion_force.addPerTorsionParameter("theta0");
for torsion_index in range(torsionforce.getNumTorsions()):
a0, a1, a2, a3, periodicity, phase, k = torsionforce.getTorsionParameters(torsion_index)
custom_torsion_force.addTorsion(a0, a1, a2, a3, [k, periodicity,phase])