[gmx-developers] Modification of g_mdmat tool and compiling
Joshua Adelman
jadelman at berkeley.edu
Fri Jan 16 20:41:50 CET 2009
Thank you all for your suggestions. I had inserted the corresponding
gmx_mdmat2 and g_mdmat2 into the Makefile.am in src/tools As Mark
suggested, I then went up to the top GROMACS directory and tried to run
On Jan 16, 2009, at 5:07 AM, Erik Lindahl wrote:
> Hi,
>
> On Jan 16, 2009, at 1:03 PM, Mark Abraham wrote:
>
>> Joshua Adelman wrote:
>>> I'm attempting to write a modified version of g_mdmat to do some
>>> custom analysis of a simulation trajectory. Since what I'm trying
>>> to do requires only slight modification of the code, I thought the
>>> easiest thing to do is just copy g_mdmat.c and gmx_mdmat.c to
>>> something like g_mdmat2.c and gmx_mdmat2.c and compile them in the
>>> src/tools directory (as opposed to writing something from scratch
>>> given the template in shared/template). I'm just having a little
>>> bit of difficulty getting the modified versions compiled and was
>>> hoping someone could point me in the right direction. Since the
>>> Makefile and Makefile.in are auto-generated, I believe I shouldn't
>>> be modifying them directly. I tried inserting duplicating the
>>> enteries in Makefile.am that reference the g_mdmat files, and then
>>> rerun ./configure, but I'm not getting any instructions for the
>>> 'g_mdmat2' tool in Makefile and Makefile.in.
>>
>> A more elegant solution than the one DvdS suggested, is to adapt
>> Makefile.am suitably (wherever g_mdmat(.*) appears, modify suitably
>> to add your version), return to the top-level GROMACS directory and
>> invoke automake to create the Makefile.in files. Then invoke
>> configure to create the Makefile files. Then things should work OK,
>> and the GROMACS build process will build and install your utility.
>>
>> You may run into versioning issues with the autotools. Invoking
>> autom4te or autoconf in the top-level GROMACS directory may help
>> resolve these. Test on a non-precious GROMACS build directory first!
>>
>> If you're working in the CVS version, there's a "bootstrap" script
>> that takes care of the invocation order for you. Grabbing a copy of
>> it to apply to your modified 4.0.2 distribution may streamline
>> things for you.
>
> In principle the autotools should actually detect and rebuild the
> files automatically for you when necessary, so ideally a "make" is
> enough even after modifying Makefile.am.
>
> One problem with this is that the build tools might end up re-
> running the configure and automake commands separately for every
> single subdirectory in your tree, and then it's much cheaper to do
> as Mark says - go to the top directory and issue the commands there
> manually.
>
> I've modified and included some libtool scripts in the release-4-0-
> patches CVS branch to reduce the autotools versioning issues for
> developers - in particular it should no longer matter whether you
> have libtool-1.x or 2.x installed. This will be included in 4.0.3
> that we in best case might get out today or tomorrow!
>
> Cheers,
>
> Erik
>
>
>
>
>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use thewww
> interface or send it to gmx-developers-request at gromacs.org.
------------------------------------------------------------------------------------------------------
Joshua L. Adelman
Biophysics Graduate Group Lab: 510.643.2159
218 Wellman Hall Fax: 510.642.7428
University of California, Berkeley http://nature.berkeley.edu/~jadelman
Berkeley, CA 94720 USA jadelman at berkeley.edu
------------------------------------------------------------------------------------------------------
More information about the gromacs.org_gmx-developers
mailing list