1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef PAIR_CLASS
PairStyle(table,PairTable)
#else
#ifndef LMP_PAIR_TABLE_H
#define LMP_PAIR_TABLE_H
#include "pair.h"
namespace LAMMPS_NS {
class PairTable : public Pair {
public:
PairTable(class LAMMPS *);
virtual ~PairTable();
virtual void compute(int, int);
virtual void settings(int, char **);
void coeff(int, char **);
virtual double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
virtual double single(int, int, int, int, double, double, double, double &);
void *extract(const char *, int &);
enum{LOOKUP,LINEAR,SPLINE,BITMAP};
protected:
int tabstyle,tablength;
struct Table {
int ninput,rflag,fpflag,match,ntablebits;
int nshiftbits,nmask;
double rlo,rhi,fplo,fphi,cut;
double *rfile,*efile,*ffile;
double *e2file,*f2file;
double innersq,delta,invdelta,deltasq6;
double *rsq,*drsq,*e,*de,*f,*df,*e2,*f2;
};
int ntables;
Table *tables;
int **tabindex;
virtual void allocate();
void read_table(Table *, char *, char *);
void param_extract(Table *, char *);
void bcast_table(Table *);
void spline_table(Table *);
virtual void compute_table(Table *);
void null_table(Table *);
void free_table(Table *);
static void spline(double *, double *, int, double, double, double *);
static double splint(double *, double *, double *, int, double);
};
}
#endif
#endif
/* ERROR/WARNING messages:
E: Pair distance < table inner cutoff: ijtype %d %d dist %g
UNDOCUMENTED
E: Pair distance > table outer cutoff: ijtype %d %d dist %g
UNDOCUMENTED
E: Illegal ... command
Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
E: Unknown table style in pair_style command
Style of table is invalid for use with pair_style table command.
E: Illegal number of pair table entries
There must be at least 2 table entries.
E: Invalid pair table length
Length of read-in pair table is invalid
E: Invalid pair table cutoff
Cutoffs in pair_coeff command are not valid with read-in pair table.
E: Bitmapped table in file does not match requested table
Setting for bitmapped table in pair_coeff command must match table
in file exactly.
E: All pair coeffs are not set
All pair coefficients must be set in the data file or by the
pair_coeff command before running a simulation.
E: Cannot open file %s
The specified file cannot be opened. Check that the path and name are
correct. If the file is a compressed file, also check that the gzip
executable can be found and run.
E: Did not find keyword in table file
Keyword used in pair_coeff command was not found in table file.
E: Bitmapped table is incorrect length in table file
Number of table entries is not a correct power of 2.
E: Premature end of file in pair table
UNDOCUMENTED
W: %d of %d force values in table are inconsistent with -dE/dr.\n Should only be flagged at inflection points
UNDOCUMENTED
W: %d of %d distance values in table with relative error\n over %g to re-computed values
UNDOCUMENTED
W: %d of %d lines in table were incomplete\n or could not be parsed completely
UNDOCUMENTED
E: Invalid keyword in pair table parameters
Keyword used in list of table parameters is not recognized.
E: Pair table parameters did not set N
List of pair table parameters must include N setting.
E: Pair distance < table inner cutoff
Two atoms are closer together than the pairwise table allows.
E: Pair distance > table outer cutoff
Two atoms are further apart than the pairwise table allows.
E: Pair table cutoffs must all be equal to use with KSpace
When using pair style table with a long-range KSpace solver, the
cutoffs for all atom type pairs must all be the same, since the
long-range solver starts at that cutoff.
*/