Recently , I want to add a fix to lammps. When I read the related fix code,I am puzzled by this question below.
When both two fixs execute final_integrate() method, its final result rely on the sequence of these two fixs defined in input script, right??? For example,
these two command
fix 1 group-id nve
fix 1 group-id move linear 0.0 0.0 2.0
equal only this one
fix 1 group-id move linear 0.0 0.0 2.0
As fix group is the same, who defines later, who will actually take effective. Am I right???
Thanks for any kind heated help.
|
Recently , I want to add a fix to lammps. When I read the related fix code,I am puzzled by this question below.
When both two fixs execute final_integrate() method, its final result rely on the sequence of these two fixs defined in input script, right??? For example,
these two command
fix 1 group-id nve
fix 1 group-id move linear 0.0 0.0 2.0
equal only this one
fix 1 group-id move linear 0.0 0.0 2.0As fix group is the same, who defines later, who will actually take effective. Am I right???
the group id doesn't matter, but the fix label (1) does.
in any case, replacing a fix with a different one without
first using unfix on the fix label is an error and will
abort lammps.
axel.
Aside from Axel's point, an
important Q is whether you want
to "integrate" the same atoms twice.
Usually you don't. In which case
you can use multiple fix commands
on non-intersecting groups of atoms.
Then it doesn't matter what order you specify
the fixes in.
Steve