[gmx-users] Calculated bonded interactions - number of bonds- bondfree.c

Hoa Trinh trinhlanhoa at gmail.com
Thu Oct 26 07:56:09 CEST 2017


Hi all,
I am trying to look into the source code of Gromacs 5.0.7 to see how
Gromacs calculate bonded interactions. For example, to calculate bond
interaction between 2 atoms, there is the function (gmxlib/bondfree.c):
real bonds(int nbonds, ...)
{
  ....
  for (i = 0; (i < nbonds); )
    {
        type = forceatoms[i++];
        ai   = forceatoms[i++];
        aj   = forceatoms[i++];
....
}
Is "nbonds" the total number of bond interactions? In my topology file, I
have 126 pairs in the [ bonds ] section. However, when I printf the
variable nbonds, it appears to be 378. I have no idea why. Can anyone
please help me to explain what is nbonds?
Thank you very much in advance.
Best regards,

*Lan Hoa*


More information about the gromacs.org_gmx-users mailing list