From looking at the source code in fix gcmc and in region prism it looks to me as if the case of a non-orthogonal box for restricting the region for inserting atoms has not been considered.
If my understanding of the relevant source code is correct, the following modification should add the lacking triclinic cell support to this specific check.
diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp
index 063eeee7e8..384237391f 100644
--- a/src/MC/fix_gcmc.cpp
+++ b/src/MC/fix_gcmc.cpp
@@ -138,10 +138,18 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
region_zlo = region->extent_zlo;
region_zhi = region->extent_zhi;
- if (region_xlo < domain->boxlo[0] || region_xhi > domain->boxhi[0] ||
- region_ylo < domain->boxlo[1] || region_yhi > domain->boxhi[1] ||
- region_zlo < domain->boxlo[2] || region_zhi > domain->boxhi[2])
- error->all(FLERR,"Fix gcmc region extends outside simulation box");
+ if (triclinic) {
+ if ((region_xlo < domain->boxlo_bound[0]) || (region_xhi > domain->boxhi_bound[0]) ||
+ (region_ylo < domain->boxlo_bound[1]) || (region_yhi > domain->boxhi_bound[1]) ||
+ (region_zlo < domain->boxlo_bound[2]) || (region_zhi > domain->boxhi_bound[2]))
+ error->all(FLERR,"Fix gcmc region extends outside simulation box");
+ } else {
+ if ((region_xlo < domain->boxlo[0]) || (region_xhi > domain->boxhi[0]) ||
+ (region_ylo < domain->boxlo[1]) || (region_yhi > domain->boxhi[1]) ||
+ (region_zlo < domain->boxlo[2]) || (region_zhi > domain->boxhi[2]))
+ error->all(FLERR,"Fix gcmc region extends outside simulation box");
+
+ }
// estimate region volume using MC trials