[gmx-developers] Code for reading user-defined tabulated potentials in Gromacs

Mark Abraham mark.j.abraham at gmail.com
Tue Sep 11 10:05:49 CEST 2018


Hi,

This doesn't seem to be a question about GROMACS development, please ask on
gmx-users.

On Tue, Sep 11, 2018 at 9:17 AM Dheeraj Prakaash <dheej93 at gmail.com> wrote:

> Hello all,
>
> I'm working on a new forcefield to be incorporated in Gromacs for MD
> simulations. More importantly, my work includes specifying user-defined
> tabulated potential (table.xvg) during the production run using [-table]
> tag. To code the part of the new forcefield which accepts/reads and
> implements the tabulated potential, I need to study how Gromacs does it
> first. So, could anyone please point me to the particular file which
> contains the code to read and implement it?
>

You shouldn't need to read the code if our documentation is good enough.
People have been writing these tables for a decade or more, so it's
probably OK. :-) Have you read the relevant parts of the reference manual?


> Initially, I thought I had figured that tables.c file located in
> gromacs4.5.5/src/mdlib/ did the trick. But to be sure, when I removed
> tables.c file from gromacs and re-ran:
> mdrun -deffnm -v xxx -table table.xvg
>
> I still obtained the same resultant files with no change.
>

C is a compiled language. mdrun is compiled from the source files, but if
you don't use make to call the compiler, mdrun still works.

Also, if you would like your work to be as relevant as possible, and also
take advantage of the hundreds of bug fixes done since 2011 when 4.5.5 was
released, I strongly suggest using e.g. version 2018.3.


> In the md.mdp file, values for vdwtype and coulombtype was changed to '
> User'.
>
> There are 20,000 lines of data in my table.xvg and even after I delete
> the tables.c file from its location, the log file still says that the
> user-defined tabulated potentials have been read. So, I infer that it is
> some other file which helps read the tab-potentials. I haven't been
> successful in figuring which one yet. Or is there a component of the same
> function located elsewhere in Gromacs? Could someone help me with it? Any
> help/suggestion would be greatly appreciated.
>

As above, this behaviour is expected. If you then tried to make GROMACS, it
would not succeed, but this would have been true for any other source file
too.


> Apologies if my question is unorthodox. I did not find an answer to my
> question on the archive neither did I receive a response from the users
> mailing list.
>

I don't think that email made it to the list - but please ask there in
future.

Mark


> Regards
> Dheeraj
> --
> 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/20180911/b831774c/attachment-0003.html>


More information about the gromacs.org_gmx-developers mailing list