How to change a simulation box

Hello EMC,
Currently, I am building the semi-crystalline PE with chain stems titled so that the {201} crystallographic plane is normal to the z direction. I made the system (4 * 6 * 100) like below

However, I want to change the angle of simulation box, beta, to be 89.8 degree.
I guess the “deform command” in 5.7 (docs) should be used.
Is there any advice you can offer?

Below is my build.emc for semi-crystalline PE.

(* create a semicrystalline polyethylene input structure by using a 
   crystalline polyethylene unit cell *)

(* set variables *)

variables	= {
  input		-> $root+"lib/polyethylene.emc",
  output	-> "pe",
  ncycles	-> 100,
  nblocks	-> 1,
  seed		-> 1
};

(* load unit cell *)

get		= {name -> input};

(* set random seed *)

simulation	= {units -> {seed -> seed}};

(* create a supercell, using a 201 crystal facet cut, based on a 001
   coordination *)

crystal		= {n -> {4, 6, 100},merge -> true,periodic ->{false, false, false}};

(* immobilize the crystalline region 100% crystallinity*)

flag		= {flag -> fixed, oper -> set,
		    region -> {shape -> cuboid, center -> {0, 0, 1/2},
		      radius -> {1, 1, 50/100}}};

(* cut 0 polymer chains within a selected region to accomodate PE molecular
   mass *)

cut		= {n -> 0,
		    region -> {shape -> cuboid, center -> {0, 0, 0},
		      radius -> {1, 1, (1-6/9/5)/2-1/5}}};

(* remove a maximum of 0 end beads within a selected region to accomodate
   the target amorphous density and PE molecular mass *)

remove		= {n -> 0, mode -> cluster,
		    region -> {shape -> cuboid, center -> {0, 0, 0},
		      radius -> {1, 1, (1-6/9/5)/2-1/5}}};

(* terminate all chains with the apropriate termination methyl group *)

terminate	= {mode -> all};

(* set system *)

simulation	= {
  types -> {
    applied	-> true
  },
  systems -> {
    properties	-> {
      {id	-> 0, t -> 10000}}},
  moves -> {
    displace 	-> {frequency -> 51},	(* specify move frequencies *)
    rebridge 	-> {frequency -> 14},
    reptate 	-> {frequency -> 7},
    endbridge 	-> {frequency -> 14},
    rotate 	-> {frequency -> 14}},
  types -> {
    virial	-> false,		(* do not calculate virial *)
    neighbor	-> sector,		(* use sectors to find neighbors *)
    stencil	-> standard,		(* use standard stencil *)
    skin	-> 0.0,			(* use no skin *)
    standard	-> {
      correct -> {active -> false}}}};	(* add long range correction *)

(* check force calculations *)

force		= {style -> init, message -> true};
force		= {style -> list, message -> true};

(* check memory usage *)

memory		= {style -> full};


(* execute a monte carlo simulation for ncycles *)

run		= {ncycles -> ncycles, nblocks -> nblocks, cycle -> 0};

Simply saying, I want to make a orthorhombic simulation cell with chain tilted.
Thank you.

Dear user,

The shape of your simulation box is dependent on the original unit cell, which in the case of crystalline 201 PE is not orthorhombic. Therefore one would be advised not to change the box shape as to avoid severe tension in the crystal – or worse – break crystal periodicity.

Having said that, you can have EMC deform boxes for you using the EMC scripting deform command. Below is a simple example for a generic system, in which a orthorhombic box is deformed for 20% in the positive yx direction.

#!/usr/bin/env emc.pl
#
#  script:	setup.esh
#  author:	Pieter J. in 't Veld
#  date:	January 12, 2025
#  purpose:	Example for using EMC setup chemistry mode
#

# Options section

ITEM	OPTIONS

replace		true
field		dpd/general
ntotal		1000
density		3
focus		true
emc_execute	true

ITEM	END	# OPTIONS

# Shorthand section

ITEM	SHORTHAND

molecule	(C)8,1

ITEM	END	# SHORTHAND

# EMC section; placed after build in build.emc

ITEM	EMC	stage=1	spot=2

deform		= {
  mode		-> affine,	// sets how to change site positions; either
				// 'none' where no operation on site positions
				// is performed, or 'affine' where the site
				// positions are deformed affinely;
				// alternatively, 'tighten' can be used, but 
				// this option is meant to delete spurious
				// vacuum space
  type		-> relative,	// 'relative' or 'absolute'
  system	-> 0,		// deform first system
  frequency	-> 1,		// after each cycle; other option is to use
				// 'instant' instead of a number
  density	-> calculate,	// calculate the resulting density; a numeric
				// value can also be provided
  geometry	-> {		// set relative deformation; valid keywords are
    xx		-> 1,		// 'xx', 'yy', 'zz', 'zy', 'zx', 'yx';
    yy		-> 1,		// main axis contributions have to be defined
    zz		-> 1,		// even when no deformation is applied;
    yx		-> 0.2		// a relative deformation of 20% is chosen;
  }				// deformations can also be negative
};		      

// running MC avoids possible overlaps occurring when deforming instantaneously

run		= {
  ncycles	-> 10000,	// run for 10000 cycles after building
  nblocks	-> 100		// output energetics every 100 cycles
};

ITEM	END

This example places a deformation section after building, which is performed during execution of a 10,000 cycle Monte Carlo run. One is well-advised to apply deformation gradually as to avoid overlaps which could occur when applying instantaneous deformation. You can copy the verbatim EMC scripting section as defined under ITEM EMC to your build.emc and insert it at the point at which you would like to perform the deformation. Alternatively, you can also use LAMMPS to deform. Visually, the above simulation results in