Hello,<div><br></div><div>I just started experimenting with GROMACS and I would like to interface with it to get energy values for different conformations of peptides. When debugging my way through the energy minimization part of the gmxdemo tutorial, I ended up in the following method of the mdlib/minimize.c file:</div>
<div><br><div><div>static void evaluate_energy(FILE *fplog,bool bVerbose,t_commrec *cr,</div><div><span style="white-space: pre-wrap; ">                        </span>    t_state *state_global,gmx_mtop_t *top_global,</div><div><span style="white-space: pre-wrap; ">                        </span>    em_state_t *ems,rvec **buf,gmx_localtop_t *top,</div>
<div><span style="white-space: pre-wrap; ">                        </span>    t_inputrec *inputrec,</div><div><span style="white-space: pre-wrap; ">                        </span>    t_nrnb *nrnb,gmx_wallcycle_t wcycle,</div><div><span style="white-space: pre-wrap; ">                        </span>    gmx_vsite_t *vsite,gmx_constr_t constr,</div>
<div><span style="white-space: pre-wrap; ">                        </span>    t_fcdata *fcd,</div><div><span style="white-space: pre-wrap; ">                        </span>    t_graph *graph,t_mdatoms *mdatoms,</div><div><span style="white-space: pre-wrap; ">                        </span>    t_forcerec *fr, rvec mu_tot,</div>
<div><span style="white-space: pre-wrap; ">                        </span>    gmx_enerdata_t *enerd,tensor vir,tensor pres,</div><div><span style="white-space: pre-wrap; ">                        </span>    int count,bool bFirst)</div></div><div><br></div><div>I&#39;m not very experienced with C/C++, but the fact that this method is static means that I cannot just call it from another C program (or e.g. a Java program) without changing GROMACS. I guess a naive way would be setting up an energy minimization and just running one step, but that is a lot of overhead and not very clean. Do you have any pointers for me?</div>
</div><div><br></div><div>(Actually, what I want to do is navigate the energy landscape of peptides by changing the torsion angles. This means that I will need to look up energy values very frequently.)</div><div><br></div>
<div>Regards,</div><div>Martin.</div>