[gmx-users] how to extract the LJ interaction parameters from the tpr file

Mark Abraham Mark.Abraham at anu.edu.au
Mon Feb 8 12:32:55 CET 2010


On 08/02/10 21:03, Baofu Qiao wrote:
> Hi all,
>
> I want to calculate the non-bonded interactions (LJ+Coulomb) between two
> sub-groups when they are within the cutoff distance. The sub-groups are
> only parts of the whole energy groups used in my .mdp file. Given the
> partial charges of the atoms involved are easy to get from the
> "top.atoms.atom[index[i]].q",   I have no idea how to get the LJ
> parameters of the atoms?
>
> Does anyone know how to get them from the top.atoms.atomXXX? Or is there
> some similar code to calculate such energies?

If you want them calculated mid-simulation, then you'll have to find the 
relevant data structure.

Otherwise, define useful energy groups, and calculate the terms from 
frames in a saved trajectory using mdrun -rerun. Get the data from the 
resulting .edr with g_energy in the usual way.

Mark



More information about the gromacs.org_gmx-users mailing list