[gmx-users] Writing and compiling new analyses for gromacs

francesco oteri francesco.oteri at gmail.com
Mon Jun 4 23:48:27 CEST 2012


Dear Peter,
usually I use a simple Makefile like



# Variables set by the configuration script:
GMX_HOME     = /home/oteri/PKG/gromacs/4.5.5/gcc/
GMX_SRC      = /home/oteri/PKG/sources/gromacs-4.5.5
GSL_HOME     = /home/oteri/PKG//gsl/1.15/gcc
MOD_HOME     = /home/oteri/PKG/utilities/src
MOD_BIN      = /home/oteri/PKG/utilities/bin


LIBS         = -lgmxana -lmd -lgmx -lgsl  -lnsl -lm   -lSM -lICE  -lpthread
-lgslcblas
LDFLAGS      = -L$(GMX_HOME)/lib -L$(GSL_HOME)/lib  $(LIBS)

INCLUDE      =-I/usr/X11R6/include -I/usr/include/libxml2  -I
$(GSL_HOME)/include  -I$(GMX_HOME)/include -I$(GMX_HOME)/include/gromacs
-I$(GMX_SRC)/src/tools #-DDEBUG
CFLAGSD      = -O3 -fomit-frame-pointer -finline-functions  -Wno-unused
-funroll-all-loops  -std=gnu99   $(INCLUDE)
CFLAGS      = -O0 -std=gnu99 -ggdb -O0  $(INCLUDE)
CC           = gcc
LD           = $(CC)


# The real make targets - note that most make programs support
# the shortcut $^ instead of listing all object files a second
# time, but we cannot count on it...

all: gmx_whatever


gmx_whatever:  gmx_whatever.o
                $(LD) $(CFLAGS)   $(LDFLAGS) -o $(MOD_BIN)/$@ $(@).o $(LIBS)



And it works fine!


Regardiing the common function used, the only help I found is the gromacs
source code. There are functions to read/write topology, frames, odb/gro
file and so on....

Francesco














2012/6/4 Peter C. Lai <pcl at uab.edu>

> On 2012-06-04 05:23:10PM -0400, Justin A. Lemkul wrote:
> >
> >
> > On 6/4/12 5:16 PM, Shay Teaching wrote:
> > >
> > >
> > > 2012/6/4 Justin A. Lemkul <jalemkul at vt.edu <mailto:jalemkul at vt.edu>>
> > >
> > >
> > >
> > >     On 6/4/12 2:59 PM, Shay Teaching wrote:
> > >
> > >         Dear Gromacs users,
> > >
> > >         I want to write new analyses for gromacs and compile it (so
> I'll have
> > >         g_whatever) as part of the gromacs package.
> > >         Per the instructions I found on gromacs website, I installed
> kdevelop
> > >         and opened
> > >         the gromacs as a project using kdevelop. However I have two
> questions:
> > >         1) When I try to compile gromacs source, through kdevelop, I
> get a
> > >         "permission
> > >         denied" error. I think it is because gromacs installation
> requires root
> > >         privileges. Any suggestions on how to bypass that, so I won't
> have to use
> > >         kdevelop as root (which is a *really* bad idea)? (e.g.,
> installing gromacs
> > >         without root?)
> > >
> > >
> > >     Assuming you're trying to compile template.c in some system-level
> directory,
> > >     you're certain to run into that problem.  Compile in a different
> location.
> > >
> > > Actually, I tried installing Gromacs to my home directory, not system
> directory.
> > > You're saying that I'm not supposed to encounter this error?
> > >
> >
> > You shouldn't have permission errors in your home directory.  I've never
> used
> > KDevelop; what happens if you try to compile from a normal command line?
>
> My guess is that KDevelop isn't re-running configure and/or ccmake to set
> PREFIX correctly before make.
>
>
> --
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>



-- 
Cordiali saluti, Dr.Oteri Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20120604/f410a03b/attachment.html>


More information about the gromacs.org_gmx-users mailing list