[gmx-developers] Interfacing with gromacs to get potential energies/ forces
Mark Abraham
mark.j.abraham at gmail.com
Sat Nov 19 15:49:26 CET 2016
Hi,
On Fri, Nov 18, 2016 at 11:43 AM Augustin Chevallier <
augustin.chevallier at inria.fr> wrote:
> Hello,
>
> first, I apologize if this is not the right mailing list, however it
> seemed more appropriate than user mailing list.
>
Sure, this is appropriate discussion here.
> I would like to get the potential energy computed by gromacs without
> having to use the command line and the overhead of writing/reading the
> result in files.
>
If you don't need to change the model physics between computations of PE,
then you should still consider mdrun -rerun, per
http://www.gromacs.org/Documentation/How-tos/Single-Point_Energy.
> I had a look at the code and indeed it seems possible using mdlib, however
> I'm a bit overwhelmed by the complexity of the code.
>
Yes. We are in the process of designing an API that would be usable for
what you want, but that's years away still.
>From what I understood, I should call the function do_forces(), however it
> has many parameters, and after looking at do_md() ,mdrunner() and main() it
> seems there is quite a lot of things to set up before calling that function.
>
> So here are some more precise questions:
> *which initialization are required? should I just copy past some parts of
> mdrunner for that?
> *how do I load a gromacs topology file?
> *I guess I also need a forcerec, how do I create on too?
>
mdrun reads all of that from the .tpr and looks at your hardware and
command-line options and sets up all of that complexity. I don't think you
should want to try to simplify that - you need to satisfy the prerequisites
of do_force() and those were never designed for this use. The important
questions are "what will vary between evaluations?" and "why is GROMACS the
right tool for the job?"
*If I want to modify the atoms positions, can I do it in mdAtoms directly?
>
No, they live in a variable of type t_state.
> I know these questions are rather vague, so if you could just point to
> which part of md_runner() and do_md() I should look at, it would greatly
> help!
>
First let's see whether you can avoid it :-)
Mark
> Thanks!
> Augustin Chevallier
> --
> 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/20161119/f30240ba/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list