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(tmd,FixTMD);
17 // clang-format on
18 #else
19 
20 #ifndef LMP_FIX_TMD_H
21 #define LMP_FIX_TMD_H
22 
23 #include "fix.h"
24 
25 namespace LAMMPS_NS {
26 
27 class FixTMD : public Fix {
28  public:
29   FixTMD(class LAMMPS *, int, char **);
30   ~FixTMD();
31   int setmask();
32   void init();
33   void initial_integrate(int);
34   void initial_integrate_respa(int, int, int);
35 
36   double memory_usage();
37   void grow_arrays(int);
38   void copy_arrays(int, int, int);
39   int pack_exchange(int, double *);
40   int unpack_exchange(int, double *);
41   void reset_dt();
42 
43  private:
44   int me;
45   int nfileevery, compressed;
46   bigint previous_stat;
47   FILE *fp;
48   double rho_start, rho_stop, rho_old, masstotal;
49   double dtv, dtf;
50   double *step_respa;
51   double work_lambda, work_analytical;
52   double **xf, **xold;
53 
54   void readfile(char *);
55   void open(char *);
56 };
57 
58 }    // namespace LAMMPS_NS
59 
60 #endif
61 #endif
62 
63 /* ERROR/WARNING messages:
64 
65 E: Illegal ... command
66 
67 Self-explanatory.  Check the input script syntax and compare to the
68 documentation for the command.  You can use -echo screen as a
69 command-line option when running LAMMPS to see the offending line.
70 
71 E: Cannot use fix TMD unless atom map exists
72 
73 Using this fix requires the ability to lookup an atom index, which is
74 provided by an atom map.  An atom map does not exist (by default) for
75 non-molecular problems.  Using the atom_modify map command will force
76 an atom map to be created.
77 
78 E: Cannot open fix tmd file %s
79 
80 The output file for the fix tmd command cannot be opened.  Check that
81 the path and name are correct.
82 
83 E: Cannot use fix TMD on massless group
84 
85 UNDOCUMENTED
86 
87 E: Fix tmd must come after integration fixes
88 
89 Any fix tmd command must appear in the input script after all time
90 integration fixes (nve, nvt, npt).  See the fix tmd documentation for
91 details.
92 
93 E: Incorrect format in TMD target file
94 
95 Format of file read by fix tmd command is incorrect.
96 
97 W: Ignoring empty or incorrectly formatted line in target file
98 
99 UNDOCUMENTED
100 
101 E: TMD target file did not list all group atoms
102 
103 The target file for the fix tmd command did not list all atoms in the
104 fix group.
105 
106 E: Cannot open gzipped file
107 
108 LAMMPS was compiled without support for reading and writing gzipped
109 files through a pipeline to the gzip program with -DLAMMPS_GZIP.
110 
111 E: Cannot open file %s
112 
113 The specified file cannot be opened.  Check that the path and name are
114 correct. If the file is a compressed file, also check that the gzip
115 executable can be found and run.
116 
117 */
118