<div dir="ltr">Hi,<br><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 18, 2016 at 11:43 AM Augustin Chevallier &lt;<a href="mailto:augustin.chevallier@inria.fr">augustin.chevallier@inria.fr</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" class="gmail_msg"><div class="gmail_msg">Hello,<br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">first, I apologize if this is not the right mailing list, however it seemed more appropriate than user mailing list. </div></div></div></blockquote><div><br></div><div>Sure, this is appropriate discussion here.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" class="gmail_msg"><div class="gmail_msg">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.</div></div></div></blockquote><div><br></div><div>If you don&#39;t need to change the model physics between computations of PE, then you should still consider mdrun -rerun, per <a href="http://www.gromacs.org/Documentation/How-tos/Single-Point_Energy">http://www.gromacs.org/Documentation/How-tos/Single-Point_Energy</a>.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" class="gmail_msg"><div class="gmail_msg"> I had a look at the code and indeed it seems possible using mdlib, however I&#39;m a bit overwhelmed by the complexity of the code.<br class="gmail_msg"></div></div></div></blockquote><div><br></div><div>Yes. We are in the process of designing an API that would be usable for what you want, but that&#39;s years away still.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" class="gmail_msg"><div class="gmail_msg">From what I understood, I should call the function do_forces(), however it has many parameters, and after looking at do_md() ,<span class="m_-5873909791933373829mw-headline gmail_msg">mdrunner()  </span>and <span class="m_-5873909791933373829mw-headline gmail_msg">main() </span>it seems there is quite a lot of things to set up before calling that function.<br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg">So here are some more precise questions:<br class="gmail_msg"></div><div class="gmail_msg">*which initialization are required? should I just copy past some parts of mdrunner for that?<br class="gmail_msg"></div><div class="gmail_msg">*how do I load a gromacs topology file?<br class="gmail_msg"></div><div class="gmail_msg">*I guess I also need a forcerec, how do I create on too?<br class="gmail_msg"></div></div></div></blockquote><div><br></div><div>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&#39;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 &quot;what will vary between evaluations?&quot; and &quot;why is GROMACS the right tool for the job?&quot;</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" class="gmail_msg"><div class="gmail_msg"></div><div class="gmail_msg">*If I want to modify the atoms positions, can I do it in mdAtoms directly?</div></div></div></blockquote><div><br></div><div>No, they live in a variable of type t_state.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" class="gmail_msg"><div class="gmail_msg">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!</div></div></div></blockquote><div><br></div><div>First let&#39;s see whether you can avoid it :-)</div><div><br></div><div>Mark</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" class="gmail_msg"><div class="gmail_msg">Thanks!<br class="gmail_msg"></div><div class="gmail_msg">Augustin Chevallier<br class="gmail_msg"></div></div></div>--<br class="gmail_msg">
Gromacs Developers mailing list<br class="gmail_msg">
<br class="gmail_msg">
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" class="gmail_msg" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br class="gmail_msg">
<br class="gmail_msg">
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" class="gmail_msg" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br class="gmail_msg">
<br class="gmail_msg">
* For (un)subscribe requests visit<br class="gmail_msg">
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" class="gmail_msg" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" class="gmail_msg" target="_blank">gmx-developers-request@gromacs.org</a>.</blockquote></div></div>