From a9fe42bea4f37726d13bdce9f3579f4e929af8af Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 16 Apr 2025 06:21:11 -0400 Subject: [PATCH] fix bug reported in issue #4551 --- src/displace_atoms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index b9eb121b3d..3ab9fd665d 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -125,7 +125,7 @@ void DisplaceAtoms::command(int narg, char **arg) else if (strcmp(arg[2],"y") == 0) d_dim = 1; else if (strcmp(arg[2],"z") == 0) d_dim = 2; else error->all(FLERR, 2, "Unknown displace_atoms ramp dimension {}", arg[2]); - if ((domain->dimension == 2) && (d_dim = 2)) + if ((domain->dimension == 2) && (d_dim == 2)) error->all(FLERR, 2, "Must not displace atoms in z-direction with 2d system"); double d_lo,d_hi;