Question about restraining the center of mass

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Lee-Ping Wang
Posts: 102
Joined: Sun Jun 19, 2011 5:14 pm

Question about restraining the center of mass

Post by Lee-Ping Wang » Wed Apr 13, 2016 3:16 pm

Hi there,

If I wanted to restrain the center of mass of a molecule to a particular position (without restraining the individual atoms), should I use the CustomCentroidBondForce? I could create a fictitious particle with no mass and no other interactions so that it stays at a prescribed position, and that would be my group 2.

While this force seems to be intended to apply forces to the centers of masses of two or more groups, I couldn't find another Custom Force that would work for an individual group. Let me know if I missed something.

Thanks,

- Lee-Ping

User avatar
Peter Eastman
Posts: 2543
Joined: Thu Aug 09, 2007 1:25 pm

Re: Question about restraining the center of mass

Post by Peter Eastman » Wed Apr 13, 2016 3:32 pm

CustomCentroidBondForce will happily let you define a "bond" based on only one group. For example, if you set your energy to "(x1-5)^2+(y1-2)^2+(z1-3)^2", that will restrain the center of mass to (5, 2, 3).

Peter

User avatar
Lee-Ping Wang
Posts: 102
Joined: Sun Jun 19, 2011 5:14 pm

Re: Question about restraining the center of mass

Post by Lee-Ping Wang » Wed Apr 13, 2016 3:40 pm

Thanks a lot. :) That seems a lot simpler than creating a fictitious atom.

POST REPLY