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">&lt;<a href="mailto:pcl@uab.edu" target="_blank">pcl@uab.edu</a>&gt;</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>
&gt;<br>
&gt;<br>
&gt; On 6/4/12 5:16 PM, Shay Teaching wrote:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; 2012/6/4 Justin A. Lemkul &lt;<a href="mailto:jalemkul@vt.edu">jalemkul@vt.edu</a> &lt;mailto:<a href="mailto:jalemkul@vt.edu">jalemkul@vt.edu</a>&gt;&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;     On 6/4/12 2:59 PM, Shay Teaching wrote:<br>
&gt; &gt;<br>
&gt; &gt;         Dear Gromacs users,<br>
&gt; &gt;<br>
&gt; &gt;         I want to write new analyses for gromacs and compile it (so I&#39;ll have<br>
&gt; &gt;         g_whatever) as part of the gromacs package.<br>
&gt; &gt;         Per the instructions I found on gromacs website, I installed kdevelop<br>
&gt; &gt;         and opened<br>
&gt; &gt;         the gromacs as a project using kdevelop. However I have two questions:<br>
&gt; &gt;         1) When I try to compile gromacs source, through kdevelop, I get a<br>
&gt; &gt;         &quot;permission<br>
&gt; &gt;         denied&quot; error. I think it is because gromacs installation requires root<br>
&gt; &gt;         privileges. Any suggestions on how to bypass that, so I won&#39;t have to use<br>
&gt; &gt;         kdevelop as root (which is a *really* bad idea)? (e.g., installing gromacs<br>
&gt; &gt;         without root?)<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;     Assuming you&#39;re trying to compile template.c in some system-level directory,<br>
&gt; &gt;     you&#39;re certain to run into that problem.  Compile in a different location.<br>
&gt; &gt;<br>
&gt; &gt; Actually, I tried installing Gromacs to my home directory, not system directory.<br>
&gt; &gt; You&#39;re saying that I&#39;m not supposed to encounter this error?<br>
&gt; &gt;<br>
&gt;<br>
&gt; You shouldn&#39;t have permission errors in your home directory.  I&#39;ve never used<br>
&gt; KDevelop; what happens if you try to compile from a normal command line?<br>
<br>
</div>My guess is that KDevelop isn&#39;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&#39;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&#39;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>