[gmx-users] how to compile and make a C analyzing code under GROMACS 5.0

qiaobf qiaobf at gmail.com
Thu Jul 24 23:47:10 CEST 2014

Dear all,

Please help me out. Thanks in advance.

I had written some analyzing codes, which can be easily compiled under 
Gromacs 4.5.5. Since I switched to GMX 5.0 weeks ago, I want to 
re-compile them under GMX5.0. But the GMX5.0 seems quite different from 
GMX4.5.5. Anyone can help me? Thanks a lot!

I have tried the following methods:
1)  (a) save the gmx_density2.c under 
$HOME/programmes/backup/gromacs-5.0/src/gromacs/gmxana, which is the 
folder to save all the gmx_XXX.c analyzing codes under the distribution 
      (b) re-install the whole package of GMX5.0 (cmake-->make--->make 
install). I got no error message. All regular analyzing programs are 
correctly installed, but not the gmx_density2!
2) (a) run "source $HOME/programmes/GROMACS-5.0/bin/GMXRC";
     (b) save the gmx_density2.c under 
$HOME/programmes/GROMACS-5.0/share/gromacs/template, which is under the 
executable folder;
     (c) modify the content of CMakeList.txt to change "template" to 
"gmx_density2", and "template.cpp" to "gmx_density2.c";
     (d) run "cmake .". No error message, and the Makefile and the 
folder CMakeFiles are created;
     (e) run "make". Then I get the error message
> gmx_density2.c:42:22: fatal error: sysstuff.h: No such file or directory
>  #include "sysstuff.h"
>                       ^
> compilation terminated.
> make[2]: *** [CMakeFiles/gmx_density2.dir/gmx_density2.c.o] Error 1
> make[1]: *** [CMakeFiles/gmx_density2.dir/all] Error 2
> make: *** [all] Error 2

best wishes,

More information about the gromacs.org_gmx-users mailing list