Hi all,
I am trying to run a metadynamics simulation where the collective variable is bond length. I am trying to track a closed state of the protein which occurs when the distance between to atoms in within a given range. However when I run the attached script (abbreviated) I get the resulting plot where it appears nothing really happened. This plot looks the same when running over 100us. Thank you for the help!
Collective Variable of Bond Disance in Metadynamics
Collective Variable of Bond Disance in Metadynamics
- Attachments
-
- meta_dynamics_with_distance.txt
- (1.45 KiB) Downloaded 12 times
-
- metdy_plot.2.png (12.61 KiB) Viewed 188 times
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Collective Variable of Bond Disance in Metadynamics
The definitions of the custom forces are incorrect:
The arguments to distance() aren't global particle indices. They're the particles within a particular bond. Then you need to add bonds to the force.
You also could do it more simply with a CustomBondForce:
Code: Select all
cv1 = mm.CustomCompoundBondForce(2, '1*distance(3105, 3750)')
Code: Select all
cv1 = mm.CustomCompoundBondForce(2, '1*distance(p1, p2)')
cv1.addBond([3105, 3750])
Code: Select all
cv1 = mm.CustomBondForce('r')
cv1.addBond(3105, 3750)