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 PAIR_CLASS
15 // clang-format off
16 PairStyle(hybrid,PairHybrid);
17 // clang-format on
18 #else
19 
20 #ifndef LMP_PAIR_HYBRID_H
21 #define LMP_PAIR_HYBRID_H
22 
23 #include "pair.h"
24 
25 namespace LAMMPS_NS {
26 
27 class PairHybrid : public Pair {
28   friend class ComputeSpin;
29   friend class FixGPU;
30   friend class FixIntel;
31   friend class FixNVESpin;
32   friend class FixOMP;
33   friend class Force;
34   friend class Info;
35   friend class Neighbor;
36   friend class PairDeprecated;
37   friend class Respa;
38   friend class Scafacos;
39 
40  public:
41   PairHybrid(class LAMMPS *);
42   virtual ~PairHybrid();
43   virtual void compute(int, int);
44   virtual void settings(int, char **);
45   virtual void coeff(int, char **);
46   void init_style();
47   double init_one(int, int);
48   void setup();
49   virtual void write_restart(FILE *);
50   virtual void read_restart(FILE *);
51   virtual double single(int, int, int, int, double, double, double, double &);
52   void modify_params(int narg, char **arg);
53   double memory_usage();
54 
55   void compute_inner();
56   void compute_middle();
57   void compute_outer(int, int);
58   void *extract(const char *, int &);
59   void reset_dt();
60 
61   int check_ijtype(int, int, char *);
62 
63   virtual void add_tally_callback(class Compute *);
64   virtual void del_tally_callback(class Compute *);
65   double atom2cut(int);
66   double radii2cut(double, double);
67 
68  protected:
69   int nstyles;        // # of sub-styles
70   Pair **styles;      // list of Pair style classes
71   char **keywords;    // style name of each Pair style
72   int *multiple;      // 0 if style used once, else Mth instance
73 
74   int outerflag;    // toggle compute() when invoked by outer()
75   int respaflag;    // 1 if different substyles are assigned to
76                     // different r-RESPA levels
77 
78   int **nmap;               // # of sub-styles itype,jtype points to
79   int ***map;               // list of sub-styles itype,jtype points to
80   double **special_lj;      // list of per style LJ exclusion factors
81   double **special_coul;    // list of per style Coulomb exclusion factors
82   int *compute_tally;       // list of on/off flags for tally computes
83 
84   void allocate();
85   void flags();
86 
87   virtual void init_svector();
88   virtual void copy_svector(int, int);
89 
90   void modify_special(int, int, char **);
91   double *save_special();
92   void set_special(int);
93   void restore_special(double *);
94 };
95 
96 }    // namespace LAMMPS_NS
97 
98 #endif
99 #endif
100 
101 /* ERROR/WARNING messages:
102 
103 E: Illegal ... command
104 
105 Self-explanatory.  Check the input script syntax and compare to the
106 documentation for the command.  You can use -echo screen as a
107 command-line option when running LAMMPS to see the offending line.
108 
109 E: Pair style hybrid cannot have hybrid as an argument
110 
111 Self-explanatory.
112 
113 E: Pair style hybrid cannot have none as an argument
114 
115 Self-explanatory.
116 
117 E: Incorrect args for pair coefficients
118 
119 Self-explanatory.  Check the input script or data file.
120 
121 E: Cannot yet use pair hybrid with Kokkos
122 
123 This feature is not yet supported.
124 
125 E: Pair coeff for hybrid has invalid style
126 
127 Style in pair coeff must have been listed in pair_style command.
128 
129 E: Pair hybrid sub-style is not used
130 
131 No pair_coeff command used a sub-style specified in the pair_style
132 command.
133 
134 E: Pair_modify special setting for pair hybrid incompatible with global special_bonds setting
135 
136 Cannot override a setting of 0.0 or 1.0 or change a setting between
137 0.0 and 1.0.
138 
139 E: All pair coeffs are not set
140 
141 All pair coefficients must be set in the data file or by the
142 pair_coeff command before running a simulation.
143 
144 E: Invoked pair single on pair style none
145 
146 A command (e.g. a dump) attempted to invoke the single() function on a
147 pair style none, which is illegal.  You are probably attempting to
148 compute per-atom quantities with an undefined pair style.
149 
150 E: Pair hybrid sub-style does not support single call
151 
152 You are attempting to invoke a single() call on a pair style
153 that doesn't support it.
154 
155 E: Pair hybrid single calls do not support per sub-style special bond values
156 
157 Self-explanatory.
158 
159 E: Unknown pair_modify hybrid sub-style
160 
161 The choice of sub-style is unknown.
162 
163 E: Coulomb cutoffs of pair hybrid sub-styles do not match
164 
165 If using a Kspace solver, all Coulomb cutoffs of long pair styles must
166 be the same.
167 
168 */
169