Merge branch 'master' into doc-updates

This commit is contained in:
Axel Kohlmeyer 2016-11-09 18:18:05 -05:00
commit 1f38e1a771
112 changed files with 1530 additions and 204 deletions

View File

@ -1,7 +1,7 @@
<!-- HTML_ONLY -->
<HEAD>
<TITLE>LAMMPS Users Manual</TITLE>
<META NAME="docnumber" CONTENT="27 Oct 2016 version">
<META NAME="docnumber" CONTENT="9 Nov 2016 version">
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
</HEAD>
@ -21,7 +21,7 @@
<H1></H1>
LAMMPS Documentation :c,h3
27 Oct 2016 version :c,h4
9 Nov 2016 version :c,h4
Version info: :h4

View File

@ -886,6 +886,8 @@ KOKKOS, o = USER-OMP, t = OPT.
"body"_pair_body.html,
"bop"_pair_bop.html,
"born (go)"_pair_born.html,
"born/coul/dsf"_pair_born.html,
"born/coul/dsf/cs"_pair_born.html,
"born/coul/long (go)"_pair_born.html,
"born/coul/long/cs"_pair_born.html,
"born/coul/msm (o)"_pair_born.html,

View File

@ -366,11 +366,11 @@ complementary modeling tasks.
"DL_POLY"_dlpoly
"Tinker"_tinker :ul
:link(charmm,http://www.scripps.edu/brooks)
:link(amber,http://amber.scripps.edu)
:link(charmm,http://www.charmm.org)
:link(amber,http://ambermd.org)
:link(namd,http://www.ks.uiuc.edu/Research/namd/)
:link(nwchem,http://www.emsl.pnl.gov/docs/nwchem/nwchem.html)
:link(dlpoly,http://www.cse.clrc.ac.uk/msi/software/DL_POLY)
:link(dlpoly,http://www.ccp5.ac.uk/DL_POLY_CLASSIC)
:link(tinker,http://dasher.wustl.edu/tinker)
CHARMM, AMBER, NAMD, NWCHEM, and Tinker are designed primarily for

View File

@ -19,6 +19,8 @@ pair_style born/coul/msm/omp command :h3
pair_style born/coul/wolf command :h3
pair_style born/coul/wolf/gpu command :h3
pair_style born/coul/wolf/omp command :h3
pair_style born/coul/dsf command :h3
pair_style born/coul/dsf/cs command :h3
[Syntax:]
@ -37,7 +39,11 @@ args = list of arguments for a particular style :ul
{born/coul/wolf} args = alpha cutoff (cutoff2)
alpha = damping parameter (inverse distance units)
cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units) :pre
cutoff2 = global cutoff for Coulombic (optional) (distance units)
{born/coul/dsf} or {born/coul/dsf/cs} args = alpha cutoff (cutoff2)
alpha = damping parameter (inverse distance units)
cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (distance units) :pre
[Examples:]
@ -62,6 +68,10 @@ pair_style born/coul/wolf 0.25 10.0 9.0
pair_coeff * * 6.08 0.317 2.340 24.18 11.51
pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 :pre
pair_style born/coul/dsf 0.1 10.0 12.0
pair_coeff * * 0.0 1.00 0.00 0.00 0.00
pair_coeff 1 1 480.0 0.25 0.00 1.05 0.50 :pre
[Description:]
The {born} style computes the Born-Mayer-Huggins or Tosi/Fumi
@ -90,10 +100,14 @@ term.
The {born/coul/wolf} style adds a Coulombic term as described for the
Wolf potential in the "coul/wolf"_pair_coul.html pair style.
The {born/coul/dsf} style computes the Coulomb contribution with the
damped shifted force model as in the "coul/dsf"_pair_coul.html style.
Style {born/coul/long/cs} is identical to {born/coul/long} except that
a term is added for the "core/shell model"_Section_howto.html#howto_25
to allow charges on core and shell particles to be separated by r =
0.0.
0.0. The same correction is introduced for {born/coul/dsf/cs} style
which is identical to {born/coul/dsf}.
Note that these potentials are related to the "Buckingham
potential"_pair_buck.html.
@ -116,9 +130,10 @@ The second coefficient, rho, must be greater than zero.
The last coefficient is optional. If not specified, the global A,C,D
cutoff specified in the pair_style command is used.
For {born/coul/long} and {born/coul/wolf} no Coulombic cutoff can be
specified for an individual I,J type pair. All type pairs use the
same global Coulombic cutoff specified in the pair_style command.
For {born/coul/long}, {born/coul/wolf} and {born/coul/dsf} no
Coulombic cutoff can be specified for an individual I,J type pair.
All type pairs use the same global Coulombic cutoff specified in the
pair_style command.
:line

View File

@ -8,19 +8,24 @@
pair_style born/coul/long/cs command :h3
pair_style buck/coul/long/cs command :h3
pair_style born/coul/dsf/cs command :h3
[Syntax:]
pair_style style args :pre
style = {born/coul/long/cs} or {buck/coul/long/cs}
style = {born/coul/long/cs} or {buck/coul/long/cs} or {born/coul/dsf/cs}
args = list of arguments for a particular style :ul
{born/coul/long/cs} args = cutoff (cutoff2)
cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
{buck/coul/long/cs} args = cutoff (cutoff2)
cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units) :pre
cutoff2 = global cutoff for Coulombic (optional) (distance units)
{born/coul/dsf/cs} args = alpha cutoff (cutoff2)
alpha = damping parameter (inverse distance units)
cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (distance units) :pre
[Examples:]
@ -32,6 +37,10 @@ pair_style buck/coul/long/cs 10.0 8.0
pair_coeff * * 100.0 1.5 200.0
pair_coeff 1 1 100.0 1.5 200.0 9.0 :pre
pair_style born/coul/dsf/cs 0.1 10.0 12.0
pair_coeff * * 0.0 1.00 0.00 0.00 0.00
pair_coeff 1 1 480.0 0.25 0.00 1.05 0.50 :pre
[Description:]
These pair styles are designed to be used with the adiabatic
@ -39,7 +48,7 @@ core/shell model of "(Mitchell and Finchham)"_#MitchellFinchham. See
"Section 6.25"_Section_howto.html#howto_25 of the manual for an
overview of the model as implemented in LAMMPS.
These pair styles are identical to the "pair_style
The styles with a {coul/long} term are identical to the "pair_style
born/coul/long"_pair_born.html and "pair_style
buck/coul/long"_pair_buck.html styles, except they correctly treat the
special case where the distance between two charged core and shell
@ -63,6 +72,14 @@ where C is an energy-conversion constant, Qi and Qj are the charges on
the core and shell, epsilon is the dielectric constant and r_min is the
minimal distance.
The pair style {born/coul/dsf/cs} is identical to the
"pair_style born/coul/dsf"_pair_born.html style, which uses the
the damped shifted force model as in "coul/dsf"_pair_coul.html
to compute the Coulomb contribution. This approach does not require
a long-range solver, thus the only correction is the addition of a
minimal distance to avoid the possible r = 0.0 case for a
core/shell pair.
[Restrictions:]
These pair styles are part of the CORESHELL package. They are only

View File

@ -15,7 +15,7 @@ pair_style snap :pre
[Examples:]
pair_style snap
pair_coeff * * snap InP.snapcoeff In P InP.snapparam In In P P :pre
pair_coeff * * InP.snapcoeff In P InP.snapparam In In P P :pre
[Description:]
@ -27,9 +27,9 @@ it uses bispectrum components
to characterize the local neighborhood of each atom
in a very general way. The mathematical definition of the
bispectrum calculation used by SNAP is identical
to that used of "compute sna/atom"_compute_sna_atom.html.
to that used by "compute sna/atom"_compute_sna_atom.html.
In SNAP, the total energy is decomposed into a sum over
atom energies. The energy of atom {i} is
atom energies. The energy of atom {i } is
expressed as a weighted sum over bispectrum components.
:c,image(Eqs/pair_snap.jpg)
@ -183,8 +183,7 @@ LAMMPS"_Section_start.html#start_3 section for more info.
:line
:link(Thompson2014)
[(Thompson)] Thompson, Swiler, Trott, Foiles, Tucker, under review, preprint
available at "arXiv:1409.3880"_http://arxiv.org/abs/1409.3880
[(Thompson)] Thompson, Swiler, Trott, Foiles, Tucker, J Comp Phys, 285, 316 (2015).
:link(Bartok2010)
[(Bartok2010)] Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).

View File

@ -0,0 +1,71 @@
# Testsystem for core-shell model compared to Mitchel and Finchham
# Hendrik Heenen, June 2014
# ------------------------ INITIALIZATION ----------------------------
units metal
dimension 3
boundary p p p
atom_style full
# ----------------------- ATOM DEFINITION ----------------------------
fix csinfo all property/atom i_CSID
read_data data.coreshell fix csinfo NULL CS-Info
group cores type 1 2
group shells type 3 4
neighbor 2.0 bin
comm_modify vel yes
# ------------------------ FORCE FIELDS ------------------------------
pair_style born/coul/dsf/cs 0.1 20.0 20.0 # A, rho, sigma=0, C, D
pair_coeff * * 0.0 1.000 0.00 0.00 0.00
pair_coeff 3 3 487.0 0.23768 0.00 1.05 0.50 #Na-Na
pair_coeff 3 4 145134.0 0.23768 0.00 6.99 8.70 #Na-Cl
pair_coeff 4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl
bond_style harmonic
bond_coeff 1 63.014 0.0
bond_coeff 2 25.724 0.0
# ------------------------ Equilibration Run -------------------------------
reset_timestep 0
thermo 50
thermo_style custom step etotal pe ke temp press &
epair evdwl ecoul elong ebond fnorm fmax vol
compute CSequ all temp/cs cores shells
# output via chunk method
#compute prop all property/atom i_CSID
#compute cs_chunk all chunk/atom c_prop
#compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0
#fix ave_chunk all ave/time 100 1 100 c_cstherm file chunk.dump mode vector
thermo_modify temp CSequ
# velocity bias option
velocity all create 1427 134 dist gaussian mom yes rot no bias yes temp CSequ
velocity all scale 1427 temp CSequ
fix thermoberendsen all temp/berendsen 1427 1427 0.4
fix nve all nve
fix_modify thermoberendsen temp CSequ
# 2 fmsec timestep
timestep 0.002
run 500
unfix thermoberendsen
# ------------------------ Dynamic Run -------------------------------
run 1000

View File

@ -0,0 +1,185 @@
LAMMPS (27 Oct 2016)
# Testsystem for core-shell model compared to Mitchel and Finchham
# Hendrik Heenen, June 2014
# ------------------------ INITIALIZATION ----------------------------
units metal
dimension 3
boundary p p p
atom_style full
# ----------------------- ATOM DEFINITION ----------------------------
fix csinfo all property/atom i_CSID
read_data data.coreshell fix csinfo NULL CS-Info
orthogonal box = (0 0 0) to (24.096 24.096 24.096)
1 by 1 by 1 MPI processor grid
reading atoms ...
432 atoms
scanning bonds ...
1 = max bonds/atom
reading bonds ...
216 bonds
1 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
group cores type 1 2
216 atoms in group cores
group shells type 3 4
216 atoms in group shells
neighbor 2.0 bin
comm_modify vel yes
# ------------------------ FORCE FIELDS ------------------------------
pair_style born/coul/dsf/cs 0.1 20.0 20.0 # A, rho, sigma=0, C, D
pair_coeff * * 0.0 1.000 0.00 0.00 0.00
pair_coeff 3 3 487.0 0.23768 0.00 1.05 0.50 #Na-Na
pair_coeff 3 4 145134.0 0.23768 0.00 6.99 8.70 #Na-Cl
pair_coeff 4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl
bond_style harmonic
bond_coeff 1 63.014 0.0
bond_coeff 2 25.724 0.0
# ------------------------ Equilibration Run -------------------------------
reset_timestep 0
thermo 50
thermo_style custom step etotal pe ke temp press epair evdwl ecoul elong ebond fnorm fmax vol
compute CSequ all temp/cs cores shells
# output via chunk method
#compute prop all property/atom i_CSID
#compute cs_chunk all chunk/atom c_prop
#compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0
#fix ave_chunk all ave/time 100 1 100 c_cstherm file chunk.dump mode vector
thermo_modify temp CSequ
# velocity bias option
velocity all create 1427 134 dist gaussian mom yes rot no bias yes temp CSequ
Neighbor list info ...
1 neighbor list requests
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 22
ghost atom cutoff = 22
binsize = 11 -> bins = 3 3 3
velocity all scale 1427 temp CSequ
fix thermoberendsen all temp/berendsen 1427 1427 0.4
fix nve all nve
fix_modify thermoberendsen temp CSequ
# 2 fmsec timestep
timestep 0.002
run 500
Memory usage per processor = 7.04355 Mbytes
Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume
0 -635.80596 -675.46362 39.657659 1427 -21302.622 -675.46362 1.6320365 -677.09565 0 0 1.3517686e-14 2.942091e-15 13990.5
50 -633.9898 -666.02679 32.03699 1152.7858 -4578.5681 -668.50431 37.800204 -706.30452 0 2.4775226 14.568073 4.3012389 13990.5
100 -631.89604 -661.96148 30.065442 1081.8436 -3536.6738 -664.61798 39.18583 -703.80381 0 2.6564973 14.677968 3.9051029 13990.5
150 -630.08723 -662.95879 32.871559 1182.816 -109.19506 -665.76772 46.247821 -712.01554 0 2.8089226 15.270039 2.9328953 13990.5
200 -628.55895 -663.97376 35.414806 1274.3296 -1748.35 -666.58439 41.738552 -708.32294 0 2.6106349 14.148282 3.1047826 13990.5
250 -627.28761 -661.92274 34.635123 1246.2743 -1280.4899 -664.917 43.045475 -707.96247 0 2.9942594 14.248617 2.4694705 13990.5
300 -626.6163 -663.65651 37.040209 1332.8164 -1887.9043 -666.35215 40.84964 -707.20179 0 2.6956373 13.142643 1.9263242 13990.5
350 -625.76781 -664.66441 38.896607 1399.6151 -1839.482 -667.47659 40.999206 -708.47579 0 2.8121749 13.601238 1.9262698 13990.5
400 -625.02586 -661.46042 36.434568 1311.0236 -868.2031 -664.40231 43.21398 -707.61629 0 2.9418875 14.945389 2.7493413 13990.5
450 -624.3278 -660.50844 36.180639 1301.8865 -2203.3944 -663.49896 40.008669 -703.50763 0 2.9905179 14.158866 1.7299899 13990.5
500 -623.56254 -661.33839 37.775849 1359.2869 -810.50736 -664.11652 42.993999 -707.11052 0 2.7781274 13.68709 2.9115277 13990.5
Loop time of 10.7162 on 1 procs for 500 steps with 432 atoms
Performance: 8.063 ns/day, 2.977 hours/ns, 46.658 timesteps/s
99.9% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 10.478 | 10.478 | 10.478 | 0.0 | 97.78
Bond | 0.0029511 | 0.0029511 | 0.0029511 | 0.0 | 0.03
Neigh | 0.14159 | 0.14159 | 0.14159 | 0.0 | 1.32
Comm | 0.074382 | 0.074382 | 0.074382 | 0.0 | 0.69
Output | 0.00054097 | 0.00054097 | 0.00054097 | 0.0 | 0.01
Modify | 0.010588 | 0.010588 | 0.010588 | 0.0 | 0.10
Other | | 0.007748 | | | 0.07
Nlocal: 432 ave 432 max 432 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 9280 ave 9280 max 9280 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 297636 ave 297636 max 297636 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 297636
Ave neighs/atom = 688.972
Ave special neighs/atom = 1
Neighbor list builds = 20
Dangerous builds = 0
unfix thermoberendsen
# ------------------------ Dynamic Run -------------------------------
run 1000
Memory usage per processor = 7.04355 Mbytes
Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume
500 -623.56254 -661.33839 37.775849 1359.2869 -810.50736 -664.11652 42.993999 -707.11052 0 2.7781274 13.68709 2.9115277 13990.5
550 -623.5004 -660.74472 37.244326 1340.1611 -1413.4326 -663.99669 41.875014 -705.8717 0 3.2519651 15.097948 2.278405 13990.5
600 -623.46963 -659.61729 36.147655 1300.6997 -521.50578 -662.54994 43.956071 -706.50601 0 2.9326492 14.99649 2.6334959 13990.5
650 -623.49291 -661.50698 38.014069 1367.8588 -1230.0925 -664.21074 42.027844 -706.23859 0 2.7037578 13.982308 1.6247207 13990.5
700 -623.4913 -660.11564 36.62434 1317.8522 -727.89052 -663.24921 43.413397 -706.66261 0 3.1335699 15.009937 2.0563966 13990.5
750 -623.50292 -657.95982 34.4569 1239.8613 636.46644 -661.16971 46.539267 -707.70898 0 3.2098934 15.25993 2.1864622 13990.5
800 -623.5176 -659.92032 36.402711 1309.8773 -912.75799 -662.84989 42.668309 -705.5182 0 2.9295708 13.577516 2.0006099 13990.5
850 -623.44098 -660.92727 37.486295 1348.8679 -550.40358 -664.08308 43.667245 -707.75033 0 3.1558098 14.836208 2.279198 13990.5
900 -623.46361 -661.21737 37.753765 1358.4923 1267.8647 -664.52195 47.67284 -712.19479 0 3.3045765 15.058502 1.886141 13990.5
950 -623.50114 -660.58464 37.083492 1334.3739 1754.7359 -663.48186 48.70363 -712.18549 0 2.897226 15.519042 2.2654928 13990.5
1000 -623.50161 -660.02915 36.527539 1314.369 228.76104 -663.31152 45.374099 -708.68562 0 3.2823685 14.783709 2.4201134 13990.5
1050 -623.45985 -660.57417 37.114321 1335.4832 -1490.604 -663.75391 41.258878 -705.01279 0 3.1797391 14.250262 2.3153255 13990.5
1100 -623.51051 -661.20338 37.692871 1356.3011 1791.7899 -664.01042 48.626451 -712.63687 0 2.807039 15.559872 3.184101 13990.5
1150 -623.51067 -663.19545 39.684776 1427.9758 1023.0584 -666.07723 46.5628 -712.64003 0 2.8817804 13.895322 2.3950292 13990.5
1200 -623.49625 -659.6715 36.175253 1301.6927 1600.2805 -662.62259 48.522365 -711.14495 0 2.9510854 15.567834 2.1677651 13990.5
1250 -623.48282 -660.56735 37.084533 1334.4113 -871.67341 -663.86673 42.560699 -706.42743 0 3.2993759 14.569539 2.0093709 13990.5
1300 -623.47744 -663.63125 40.153811 1444.853 1343.7147 -666.39564 47.104842 -713.50048 0 2.7643857 14.186019 1.4599359 13990.5
1350 -623.49121 -661.42731 37.936096 1365.0531 589.73669 -664.46099 45.947687 -710.40867 0 3.0336821 14.801223 2.7486556 13990.5
1400 -623.50803 -660.03912 36.53109 1314.4968 362.97431 -663.24909 45.772904 -709.02199 0 3.2099708 14.566488 1.9170714 13990.5
1450 -623.51243 -659.65548 36.143052 1300.534 2853.0755 -663.0534 51.355353 -714.40875 0 3.3979157 15.890282 2.5251359 13990.5
1500 -623.51621 -661.87741 38.361201 1380.3496 740.04973 -665.00896 46.208742 -711.2177 0 3.1315492 15.168927 2.4710846 13990.5
Loop time of 22.2766 on 1 procs for 1000 steps with 432 atoms
Performance: 7.757 ns/day, 3.094 hours/ns, 44.890 timesteps/s
99.9% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 21.8 | 21.8 | 21.8 | 0.0 | 97.86
Bond | 0.005852 | 0.005852 | 0.005852 | 0.0 | 0.03
Neigh | 0.30423 | 0.30423 | 0.30423 | 0.0 | 1.37
Comm | 0.14388 | 0.14388 | 0.14388 | 0.0 | 0.65
Output | 0.0010855 | 0.0010855 | 0.0010855 | 0.0 | 0.00
Modify | 0.0064189 | 0.0064189 | 0.0064189 | 0.0 | 0.03
Other | | 0.01527 | | | 0.07
Nlocal: 432 ave 432 max 432 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 9318 ave 9318 max 9318 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 297131 ave 297131 max 297131 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 297131
Ave neighs/atom = 687.803
Ave special neighs/atom = 1
Neighbor list builds = 44
Dangerous builds = 0
Total wall time: 0:00:33

2
src/.gitignore vendored
View File

@ -976,6 +976,8 @@
/fix_ttm_mod.h
/pair_born_coul_long_cs.cpp
/pair_born_coul_long_cs.h
/pair_born_coul_dsf_cs.cpp
/pair_born_coul_dsf_cs.h
/pair_buck_coul_long_cs.cpp
/pair_buck_coul_long_cs.h
/pair_coul_long_cs.cpp

View File

@ -38,7 +38,8 @@ enum{ROTATE,ALL};
/* ---------------------------------------------------------------------- */
ComputeTempAsphere::ComputeTempAsphere(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg),
id_bias(NULL), tbias(NULL), avec(NULL)
{
if (narg < 3) error->all(FLERR,"Illegal compute temp/asphere command");

View File

@ -28,7 +28,7 @@ enum{SPHERE,LINE,TRI}; // also in DumpImage
/* ---------------------------------------------------------------------- */
BodyNparticle::BodyNparticle(LAMMPS *lmp, int narg, char **arg) :
Body(lmp, narg, arg)
Body(lmp, narg, arg), imflag(NULL), imdata(NULL)
{
if (narg != 3) error->all(FLERR,"Invalid body nparticle command");

View File

@ -33,7 +33,7 @@ enum{ID,TYPE,INDEX};
/* ---------------------------------------------------------------------- */
ComputeBodyLocal::ComputeBodyLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), which(NULL), index(NULL), avec(NULL), bptr(NULL)
{
if (narg < 4) error->all(FLERR,"Illegal compute body/local command");

View File

@ -37,7 +37,7 @@ enum{ROTATE,ALL};
/* ---------------------------------------------------------------------- */
ComputeTempBody::ComputeTempBody(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), id_bias(NULL), tbias(NULL), avec(NULL)
{
if (narg < 3) error->all(FLERR,"Illegal compute temp/body command");

View File

@ -31,8 +31,10 @@ action () {
action compute_temp_cs.cpp
action compute_temp_cs.h
action pair_born_coul_long_cs.cpp pair_born_coul_long.cpp
action pair_born_coul_dsf_cs.cpp pair_born_coul_dsf.cpp
action pair_buck_coul_long_cs.cpp pair_buck_coul_long.cpp
action pair_born_coul_long_cs.h pair_born_coul_long.h
action pair_born_coul_dsf_cs.h pair_born_coul_dsf.h
action pair_buck_coul_long_cs.h pair_buck_coul_long.h
action pair_coul_long_cs.cpp pair_coul_long.cpp
action pair_coul_long_cs.h pair_coul_long.h

View File

@ -39,7 +39,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputeTempCS::ComputeTempCS(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), vint(NULL), id_fix(NULL), fix(NULL)
{
if (narg != 5) error->all(FLERR,"Illegal compute temp/cs command");

View File

@ -0,0 +1,162 @@
/* ----------------------------------------------------------------------
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.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing author: Ariel Lozano (arielzn@gmail.com)
References: Fennell and Gezelter, JCP 124, 234104 (2006)
------------------------------------------------------------------------- */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pair_born_coul_dsf_cs.h"
#include "atom.h"
#include "comm.h"
#include "force.h"
#include "neighbor.h"
#include "neigh_list.h"
#include "math_const.h"
#include "memory.h"
#include "error.h"
#include "math_special.h"
using namespace LAMMPS_NS;
using namespace MathConst;
#define EPSILON 1.0e-20
/* ---------------------------------------------------------------------- */
PairBornCoulDSFCS::PairBornCoulDSFCS(LAMMPS *lmp) : PairBornCoulDSF(lmp)
{
writedata = 1;
single_enable = 0;
}
/* ---------------------------------------------------------------------- */
void PairBornCoulDSFCS::compute(int eflag, int vflag)
{
int i,j,ii,jj,inum,jnum,itype,jtype;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
double r,rsq,r2inv,r6inv,forcecoul,forceborn,factor_coul,factor_lj;
double prefactor,erfcc,erfcd,arg;
double rexp;
int *ilist,*jlist,*numneigh,**firstneigh;
evdwl = ecoul = 0.0;
if (eflag || vflag) ev_setup(eflag,vflag);
else evflag = vflag_fdotr = 0;
double **x = atom->x;
double **f = atom->f;
double *q = atom->q;
int *type = atom->type;
int nlocal = atom->nlocal;
double *special_lj = force->special_lj;
double *special_coul = force->special_coul;
int newton_pair = force->newton_pair;
double qqrd2e = force->qqrd2e;
inum = list->inum;
ilist = list->ilist;
numneigh = list->numneigh;
firstneigh = list->firstneigh;
// loop over neighbors of my atoms
for (ii = 0; ii < inum; ii++) {
i = ilist[ii];
qtmp = q[i];
xtmp = x[i][0];
ytmp = x[i][1];
ztmp = x[i][2];
itype = type[i];
jlist = firstneigh[i];
jnum = numneigh[i];
// self coulombic energy
if (eflag) {
double e_self = -(e_shift/2.0 + alpha/MY_PIS) * qtmp*qtmp*qqrd2e;
ev_tally(i,i,nlocal,0,0.0,e_self,0.0,0.0,0.0,0.0);
}
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
factor_lj = special_lj[sbmask(j)];
factor_coul = special_coul[sbmask(j)];
j &= NEIGHMASK;
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
jtype = type[j];
if (rsq < cutsq[itype][jtype]) {
rsq += EPSILON; // Add Epsilon for case: r = 0; Interaction must be removed by special bond;
r2inv = 1.0/rsq;
if (rsq < cut_coulsq) {
r = sqrt(rsq);
prefactor = qqrd2e*qtmp*q[j] / r;
arg = alpha * r ;
erfcd = MathSpecial::expmsq(arg);
erfcc = MathSpecial::my_erfcx(arg) * erfcd;
forcecoul = prefactor * (erfcc/r + 2.0*alpha/MY_PIS * erfcd +
r*f_shift) * r;
if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor;
} else forcecoul = 0.0;
if (rsq < cut_ljsq[itype][jtype]) {
r6inv = r2inv*r2inv*r2inv;
r = sqrt(rsq);
rexp = exp((sigma[itype][jtype]-r)*rhoinv[itype][jtype]);
forceborn = born1[itype][jtype]*r*rexp - born2[itype][jtype]*r6inv
+ born3[itype][jtype]*r2inv*r6inv;
} else forceborn = 0.0;
fpair = (forcecoul + factor_lj*forceborn) * r2inv;
f[i][0] += delx*fpair;
f[i][1] += dely*fpair;
f[i][2] += delz*fpair;
if (newton_pair || j < nlocal) {
f[j][0] -= delx*fpair;
f[j][1] -= dely*fpair;
f[j][2] -= delz*fpair;
}
if (eflag) {
if (rsq < cut_coulsq) {
ecoul = prefactor * (erfcc - r*e_shift - rsq*f_shift);
if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor;
} else ecoul = 0.0;
if (rsq < cut_ljsq[itype][jtype]) {
evdwl = a[itype][jtype]*rexp - c[itype][jtype]*r6inv +
d[itype][jtype]*r6inv*r2inv - offset[itype][jtype];
evdwl *= factor_lj;
} else evdwl = 0.0;
}
if (evflag) ev_tally(i,j,nlocal,newton_pair,
evdwl,ecoul,fpair,delx,dely,delz);
}
}
}
if (vflag_fdotr) virial_fdotr_compute();
}

View File

@ -0,0 +1,59 @@
/* -*- 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(born/coul/dsf/cs,PairBornCoulDSFCS)
#else
#ifndef LMP_PAIR_BORN_COUL_DSF_CS_H
#define LMP_PAIR_BORN_COUL_DSF_CS_H
#include "pair_born_coul_dsf.h"
namespace LAMMPS_NS {
class PairBornCoulDSFCS : public PairBornCoulDSF {
public:
PairBornCoulDSFCS(class LAMMPS *);
virtual void compute(int, int);
};
}
#endif
#endif
/* ERROR/WARNING messages:
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: Incorrect args for pair coefficients
Self-explanatory. Check the input script or data file.
E: Pair style born/coul/dsf requires atom attribute q
The atom style defined does not have this attribute.
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.
*/

View File

@ -47,7 +47,10 @@ enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files
/* ---------------------------------------------------------------------- */
FixPour::FixPour(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), radius_poly(NULL), frac_poly(NULL),
idrigid(NULL), idshake(NULL), onemols(NULL), molfrac(NULL), coords(NULL),
imageflags(NULL), fixrigid(NULL), fixshake(NULL), recvcounts(NULL),
displs(NULL), random(NULL), random2(NULL)
{
if (narg < 6) error->all(FLERR,"Illegal fix pour command");

View File

@ -46,7 +46,7 @@ enum{NONE,CONSTANT,EQUAL};
/* ---------------------------------------------------------------------- */
FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), idregion(NULL), shearone(NULL), fix_rigid(NULL), mass_rigid(NULL)
{
if (narg < 4) error->all(FLERR,"Illegal fix wall/gran command");

View File

@ -44,7 +44,8 @@ enum{HOOKE,HOOKE_HISTORY,HERTZ_HISTORY,BONDED_HISTORY};
/* ---------------------------------------------------------------------- */
FixWallGranRegion::FixWallGranRegion(LAMMPS *lmp, int narg, char **arg) :
FixWallGran(lmp, narg, arg)
FixWallGran(lmp, narg, arg), region(NULL), region_style(NULL), ncontact(NULL),
walls(NULL), shearmany(NULL), c2r(NULL)
{
restart_global = 1;
motion_resetflag = 0;

View File

@ -59,6 +59,8 @@ action bond_harmonic_kokkos.cpp bond_harmonic.cpp
action bond_harmonic_kokkos.h bond_harmonic.h
action comm_kokkos.cpp
action comm_kokkos.h
action comm_tiled_kokkos.cpp
action comm_tiled_kokkos.h
action compute_temp_kokkos.cpp
action compute_temp_kokkos.h
action dihedral_charmm_kokkos.cpp dihedral_charmm.cpp

View File

@ -103,6 +103,7 @@ void FixReaxCBondsKokkos::Output_ReaxC_Bonds(bigint ntimestep, FILE *fp)
((PairReaxCKokkos<LMPDeviceType>*) reaxc)->PackBondBuffer(k_buf,nbuf_local);
else
((PairReaxCKokkos<LMPHostType>*) reaxc)->PackBondBuffer(k_buf,nbuf_local);
buf[0] = nlocal;
// Receive information from buffer for output
RecvBuffer(buf, nbuf, nbuf_local, nlocal_tot, numbonds_max);
@ -110,6 +111,8 @@ void FixReaxCBondsKokkos::Output_ReaxC_Bonds(bigint ntimestep, FILE *fp)
memory->destroy_kokkos(k_buf,buf);
}
/* ---------------------------------------------------------------------- */
double FixReaxCBondsKokkos::memory_usage()
{
double bytes;

View File

@ -32,7 +32,7 @@ class FixReaxCBondsKokkos : public FixReaxCBonds {
void init();
private:
double nbuf;
int nbuf;
void Output_ReaxC_Bonds(bigint, FILE *);
double memory_usage();
};

View File

@ -40,14 +40,20 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */
Ewald::Ewald(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg)
Ewald::Ewald(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
kxvecs(NULL), kyvecs(NULL), kzvecs(NULL), ug(NULL), eg(NULL), vg(NULL),
ek(NULL), sfacrl(NULL), sfacim(NULL), sfacrl_all(NULL), sfacim_all(NULL),
cs(NULL), sn(NULL), sfacrl_A(NULL), sfacim_A(NULL), sfacrl_A_all(NULL),
sfacim_A_all(NULL), sfacrl_B(NULL), sfacim_B(NULL), sfacrl_B_all(NULL),
sfacim_B_all(NULL)
{
group_allocate_flag = 0;
kmax_created = 0;
if (narg != 1) error->all(FLERR,"Illegal kspace_style ewald command");
ewaldflag = 1;
group_group_enable = 1;
group_allocate_flag = 0;
accuracy_relative = fabs(force->numeric(FLERR,arg[0]));
kmax = 0;

View File

@ -45,7 +45,9 @@ enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; // same as in pair.h
/* ---------------------------------------------------------------------- */
EwaldDisp::EwaldDisp(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg)
EwaldDisp::EwaldDisp(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
kenergy(NULL), kvirial(NULL), energy_self_peratom(NULL), virial_self_peratom(NULL),
ekr_local(NULL), hvec(NULL), kvec(NULL), B(NULL), cek_local(NULL), cek_global(NULL)
{
if (narg!=1) error->all(FLERR,"Illegal kspace_style ewald/n command");

View File

@ -44,7 +44,19 @@ enum{REVERSE_RHO,REVERSE_AD,REVERSE_AD_PERATOM};
enum{FORWARD_RHO,FORWARD_AD,FORWARD_AD_PERATOM};
/* ---------------------------------------------------------------------- */
MSM::MSM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg)
MSM::MSM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
factors(NULL), delxinv(NULL), delyinv(NULL), delzinv(NULL), nx_msm(NULL),
ny_msm(NULL), nz_msm(NULL), nxlo_in(NULL), nylo_in(NULL), nzlo_in(NULL),
nxhi_in(NULL), nyhi_in(NULL), nzhi_in(NULL), nxlo_out(NULL), nylo_out(NULL),
nzlo_out(NULL), nxhi_out(NULL), nyhi_out(NULL), nzhi_out(NULL), ngrid(NULL),
active_flag(NULL), alpha(NULL), betax(NULL), betay(NULL), betaz(NULL), peratom_allocate_flag(0),
levels(0), world_levels(NULL), qgrid(NULL), egrid(NULL), v0grid(NULL), v1grid(NULL),
v2grid(NULL), v3grid(NULL), v4grid(NULL), v5grid(NULL), g_direct(NULL),
v0_direct(NULL), v1_direct(NULL), v2_direct(NULL), v3_direct(NULL), v4_direct(NULL),
v5_direct(NULL), g_direct_top(NULL), v0_direct_top(NULL), v1_direct_top(NULL),
v2_direct_top(NULL), v3_direct_top(NULL), v4_direct_top(NULL), v5_direct_top(NULL),
phi1d(NULL), dphi1d(NULL), procneigh_levels(NULL), cg(NULL), cg_peratom(NULL),
cg_all(NULL), cg_peratom_all(NULL), part2grid(NULL), boxlo(NULL)
{
if (narg < 1) error->all(FLERR,"Illegal kspace_style msm command");
@ -96,8 +108,6 @@ MSM::MSM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg)
egrid = NULL;
v0grid = v1grid = v2grid = v3grid = v4grid = v5grid = NULL;
levels = 0;
peratom_allocate_flag = 0;
scalar_pressure_flag = 1;
warn_nonneutral = 0;

View File

@ -42,7 +42,8 @@ enum{FORWARD_RHO,FORWARD_AD,FORWARD_AD_PERATOM};
/* ---------------------------------------------------------------------- */
MSMCG::MSMCG(LAMMPS *lmp, int narg, char **arg) : MSM(lmp, narg, arg)
MSMCG::MSMCG(LAMMPS *lmp, int narg, char **arg) : MSM(lmp, narg, arg),
is_charged(NULL)
{
if ((narg < 1) || (narg > 2))
error->all(FLERR,"Illegal kspace_style msm/cg command");
@ -53,7 +54,6 @@ MSMCG::MSMCG(LAMMPS *lmp, int narg, char **arg) : MSM(lmp, narg, arg)
else smallq = SMALLQ;
num_charged = -1;
is_charged = NULL;
}
/* ----------------------------------------------------------------------

View File

@ -64,8 +64,20 @@ enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM};
/* ---------------------------------------------------------------------- */
PPPM::PPPM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg)
PPPM::PPPM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
factors(NULL), density_brick(NULL), vdx_brick(NULL), vdy_brick(NULL), vdz_brick(NULL),
u_brick(NULL), v0_brick(NULL), v1_brick(NULL), v2_brick(NULL), v3_brick(NULL),
v4_brick(NULL), v5_brick(NULL), greensfn(NULL), vg(NULL), fkx(NULL), fky(NULL),
fkz(NULL), density_fft(NULL), work1(NULL), work2(NULL), gf_b(NULL), rho1d(NULL),
rho_coeff(NULL), drho1d(NULL), drho_coeff(NULL), sf_precoeff1(NULL), sf_precoeff2(NULL),
sf_precoeff3(NULL), sf_precoeff4(NULL), sf_precoeff5(NULL), sf_precoeff6(NULL),
acons(NULL), density_A_brick(NULL), density_B_brick(NULL), density_A_fft(NULL),
density_B_fft(NULL), fft1(NULL), fft2(NULL), remap(NULL), cg(NULL), cg_peratom(NULL),
part2grid(NULL), boxlo(NULL)
{
peratom_allocate_flag = 0;
group_allocate_flag = 0;
if (narg < 1) error->all(FLERR,"Illegal kspace_style pppm command");
pppmflag = 1;
@ -108,9 +120,6 @@ PPPM::PPPM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg)
nmax = 0;
part2grid = NULL;
peratom_allocate_flag = 0;
group_allocate_flag = 0;
// define acons coefficients for estimation of kspace errors
// see JCP 109, pg 7698 for derivation of coefficients
// higher order coefficients may be computed if needed

View File

@ -48,7 +48,8 @@ enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM};
/* ---------------------------------------------------------------------- */
PPPMCG::PPPMCG(LAMMPS *lmp, int narg, char **arg) : PPPM(lmp, narg, arg)
PPPMCG::PPPMCG(LAMMPS *lmp, int narg, char **arg) : PPPM(lmp, narg, arg),
is_charged(NULL)
{
if ((narg < 1) || (narg > 2))
error->all(FLERR,"Illegal kspace_style pppm/cg command");
@ -59,7 +60,6 @@ PPPMCG::PPPMCG(LAMMPS *lmp, int narg, char **arg) : PPPM(lmp, narg, arg)
else smallq = SMALLQ;
num_charged = -1;
is_charged = NULL;
group_group_enable = 1;
}

View File

@ -64,7 +64,48 @@ enum{FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM,
/* ---------------------------------------------------------------------- */
PPPMDisp::PPPMDisp(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg)
PPPMDisp::PPPMDisp(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
factors(NULL), csumi(NULL), cii(NULL), B(NULL), density_brick(NULL), vdx_brick(NULL),
vdy_brick(NULL), vdz_brick(NULL), density_fft(NULL), u_brick(NULL), v0_brick(NULL),
v1_brick(NULL), v2_brick(NULL), v3_brick(NULL), v4_brick(NULL), v5_brick(NULL),
density_brick_g(NULL), vdx_brick_g(NULL), vdy_brick_g(NULL), vdz_brick_g(NULL),
density_fft_g(NULL), u_brick_g(NULL), v0_brick_g(NULL), v1_brick_g(NULL), v2_brick_g(NULL),
v3_brick_g(NULL), v4_brick_g(NULL), v5_brick_g(NULL), density_brick_a0(NULL),
vdx_brick_a0(NULL), vdy_brick_a0(NULL), vdz_brick_a0(NULL), density_fft_a0(NULL),
u_brick_a0(NULL), v0_brick_a0(NULL), v1_brick_a0(NULL), v2_brick_a0(NULL),
v3_brick_a0(NULL), v4_brick_a0(NULL), v5_brick_a0(NULL), density_brick_a1(NULL),
vdx_brick_a1(NULL), vdy_brick_a1(NULL), vdz_brick_a1(NULL), density_fft_a1(NULL),
u_brick_a1(NULL), v0_brick_a1(NULL), v1_brick_a1(NULL), v2_brick_a1(NULL),
v3_brick_a1(NULL), v4_brick_a1(NULL), v5_brick_a1(NULL), density_brick_a2(NULL),
vdx_brick_a2(NULL), vdy_brick_a2(NULL), vdz_brick_a2(NULL), density_fft_a2(NULL),
u_brick_a2(NULL), v0_brick_a2(NULL), v1_brick_a2(NULL), v2_brick_a2(NULL),
v3_brick_a2(NULL), v4_brick_a2(NULL), v5_brick_a2(NULL), density_brick_a3(NULL),
vdx_brick_a3(NULL), vdy_brick_a3(NULL), vdz_brick_a3(NULL), density_fft_a3(NULL),
u_brick_a3(NULL), v0_brick_a3(NULL), v1_brick_a3(NULL), v2_brick_a3(NULL),
v3_brick_a3(NULL), v4_brick_a3(NULL), v5_brick_a3(NULL), density_brick_a4(NULL),
vdx_brick_a4(NULL), vdy_brick_a4(NULL), vdz_brick_a4(NULL), density_fft_a4(NULL),
u_brick_a4(NULL), v0_brick_a4(NULL), v1_brick_a4(NULL), v2_brick_a4(NULL),
v3_brick_a4(NULL), v4_brick_a4(NULL), v5_brick_a4(NULL), density_brick_a5(NULL),
vdx_brick_a5(NULL), vdy_brick_a5(NULL), vdz_brick_a5(NULL), density_fft_a5(NULL),
u_brick_a5(NULL), v0_brick_a5(NULL), v1_brick_a5(NULL), v2_brick_a5(NULL),
v3_brick_a5(NULL), v4_brick_a5(NULL), v5_brick_a5(NULL), density_brick_a6(NULL),
vdx_brick_a6(NULL), vdy_brick_a6(NULL), vdz_brick_a6(NULL), density_fft_a6(NULL),
u_brick_a6(NULL), v0_brick_a6(NULL), v1_brick_a6(NULL), v2_brick_a6(NULL),
v3_brick_a6(NULL), v4_brick_a6(NULL), v5_brick_a6(NULL), density_brick_none(NULL),
vdx_brick_none(NULL), vdy_brick_none(NULL), vdz_brick_none(NULL),
density_fft_none(NULL), u_brick_none(NULL), v0_brick_none(NULL), v1_brick_none(NULL),
v2_brick_none(NULL), v3_brick_none(NULL), v4_brick_none(NULL), v5_brick_none(NULL),
greensfn(NULL), vg(NULL), vg2(NULL), greensfn_6(NULL), vg_6(NULL), vg2_6(NULL),
fkx(NULL), fky(NULL), fkz(NULL), fkx2(NULL), fky2(NULL), fkz2(NULL), fkx_6(NULL),
fky_6(NULL), fkz_6(NULL), fkx2_6(NULL), fky2_6(NULL), fkz2_6(NULL), gf_b(NULL),
gf_b_6(NULL), sf_precoeff1(NULL), sf_precoeff2(NULL), sf_precoeff3(NULL),
sf_precoeff4(NULL), sf_precoeff5(NULL), sf_precoeff6(NULL), sf_precoeff1_6(NULL),
sf_precoeff2_6(NULL), sf_precoeff3_6(NULL), sf_precoeff4_6(NULL), sf_precoeff5_6(NULL),
sf_precoeff6_6(NULL), rho1d(NULL), rho_coeff(NULL), drho1d(NULL), drho_coeff(NULL),
rho1d_6(NULL), rho_coeff_6(NULL), drho1d_6(NULL), drho_coeff_6(NULL), work1(NULL),
work2(NULL), work1_6(NULL), work2_6(NULL), fft1(NULL), fft2(NULL), fft1_6(NULL),
fft2_6(NULL), remap(NULL), remap_6(NULL), cg(NULL), cg_peratom(NULL), cg_6(NULL),
cg_peratom_6(NULL), part2grid(NULL), part2grid_6(NULL), boxlo(NULL)
{
if (narg < 1) error->all(FLERR,"Illegal kspace_style pppm/disp command");

View File

@ -52,7 +52,8 @@ enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM};
/* ---------------------------------------------------------------------- */
PPPMStagger::PPPMStagger(LAMMPS *lmp, int narg, char **arg) :
PPPM(lmp, narg, arg)
PPPM(lmp, narg, arg),
gf_b2(NULL)
{
if (narg < 1) error->all(FLERR,"Illegal kspace_style pppm/stagger command");
stagger_flag = 1;

View File

@ -6,12 +6,12 @@ SHELL = /bin/sh
# compiler/linker settings
# specify flags and libraries needed for your compiler
CC = mpiicpc
CC = mpicxx
CCFLAGS = -g -O3
SHFLAGS = -fPIC
DEPFLAGS = -M
LINK = mpiicpc
LINK = mpicxx
LINKFLAGS = -g -O3
LIB =
SIZE = size
@ -20,7 +20,7 @@ ARCHIVE = ar
ARFLAGS = -rc
SHLIBFLAGS = -shared
KOKKOS_DEVICES = OpenMP
KOKKOS_ARCH = KNC
KOKKOS_ARCH = KNL
# ---------------------------------------------------------------------
# LAMMPS-specific settings, all OPTIONAL

View File

@ -39,7 +39,7 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixQEQComb::FixQEQComb(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg),
fp(NULL), qf(NULL), q1(NULL), q2(NULL)
fp(NULL), comb(NULL), comb3(NULL), qf(NULL), q1(NULL), q2(NULL)
{
if (narg < 5) error->all(FLERR,"Illegal fix qeq/comb command");

View File

@ -57,7 +57,7 @@ using namespace MathConst;
FixAtomSwap::FixAtomSwap(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
idregion(NULL), type_list(NULL), mu(NULL), qtype(NULL), sqrt_mass_ratio(NULL), random_equal(NULL), random_unequal(NULL)
idregion(NULL), type_list(NULL), mu(NULL), qtype(NULL), sqrt_mass_ratio(NULL), local_swap_iatom_list(NULL), local_swap_jatom_list(NULL), local_swap_atom_list(NULL), random_equal(NULL), random_unequal(NULL), c_pe(NULL)
{
if (narg < 10) error->all(FLERR,"Illegal fix atom/swap command");

View File

@ -37,7 +37,7 @@ using namespace FixConst;
FixBondBreak::FixBondBreak(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
partner(NULL), finalpartner(NULL), distsq(NULL), broken(NULL), copy(NULL), random(NULL)
partner(NULL), finalpartner(NULL), distsq(NULL), probability(NULL), broken(NULL), copy(NULL), random(NULL)
{
if (narg < 6) error->all(FLERR,"Illegal fix bond/break command");

View File

@ -40,8 +40,8 @@ using namespace FixConst;
FixBondCreate::FixBondCreate(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
bondcount(NULL), partner(NULL), finalpartner(NULL), distsq(NULL),
created(NULL), copy(NULL), random(NULL)
bondcount(NULL), partner(NULL), finalpartner(NULL), distsq(NULL),
probability(NULL), created(NULL), copy(NULL), random(NULL), list(NULL)
{
if (narg < 8) error->all(FLERR,"Illegal fix bond/create command");

View File

@ -53,7 +53,8 @@ static const char cite_fix_bond_swap[] =
FixBondSwap::FixBondSwap(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
tflag(0), alist(NULL), id_temp(NULL)
tflag(0), alist(NULL), id_temp(NULL), type(NULL), x(NULL), list(NULL),
temperature(NULL), random(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_fix_bond_swap);

View File

@ -38,7 +38,7 @@ using namespace FixConst;
FixTFMC::FixTFMC(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
xd(NULL), rotflag(0)
xd(NULL), rotflag(0), random_num(NULL)
{
if (narg < 6) error->all(FLERR,"Illegal fix tfmc command");

View File

@ -36,7 +36,8 @@ enum{PAIR,TAIL,KSPACE};
/* ---------------------------------------------------------------------- */
ComputeTI::ComputeTI(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), nterms(0), which(NULL), ivar1(NULL), ivar2(NULL),
ilo(NULL), ihi(NULL), var1(NULL), var2(NULL), pptr(NULL), pstyle(NULL)
{
if (narg < 4) error->all(FLERR,"Illegal compute ti command");

View File

@ -53,7 +53,8 @@ int xdr3dfcoord(XDR *, float *, int *, float *);
/* ---------------------------------------------------------------------- */
DumpXTC::DumpXTC(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg)
DumpXTC::DumpXTC(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg),
coords(NULL)
{
if (narg != 5) error->all(FLERR,"Illegal dump xtc command");
if (binary || compressed || multifile || multiproc)

View File

@ -45,7 +45,9 @@ enum{DIST_UNIFORM,DIST_GAUSSIAN};
/* ---------------------------------------------------------------------- */
FixDeposit::FixDeposit(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), idregion(NULL), idrigid(NULL),
idshake(NULL), onemols(NULL), molfrac(NULL), coords(NULL), imageflags(NULL),
fixrigid(NULL), fixshake(NULL), random(NULL)
{
if (narg < 7) error->all(FLERR,"Illegal fix deposit command");

View File

@ -41,7 +41,8 @@ enum{NONE,CONSTANT,EQUAL,ATOM};
/* ---------------------------------------------------------------------- */
FixEfield::FixEfield(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), xstr(NULL), ystr(NULL), zstr(NULL),
estr(NULL), idregion(NULL), efield(NULL)
{
if (narg < 6) error->all(FLERR,"Illegal fix efield command");

View File

@ -35,7 +35,7 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixEvaporate::FixEvaporate(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), idregion(NULL), list(NULL), mark(NULL), random(NULL)
{
if (narg < 7) error->all(FLERR,"Illegal fix evaporate command");

View File

@ -43,7 +43,8 @@ using namespace FixConst;
------------------------------------------------------------------------- */
FixGLD::FixGLD(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
step_respa(NULL), prony_c(NULL), prony_tau(NULL), s_gld(NULL), random(NULL)
{
int narg_min = 8;
// Check to make sure we have the minimal number of inputs

View File

@ -57,7 +57,8 @@ static const char cite_fix_orient_bcc[] =
/* ---------------------------------------------------------------------- */
FixOrientBCC::FixOrientBCC(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
xifilename(NULL), chifilename(NULL), order(NULL), nbr(NULL), sort(NULL), list(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_fix_orient_bcc);

View File

@ -54,7 +54,8 @@ static const char cite_fix_orient_fcc[] =
/* ---------------------------------------------------------------------- */
FixOrientFCC::FixOrientFCC(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
xifilename(NULL), chifilename(NULL), order(NULL), nbr(NULL), sort(NULL), list(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_fix_orient_fcc);

View File

@ -36,7 +36,8 @@ using namespace FixConst;
FixThermalConductivity::FixThermalConductivity(LAMMPS *lmp,
int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
index_lo(NULL), index_hi(NULL), ke_lo(NULL), ke_hi(NULL)
{
if (narg < 6) error->all(FLERR,"Illegal fix thermal/conductivity command");

View File

@ -40,7 +40,12 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixTTM::FixTTM(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
random(NULL), fp(NULL), fpr(NULL), nsum(NULL), nsum_all(NULL),
T_initial_set(NULL), gfactor1(NULL), gfactor2(NULL), ratio(NULL),
flangevin(NULL), T_electron(NULL), T_electron_old(NULL), sum_vsq(NULL),
sum_mass_vsq(NULL), sum_vsq_all(NULL), sum_mass_vsq_all(NULL),
net_energy_transfer(NULL), net_energy_transfer_all(NULL)
{
if (narg < 15) error->all(FLERR,"Illegal fix ttm command");

View File

@ -37,7 +37,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixViscosity::FixViscosity(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
pos_index(NULL), neg_index(NULL), pos_delta(NULL), neg_delta(NULL)
{
if (narg < 7) error->all(FLERR,"Illegal fix viscosity command");

View File

@ -62,7 +62,10 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */
FixCMAP::FixCMAP(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
FixCMAP::FixCMAP(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg),
crosstermlist(NULL), num_crossterm(NULL), crossterm_type(NULL), crossterm_atom1(NULL),
crossterm_atom2(NULL), crossterm_atom3(NULL), crossterm_atom4(NULL), crossterm_atom5(NULL),
g_axis(NULL), cmapgrid(NULL), d1cmapgrid(NULL), d2cmapgrid(NULL), d12cmapgrid(NULL)
{
if (narg != 4) error->all(FLERR,"Illegal fix cmap command");

View File

@ -32,7 +32,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputeDamageAtom::ComputeDamageAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), damage(NULL)
{
if (narg != 3) error->all(FLERR,"Illegal compute damage/atom command");
@ -40,7 +40,6 @@ ComputeDamageAtom::ComputeDamageAtom(LAMMPS *lmp, int narg, char **arg) :
size_peratom_cols = 0;
nmax = 0;
damage = NULL;
}
/* ---------------------------------------------------------------------- */

View File

@ -46,7 +46,11 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixQEq::FixQEq(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), list(NULL), chi(NULL), eta(NULL),
gamma(NULL), zeta(NULL), zcore(NULL), chizj(NULL), shld(NULL),
s(NULL), t(NULL), s_hist(NULL), t_hist(NULL), Hdia_inv(NULL), b_s(NULL),
b_t(NULL), p(NULL), q(NULL), r(NULL), d(NULL),
qf(NULL), q1(NULL), q2(NULL), qv(NULL)
{
if (narg < 8) error->all(FLERR,"Illegal fix qeq command");

View File

@ -36,7 +36,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputeEventDisplace::ComputeEventDisplace(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), id_event(NULL), fix_event(NULL)
{
if (narg != 4) error->all(FLERR,"Illegal compute event/displace command");

View File

@ -33,7 +33,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixEvent::FixEvent(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), xevent(NULL), xold(NULL), vold(NULL),
imageold(NULL), xorig(NULL), vorig(NULL), imageorig(NULL)
{
if (narg != 3) error->all(FLERR,"Illegal fix event command");
@ -42,14 +43,6 @@ FixEvent::FixEvent(LAMMPS *lmp, int narg, char **arg) :
// perform initial allocation of atom-based array
// register with Atom class
xevent = NULL;
xold = NULL;
vold = NULL;
imageold = NULL;
xorig = NULL;
vorig = NULL;
imageorig = NULL;
grow_arrays(atom->nmax);
atom->add_callback(0);
}

View File

@ -36,7 +36,10 @@ enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC};
/* ---------------------------------------------------------------------- */
FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), id_pe(NULL), pe(NULL), xprev(NULL), xnext(NULL),
tangent(NULL), xsend(NULL), xrecv(NULL), tagsend(NULL), tagrecv(NULL),
xsendall(NULL), xrecvall(NULL), tagsendall(NULL), tagrecvall(NULL),
counts(NULL), displacements(NULL)
{
if (narg != 4) error->all(FLERR,"Illegal fix neb command");

View File

@ -43,7 +43,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
VerletSplit::VerletSplit(LAMMPS *lmp, int narg, char **arg) :
Verlet(lmp, narg, arg)
Verlet(lmp, narg, arg), qsize(NULL), qdisp(NULL), xsize(NULL), xdisp(NULL), f_kspace(NULL)
{
// error checks on partitions

View File

@ -27,7 +27,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputeERotateRigid::ComputeERotateRigid(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), rfix(NULL)
{
if (narg != 4) error->all(FLERR,"Illegal compute erotate/rigid command");

View File

@ -27,7 +27,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputeKERigid::ComputeKERigid(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), rfix(NULL)
{
if (narg != 4) error->all(FLERR,"Illegal compute ke/rigid command");

View File

@ -33,7 +33,7 @@ enum{ID,MOL,MASS,X,Y,Z,XU,YU,ZU,VX,VY,VZ,FX,FY,FZ,IX,IY,IZ,
/* ---------------------------------------------------------------------- */
ComputeRigidLocal::ComputeRigidLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), rstyle(NULL), idrigid(NULL), fixrigid(NULL)
{
if (narg < 5) error->all(FLERR,"Illegal compute rigid/local command");
@ -90,7 +90,6 @@ ComputeRigidLocal::ComputeRigidLocal(LAMMPS *lmp, int narg, char **arg) :
ncount = nmax = 0;
vector = NULL;
array = NULL;
fixrigid = NULL;
}
/* ---------------------------------------------------------------------- */

View File

@ -49,7 +49,9 @@ enum{CONSTANT,EQUAL,ATOM};
/* ---------------------------------------------------------------------- */
FixEHEX::FixEHEX(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
FixEHEX::FixEHEX(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg),
idregion(NULL), x(NULL), f(NULL), v(NULL),
mass(NULL), rmass(NULL), type(NULL), scalingmask(NULL)
{
MPI_Comm_rank(world, &me);
@ -73,8 +75,7 @@ FixEHEX::FixEHEX(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
// optional args
iregion = -1;
idregion = NULL;
// NOTE: constraints are deactivated by default
constraints = 0;

View File

@ -53,18 +53,18 @@ class FixEHEX : public Fix {
char *idregion;
int me;
double ** x; // coordinates
double ** f; // forces
double ** v; // velocities
double * mass; // masses
double * rmass; // reduced masses
int * type; // atom types
double **x; // coordinates
double **f; // forces
double **v; // velocities
double *mass; // masses
double *rmass; // reduced masses
int *type; // atom types
int nlocal; // number of local atoms
FixShake * fshake; // pointer to fix_shake/fix_rattle
int constraints; // constraints (0/1)
int cluster; // rescaling entire clusters (0/1)
int hex; // HEX mode (0/1)
bool * scalingmask; // scalingmask[i] determines whether
bool *scalingmask; // scalingmask[i] determines whether
// the velocity of atom i is to be rescaled
};

View File

@ -56,7 +56,16 @@ enum{ISO,ANISO,TRICLINIC};
/* ---------------------------------------------------------------------- */
FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), step_respa(NULL),
infile(NULL), nrigid(NULL), mol2body(NULL), body2mol(NULL),
body(NULL), displace(NULL), masstotal(NULL), xcm(NULL),
vcm(NULL), fcm(NULL), inertia(NULL), ex_space(NULL),
ey_space(NULL), ez_space(NULL), angmom(NULL), omega(NULL),
torque(NULL), quat(NULL), imagebody(NULL), fflag(NULL),
tflag(NULL), langextra(NULL), sum(NULL), all(NULL),
remapflag(NULL), xcmimage(NULL), eflags(NULL), orient(NULL),
dorient(NULL), id_dilate(NULL), random(NULL), avec_ellipsoid(NULL),
avec_line(NULL), avec_tri(NULL)
{
int i,ibody;

View File

@ -47,7 +47,12 @@ enum{ISO,ANISO,TRICLINIC}; // same as in FixRigid
/* ---------------------------------------------------------------------- */
FixRigidNH::FixRigidNH(LAMMPS *lmp, int narg, char **arg) :
FixRigid(lmp, narg, arg)
FixRigid(lmp, narg, arg), conjqm(NULL), w(NULL),
wdti1(NULL), wdti2(NULL), wdti4(NULL), q_t(NULL), q_r(NULL),
eta_t(NULL), eta_r(NULL), eta_dot_t(NULL), eta_dot_r(NULL),
f_eta_t(NULL), f_eta_r(NULL), q_b(NULL), eta_b(NULL),
eta_dot_b(NULL), f_eta_b(NULL), rfix(NULL), id_temp(NULL),
id_press(NULL), temperature(NULL), pressure(NULL)
{
// error checks: could be moved up to FixRigid

View File

@ -50,7 +50,12 @@ enum{FULL_BODY,INITIAL,FINAL,FORCE_TORQUE,VCM_ANGMOM,XCM_MASS,ITENSOR,DOF};
/* ---------------------------------------------------------------------- */
FixRigidNHSmall::FixRigidNHSmall(LAMMPS *lmp, int narg, char **arg) :
FixRigidSmall(lmp, narg, arg)
FixRigidSmall(lmp, narg, arg), w(NULL), wdti1(NULL),
wdti2(NULL), wdti4(NULL), q_t(NULL), q_r(NULL), eta_t(NULL),
eta_r(NULL), eta_dot_t(NULL), eta_dot_r(NULL), f_eta_t(NULL),
f_eta_r(NULL), q_b(NULL), eta_b(NULL), eta_dot_b(NULL),
f_eta_b(NULL), rfix(NULL), id_temp(NULL), id_press(NULL),
temperature(NULL), pressure(NULL)
{
// error checks

View File

@ -67,7 +67,12 @@ enum{FULL_BODY,INITIAL,FINAL,FORCE_TORQUE,VCM_ANGMOM,XCM_MASS,ITENSOR,DOF};
/* ---------------------------------------------------------------------- */
FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), step_respa(NULL),
infile(NULL), body(NULL), bodyown(NULL), bodytag(NULL), atom2body(NULL),
xcmimage(NULL), displace(NULL), eflags(NULL), orient(NULL), dorient(NULL),
avec_ellipsoid(NULL), avec_line(NULL), avec_tri(NULL), counts(NULL),
itensor(NULL), mass_body(NULL), langextra(NULL), random(NULL), id_dilate(NULL),
onemols(NULL), hash(NULL), bbox(NULL), ctr(NULL), idclose(NULL), rsqclose(NULL)
{
int i;

View File

@ -49,7 +49,16 @@ FixShake *FixShake::fsptr;
/* ---------------------------------------------------------------------- */
FixShake::FixShake(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), bond_flag(NULL), angle_flag(NULL),
type_flag(NULL), mass_list(NULL), bond_distance(NULL), angle_distance(NULL),
loop_respa(NULL), step_respa(NULL), x(NULL), v(NULL), f(NULL), ftmp(NULL),
vtmp(NULL), mass(NULL), rmass(NULL), type(NULL), shake_flag(NULL),
shake_atom(NULL), shake_type(NULL), xshake(NULL), nshake(NULL),
list(NULL), b_count(NULL), b_count_all(NULL), b_ave(NULL), b_max(NULL),
b_min(NULL), b_ave_all(NULL), b_max_all(NULL), b_min_all(NULL),
a_count(NULL), a_count_all(NULL), a_ave(NULL), a_max(NULL), a_min(NULL),
a_ave_all(NULL), a_max_all(NULL), a_min_all(NULL), atommols(NULL),
onemols(NULL)
{
MPI_Comm_rank(world,&me);
MPI_Comm_size(world,&nprocs);

View File

@ -37,7 +37,8 @@ enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files
/* ---------------------------------------------------------------------- */
FixAppendAtoms::FixAppendAtoms(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), randomx(NULL), randomt(NULL), basistype(NULL),
spatialid(NULL), gfactor1(NULL), gfactor2(NULL)
{
force_reneighbor = 1;
next_reneighbor = -1;

View File

@ -40,7 +40,9 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), old_velocity(NULL), rfix(NULL),
id_temp(NULL), id_press(NULL), id_pe(NULL), temperature(NULL),
pressure(NULL), pe(NULL), atoms_allocated(0)
{
if (narg < 4) error->all(FLERR,"Illegal fix msst command");

View File

@ -34,7 +34,7 @@ enum{ISO,ANISO,TRICLINIC}; // same as fix_nh.cpp
/* ---------------------------------------------------------------------- */
FixNPHug::FixNPHug(LAMMPS *lmp, int narg, char **arg) :
FixNH(lmp, narg, arg)
FixNH(lmp, narg, arg), pe(NULL), id_pe(NULL)
{
// Prevent masses from being updated every timestep

View File

@ -33,7 +33,7 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */
FixWallPiston::FixWallPiston(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), randomt(NULL), gfactor1(NULL), gfactor2(NULL)
{
force_reneighbor = 1;
next_reneighbor = -1;

View File

@ -30,7 +30,8 @@
using namespace LAMMPS_NS;
ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), cutsq(NULL), list(NULL), sna(NULL),
radelem(NULL), wjelem(NULL)
{
double rmin0, rfac0;
int twojmax, switchflag;

View File

@ -30,7 +30,8 @@
using namespace LAMMPS_NS;
ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), cutsq(NULL), list(NULL), snad(NULL),
radelem(NULL), wjelem(NULL)
{
double rfac0, rmin0;
int twojmax, switchflag;

View File

@ -30,7 +30,8 @@
using namespace LAMMPS_NS;
ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), cutsq(NULL), list(NULL), snav(NULL),
radelem(NULL), wjelem(NULL)
{
double rfac0, rmin0;
int twojmax, switchflag;
@ -128,7 +129,7 @@ ComputeSNAVAtom::~ComputeSNAVAtom()
memory->destroy(radelem);
memory->destroy(wjelem);
memory->destroy(cutsq);
delete [] snaptr;
delete [] snaptr;
}
/* ---------------------------------------------------------------------- */

View File

@ -79,7 +79,13 @@ static const char cite_fix_srd[] =
/* ---------------------------------------------------------------------- */
FixSRD::FixSRD(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
FixSRD::FixSRD(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg),
wallfix(NULL), wallwhich(NULL), xwall(NULL), xwallhold(NULL),
vwall(NULL), fwall(NULL), avec_ellipsoid(NULL), avec_line(NULL),
avec_tri(NULL), random(NULL), randomshift(NULL), flocal(NULL),
tlocal(NULL), biglist(NULL), binhead(NULL), binnext(NULL), sbuf1(NULL),
sbuf2(NULL), rbuf1(NULL), rbuf2(NULL), nbinbig(NULL), binbig(NULL),
binsrd(NULL), stencil(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_fix_srd);

View File

@ -36,7 +36,7 @@ enum{NONE,EDGE,CONSTANT,VARIABLE};
/* ---------------------------------------------------------------------- */
FixWallSRD::FixWallSRD(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), nwall(0), fwall(NULL), fwall_all(NULL)
{
if (narg < 4) error->all(FLERR,"Illegal fix wall/srd command");

View File

@ -49,7 +49,7 @@ static const char cite_compute_saed_c[] =
/* ---------------------------------------------------------------------- */
ComputeSAED::ComputeSAED(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), ztype(NULL), store_tmp(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_compute_saed_c);

View File

@ -50,7 +50,7 @@ static const char cite_compute_xrd_c[] =
/* ---------------------------------------------------------------------- */
ComputeXRD::ComputeXRD(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), ztype(NULL), store_tmp(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_compute_xrd_c);

View File

@ -44,7 +44,8 @@ enum{FIRST,MULTI};
/* ---------------------------------------------------------------------- */
FixSAEDVTK::FixSAEDVTK(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), ids(NULL), fp(NULL), vector(NULL),
vector_total(NULL), vector_list(NULL), compute_saed(NULL), filename(NULL)
{
if (narg < 7) error->all(FLERR,"Illegal fix saed/vtk command");

View File

@ -35,7 +35,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputeDpdAtom::ComputeDpdAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), dpdAtom(NULL)
{
if (narg != 3) error->all(FLERR,"Illegal compute dpd/atom command");
@ -43,8 +43,7 @@ ComputeDpdAtom::ComputeDpdAtom(LAMMPS *lmp, int narg, char **arg) :
size_peratom_cols = 4;
nmax = 0;
dpdAtom = NULL;
if (atom->dpd_flag != 1) error->all(FLERR,"compute dpd requires atom_style with internal temperature and energies (e.g. dpd)");
}

View File

@ -31,7 +31,7 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixEOStable::FixEOStable(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), ntables(0), tables(NULL)
{
if (narg != 7) error->all(FLERR,"Illegal fix eos/table command");
restart_peratom = 1;

View File

@ -34,7 +34,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixEOStableRX::FixEOStableRX(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), ntables(0), tables(NULL),
tables2(NULL), dHf(NULL), eosSpecies(NULL)
{
if (narg != 8) error->all(FLERR,"Illegal fix eos/table/rx command");
restart_peratom = 1;

View File

@ -60,7 +60,13 @@ double getElapsedTime( const TimerType &t0, const TimerType &t1) { return t1-t0;
/* ---------------------------------------------------------------------- */
FixRX::FixRX(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), mol2param(NULL), nreactions(0),
params(NULL), Arr(NULL), nArr(NULL), Ea(NULL), tempExp(NULL),
stoich(NULL), stoichReactants(NULL), stoichProducts(NULL), kR(NULL),
pairDPDE(NULL), dpdThetaLocal(NULL), sumWeights(NULL), sparseKinetics_nu(NULL),
sparseKinetics_nuk(NULL), sparseKinetics_inu(NULL), sparseKinetics_isIntegralReaction(NULL),
kineticsFile(NULL), id_fix_species(NULL),
id_fix_species_old(NULL), fix_species(NULL), fix_species_old(NULL)
{
if (narg < 7 || narg > 12) error->all(FLERR,"Illegal fix rx command");
restart_peratom = 1;

View File

@ -83,7 +83,7 @@ static const char cite_fix_shardlow[] =
/* ---------------------------------------------------------------------- */
FixShardlow::FixShardlow(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), pairDPD(NULL), pairDPDE(NULL), v_t0(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_fix_shardlow);

View File

@ -54,7 +54,8 @@ static const char cite_pair_multi_lucy[] =
/* ---------------------------------------------------------------------- */
PairMultiLucy::PairMultiLucy(LAMMPS *lmp) : Pair(lmp)
PairMultiLucy::PairMultiLucy(LAMMPS *lmp) : Pair(lmp),
ntables(0), tables(NULL), tabindex(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_pair_multi_lucy);

View File

@ -59,7 +59,8 @@ static const char cite_pair_multi_lucy_rx[] =
/* ---------------------------------------------------------------------- */
PairMultiLucyRX::PairMultiLucyRX(LAMMPS *lmp) : Pair(lmp)
PairMultiLucyRX::PairMultiLucyRX(LAMMPS *lmp) : Pair(lmp),
ntables(0), tables(NULL), tabindex(NULL), site1(NULL), site2(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_pair_multi_lucy_rx);

View File

@ -34,7 +34,7 @@ enum{ISO,ANISO,TRICLINIC}; // same as fix_nh.cpp
/* ---------------------------------------------------------------------- */
FixNPHugOMP::FixNPHugOMP(LAMMPS *lmp, int narg, char **arg) :
FixNHOMP(lmp, narg, arg)
FixNHOMP(lmp, narg, arg), pe(NULL), id_pe(NULL)
{
// Prevent masses from being updated every timestep

View File

@ -44,7 +44,8 @@ enum{FORWARD_RHO,FORWARD_AD,FORWARD_AD_PERATOM};
/* ---------------------------------------------------------------------- */
MSMCGOMP::MSMCGOMP(LAMMPS *lmp, int narg, char **arg) : MSMOMP(lmp, narg, arg)
MSMCGOMP::MSMCGOMP(LAMMPS *lmp, int narg, char **arg) : MSMOMP(lmp, narg, arg),
is_charged(NULL)
{
if ((narg < 1) || (narg > 2))
error->all(FLERR,"Illegal kspace_style msm/cg/omp command");
@ -55,7 +56,6 @@ MSMCGOMP::MSMCGOMP(LAMMPS *lmp, int narg, char **arg) : MSMOMP(lmp, narg, arg)
else smallq = SMALLQ;
num_charged = -1;
is_charged = NULL;
}
/* ----------------------------------------------------------------------

View File

@ -22,6 +22,7 @@
#include "kokkos.h"
#include "atom_kokkos.h"
#include "comm_kokkos.h"
#include "comm_tiled_kokkos.h"
#include "domain_kokkos.h"
#include "neighbor_kokkos.h"
#include "modify_kokkos.h"
@ -33,6 +34,7 @@
#include "atom.h"
#include "comm_brick.h"
#include "comm_tiled.h"
#include "domain.h"
#include "neighbor.h"
#include "modify.h"
@ -68,6 +70,13 @@ class CommKokkos : public CommBrick {
~CommKokkos() {}
};
class CommTiledKokkos : public CommTiled {
public:
CommTiledKokkos(class LAMMPS *lmp) : CommTiled(lmp) {}
CommTiledKokkos(class LAMMPS *lmp, Comm *oldcomm) : CommTiled(lmp,oldcomm) {}
~CommTiledKokkos() {}
};
class DomainKokkos : public Domain {
public:
DomainKokkos(class LAMMPS *lmp) : Domain(lmp) {}

View File

@ -51,7 +51,10 @@ enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files
/* ---------------------------------------------------------------------- */
CommBrick::CommBrick(LAMMPS *lmp) : Comm(lmp)
CommBrick::CommBrick(LAMMPS *lmp) : Comm(lmp),
sendnum(NULL), recvnum(NULL), sendproc(NULL), recvproc(NULL), size_forward_recv(NULL),
size_reverse_send(NULL), size_reverse_recv(NULL), slablo(NULL), slabhi(NULL), multilo(NULL), multihi(NULL),
cutghostmulti(NULL), pbc_flag(NULL), pbc(NULL), firstrecv(NULL), sendlist(NULL), maxsendlist(NULL), buf_send(NULL), buf_recv(NULL)
{
style = 0;
layout = LAYOUT_UNIFORM;

View File

@ -42,7 +42,7 @@ enum{INT,DOUBLE,STRING,BIGINT}; // same as in DumpCustom
/* ---------------------------------------------------------------------- */
DumpCFG::DumpCFG(LAMMPS *lmp, int narg, char **arg) :
DumpCustom(lmp, narg, arg)
DumpCustom(lmp, narg, arg), auxname(NULL)
{
multifile_override = 0;

View File

@ -54,7 +54,13 @@ enum{INT,DOUBLE,STRING,BIGINT}; // same as in DumpCFG
/* ---------------------------------------------------------------------- */
DumpCustom::DumpCustom(LAMMPS *lmp, int narg, char **arg) :
Dump(lmp, narg, arg)
Dump(lmp, narg, arg),
idregion(NULL), thresh_array(NULL), thresh_op(NULL), thresh_value(NULL),
thresh_last(NULL), thresh_fix(NULL), thresh_fixID(NULL), thresh_first(NULL),
earg(NULL), vtype(NULL), vformat(NULL), columns(NULL), choose(NULL),
dchoose(NULL), clist(NULL), field2index(NULL), argindex(NULL), id_compute(NULL),
compute(NULL), id_fix(NULL), fix(NULL), id_variable(NULL), variable(NULL),
vbuf(NULL), id_custom(NULL), flag_custom(NULL), typenames(NULL), pack_choice(NULL)
{
if (narg == 5) error->all(FLERR,"No dump custom arguments specified");

View File

@ -52,7 +52,8 @@ static inline void fwrite_int32(FILE* fd, uint32_t i)
/* ---------------------------------------------------------------------- */
DumpDCD::DumpDCD(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg)
DumpDCD::DumpDCD(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg),
coords(NULL)
{
if (narg != 5) error->all(FLERR,"Illegal dump dcd command");
if (binary || compressed || multifile || multiproc)

View File

@ -49,7 +49,12 @@ enum{NO,YES};
/* ---------------------------------------------------------------------- */
DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) :
DumpCustom(lmp, narg, arg)
DumpCustom(lmp, narg, arg), thetastr(NULL), phistr(NULL), cxstr(NULL),
cystr(NULL), czstr(NULL), upxstr(NULL), upystr(NULL), upzstr(NULL),
zoomstr(NULL), perspstr(NULL), diamtype(NULL), diamelement(NULL),
bdiamtype(NULL), colortype(NULL), colorelement(NULL), bcolortype(NULL),
avec_line(NULL), avec_tri(NULL), avec_body(NULL), fixptr(NULL), image(NULL),
chooseghost(NULL), bufcopy(NULL)
{
if (binary || multiproc) error->all(FLERR,"Invalid dump image filename");

View File

@ -37,7 +37,10 @@ enum{INT,DOUBLE};
/* ---------------------------------------------------------------------- */
DumpLocal::DumpLocal(LAMMPS *lmp, int narg, char **arg) :
Dump(lmp, narg, arg)
Dump(lmp, narg, arg),
label(NULL), vtype(NULL), vformat(NULL), columns(NULL), field2index(NULL),
argindex(NULL), id_compute(NULL), compute(NULL), id_fix(NULL), fix(NULL),
pack_choice(NULL)
{
if (narg == 5) error->all(FLERR,"No dump local arguments specified");

View File

@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
DumpXYZ::DumpXYZ(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg)
DumpXYZ::DumpXYZ(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg),
typenames(NULL)
{
if (narg != 5) error->all(FLERR,"Illegal dump xyz command");
if (binary || multiproc) error->all(FLERR,"Invalid dump xyz filename");

View File

@ -32,7 +32,8 @@ int Fix::instance_total = 0;
/* ---------------------------------------------------------------------- */
Fix::Fix(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp),
id(NULL), style(NULL), eatom(NULL), vatom(NULL)
id(NULL), style(NULL), extlist(NULL), vector_atom(NULL), array_atom(NULL),
vector_local(NULL), array_local(NULL), eatom(NULL), vatom(NULL)
{
instance_me = instance_total++;

View File

@ -27,6 +27,7 @@
#include "comm.h"
#include "comm_brick.h"
#include "comm_tiled.h"
#include "accelerator_kokkos.h"
#include "group.h"
#include "domain.h"
#include "output.h"
@ -1465,7 +1466,10 @@ void Input::comm_style()
} else if (strcmp(arg[0],"tiled") == 0) {
if (comm->style == 1) return;
Comm *oldcomm = comm;
comm = new CommTiled(lmp,oldcomm);
if (lmp->kokkos) comm = new CommTiledKokkos(lmp,oldcomm);
else comm = new CommTiled(lmp,oldcomm);
delete oldcomm;
} else error->all(FLERR,"Illegal comm_style command");
}

View File

@ -32,6 +32,7 @@ using namespace LAMMPS_NS;
KSpace::KSpace(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
{
order_allocated = 0;
energy = 0.0;
virial[0] = virial[1] = virial[2] = virial[3] = virial[4] = virial[5] = 0.0;

View File

@ -46,10 +46,13 @@
#include "accelerator_omp.h"
#include "timer.h"
#include "memory.h"
#include "version.h"
#include "error.h"
using namespace LAMMPS_NS;
static void print_style(FILE *fp, const char *str, int &pos);
/* ----------------------------------------------------------------------
start up LAMMPS
allocate fundamental classes (memory, error, universe, input)
@ -86,6 +89,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
suffix = suffix2 = NULL;
suffix_enable = 0;
exename = arg[0];
packargs = NULL;
num_package = 0;
char *rfile = NULL;
@ -762,8 +766,37 @@ void LAMMPS::destroy()
void LAMMPS::help()
{
fprintf(screen,
"\nCommand line options:\n\n"
FILE *fp = screen;
const char *pager = NULL;
// if output is "stdout", use a pipe to a pager for paged output.
// this will avoid the most important help text to rush past the
// user. scrollback buffers are often not large enough. this is most
// beneficial to windows users, who are not used to command line.
if (fp == stdout) {
pager = getenv("PAGER");
if (pager == NULL) pager = "more";
#if defined(_WIN32)
fp = _popen(pager,"w");
#else
fp = popen(pager,"w");
#endif
// reset to original state, if pipe command failed
if (fp == NULL) {
fp = stdout;
pager = NULL;
}
}
// general help message about command line and flags
fprintf(fp,
"\nLarge-scale Atomic/Molecular Massively Parallel Simulator - "
LAMMPS_VERSION "\n\n"
"Usage example: %s -var t 300 -echo screen -in in.alloy\n\n"
"List of command line options supported by this LAMMPS executable:\n\n"
"-echo none/screen/log/both : echoing of input script (-e)\n"
"-help : print this help message (-h)\n"
"-in filename : read input from file, not stdin (-i)\n"
@ -778,121 +811,126 @@ void LAMMPS::help()
"-reorder topology-specs : processor reordering (-r)\n"
"-screen none/filename : where to send screen output (-sc)\n"
"-suffix gpu/intel/opt/omp : style suffix to apply (-sf)\n"
"-var varname value : set index style variable (-v)\n\n");
"-var varname value : set index style variable (-v)\n\n",
exename);
fprintf(screen,"Style options compiled with this executable\n\n");
fprintf(fp,"List of style options included in this LAMMPS executable\n\n");
int pos = 80;
fprintf(screen,"* Atom styles:\n");
fprintf(fp,"* Atom styles:\n");
#define ATOM_CLASS
#define AtomStyle(key,Class) print_style(#key,pos);
#define AtomStyle(key,Class) print_style(fp,#key,pos);
#include "style_atom.h"
#undef ATOM_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Integrate styles:\n");
fprintf(fp,"* Integrate styles:\n");
#define INTEGRATE_CLASS
#define IntegrateStyle(key,Class) print_style(#key,pos);
#define IntegrateStyle(key,Class) print_style(fp,#key,pos);
#include "style_integrate.h"
#undef INTEGRATE_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Minimize styles:\n");
fprintf(fp,"* Minimize styles:\n");
#define MINIMIZE_CLASS
#define MinimizeStyle(key,Class) print_style(#key,pos);
#define MinimizeStyle(key,Class) print_style(fp,#key,pos);
#include "style_minimize.h"
#undef MINIMIZE_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Pair styles:\n");
fprintf(fp,"* Pair styles:\n");
#define PAIR_CLASS
#define PairStyle(key,Class) print_style(#key,pos);
#define PairStyle(key,Class) print_style(fp,#key,pos);
#include "style_pair.h"
#undef PAIR_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Bond styles:\n");
fprintf(fp,"* Bond styles:\n");
#define BOND_CLASS
#define BondStyle(key,Class) print_style(#key,pos);
#define BondStyle(key,Class) print_style(fp,#key,pos);
#include "style_bond.h"
#undef BOND_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Angle styles:\n");
fprintf(fp,"* Angle styles:\n");
#define ANGLE_CLASS
#define AngleStyle(key,Class) print_style(#key,pos);
#define AngleStyle(key,Class) print_style(fp,#key,pos);
#include "style_angle.h"
#undef ANGLE_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Dihedral styles:\n");
fprintf(fp,"* Dihedral styles:\n");
#define DIHEDRAL_CLASS
#define DihedralStyle(key,Class) print_style(#key,pos);
#define DihedralStyle(key,Class) print_style(fp,#key,pos);
#include "style_dihedral.h"
#undef DIHEDRAL_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Improper styles:\n");
fprintf(fp,"* Improper styles:\n");
#define IMPROPER_CLASS
#define ImproperStyle(key,Class) print_style(#key,pos);
#define ImproperStyle(key,Class) print_style(fp,#key,pos);
#include "style_improper.h"
#undef IMPROPER_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* KSpace styles:\n");
fprintf(fp,"* KSpace styles:\n");
#define KSPACE_CLASS
#define KSpaceStyle(key,Class) print_style(#key,pos);
#define KSpaceStyle(key,Class) print_style(fp,#key,pos);
#include "style_kspace.h"
#undef KSPACE_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Fix styles\n");
fprintf(fp,"* Fix styles\n");
#define FIX_CLASS
#define FixStyle(key,Class) print_style(#key,pos);
#define FixStyle(key,Class) print_style(fp,#key,pos);
#include "style_fix.h"
#undef FIX_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Compute styles:\n");
fprintf(fp,"* Compute styles:\n");
#define COMPUTE_CLASS
#define ComputeStyle(key,Class) print_style(#key,pos);
#define ComputeStyle(key,Class) print_style(fp,#key,pos);
#include "style_compute.h"
#undef COMPUTE_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Region styles:\n");
fprintf(fp,"* Region styles:\n");
#define REGION_CLASS
#define RegionStyle(key,Class) print_style(#key,pos);
#define RegionStyle(key,Class) print_style(fp,#key,pos);
#include "style_region.h"
#undef REGION_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Dump styles:\n");
fprintf(fp,"* Dump styles:\n");
#define DUMP_CLASS
#define DumpStyle(key,Class) print_style(#key,pos);
#define DumpStyle(key,Class) print_style(fp,#key,pos);
#include "style_dump.h"
#undef DUMP_CLASS
fprintf(screen,"\n\n");
fprintf(fp,"\n\n");
pos = 80;
fprintf(screen,"* Command styles\n");
fprintf(fp,"* Command styles\n");
#define COMMAND_CLASS
#define CommandStyle(key,Class) print_style(#key,pos);
#define CommandStyle(key,Class) print_style(fp,#key,pos);
#include "style_command.h"
#undef COMMAND_CLASS
fprintf(screen,"\n");
fprintf(fp,"\n\n");
// close pipe to pager, if active
if (pager != NULL) pclose(fp);
}
/* ----------------------------------------------------------------------
@ -900,30 +938,30 @@ void LAMMPS::help()
skip any style that starts with upper-case letter, since internal
------------------------------------------------------------------------- */
void LAMMPS::print_style(const char *str, int &pos)
void print_style(FILE *fp, const char *str, int &pos)
{
if (isupper(str[0])) return;
int len = strlen(str);
if (pos+len > 80) {
fprintf(screen,"\n");
fprintf(fp,"\n");
pos = 0;
}
if (len < 16) {
fprintf(screen,"%-16s",str);
fprintf(fp,"%-16s",str);
pos += 16;
} else if (len < 32) {
fprintf(screen,"%-32s",str);
fprintf(fp,"%-32s",str);
pos += 32;
} else if (len < 48) {
fprintf(screen,"%-48s",str);
fprintf(fp,"%-48s",str);
pos += 48;
} else if (len < 64) {
fprintf(screen,"%-64s",str);
fprintf(fp,"%-64s",str);
pos += 64;
} else {
fprintf(screen,"%-80s",str);
fprintf(fp,"%-80s",str);
pos += 80;
}
}

View File

@ -46,6 +46,7 @@ class LAMMPS {
char *suffix,*suffix2; // suffixes to add to input script style names
int suffix_enable; // 1 if suffixes are enabled, 0 if disabled
char *exename; // pointer to argv[0]
char ***packargs; // arguments for cmdline package commands
int num_package; // number of cmdline package commands
int cite_enable; // 1 if generating log.cite, 0 if disabled
@ -64,7 +65,6 @@ class LAMMPS {
private:
void help();
void print_style(const char *, int &);
LAMMPS() {}; // prohibit using the default constructor
LAMMPS(const LAMMPS &) {}; // prohibit using the copy constructor
};

Some files were not shown because too many files have changed in this diff Show More