<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br><br>> Date: Wed, 26 Nov 2008 17:25:10 +0100<br>> From: H.J.risselada@rug.nl<br>> To: gmx-users@gromacs.org<br>> Subject: Re: [gmx-users] Bugs in gromacs 4<br>> <br>> Jochen Hub wrote:<br>> > Jelger Risselada wrote:<br>> > <br>> >> Finally had a look through the gromacs 4.0 source code.<br>> >> Don't know if this bug/points already have been reported and changed in<br>> >> 4.0.2:<br>> >><br>> >> 1) There is never memory allocated for the pointers to the user defined<br>> >> groups:<br>> >><br>> >> mdatoms->cU1 etc.<br>> >> <br>> ><br>> > I'm not sure, but there is a<br>> ><br>> > /* The user should fix this */<br>> > if (FALSE)<br>> > srenew(md->cU1,md->nalloc);<br>> > if (FALSE)<br>> > srenew(md->cU2,md->nalloc);<br>> ><br>> > in ./src/mdlib/mdatom.c.<br>> ><br>> > You can remove the FALSE and get the memory allocation, I guess.<br>> ><br>> > Jochen<br>> ><br>> > <br>> A hardcoded if(FALSE) in the middle of no where with the command /*The <br>> user should fix this */ .<br>> How flexible...... ;-)<br>> <br>> greetings<br>> <br>> Jelger<br><br>That could indeed be done a bit more elegantly.<br>I committed a proper solution (see below).<br><br>Berk<br><br> /* Note that these user t_mdatoms array pointers are NULL<br> * when there is only one group present.<br> * Therefore, when adding code, the user should use something like:<br> * gprnrU1 = (md->cU1==NULL ? 0 : md->cU1[localatindex])<br> */<br> if (mtop->groups.grpnr[egcUser1] != NULL)<br> srenew(md->cU1,md->nalloc);<br> if (mtop->groups.grpnr[egcUser2] != NULL)<br> srenew(md->cU2,md->nalloc);<br><br><br /><hr />Express yourself instantly with MSN Messenger! <a href='http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/' target='_new'>MSN Messenger</a></body>
</html>