CustomCVForce crashes simulation with very high kinetic energy.
Posted: Thu Aug 06, 2020 6:46 am
I am trying to implement a fraction-of-native-contacts (Qf) force to apply it in umbrella sampling calculations. First, I am using a CustomBondForce to add each native contact contribution as:
Where N is the total number of native contacts and beta and lambda are global parameters for adjusting each contribution.
Then, I am passing this object as a collective variable (scalar) to a CustomCVForce using an Umbrella potential to restraint the Qf value as:
The remaining potential energy of the system is an implementation of a coarse-grained Go-like (structure-based) energy function that, otherwise, works fine. The problem is that the simulation is crashing with a "Potential energy is NaN" error, even with meagre constant forces or timesteps (within practical reason).
Just before crashing, I see the kinetic energy of the system getting very high and, in the trajectory, atoms are flying away in specific segments. I am not sure how the CustomCVForce object calculates the vectorial component of the force, mainly because it uses a scalar number as the driving force. But I am guessing that the problem is that the force applied is not restorative of the fraction of native contacts; kinetic energy is getting accumulated while the configuration stays far from the restrained Qf0 value.
Does anyone know how to deal with such a scenario, or maybe, has an alternative on how to implement this specific force?
Code: Select all
energy_function = '(1/N)*(1/(1+exp(beta*(r-lambda*r0))))'
Qf = CustomBondForce(energy_function)
Then, I am passing this object as a collective variable (scalar) to a CustomCVForce using an Umbrella potential to restraint the Qf value as:
Code: Select all
QfCV = CustomCVForce('0.5*k*(Qf-Qf0)^2')
Just before crashing, I see the kinetic energy of the system getting very high and, in the trajectory, atoms are flying away in specific segments. I am not sure how the CustomCVForce object calculates the vectorial component of the force, mainly because it uses a scalar number as the driving force. But I am guessing that the problem is that the force applied is not restorative of the fraction of native contacts; kinetic energy is getting accumulated while the configuration stays far from the restrained Qf0 value.
Does anyone know how to deal with such a scenario, or maybe, has an alternative on how to implement this specific force?