[lammps-users] number of groups in LAMMPS


Hi,

If the source code is modified such that the number of groups is more than 32, is it just as simple as change the number in the group.cpp file? What else do I need to watch out for? Thanks a lot.

Albert To
|

albert,

you cannot change the number of groups easily. i once fell into
the trap of believing that changing the maximum number of groups
was enough myself. the flags which group an atom belongs to are
stored as a bitmask in an 'int' and that has 32-bits on all current
platforms and changing this to something larger or using two 'int's
for that purpose would require a major code revamp.

that being said, most if not all cases where people felt they
needed more groups, have been resolved to use some other means,
e.g. a custom 'fix'. at least in my case that worked.

cheers,
   axel.

Axel,

Thanks very much for your info.

-Albert-




> <br>> albert,<br>> <br>> you cannot change the number of groups easily. i once fell into<br>> the trap of believing that changing the maximum number of groups<br>> was enough myself. the flags which group an atom belongs to are<br>> stored as a bitmask in an 'int' and that has 32-bits on all current<br>> platforms and changing this to something larger or using two 'int's<br>> for that purpose would require a major code revamp.<br>> <br>> that being said, most if not all cases where people felt they <br>> needed more groups, have been resolved to use some other means,<br>> e.g. a custom 'fix'. at least in my case that worked.<br>> <br>> cheers,<br>> axel.<br>> <br>> On Sun, 2009-04-05 at 18:27 -0700, Albert To<br>> wrote:<br>> > Hi,<br>> > <br>> > If the source code is modified such that the number of groups is more<br>> > than 32, is it just as simple as change the number in the group.cpp<br>> > file? What else do I need to watch out for? Thanks a lot.<br>> > <br>> > <br>> > <br>> > Albert To<br>> > <br>> ><br>> ------------------------------------------------------------------------------<br>> > _______________________________________________<br>> > lammps-users mailing list<br>> > [email protected]<br>> > https://lists.sourceforge.net/lists/listinfo/lammps-users<br>> <br>> -- <br>> =======================================================================<br>> Axel Kohlmeyer [email protected] http://www.cmm.upenn.edu<br>> Center for Molecular Modeling -- University of Pennsylvania<br>> Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323<br>> tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel:<br>> 1-215-898-5425<br>> =======================================================================<br>> If you make something idiot-proof, the universe creates a better idiot.<br>> <br>>

|

If you want to address group of atoms and have more than 32 (including ‘all’) groups to address you can also try to exploit the molecular ID option. I grouped atoms and gave different molecular ID and used that ID to identify each group. However i assume that you are not using the molecular ID feature otherwise.

Arnab