1 /* -*- c++ -*- ---------------------------------------------------------- 2 LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator 3 https://www.lammps.org/, Sandia National Laboratories 4 Steve Plimpton, sjplimp@sandia.gov 5 6 Copyright (2003) Sandia Corporation. Under the terms of Contract 7 DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains 8 certain rights in this software. This software is distributed under 9 the GNU General Public License. 10 11 See the README file in the top-level LAMMPS directory. 12 ------------------------------------------------------------------------- */ 13 14 #ifdef FIX_CLASS 15 // clang-format off 16 FixStyle(deform,FixDeform); 17 // clang-format on 18 #else 19 20 #ifndef LMP_FIX_DEFORM_H 21 #define LMP_FIX_DEFORM_H 22 23 #include "fix.h" 24 25 namespace LAMMPS_NS { 26 27 class FixDeform : public Fix { 28 public: 29 int remapflag; // whether x,v are remapped across PBC 30 int dimflag[6]; // which dims are deformed 31 32 FixDeform(class LAMMPS *, int, char **); 33 virtual ~FixDeform(); 34 int setmask(); 35 void init(); 36 virtual void pre_exchange(); 37 virtual void end_of_step(); 38 virtual void write_restart(FILE *); 39 virtual void restart(char *buf); 40 double memory_usage(); 41 42 protected: 43 int triclinic, scaleflag, flipflag; 44 int flip, flipxy, flipxz, flipyz; 45 double *h_rate, *h_ratelo; 46 int varflag; // 1 if VARIABLE option is used, 0 if not 47 int kspace_flag; // 1 if KSpace invoked, 0 if not 48 int nrigid; // number of rigid fixes 49 int *rfix; // indices of rigid fixes 50 class Irregular *irregular; // for migrating atoms after box flips 51 52 double TWOPI; 53 54 struct Set { 55 int style, substyle; 56 double flo, fhi, ftilt; 57 double dlo, dhi, dtilt; 58 double scale, vel, rate; 59 double amplitude, tperiod; 60 double lo_initial, hi_initial; 61 double lo_start, hi_start, lo_stop, hi_stop, lo_target, hi_target; 62 double tilt_initial, tilt_start, tilt_stop, tilt_target, tilt_flip; 63 double tilt_min, tilt_max; 64 double vol_initial, vol_start; 65 int fixed, dynamic1, dynamic2; 66 char *hstr, *hratestr; 67 int hvar, hratevar; 68 }; 69 Set *set; 70 71 void options(int, char **); 72 }; 73 74 } // namespace LAMMPS_NS 75 76 #endif 77 #endif 78 79 /* ERROR/WARNING messages: 80 81 E: Illegal ... command 82 83 Self-explanatory. Check the input script syntax and compare to the 84 documentation for the command. You can use -echo screen as a 85 command-line option when running LAMMPS to see the offending line. 86 87 E: Fix deform tilt factors require triclinic box 88 89 Cannot deform the tilt factors of a simulation box unless it 90 is a triclinic (non-orthogonal) box. 91 92 E: Cannot use fix deform on a shrink-wrapped boundary 93 94 The x, y, z options cannot be applied to shrink-wrapped 95 dimensions. 96 97 E: Cannot use fix deform tilt on a shrink-wrapped 2nd dim 98 99 This is because the shrink-wrapping will change the value 100 of the strain implied by the tilt factor. 101 102 E: Fix deform volume setting is invalid 103 104 Cannot use volume style unless other dimensions are being controlled. 105 106 E: More than one fix deform 107 108 Only one fix deform can be defined at a time. 109 110 E: Variable name for fix deform does not exist 111 112 Self-explanatory. 113 114 E: Variable for fix deform is invalid style 115 116 The variable must be an equal-style variable. 117 118 E: Final box dimension due to fix deform is < 0.0 119 120 Self-explanatory. 121 122 E: Cannot use fix deform trate on a box with zero tilt 123 124 The trate style alters the current strain. 125 126 E: Fix deform cannot use yz variable with xy 127 128 The yz setting cannot be a variable if xy deformation is also 129 specified. This is because LAMMPS cannot determine if the yz setting 130 will induce a box flip which would be invalid if xy is also changing. 131 132 E: Fix deform is changing yz too much with xy 133 134 When both yz and xy are changing, it induces changes in xz if the 135 box must flip from one tilt extreme to another. Thus it is not 136 allowed for yz to grow so much that a flip is induced. 137 138 E: Fix deform settings not consistent with restart 139 140 UNDOCUMENTED 141 142 */ 143