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(setforce,FixSetForce);
17 // clang-format on
18 #else
19 
20 #ifndef LMP_FIX_SET_FORCE_H
21 #define LMP_FIX_SET_FORCE_H
22 
23 #include "fix.h"
24 
25 namespace LAMMPS_NS {
26 
27 class FixSetForce : public Fix {
28  public:
29   FixSetForce(class LAMMPS *, int, char **);
30   virtual ~FixSetForce();
31   int setmask();
32   virtual void init();
33   void setup(int);
34   void min_setup(int);
35   virtual void post_force(int);
36   void post_force_respa(int, int, int);
37   void min_post_force(int);
38   double compute_vector(int);
39 
40   double memory_usage();
41 
42  protected:
43   double xvalue, yvalue, zvalue;
44   int varflag, iregion;
45   char *xstr, *ystr, *zstr;
46   char *idregion;
47   int xvar, yvar, zvar, xstyle, ystyle, zstyle;
48   double foriginal[3], foriginal_all[3], foriginal_saved[3];
49   int force_flag;
50   int nlevels_respa, ilevel_respa;
51 
52   int maxatom;
53   double **sforce;
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: Region ID for fix setforce does not exist
70 
71 Self-explanatory.
72 
73 E: Variable name for fix setforce does not exist
74 
75 Self-explanatory.
76 
77 E: Variable for fix setforce is invalid style
78 
79 Only equal-style variables can be used.
80 
81 E: Cannot use non-zero forces in an energy minimization
82 
83 Fix setforce cannot be used in this manner.  Use fix addforce
84 instead.
85 
86 */
87