[gmx-developers] User Defined Input Values
David van der Spoel
spoel at xray.bmc.uu.se
Fri Sep 13 08:57:20 CEST 2002
On Fri, 2002-09-13 at 08:47, Gerrit Groenhof wrote:
> Hi Hank,
>
> >I'm trying to modify the code slightly and am a little bit lost...
> >
> >I would like access to the user defined inputs (userreal1 etc.) within the
> >posres() function inside of bondfree.c
> >
> You only want to use the userint, and userreals, right?
>
> In that case the easiest, but maybe not the cleanest, way would be to
> add userreal and userint elements to one of the structs that is passed
> on to posres, like the forcerec for instance. Then you can fill this
> userelement(s) when the forcere struct itself gets initiated and
> filled by init_forcerec (force.c) with the parameters stored in the
> inputrec. The user variables get read into the inputrec by grompp, but
> are not used furtheron in the code. The good thing is that if a user
> wants to use some extra input variables they he uses the userint/reals
> and doesn't have to modify the horrible(!!) grompp code.
THis is roughly correct, apart from the fact that the grompp code is
really elegant... My joy and pride has been running for more than 10
years! The ugly bit is mainly in writing tpr files....
Gerrit's description of group use is also correct.
--
Groeten, David.
________________________________________________________________________
Dr. David van der Spoel, Biomedical center, Dept. of Biochemistry
Husargatan 3, Box 576, 75123 Uppsala, Sweden
phone: 46 18 471 4205 fax: 46 18 511 755
spoel at xray.bmc.uu.se spoel at gromacs.org http://zorn.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
More information about the gromacs.org_gmx-developers
mailing list