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!
mixture Gaussian force with custom force
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: mixture Gaussian force with custom force
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?
Re: mixture Gaussian force with custom force
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).
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: mixture Gaussian force with custom force
You can use CustomTorsionForce. That does exactly what you want.
Re: mixture Gaussian force with custom force
Looks great! Does "CustomTorsionForce" support multiple torsions? I found that there is an example in the documentation:
I am wondering if it is possible to define two theta's and define following expression:
where theta1 and theta2 are two torsions (each defined by 4 atoms), and theta10, theta20 are potential centers?
Code: Select all
CustomTorsionForce* force = new CustomTorsionForce("0.5*k*(theta-theta0)^2");
Code: Select all
CustomTorsionForce* force = new CustomTorsionForce("exp(-0.5*k*(theta1-theta10)^2-0.5*k*(theta2-theta20)^2)");
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: mixture Gaussian force with custom force
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.
Re: mixture Gaussian force with custom force
I will take a look, thanks for your help!