1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
5 :link(lc,Section_commands.html#comm)
13 pair_write itype jtype N style inner outer file keyword Qi Qj :pre
15 itype,jtype = 2 atom types
17 style = {r} or {rsq} or {bitmap}
18 inner,outer = inner and outer cutoff (distance units)
19 file = name of file to write values to
20 keyword = section name in file for this set of tabulated values
21 Qi,Qj = 2 atom charges (charge units) (optional) :ul
25 pair_write 1 3 500 r 1.0 10.0 table.txt LJ
26 pair_write 1 1 1000 rsq 2.0 8.0 table.txt Yukawa_1_1 -0.5 0.5 :pre
30 Write energy and force values to a file as a function of distance for
31 the currently defined pair potential. This is useful for plotting the
32 potential function or otherwise debugging its values. If the file
33 already exists, the table of values is appended to the end of the file
34 to allow multiple tables of energy and force to be included in one
37 The energy and force values are computed at distances from inner to
38 outer for 2 interacting atoms of type itype and jtype, using the
39 appropriate "pair_coeff"_pair_coeff.html coefficients. If the style
40 is {r}, then N distances are used, evenly spaced in r; if the style is
41 {rsq}, N distances are used, evenly spaced in r^2.
43 For example, for N = 7, style = {r}, inner = 1.0, and outer = 4.0,
44 values are computed at r = 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0.
46 If the style is {bitmap}, then 2^N values are written to the file in a
47 format and order consistent with how they are read in by the
48 "pair_coeff"_pair_coeff.html command for pair style {table}. For
49 reasonable accuracy in a bitmapped table, choose N >= 12, an {inner}
50 value that is smaller than the distance of closest approach of 2
51 atoms, and an {outer} value <= cutoff of the potential.
53 If the pair potential is computed between charged atoms, the charges
54 of the pair of interacting atoms can optionally be specified. If not
55 specified, values of Qi = Qj = 1.0 are used.
57 The file is written in the format used as input for the
58 "pair_style"_pair_style.html {table} option with {keyword} as the
59 section name. Each line written to the file lists an index number
60 (1-N), a distance (in distance units), an energy (in energy units),
61 and a force (in force units).
65 All force field coefficients for pair and other kinds of interactions
66 must be set before this command can be invoked.
68 Due to how the pairwise force is computed, an inner value > 0.0 must
69 be specified even if the potential has a finite value at r = 0.0.
71 For EAM potentials, the pair_write command only tabulates the
72 pairwise portion of the potential, not the embedding portion.
76 "pair_style table"_pair_table.html,
77 "pair_style"_pair_style.html, "pair_coeff"_pair_coeff.html