[lammps-users] Error: too many groups

Hi all,

How can i increase the group #s allowable in lammps code. It should not be difficult to do this but i just can not find the corresponding source code. Can somebody kindly let me know? I want to increase to 100 or more.

Best regards,

Ajing Cao

Hi all,

How can i increase the group #s allowable in lammps code. It should not be
difficult to do this but i just can not find the corresponding source code.

sorry, but it is not very simple. it would be _very_ complicated
and would require a _lot_ of coding. this topic has been discussed
on the list many times before. just search the list archives.

Can somebody kindly let me know? I want to increase to 100 or more.

why do you need those?

typically when people believed they needed more groups
in the past, it turned out that this was not needed, i.e. that
there were other, often much better ways to do the same.

cheers,
     axel.

Axel,

Thanks for your reply.

Yeah, of course there are other alternative ways to achieve this. But i thought this could be the most convenient way to do without modifying source code.

Here is what I want to do:

I have a circular computation domain which need to be divided into small sub-domains, in both radial and peripheral directions (that is r, t in cylinder coordinate system). Unfortunately, this can not be done with command “region …” since it only allow to subdivide the region in x,y,z direction. So I figured that I could write myself a code to assign these atoms in the sub-domain with different type ids and group these atoms with the different type id #s.

That’s why i need so many group #s.

If you can think of other easy ways, i would appreciated.

Thanks,

Ajing

Axel,

Thanks for your reply.

Yeah, of course there are other alternative ways to achieve this. But i
thought this could be the most convenient way to do without modifying source
code.

Here is what I want to do:

I have a circular computation domain which need to be divided into small
sub-domains, in both radial and peripheral directions (that is r, t in
cylinder coordinate system). Unfortunately, this can not be done with
command "region ..." since it only allow to subdivide the region in x,y,z
direction. So I figured that I could write myself a code to assign these

why can this not be done with region?
there is a cylinder primitive that seems perfectly
suitable to subdivide an area like you describe.

furthermore, how should that be working with
groups, since groups have fixed particle assignments?

axel.

The " region cylinder " command can not divide domains into sub-region along peripheral direction.

I assigned atoms in same region with same type id then group these atoms according to their type id.

Best,

Ajing

The " region cylinder " command can not divide domains into sub-region along
peripheral direction.

sure it can. just define a series of cylinders with increasing radius
and then take the intersection of two successive ones. viola!

I assigned atoms in same region with same type id then group these atoms
according to their type id.

...and what would happen, if an atom moves to a different section?

cheers,
     axel.

You haven't said what you want to do with the atoms
in the different geometric regions.

Steve

steve,

Basically, I wanted calculate the temperature distribution over the
simulation domain, which is a circle. Specifically i want the bin is
not in x,y,z direction. The bin is in cylindrical r, t direction.

If it is cubic box, then i can use the " fix ave/spatial " command as
follows. However, seems this command does not allow me to get a temp
profile along r and t direction.

compute ke all ke/atom
variable temp atom c_ke[]/(1.5*8.617e-5)
fix 10 all ave/spatial 1 200000 200000 x low 50. v_temp &
                 file tmp.profile

Could you direct me to the right place?

Thanks,

Ajing

Hi Ajing,

So your question seems like how to obtain the temperature distribution of a nanotube along the axial and peripheral directions? If so, I think you can do a post-processing of your simulation data to solve it. If you save the position coordinates and the velocity of atoms at the same time, you can calculate the temperature anywhere and get the temperature distribution at the region you want.

Best!

Dongshan

Hi Ajing,

So your question seems like how to obtain the temperature distribution of a
nanotube along the axial and peripheral directions? If so, I think you can
do a post-processing of your simulation data to solve it. If you save the
position coordinates and the velocity of atoms at the same time, you can
calculate the temperature anywhere and get the temperature distribution at
the region you want.

the other alternative would be to implement a version of
fix ave/spatial that collects the information in the desired way.

it still escapes me, how this could be done with hundreds of
groups since group assignments are static. ...unless the system
has no diffusion particles, that is.

cheers,
     axel.

Hi Ajing,

What about grouping the atoms into molecules and then writing a
compute ke/molecule or something like that?

Zhun-Yong

If you want the KE/temp of an odd-shaped geometric
collection of atoms, I think you will have to post-process it.

Steve

Dongshan,

Thanks. The problem is "temperature" is average of atomic velocity
over time. I dont think the instantaneous temp will have physical
meaning. I could not dump all the velocity for thousands time frames.
That data is huge. So it has to be done on-fly.

Best,

Ajing

Zhun-Yong,

Thanks for your suggestion. I've seen somebody else had already used
the same idea in the past thread. You mean add a new compute
"ke/molecule" ? If so, i would love to do that.

Best,

Ajing

Axel,

The group can be updated with iteratively using "group delete"
command "group ...." every given time steps.

Ajing

Steve,

That's sad news. Maybe i should consider just choosing two paths. That
will limit the group #s.

Thanks,

Ajing

Hi Ajing,

A new compute 'ke/molecule' will be great and would serve your purpose
because there is no limit to the number of molecules. Writing it
shouldn't be too difficult, I think.

Zhun-Yong

Zhun-Yong,

Sounds doable, I will try.

Thanks for your help.

Ajing

Molecule assignments are also static. So you need to
decide whether you want the temperature of atoms in a
geometric region (which will change over time), or atoms
in a molecule (or group), which will not change.

Steve

Steve,

For my particular problem (a solid without much displacement), i think static assignment is not that bad. Especially when i average over big region, statistically only a few atoms coming in and out does not make much difference.

Ajing