[gmx-developers] Modify Gromacs version 5.1.4 to include a new 4-body interaction

Mark Abraham mark.j.abraham at gmail.com
Sat Nov 11 04:10:33 CET 2017


Hi,

On point, you have probably not correctly modified all of the arrays whose
size is supposed to be F_NRE. There are several nearby comments that note
the need for things to stay in step with each other. There is also logic
that chooses sub-ranges of those arrays to be handled in different parts of
the code, so I would probably insert your new 4-body form near the
dihedrals, and watch out for parts of the listed-forces high-level dispatch
logic working on subranges of ftype differently.

More broadly, please note that even something simple sounding as "add a new
dihedral-like term" is often best tackled in stages. For example, first add
a new interaction type that functions the same as an old one (which is
probably where you already have an issue), then change its functional form
to what you really want.

I also strongly suggest not picking an out-of-maintenance release tarball
for a development starting point. You are deliberately choosing to avoid
all of the bugs fixed in the later 5.1.x, and none of those fixed since,
and can only be helped by someone who can remember how 5.1.x worked. Also,
for your own sake, please use the git repository so you have version
control. If you were, then it would be easy for you to share your work
somewhere e.g. on github, and someone might be able to see where your issue
lies. :-)

Mark

On Fri, Nov 10, 2017 at 6:06 PM Hoa Trinh <trinhlanhoa at gmail.com> wrote:

> Dear Gromacs developers,
> I am trying to hack Gromacs to include a new 4-body short-ranged potential
> which Gromacs has not implemented yet. My strategy is to define the
> potential as a new dihedral types. I will have 2 input parameters, so I
> expected that I will do something very similar to what Gromacs does for
> improper dihedral angle. Therefore by grepping for F_IDIHS and
> eNR_IMPROPER, I think I need to modify the following files:
> src/gromacs/listed-forces/bonded.h
> src/gromacs/listed-forces/bonded.cpp
> src/gromacs/gmxlib/ifunc.c
> src/gromacs/gmxlib/nrnb.c
> src/gromacs/legacyheaders/types/nrnb.h
> src/gromacs/topology/idef.h
> src/gromacs/gmxpreprocess/topdirs.c
> src/gromacs/gmxpreprocess/convparm.c
> src/gromacs/gmxpreprocess/toppush.c
> src/gromacs/fileio/tpxio.c
>
> However, when I run test, I get the following fatal error at grompp step:
> "Incorrect number of parameters - found 2, expected 32621 or -26576307
> for. "
>
> I think there is something wrong related to toppush.c but I am really
> clueless. The file is too complicated for me to understand. In your
> opinion, what is wrong with my modification? Besides the following file, is
> there any other files which I need to modify also?
>
> I am looking forward to hearing from you.
> Thank you very much in advance.
> Best regards,
>
>
> *Lan Hoa*
> --
> Gromacs Developers mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_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-developers
> or send a mail to gmx-developers-request at gromacs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20171111/04db7e65/attachment-0003.html>


More information about the gromacs.org_gmx-developers mailing list