multiple fixed

Dear all

Is it possible to simultaneously have a fixed npt in your input? Every time you enter a fixed npt should also be unfix?please help me
Thank you,

This has been addressed many times on the mailing list. The rule is that you cannot apply multiple integrators to any single atom or group of atoms simultaneously. So you can apply NPT integrator 1 to a group of atoms A, and another NPT integrator 2 to a group of atoms B, but you can’t apply both 1 and 2 to A. If you don’t cancel an integrator after a run command, it will still be in force. After the run command, you can replace it by reissuing the fix command with the same fix ID and a new set of parameters, or unfix it. (If you unfix it before you run, you won’t use the integrator at all.)


Actually, for NPT this is a bad idea, and LAMMPS may thrown an error (can’t recall).
That is because each NPT calculates the pressure of the entire system (separate
from integrating the atom positions), and changes the box volume accordingly.
So you don’t want 2 NPT fixes changing the box volume. It also doesn’t matter

what group you use with fix NPT, it computes the pressure of the entire system,

since that’s the only thing that makes sense for influencing the box volume.