Dear lammps users
i defined a dynamic group in my inputfile and i want to count number of atoms in dynamic group,here is part of my input:
group oxygen type 2
group oxy dynamic oxygen every 1
variable n equal count(oxy)
fix 333 all print 100 “$n” file n.txt
i also use fix deposit command to deposit on a surface means number of atoms in dynamic group will increase,but n outputs are constant (only initial atoms in parent group) and a warning is printed in screen.
how to update number of atoms ?
WARNING: One or more dynamic groups may not be updated at correct point in timestep (…/fix_group.cpp:149)
Best Regard.
Dear lammps users
i defined a dynamic group in my inputfile and i want to count number of
atoms in dynamic group,here is part of my input:
group oxygen type 2
group oxy dynamic oxygen every 1
variable n equal count(oxy)
fix 333 all print 100 "$n" file n.txt
i also use fix deposit command to deposit on a surface means number of atoms
in dynamic group will increase,but n outputs are constant (only initial
atoms in parent group) and a warning is printed in screen.
this is the documented behavior. a dynamics group has to have a static
parent group. also, you need to set a rule to define that group,
either via a region or a variable.
how to update number of atoms ?
see above.
Dear lammps users
i defined a dynamic group in my inputfile and i want to count number of
atoms in dynamic group,here is part of my input:
group oxygen type 2
group oxy dynamic oxygen every 1
variable n equal count(oxy)
fix 333 all print 100 "$n" file n.txt
i also use fix deposit command to deposit on a surface means number of atoms
in dynamic group will increase,but n outputs are constant (only initial
atoms in parent group) and a warning is printed in screen.
how to update number of atoms ?
you don't need a dynamic group for that. please re-read the
documentation for fix deposit.
Dear Axel
you are right,i do not need to define dynamic group when using fix deposit .
thanks for your solution.
Best Regard.