Dear Peter, <div>usually I use a simple Makefile like</div><div><br></div><div><br></div><div><div><br></div><div># Variables set by the configuration script:</div><div>GMX_HOME = /home/oteri/PKG/gromacs/4.5.5/gcc/</div>
<div>GMX_SRC = /home/oteri/PKG/sources/gromacs-4.5.5</div><div>GSL_HOME = /home/oteri/PKG//gsl/1.15/gcc</div><div>MOD_HOME = /home/oteri/PKG/utilities/src</div><div>MOD_BIN = /home/oteri/PKG/utilities/bin</div>
<div><br></div><div><br></div><div>LIBS = -lgmxana -lmd -lgmx -lgsl -lnsl -lm -lSM -lICE -lpthread -lgslcblas</div><div>LDFLAGS = -L$(GMX_HOME)/lib -L$(GSL_HOME)/lib $(LIBS)</div><div><br></div><div>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</div>
<div>CFLAGSD = -O3 -fomit-frame-pointer -finline-functions -Wno-unused -funroll-all-loops -std=gnu99 $(INCLUDE)</div><div>CFLAGS = -O0 -std=gnu99 -ggdb -O0 $(INCLUDE)</div><div>CC = gcc</div><div>
LD = $(CC)</div><div><br></div><div><br></div><div># The real make targets - note that most make programs support</div><div># the shortcut $^ instead of listing all object files a second</div><div># time, but we cannot count on it...</div>
<div><br></div><div>all: gmx_whatever</div><div><br></div><div><br></div><div>gmx_whatever:
gmx_whatever.o</div><div> $(LD) $(CFLAGS) $(LDFLAGS) -o $(MOD_BIN)/$@ $(@).o $(LIBS)</div></div><div><br></div><div><br></div><div><br></div><div>And it works fine!</div><div><br></div><div><br></div><div>
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....</div><div><br></div><div>Francesco</div><div><br></div>
<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">2012/6/4 Peter C. Lai <span dir="ltr"><<a href="mailto:pcl@uab.edu" target="_blank">pcl@uab.edu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 2012-06-04 05:23:10PM -0400, Justin A. Lemkul wrote:<br>
><br>
><br>
> On 6/4/12 5:16 PM, Shay Teaching wrote:<br>
> ><br>
> ><br>
> > 2012/6/4 Justin A. Lemkul <<a href="mailto:jalemkul@vt.edu">jalemkul@vt.edu</a> <mailto:<a href="mailto:jalemkul@vt.edu">jalemkul@vt.edu</a>>><br>
> ><br>
> ><br>
> ><br>
> > On 6/4/12 2:59 PM, Shay Teaching wrote:<br>
> ><br>
> > Dear Gromacs users,<br>
> ><br>
> > I want to write new analyses for gromacs and compile it (so I'll have<br>
> > g_whatever) as part of the gromacs package.<br>
> > Per the instructions I found on gromacs website, I installed kdevelop<br>
> > and opened<br>
> > the gromacs as a project using kdevelop. However I have two questions:<br>
> > 1) When I try to compile gromacs source, through kdevelop, I get a<br>
> > "permission<br>
> > denied" error. I think it is because gromacs installation requires root<br>
> > privileges. Any suggestions on how to bypass that, so I won't have to use<br>
> > kdevelop as root (which is a *really* bad idea)? (e.g., installing gromacs<br>
> > without root?)<br>
> ><br>
> ><br>
> > Assuming you're trying to compile template.c in some system-level directory,<br>
> > you're certain to run into that problem. Compile in a different location.<br>
> ><br>
> > Actually, I tried installing Gromacs to my home directory, not system directory.<br>
> > You're saying that I'm not supposed to encounter this error?<br>
> ><br>
><br>
> You shouldn't have permission errors in your home directory. I've never used<br>
> KDevelop; what happens if you try to compile from a normal command line?<br>
<br>
</div>My guess is that KDevelop isn't re-running configure and/or ccmake to set<br>
PREFIX correctly before make.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
gmx-users mailing list <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
Please don't post (un)subscribe requests to the list. Use the<br>
www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Cordiali saluti, Dr.Oteri Francesco<br>
</div>