[gmx-developers] Interface - energy value from peptide conformation

Mark Abraham mark.abraham at anu.edu.au
Fri Sep 24 10:37:54 CEST 2010



----- Original Message -----
From: Martin Kamp Jensen <martin.kamp.jensen at gmail.com>
Date: Friday, September 24, 2010 18:23
Subject: [gmx-developers] Interface - energy value from peptide conformation
To: gmx-developers at gromacs.org

> Hello,
> 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: > 
> static void evaluate_energy(FILE *fplog,bool bVerbose,t_commrec *cr,> 			    t_state *state_global,gmx_mtop_t *top_global,> 			    em_state_t *ems,rvec **buf,gmx_localtop_t *top, > 			    t_inputrec *inputrec,> 			    t_nrnb *nrnb,gmx_wallcycle_t wcycle,> 			    gmx_vsite_t *vsite,gmx_constr_t constr, > 			    t_fcdata *fcd,> 			    t_graph *graph,t_mdatoms *mdatoms,> 			    t_forcerec *fr, rvec mu_tot, > 			    gmx_enerdata_t *enerd,tensor vir,tensor pres,> 			    int count,bool bFirst)> 
> I'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? > 
> (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.)

The elegant way to do that is to write your series of conformations to a pseudo-trajectory (in whichever of GROMACS many trajectory formats is convenient to you), and then invoke mdrun -rerun on that trajectory with a suitable .tpr. Then you either parse the .log file or the output .edr file for the energies. This should keep the overhead quite low.

Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20100924/39166db7/attachment.html>


More information about the gromacs.org_gmx-developers mailing list