I have a problem about the "fix rigid/nvt" command in the latest version of Lammps.
my simulation box is non-periodic in Z- direction, the command is :
boundary p p s
I want to keep the molecules as rigid bodies and perform constant NVT integration, the command is :
fix NVT mol rigid/nvt molecule temp 3.47 3.47 5.0
there was no problem in the old version of Lammps without "fix rigid/npt" and "fix rigid/nph" commands, but in the latest version, it reports an error:
ERROR: Cannot use fix rigid npt/nph with non-periodic dimension (fix_rigid_nh.cpp:59)
I am 100% sure that I am not using "fix rigid/npt" or "fix rigid/nph" command in my script.
At fix_rigid_nh.cpp, line 58, the code is :
"Cannot use fix rigid npt/nph with non-periodic dimension");
as I understand, it may need one more condition in the if sentence to exclude the NVT integration.
please use the attached fix_rigid_nh.cpp for recompilation. You are
right that the error check at line 58 is incorrect for rigid/nvt. I
removed that portion of the code because there are already other
checks for the nonperiodic dimensions (lines 80-88) when barostats are
used with fix rigid npt/nph.
Let me know if the new version of the source file works.
@@ -55,10 +55,7 @@ FixRigidNH::FixRigidNH(LAMMPS *lmp, int narg, char **arg) :
(p_flag == 1 && p_period <= 0.0) ||
(p_flag == 1 && p_period <= 0.0))
error->all(FLERR,"Fix rigid npt/nph period must be > 0.0");
- if (domain->nonperiodic)
- "Cannot use fix rigid npt/nph with non-periodic dimension");
fix_rigid_nh.cpp (40.6 KB)
Hi Wei, glad to hear that. Thanks for pointing out the issue.
Steve: could you please include the updated fix_rigid_nh.cpp in this
thread in the next patch?
will be in the next patch - thanks