[gmx-developers] calculating interaction energy for more than 256 groups

Berk Hess hessb at mpip-mainz.mpg.de
Fri Nov 10 10:49:43 CET 2006


Florian Haberl wrote:

>Hi,
>
>i posted this 3 days ago in gmx at users, and no answer, if there is no easy 
>solution this would be a nice improvement for upcoming gromacs versions:
>
>i want to calculate an interaction energy matrix for more than 256 energy 
>groups.
>
>First grompp only accept 255 groups so  i changed in readir.c 
>
>#define MAXPTR 510
>#define NOGID  511
>
>(from 254 and 255)
>
>After that grompp writes out an tpr file and mdrun works without problems, but 
>than in the log file there are only interactions calculated for the first 256 
>energy groups.
>
>what do i have to change also or is this somewhere an hard limit?
>
>  
>
Group numbers are stored as unsigned chars in the atoms struct
(include/types/atoms.h), the mdatoms struct (include/types/mdatoms.h)
and in the tpx file (src/gmxlib/tpxio.c).
It could be that also files use some unsigned chars for group numbers.

If you change the type to int in these three files it should work,
but the tpr files would be incompatible with the standard Gromacs.

Berk.




More information about the gromacs.org_gmx-developers mailing list