[gmx-developers] Questions about some source files

Frankie Montenegro frankie.montenegro at gmail.com
Tue Nov 20 21:04:36 CET 2007


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 questions:

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 number represent number of interacting atoms, second is
number of parameters. How about the third number?

2. The same question for the file src/gmxlib/nrnb.c

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)?

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...)

4. The list in the manual has file /src/kernel/topdirs.c included
twice. Should I assume that one of those is simply an extra line, or
that there is a typo and another file needs 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 right?

Thanks for your help.

More information about the gromacs.org_gmx-developers mailing list