[gmx-users] Q's about adding bonded interaction

Frankie Montenegro frankie.montenegro at gmail.com
Fri Nov 23 23:28:58 CET 2007

Hi everyone,

*I have posted these few questions on the developers list few days ago
but didn't get any feedback. I'd really appreciate some input, I am
quite lost in gromacs (not so small) source tree.*

I am trying to add a two-body bonded interaction, following a "list of
files to modify", given in the manual (page 190). I have following

*1.* In the file *src/gmxlib/ifunc.c* there is an array of functions whose
arguments include some integers. For example

def_bond   ("MORSE",    "Morse",           2, 3, 0,  eNR_MORSE,
morse_bonds   )

The first integer argument represents the number of interacting atoms,
second is
number of parameters. *What about the third integer?*

*2.* The same question for the file *src/gmxlib/nrnb.c* and this structure

static const t_nrnb_data nbdata[eNRNB] = {
 { "LJ",                             33 }, /* nb_kernel010 */
 { "Buckingham",                     61 }, /* nb_kernel020 */
 { "VdW(T)",                         54 }, /* nb_kernel030 */

*What is the meaning of the integers (33, 61, 54)? Do I need to worry about
for my added interaction?*

*3. *In the file *src/kernel/convparm.c* there is a switch statement for
every type of interaction. For example:

case F_MORSE:
 new->morse.b0    =old[0];
 new->morse.cb    =old[1];
 new->morse.beta  =old[2];

If I am adding an interaction which has three parameters, *do I need to
be concerned about order (which one is in old[0], etc...)? *
*More importantly*, *is this related to the order of input parameters in the

topology file? If not, where is this order established?
*4. *The list in the manual has file */src/kernel/topdirs.c *included
twice. Is this:
*(a) the same line listed twice by mistake, or
(b) a typo, and there is another file to be modified?*

*5. *There are couple of files in the list that don't seem to need any
modification for the type of the interaction I am adding.
For example *src/kernel/enums.h* or *src/kernel/topio.c*  *Does that seem

Thanks for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20071123/9f1ed3a8/attachment.html>

More information about the gromacs.org_gmx-users mailing list