[gmx-developers] use multiple tables for pair interactions

hessb at mpip-mainz.mpg.de hessb at mpip-mainz.mpg.de
Mon Jul 17 08:46:11 CEST 2006

> Dear GMX developers,
> I want to use a coarse grained model, which includes several tabulated
> potentials for pair interactions, but no COUL term. Currently Gromacs
> can only read one table for pair interactions. Could you please help me
> modify the source code such that Gromacs can support multiple tables for
> pair interactions?
> Another way I am thinking to solve my problem is to fool gromacs to take
> advantage of COUL term in VDWs table since my coarse grained model does
> have COUL term. In other words, I put all pair interaction values in
> COUL term in the regular VDWs tables (Gromacs can read multiple VDWs
> tables), so when gromacs wants to calculate pair interaction energys,
> gromacs will use the codes for calculate COUL energy by reading VDWs
> tables. Here I need to modify the source code to change the flow. If you
> think this is a good idea, could you please shine a light o tell me
> where I need to modify in source code (where gromacs calculate the
> nonbonded energies and forces)?

Changing the code is somewhat involved,
as the pair interactions are bonded interactions and they
are therefore not assigned to charge groups.

I have used the other option you mention several times.
You actually have three tables at your disposal:
two for LJ (usually 1/r^6 and 1/r^12) and Coulomb.
So if you can have three independent functional forms,
if you can choose your charges appropriately.
The strength of the interactions can then be scaled
with C6, C12 and the charges.

But note that the Coulomb interactions always contain
a factor f*q1*q2 (see the manual).
If you need three tables (with two you can use only LJ),
you should make all Coulomb tables for the nonbonded
interactions zero so you can use the charges for the pair
interactions only.

Note that this strategy only works when you do not need
different interaction distances, such as for instance
different sigmas would require for LJ.


More information about the gromacs.org_gmx-developers mailing list