More group and run every

Dear LAMMPS Users,

I have a two questions to ask.
First, The manual says that we can not define more than 32 groups. In my system, I have more than 50 polymer chain and for each chain i wanted to create some extra bond. so i need around 50 groups.
I tried to change the source code for maximum limit but after 32 groups atoms assigning to next groups are coming wrong. So is there any clever way to do such thing?

Second, i wanted to do couple of set type/fraction things after each step.
Can you just tell me what is right way to do it. i was defining like this but its giving error.
run 500 every “set type 1 type/fraction 3 0.5 8765 set type 2 type/fraction 1 0.5 1234 set type 3 type/fraction 2 0.5 6745”

Thank you very much.

Ankit Agrawal
The Institute of Mathematical Sciences
India

Dear LAMMPS Users,

I have a two questions to ask.
First, The manual says that we can not define more than 32 groups. In my system, I have more than 50 polymer chain and for each chain i wanted to create some extra bond. so i need around 50 groups.

Why do you need groups for that?

I tried to change the source code for maximum limit but after 32 groups atoms assigning to next groups are coming wrong. So is there any clever way to do such thing?

No. Groups are used as bitmasks. Changing this would require a massive change in the code. Essentially all cases where people claim to need more groups it turned out, they did things in the wrong way.

Second, i wanted to do couple of set type/fraction things after each step.
Can you just tell me what is right way to do it. i was defining like this but its giving error.

What error?

I need group like chain1 to chain50 because i have to use this command.

fix myid1 chain1 bond/create


fix myid50 chain50 bond/create

and each chain id is like
group chain1 molecule <> 1 1


group chain50 molecule <> 50 50

Is it possible to do above fix without defining 50 such groups. That’s why i was asking about more number of groups.

I need group like chain1 to chain50 because i have to use this command.
fix myid1 chain1 bond/create
...
...
fix myid50 chain50 bond/create

and each chain id is like
group chain1 molecule <> 1 1
...
group chain50 molecule <> 50 50

Is it possible to do above fix without defining 50 such groups. That's why i
was asking about more number of groups.

i don't understand what you are doing here. can't you just define the
bonds beforehand in your data file?

axel.

Yeah i already defined the initial bonds in each chain. The mentioned command will formed the bond between some special atoms. These extra bonds will keep on change during the simulation.
The main motto is that i don’t want any kind of inter interaction between the chains. All the interaction should be intra interaction (within chain).

Yeah i already defined the initial bonds in each chain. The mentioned
command will formed the bond between some special atoms. These extra bonds
will keep on change during the simulation.

this is not convincing. from this limited description it sounds like
you can do the same with just a single fix bond/create.

The main motto is that i don't want any kind of inter interaction between
the chains. All the interaction should be intra interaction (within chain).

and it is not clear at all, what this has to do with everything else.
i have to maintain, that most likely you are trying to do something in
a much more complicated fashion that what it needs to be like.

worst case scenario, you just write a custom fix (based on fix bond
create) that just does the bond addition in just the way you need.
since you can determine which chain belongs where, there is no reason
to use groups on top of that.

axel.

You could turn off interactions between any 2 molecules via neigh_modify exclude type M N

if you make the atoms in molecule 1 be of type 1, in mol 2 be of type 2, etc.

For 50 chains that is reasonable to do. For 5000 chains it would not be.

Steve