fix bond/create

By default groups are static, which means that atoms are assigned to them only once. If you want them to change during a simulation you have to make them dynamic.

Michal

I haven’t followed this thread, but your original Q was how

to make a new type 4 atom “stop”, as soon as it is created
by the fix bond/create command. I assume stop means

become motionless. That should happen if you only integrate

atoms that are in a group that does not include type=4 atoms.

If you define a dynamic group that is used by fix nve (for

example), I think you can do that. This can be done by using

an atom-style variable that evalutates to 1 for all types

except type 4. See the variable command and its

description of boolean operators.

Steve

Thank Steve and Michal!

I tried to use “group dynamic command” and “atom style variable command” (I wrote Input file below).
But the simulation stopped soon. I checked the motion of all particles by VMD, and I noticed the simulation stopped when type 1 were connected to type 2 and stopped their motion.

In output file, I got a warning, which is

WARNING: One or more dynamic groups may not be updated at correct point in timestep (…/fix_group.cpp:149)

I think that above two commands work to change type, group and stop motion, but still something wrong.

If you notice something wrong, please let me know.

Thank you very much for your kind cooperation!!

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

units lj

atom_style full
read_data NP_chains.np
neighbor 0.5 bin

variable G1 atom “type==1”
variable G4 atom “type==4”

group Edges dynamic all var G1 every 1
group NP type 2
group Chains type 3
group GP dynamic all var G4 every 1

special_bonds fene extra 100

bond_style hybrid fene harmonic

bond_coeff 1 fene 30.0 1.5 1.0 1.0
bond_coeff 2 harmonic 100.0 7.5

neigh_modify every 1 delay 0 check yes page 100000

pair_style lj/expand 1.12
pair_modify shift yes
pair_coeff 1 1 1.0 1.0 0.00 1.12
pair_coeff 1 2 1.0 1.0 6.50 1.12
pair_coeff 1 3 1.0 1.0 0.00 1.12
pair_coeff 1 4 0.0 1.0 0.00 1.12
pair_coeff 2 2 1.0 1.0 13.0 1.12
pair_coeff 2 3 1.0 1.0 6.50 1.12
pair_coeff 2 4 0.0 1.0 6.50 1.12
pair_coeff 3 3 1.0 1.0 0.00 1.12
pair_coeff 3 4 0.0 1.0 0.00 1.12
pair_coeff 4 4 0.0 1.0 0.00 1.12

fix 1 Chains nve
fix 2 Chains langevin 1.0 1.0 1.0 9024297
fix 3 Edges nve
fix 4 Edges langevin 1.0 1.0 1.0 9024297
fix 5 all bond/create 1 1 2 7.5 2 iparam 1 4 jparam 0 2

dump 1 all custom 10000 dump.s id type x y z

thermo 10000
thermo_style custom step temp ke etotal press vol
timestep 0.005
restart 100000 restart_temp_s1 restart_temp_s2
run 1000000
write_restart restart_s

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Makoto

You have to debug your script. E.g. run it without fix bond/create

and verify your dynamic groups have the correct atoms and fix

nve is doing what you expect. There are lots of things you

can output and check yourself.

Steve