[gmx-users] Re: modify bondfree.c and recompile

Jian Zou jianzou at gmail.com
Wed Oct 22 16:06:44 CEST 2008


Hi Mark, David and Bess,

Thank you all for the suggestions.


I know the dependency has to be somewhere in the Makefiles or the
files they include but I cannot find it. What I am doing is simply
"make" under top-level source directory followed by make install. In
this case, the content of all the files (except the RC files) under
bin and lib will be rebuild and differ from the previous build, even
from the same source.

Berk told me to do "make" in src/gmxlib. I checked the top-level
Makefile and the the rules for "make mdrun" is "make" under
src/gmxlib, src/mdlib and src/kernel, so it seems for my case "make
mdrun" then "make install-mdrun" should be enough to update the
binary, but how about the library?

The potential I am working is 1D only instead of 3D, therefore the
tabulated bonded/nonbond potential may not apply to my problem.
"Walls" with wall_type=table in gmx4 could be a solution. But  I do
not find the implementation details like Chapter 6.7 for tabulated
nonbond interaction, and therefore do not know how to make
interactions of each atomtype with the wall different.


Hi Yang He,

I started from Appendix B.4, where the files to be modified for bonded
potential are listed (Files No.6 and No.12 are the same). You may also
have a look at include/physics.h and include/vec.h.


Regards,

Jian

On Wed, Oct 22, 2008 at 3:40 AM,  <gmx-users-request at gromacs.org> wrote:
>
> Message: 1
> Date: Wed, 22 Oct 2008 11:57:46 +1100
> From: Mark Abraham <Mark.Abraham at anu.edu.au>
> Subject: Re: [gmx-users] modify bondfree.c and recompile
> To: Discussion list for GROMACS users <gmx-users at gromacs.org>
> Message-ID: <48FE7A8A.3000704 at anu.edu.au>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Jian Zou wrote:
>> Hi,
>>
>> If I only change some functional form in bondfree.c (the number of
>> parameters are kept the same), can I just do "make mdrun" and "make
>> install-mdrun" to recompile from the source?
>>
>> I cannot find the dependency between the source files and the Gromacs
>> utilities (grompp and mdrun).
>
> It's there in the Makefiles, but you don't need to know about it. Just
> use make (or just make mdrun) from the top-level source directory.
>
>> I compare the tpr file generated before and after the change and they
>> are the same. Therefore it seems to me that grompp does not read the
>> formulation of bonded interactions, am I right?
>
> grompp isn't changing, so its output is the same. All it does is
> interpret the contents of your .top file and tell mdrun which function
> to use.
>
> Mark


> Message: 5
> Date: Wed, 22 Oct 2008 08:09:17 +0200
> From: David van der Spoel <spoel at xray.bmc.uu.se>
> Subject: Re: [gmx-users] modify bondfree.c and recompile
> To: Discussion list for GROMACS users <gmx-users at gromacs.org>
> Message-ID: <48FEC38D.8060907 at xray.bmc.uu.se>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> He, Yang wrote:
>> Hi Jian,
>>
>> Do you also need to change the source code to get a new potential function? I am also engaged in this job. DO you have any experience about this job?
>>
>>
> You can use tables for bonded potentials as well, without changing any code.
>
>> Regards,
>>
>> Yang
>> ________________________________________
>> From: gmx-users-bounces at gromacs.org [gmx-users-bounces at gromacs.org] On Behalf Of Jian Zou [jianzou at gmail.com]
>> Sent: Tuesday, October 21, 2008 7:24 AM
>> To: gmx-developers at gromacs.org; gmx-users at gromacs.org
>> Subject: [gmx-users] modify bondfree.c and recompile
>>
>> Hi,
>>
>> If I only change some functional form in bondfree.c (the number of
>> parameters are kept the same), can I just do "make mdrun" and "make
>> install-mdrun" to recompile from the source?
>>
>> I cannot find the dependency between the source files and the Gromacs
>> utilities (grompp and mdrun).
>>
>> I compare the tpr file generated before and after the change and they
>> are the same. Therefore it seems to me that grompp does not read the
>> formulation of bonded interactions, am I right?
>>
>> Thank you very much for the reply.
>>
>>
>> Regards,
>>
>> Jian
>> _______________________________________________
>> gmx-users mailing list    gmx-users at gromacs.org
>> http://www.gromacs.org/mailman/listinfo/gmx-users
>> Please search the archive at http://www.gromacs.org/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/mailing_lists/users.php
>> _______________________________________________
>> gmx-users mailing list    gmx-users at gromacs.org
>> http://www.gromacs.org/mailman/listinfo/gmx-users
>> Please search the archive at http://www.gromacs.org/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/mailing_lists/users.php
>
>
> --
> David.
> ________________________________________________________________________
> David van der Spoel, PhD, Professor of Biology
> Dept. of Cell and Molecular Biology, Uppsala University.
> Husargatan 3, Box 596,          75124 Uppsala, Sweden
> phone:  46 18 471 4205          fax: 46 18 511 755
> spoel at xray.bmc.uu.se    spoel at gromacs.org   http://folding.bmc.uu.se
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



More information about the gromacs.org_gmx-users mailing list