mixture Gaussian force with custom force

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Wei Chen
Posts: 83
Joined: Thu Jul 02, 2015 6:35 pm

mixture Gaussian force with custom force

Post by Wei Chen » Tue Nov 26, 2019 9:08 am

Hi, I am trying to implement a mixture Gaussian force expressed as

$\sum_{i} V_i exp(-(\phi - \phi_i)^2 / (2 * \sigma_i^2) $

where $\phi$ is a dihedral angle of 4 atoms (out of many atoms) in a protein, $\phi_i$ and $\sigma_i$ are parameters for Gaussian. Does anyone know what might be the best way to do this? I attempted to use "CustomManyParticleForce", but I am a bit confused about how I should specify those 4 atoms for dihedral angle exactly in the expression. There is a function named "addParticle()" which I am not exactly sure if that is the correct function to call. If anyone could provide an example that would be great.

Thank you!

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

Re: mixture Gaussian force with custom force

Post by Peter Eastman » Tue Nov 26, 2019 10:01 am

Is this a bonded or nonbonded force? That is, does it get applied to specific sets of four atoms that you enumerate in advance? Or does it get applied to any set of four atoms that happen to come close to each other?

User avatar
Wei Chen
Posts: 83
Joined: Thu Jul 02, 2015 6:35 pm

Re: mixture Gaussian force with custom force

Post by Wei Chen » Tue Nov 26, 2019 10:10 am

It is bonded force, involving two set of 4 atoms, first set (defining first dihedral) with index (4,6,8,14) and second set (defining second dihedral) with index (6,8,14,16).

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

Re: mixture Gaussian force with custom force

Post by Peter Eastman » Tue Nov 26, 2019 10:55 am

You can use CustomTorsionForce. That does exactly what you want.

User avatar
Wei Chen
Posts: 83
Joined: Thu Jul 02, 2015 6:35 pm

Re: mixture Gaussian force with custom force

Post by Wei Chen » Tue Nov 26, 2019 12:19 pm

Looks great! Does "CustomTorsionForce" support multiple torsions? I found that there is an example in the documentation:

Code: Select all

CustomTorsionForce* force = new CustomTorsionForce("0.5*k*(theta-theta0)^2");
I am wondering if it is possible to define two theta's and define following expression:

Code: Select all

CustomTorsionForce* force = new CustomTorsionForce("exp(-0.5*k*(theta1-theta10)^2-0.5*k*(theta2-theta20)^2)");
where theta1 and theta2 are two torsions (each defined by 4 atoms), and theta10, theta20 are potential centers?

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

Re: mixture Gaussian force with custom force

Post by Peter Eastman » Tue Nov 26, 2019 2:53 pm

You can have as many torsions as you want. Just call addTorsion() for each one. If you make theta0 a per-torsion parameter, it can have a different value for each one.

User avatar
Wei Chen
Posts: 83
Joined: Thu Jul 02, 2015 6:35 pm

Re: mixture Gaussian force with custom force

Post by Wei Chen » Mon Dec 02, 2019 9:28 am

I will take a look, thanks for your help!

POST REPLY