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

Mark Abraham mark.j.abraham at gmail.com
Thu Oct 26 08:07:56 CEST 2017


Hi,

It's only the number of that type of bond, and there are very many types of
bond. Note that pairs are handled in their own routine.

You should really be modifying newer versions of GROMACS. Doing so off an
old released version ensures you benefit from none of the improvements or
bug fixes since then, and makes it harder for your effort to remain
relevant in the future. And please use version control ;-)

Mark

On Thu, 26 Oct 2017 07:56 Hoa Trinh <trinhlanhoa at gmail.com> wrote:

> 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*
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list