[gmx-developers] energy calculation (fwd)

Vibin R vinu at btc.iitb.ac.in
Tue Mar 12 10:14:31 CET 2002

Dear sir,
  This mail is a continuation of earlier responses. The earlier mails are 
also enclosed.
	I am unable to locate the <arch> thing. There is a directory
by the name gmxlib, but not really a file that can be included. When I try
to include that directory, there is an error message like, cannot find
-lgmxlib. there is an i686-pc-linux-gnu directory in the gromacs directory.
 This does have a directory by the name lib. But there is no file by the
name gmxlib. And so the compiler is unable to locate the same. 
Could you spread some light on the matter as to what probably could be
missing here. Sir, I really need this routine working for successful
working and testing of my algorithms. Hope it can be done. 

Thanking you for your very sincere responses

> First build gromacs in the normal way and install it. If you don't 
> change the default installation prefix, it will be installed to 
> /usr/local/gromacs, and you can find the gromacs libraries in 
> /usr/local/gromacs/<arch>/lib.
> If you have written code in the file mycode.c (which uses the energy 
> function in calc_energy.c), you should include calc_energy.c when you 
> compile your code, and link with the gromacs library. This is done by 
> (1) telling the compiler/linker to search the directory where the 
> library is located (using the -L flag) and (2) by telling it to include 
> that library (with the -l flag).
> cc mycode.c calc_energy.c -L/usr/local/gromacs/<arch>lib -lgmxlib
> (You might also have to include -lmdlib if there are unresolved 
> functions). If it is complaining about not finding a definition for the 
> mcinl1100 function you can copy and #include the file inner.h from 
> /usr/local/gromacs/src/gmxlib.
> Sorry if this is complicated, but it's not really supported yet - from 
> version 4.0 this should be MUCH simpler, and it will be carefully 
> documented.
> Cheers,
> Erik


More information about the gromacs.org_gmx-developers mailing list