[gmx-developers] bug in 407 with charge groups

Berk Hess hess at cbr.su.se
Tue Nov 2 18:31:40 CET 2010


On 11/02/2010 06:23 PM, Justin A. Lemkul wrote:
>
>
> Berk Hess wrote:
>> On 11/02/2010 05:28 PM, Berk Hess wrote:
>>> On 11/02/2010 04:18 PM, David van der Spoel wrote:
>>>  
>>>> On 2010-11-02 16.02, Berk Hess wrote:
>>>>    
>>>>> Hi,
>>>>>
>>>>> There is a MAX_CHARGEGROUP_SIZE defined in forcerec.h.
>>>>> This can simply be lowered to 32 (with proper documentation next
>>>>> to 32).
>>>>>
>>>>>       
>>>> The 32 comes from the 32 bit for the t_excl type (unsigned long),
>>>> something completely different in other words. I put hard checks in
>>>> grompp for charge groups of 32 atoms now, this has been committed as
>>>> well.
>>>>
>>>>     
>>> Are you sure exactly 32 works fine and the limit is not 31?
>>> Then I will change the limit in forcerec.h.
>>> That check is even more important, since that is in mdrun where the
>>> actual limitation is.
>>>
>
> Wouldn't the code you added always print "The largest charge group
> contains 32 atoms. The maximum is 32." ?
>
>     if (maxsize > MAX_CHARGEGROUP_SIZE)
>     {
>         gmx_fatal(FARGS,"The largest charge group contains %d atoms.
> The maximum is 32.",MAX_CHARGEGROUP_SIZE);
>     }
>
>
> Would a more suitable change be:
>
>     if (maxsize > MAX_CHARGEGROUP_SIZE)
>     {
>         gmx_fatal(FARGS,"The largest charge group contains %d atoms.
> The maximum is %d.",maxsize,MAX_CHARGEGROUP_SIZE);
>     }
>
> -Justin
Hmm, time to go home I think. I'm doing more damage than good.

Thanks,

Berk




More information about the gromacs.org_gmx-developers mailing list