[gmx-developers] energy calculation

Erik Lindahl lindahl at stanford.edu
Thu Mar 14 06:10:09 CET 2002

Vibin R wrote:
> Dear sir, 
>   Thank you very much for your prompt replies. I was successful in
> compiling the programme. 
>   Now to run the wrapper, there are some inputs mentioned in the
> calc_energy.h routine.(As a user the only input i used to give is a pdb,
> file, mdp file and an index file if necessary for running gromacs).
>  Givingthe c6, c12 paramaters is something I have figured out as also the
> input ntype for doing this.

[stuff deleted]

>  Sir, I guess once I have figured out the input file, it would be really a
> smooth sail from thereon. 

Well, I'm not quite sure what you want to do - since you were posting to 
the developer mailing list I assumed you wanted to call the Gromacs 
inner loop directly from another program?

Note that this would only include the nonbonded energy, and you cannot 
do things like pme on this level (yet). Thus, you will NOT get the 
energy due to bonded terms, and you have to construct all your nonbonded 
types and atom charges yourself as arrays of floating-point numbers. 
There is no way of you use grompp inside your program to do this 
automatically (and thus no input files - you have to take care of 
reading the pdb file and everything else yourself in this case). The 
'real' datatypes is defined in the gromacs include directories; it's 
basically 'single' or 'double' depending on how you compiled gromacs.

If you just want to know the energy of a structure based on a PDB file 
it's probably much smarter to just use the normal gromacs programs, read 
the file and perform '0' steps of any calculation. Since we're not 
updating the coordinates ( 0 steps) you will get the energy of the 
current structure. Usually this isn't very meaningful, since the 
structure was derived with a different forcefield, and you would need to 
perform at least an energy minimization to get a reasonable energy, but 
that all depends on what you want to do...



More information about the gromacs.org_gmx-developers mailing list