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 COMPUTE_CLASS 15 // clang-format off 16 ComputeStyle(pressure,ComputePressure); 17 // clang-format on 18 #else 19 20 #ifndef LMP_COMPUTE_PRESSURE_H 21 #define LMP_COMPUTE_PRESSURE_H 22 23 #include "compute.h" 24 25 namespace LAMMPS_NS { 26 27 class ComputePressure : public Compute { 28 public: 29 ComputePressure(class LAMMPS *, int, char **); 30 virtual ~ComputePressure(); 31 virtual void init(); 32 virtual double compute_scalar(); 33 virtual void compute_vector(); 34 void reset_extra_compute_fix(const char *); 35 36 protected: 37 double boltz, nktv2p, inv_volume; 38 int nvirial, dimension; 39 double **vptr; 40 double *kspace_virial; 41 Compute *temperature; 42 char *id_temp; 43 double virial[6]; // ordering: xx,yy,zz,xy,xz,yz 44 int pairhybridflag; 45 class Pair *pairhybrid; 46 int keflag, pairflag, bondflag, angleflag, dihedralflag, improperflag; 47 int fixflag, kspaceflag; 48 49 void virial_compute(int, int); 50 51 private: 52 char *pstyle; 53 int nsub; 54 }; 55 56 } // namespace LAMMPS_NS 57 58 #endif 59 #endif 60 61 /* ERROR/WARNING messages: 62 63 E: Illegal ... command 64 65 Self-explanatory. Check the input script syntax and compare to the 66 documentation for the command. You can use -echo screen as a 67 command-line option when running LAMMPS to see the offending line. 68 69 E: Compute pressure must use group all 70 71 Virial contributions computed by potentials (pair, bond, etc) are 72 computed on all atoms. 73 74 E: Could not find compute pressure temperature ID 75 76 The compute ID for calculating temperature does not exist. 77 78 E: Compute pressure temperature ID does not compute temperature 79 80 The compute ID assigned to a pressure computation must compute 81 temperature. 82 83 E: Compute pressure requires temperature ID to include kinetic energy 84 85 The keflag cannot be used unless a temperature compute is provided. 86 87 E: Virial was not tallied on needed timestep 88 89 You are using a thermo keyword that requires potentials to 90 have tallied the virial, but they didn't on this timestep. See the 91 variable doc page for ideas on how to make this work. 92 93 E: Must use 'kspace_modify pressure/scalar no' for tensor components with kspace_style msm 94 95 Otherwise MSM will compute only a scalar pressure. See the kspace_modify 96 command for details on this setting. 97 98 */ 99