[gmx-users] Bugs in gromacs 4
gmx3 at hotmail.com
Thu Nov 27 11:31:28 CET 2008
> Date: Wed, 26 Nov 2008 17:25:10 +0100
> From: H.J.risselada at rug.nl
> To: gmx-users at gromacs.org
> Subject: Re: [gmx-users] Bugs in gromacs 4
> Jochen Hub wrote:
> > Jelger Risselada wrote:
> >> Finally had a look through the gromacs 4.0 source code.
> >> Don't know if this bug/points already have been reported and changed in
> >> 4.0.2:
> >> 1) There is never memory allocated for the pointers to the user defined
> >> groups:
> >> mdatoms->cU1 etc.
> > I'm not sure, but there is a
> > /* The user should fix this */
> > if (FALSE)
> > srenew(md->cU1,md->nalloc);
> > if (FALSE)
> > srenew(md->cU2,md->nalloc);
> > in ./src/mdlib/mdatom.c.
> > You can remove the FALSE and get the memory allocation, I guess.
> > Jochen
> A hardcoded if(FALSE) in the middle of no where with the command /*The
> user should fix this */ .
> How flexible...... ;-)
That could indeed be done a bit more elegantly.
I committed a proper solution (see below).
/* Note that these user t_mdatoms array pointers are NULL
* when there is only one group present.
* Therefore, when adding code, the user should use something like:
* gprnrU1 = (md->cU1==NULL ? 0 : md->cU1[localatindex])
if (mtop->groups.grpnr[egcUser1] != NULL)
if (mtop->groups.grpnr[egcUser2] != NULL)
Express yourself instantly with MSN Messenger! Download today it's FREE!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gromacs.org_gmx-users