Compare commits
22 Commits
patch_31Ma
...
patch_11Ap
| Author | SHA1 | Date | |
|---|---|---|---|
| 4da8c1c4e2 | |||
| 49dd9449b8 | |||
| 76fd936972 | |||
| 06cebb9fb4 | |||
| b9d844ca8d | |||
| ccc9367de7 | |||
| 4c4a3fe5d1 | |||
| 84ea8a79e6 | |||
| f19f558220 | |||
| 1ad7d856fe | |||
| d6357420ae | |||
| 62b9fa22b8 | |||
| 1725832b6c | |||
| 874944f2ec | |||
| 497a5d88af | |||
| 8993daaa31 | |||
| e190eb15f5 | |||
| b6bc33bac6 | |||
| 03a6f5237f | |||
| 28e86917a0 | |||
| 6f1bbd3cec | |||
| 1544b51dcb |
@ -1,7 +1,7 @@
|
|||||||
<!-- HTML_ONLY -->
|
<!-- HTML_ONLY -->
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE>LAMMPS Users Manual</TITLE>
|
<TITLE>LAMMPS Users Manual</TITLE>
|
||||||
<META NAME="docnumber" CONTENT="31 Mar 2017 version">
|
<META NAME="docnumber" CONTENT="11 Apr 2017 version">
|
||||||
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
<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.">
|
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
||||||
</HEAD>
|
</HEAD>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<H1></H1>
|
<H1></H1>
|
||||||
|
|
||||||
LAMMPS Documentation :c,h3
|
LAMMPS Documentation :c,h3
|
||||||
31 Mar 2017 version :c,h4
|
11 Apr 2017 version :c,h4
|
||||||
|
|
||||||
Version info: :h4
|
Version info: :h4
|
||||||
|
|
||||||
|
|||||||
@ -1155,7 +1155,7 @@ USER-OMP, t = OPT.
|
|||||||
"zero"_dihedral_zero.html,
|
"zero"_dihedral_zero.html,
|
||||||
"hybrid"_dihedral_hybrid.html,
|
"hybrid"_dihedral_hybrid.html,
|
||||||
"charmm (ko)"_dihedral_charmm.html,
|
"charmm (ko)"_dihedral_charmm.html,
|
||||||
"charmmfsh"_dihedral_charmm.html,
|
"charmmfsw"_dihedral_charmm.html,
|
||||||
"class2 (ko)"_dihedral_class2.html,
|
"class2 (ko)"_dihedral_class2.html,
|
||||||
"harmonic (io)"_dihedral_harmonic.html,
|
"harmonic (io)"_dihedral_harmonic.html,
|
||||||
"helix (o)"_dihedral_helix.html,
|
"helix (o)"_dihedral_helix.html,
|
||||||
|
|||||||
@ -215,7 +215,7 @@ documentation for the formula it computes.
|
|||||||
"special_bonds"_special_bonds.html charmm
|
"special_bonds"_special_bonds.html charmm
|
||||||
"special_bonds"_special_bonds.html amber :ul
|
"special_bonds"_special_bonds.html amber :ul
|
||||||
|
|
||||||
NOTE: For CHARMM, the newer {charmmfsw} or {charmmfsh} styles were
|
NOTE: For CHARMM, newer {charmmfsw} or {charmmfsh} styles were
|
||||||
released in March 2017. We recommend they be used instead of the
|
released in March 2017. We recommend they be used instead of the
|
||||||
older {charmm} styles. See discussion of the differences on the "pair
|
older {charmm} styles. See discussion of the differences on the "pair
|
||||||
charmm"_pair_charmm.html and "dihedral charmm"_dihedral_charmm.html
|
charmm"_pair_charmm.html and "dihedral charmm"_dihedral_charmm.html
|
||||||
|
|||||||
@ -1308,8 +1308,8 @@ oxdna/..."_pair_oxdna.html, "pair_style
|
|||||||
oxdna2/..."_pair_oxdna2.html, "fix
|
oxdna2/..."_pair_oxdna2.html, "fix
|
||||||
nve/dotc/langevin"_fix_nve_dotc_langevin.html
|
nve/dotc/langevin"_fix_nve_dotc_langevin.html
|
||||||
|
|
||||||
Author: Oliver Henrich at the University of Strathclyde, Glasgow, UK and
|
Author: Oliver Henrich at the University of Strathclyde, Glasgow
|
||||||
University of Edinburgh (ohenrich@ph.ed.ac.uk).
|
(oliver.henrich at strath.ac.uk, also ohenrich at ph.ed.ac.uk).
|
||||||
Contact him directly if you have any questions.
|
Contact him directly if you have any questions.
|
||||||
|
|
||||||
:line
|
:line
|
||||||
|
|||||||
@ -455,8 +455,7 @@ and related PPPM operations are somewhat insensitive to floating point
|
|||||||
truncation errors and thus do not always need to be performed in
|
truncation errors and thus do not always need to be performed in
|
||||||
double precision. Using the -DFFT_SINGLE setting trades off a little
|
double precision. Using the -DFFT_SINGLE setting trades off a little
|
||||||
accuracy for reduced memory use and parallel communication costs for
|
accuracy for reduced memory use and parallel communication costs for
|
||||||
transposing 3d FFT data. Note that single precision FFTs have only
|
transposing 3d FFT data.
|
||||||
been tested with the FFTW3, FFTW2, MKL, and KISS FFT options.
|
|
||||||
|
|
||||||
Step 7 :h6
|
Step 7 :h6
|
||||||
|
|
||||||
|
|||||||
@ -46,9 +46,7 @@ for excluded volume interaction {oxdna/excv}, stacking {oxdna/stk}, cross-stacki
|
|||||||
and coaxial stacking interaction {oxdna/coaxstk} as well as hydrogen-bonding interaction {oxdna/hbond} (see also documentation of
|
and coaxial stacking interaction {oxdna/coaxstk} as well as hydrogen-bonding interaction {oxdna/hbond} (see also documentation of
|
||||||
"pair_style oxdna/excv"_pair_oxdna.html). For the oxDNA2 "(Snodin)"_#oxdna2 bond style the analogous pair styles and an additional Debye-Hueckel pair
|
"pair_style oxdna/excv"_pair_oxdna.html). For the oxDNA2 "(Snodin)"_#oxdna2 bond style the analogous pair styles and an additional Debye-Hueckel pair
|
||||||
style {oxdna2/dh} have to be defined.
|
style {oxdna2/dh} have to be defined.
|
||||||
|
The coefficients in the above example have to be kept fixed and cannot be changed without reparametrizing the entire model.
|
||||||
The coefficients
|
|
||||||
in the above example have to be kept fixed and cannot be changed without reparametrizing the entire model.
|
|
||||||
|
|
||||||
Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/.
|
Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/.
|
||||||
A simple python setup tool which creates single straight or helical DNA strands,
|
A simple python setup tool which creates single straight or helical DNA strands,
|
||||||
|
|||||||
@ -10,25 +10,25 @@ dihedral_style charmm command :h3
|
|||||||
dihedral_style charmm/intel command :h3
|
dihedral_style charmm/intel command :h3
|
||||||
dihedral_style charmm/kk command :h3
|
dihedral_style charmm/kk command :h3
|
||||||
dihedral_style charmm/omp command :h3
|
dihedral_style charmm/omp command :h3
|
||||||
dihedral_style charmmfsh command :h3
|
dihedral_style charmmfsw command :h3
|
||||||
|
|
||||||
[Syntax:]
|
[Syntax:]
|
||||||
|
|
||||||
dihedral_style style :pre
|
dihedral_style style :pre
|
||||||
|
|
||||||
style = {charmm} or {charmmfsh} :ul
|
style = {charmm} or {charmmfsw} :ul
|
||||||
|
|
||||||
[Examples:]
|
[Examples:]
|
||||||
|
|
||||||
dihedral_style charmm
|
dihedral_style charmm
|
||||||
dihedral_style charmmfsh
|
dihedral_style charmmfsw
|
||||||
dihedral_coeff 1 0.2 1 180 1.0
|
dihedral_coeff 1 0.2 1 180 1.0
|
||||||
dihedral_coeff 2 1.8 1 0 1.0
|
dihedral_coeff 2 1.8 1 0 1.0
|
||||||
dihedral_coeff 1 3.1 2 180 0.5 :pre
|
dihedral_coeff 1 3.1 2 180 0.5 :pre
|
||||||
|
|
||||||
[Description:]
|
[Description:]
|
||||||
|
|
||||||
The {charmm} and {charmmfsh} dihedral styles use the potential
|
The {charmm} and {charmmfsw} dihedral styles use the potential
|
||||||
|
|
||||||
:c,image(Eqs/dihedral_charmm.jpg)
|
:c,image(Eqs/dihedral_charmm.jpg)
|
||||||
|
|
||||||
@ -38,10 +38,12 @@ field (see comment on weighting factors below). See
|
|||||||
"(Cornell)"_#dihedral-Cornell for a description of the AMBER force
|
"(Cornell)"_#dihedral-Cornell for a description of the AMBER force
|
||||||
field.
|
field.
|
||||||
|
|
||||||
NOTE: The newer {charmmfsh} style was released in March 2017. We
|
NOTE: The newer {charmmfsw} style was released in March 2017. We
|
||||||
recommend it be used instead of the older {charmm} style when running
|
recommend it be used instead of the older {charmm} style when running
|
||||||
a simulation with the CHARMM force field and Coulomb cutoffs, via the
|
a simulation with the CHARMM force field, either with long-range
|
||||||
"pair_style lj/charmmfsw/coul/charmmfsh"_pair_charmm.html command.
|
Coulombics or a Coulomb cutoff, via the "pair_style
|
||||||
|
lj/charmmfsw/coul/long"_pair_charmm.html and "pair_style
|
||||||
|
lj/charmmfsw/coul/charmmfsh"_pair_charmm.html commands respectively.
|
||||||
Otherwise the older {charmm} style is fine to use. See the discussion
|
Otherwise the older {charmm} style is fine to use. See the discussion
|
||||||
below and more details on the "pair_style charmm"_pair_charmm.html doc
|
below and more details on the "pair_style charmm"_pair_charmm.html doc
|
||||||
page.
|
page.
|
||||||
@ -86,17 +88,18 @@ default). Otherwise 1-4 non-bonded interactions in dihedrals will be
|
|||||||
computed twice.
|
computed twice.
|
||||||
|
|
||||||
For simulations using the CHARMM force field with a Coulomb cutoff,
|
For simulations using the CHARMM force field with a Coulomb cutoff,
|
||||||
the difference between the {charmm} and {charmmfsh} styles is in the
|
the difference between the {charmm} and {charmmfsw} styles is in the
|
||||||
computation of the 1-4 non-bond interactions, though only if the
|
computation of the 1-4 non-bond interactions, though only if the
|
||||||
distance between the two atoms is within the switching region of the
|
distance between the two atoms is within the switching region of the
|
||||||
pairwise potential defined by the corresponding CHARMM pair style,
|
pairwise potential defined by the corresponding CHARMM pair style,
|
||||||
i.e. within the outer cutoff specified for the pair style. The
|
i.e. within the outer cutoff specified for the pair style. The
|
||||||
{charmmfsh} style should only be used when using the "pair_style
|
{charmmfsw} style should only be used when using the corresponding
|
||||||
lj/charmmfsw/coul/charmmfsh"_pair_charmm.html to make the Coulombic
|
"pair_style lj/charmmfsw/coul/charmmfsw"_pair_charmm.html or
|
||||||
pairwise calculations consistent. Use the {charmm} style with
|
"pair_style lj/charmmfsw/coul/long"_pair_charmm.html commands. Use
|
||||||
long-range Coulombics or the older "pair_style
|
the {charmm} style with the older "pair_style"_pair_charmm.html
|
||||||
lj/charmm/coul/charmm"_pair_charmm.html command. See the discussion
|
commands that have just "charmm" in their style name. See the
|
||||||
on the "CHARMM pair_style"_pair_charmm.html doc page for details.
|
discussion on the "CHARMM pair_style"_pair_charmm.html doc page for
|
||||||
|
details.
|
||||||
|
|
||||||
Note that for AMBER force fields, which use pair styles with "lj/cut",
|
Note that for AMBER force fields, which use pair styles with "lj/cut",
|
||||||
the special_bonds 1-4 scaling factor should be set to the AMBER
|
the special_bonds 1-4 scaling factor should be set to the AMBER
|
||||||
@ -104,7 +107,7 @@ defaults (1/2 and 5/6) and all the dihedral weighting factors (4th
|
|||||||
coeff above) must be set to 0.0. In this case, you can use any pair
|
coeff above) must be set to 0.0. In this case, you can use any pair
|
||||||
style you wish, since the dihedral does not need any Lennard-Jones
|
style you wish, since the dihedral does not need any Lennard-Jones
|
||||||
parameter information and will not compute any 1-4 non-bonded
|
parameter information and will not compute any 1-4 non-bonded
|
||||||
interactions. Likewise the {charmm} or {charmmfsh} styles are
|
interactions. Likewise the {charmm} or {charmmfsw} styles are
|
||||||
identical in this case since no 1-4 non-bonded interactions are
|
identical in this case since no 1-4 non-bonded interactions are
|
||||||
computed.
|
computed.
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,11 @@ attribute = {pair} or {kspace} or {atom} :l
|
|||||||
pparam = parameter to adapt over time
|
pparam = parameter to adapt over time
|
||||||
I,J = type pair(s) to set parameter for
|
I,J = type pair(s) to set parameter for
|
||||||
v_name = variable with name that calculates value of pparam
|
v_name = variable with name that calculates value of pparam
|
||||||
|
{bond} args = bstyle bparam I v_name
|
||||||
|
bstyle = bond style name, e.g. harmonic
|
||||||
|
bparam = parameter to adapt over time
|
||||||
|
I = type bond to set parameter for
|
||||||
|
v_name = variable with name that calculates value of bparam
|
||||||
{kspace} arg = v_name
|
{kspace} arg = v_name
|
||||||
v_name = variable with name that calculates scale factor on K-space terms
|
v_name = variable with name that calculates scale factor on K-space terms
|
||||||
{atom} args = aparam v_name
|
{atom} args = aparam v_name
|
||||||
@ -42,7 +47,10 @@ keyword = {scale} or {reset} :l
|
|||||||
fix 1 all adapt 1 pair soft a 1 1 v_prefactor
|
fix 1 all adapt 1 pair soft a 1 1 v_prefactor
|
||||||
fix 1 all adapt 1 pair soft a 2* 3 v_prefactor
|
fix 1 all adapt 1 pair soft a 2* 3 v_prefactor
|
||||||
fix 1 all adapt 1 pair lj/cut epsilon * * v_scale1 coul/cut scale 3 3 v_scale2 scale yes reset yes
|
fix 1 all adapt 1 pair lj/cut epsilon * * v_scale1 coul/cut scale 3 3 v_scale2 scale yes reset yes
|
||||||
fix 1 all adapt 10 atom diameter v_size :pre
|
fix 1 all adapt 10 atom diameter v_size
|
||||||
|
|
||||||
|
variable ramp_up equal "ramp(0.01,0.5)"
|
||||||
|
fix stretch all adapt 1 bond harmonic r0 1 v_ramp_up :pre
|
||||||
|
|
||||||
[Description:]
|
[Description:]
|
||||||
|
|
||||||
@ -192,6 +200,19 @@ fix 1 all adapt 1 pair soft a * * v_prefactor :pre
|
|||||||
|
|
||||||
:line
|
:line
|
||||||
|
|
||||||
|
The {bond} keyword uses the specified variable to change the value of
|
||||||
|
a bond coefficient over time, very similar to how the {pair} keyword
|
||||||
|
operates. The only difference is that now a bond coefficient for a
|
||||||
|
given bond type is adapted.
|
||||||
|
|
||||||
|
Currently {bond} does not support bond_style hybrid nor bond_style
|
||||||
|
hybrid/overlay as bond styles. The only bonds that currently are
|
||||||
|
working with fix_adapt are
|
||||||
|
|
||||||
|
"harmonic"_bond_harmonic.html: k,r0: type bonds :tb(c=3,s=:)
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
The {kspace} keyword used the specified variable as a scale factor on
|
The {kspace} keyword used the specified variable as a scale factor on
|
||||||
the energy, forces, virial calculated by whatever K-Space solver is
|
the energy, forces, virial calculated by whatever K-Space solver is
|
||||||
defined by the "kspace_style"_kspace_style.html command. If the
|
defined by the "kspace_style"_kspace_style.html command. If the
|
||||||
|
|||||||
@ -290,9 +290,10 @@ to be specified using the {gewald/disp}, {mesh/disp},
|
|||||||
{force/disp/real} or {force/disp/kspace} keywords, or
|
{force/disp/real} or {force/disp/kspace} keywords, or
|
||||||
the code will stop with an error message. When this option is set to
|
the code will stop with an error message. When this option is set to
|
||||||
{yes}, the error message will not appear and the simulation will start.
|
{yes}, the error message will not appear and the simulation will start.
|
||||||
For a typical application, using the automatic parameter generation will provide
|
For a typical application, using the automatic parameter generation
|
||||||
simulations that are either inaccurate or slow. Using this option is thus not
|
will provide simulations that are either inaccurate or slow. Using this
|
||||||
recommended. For guidelines on how to obtain good parameters, see the "How-To"_Section_howto.html#howto_23 discussion.
|
option is thus not recommended. For guidelines on how to obtain good
|
||||||
|
parameters, see the "How-To"_Section_howto.html#howto_24 discussion.
|
||||||
|
|
||||||
[Restrictions:] none
|
[Restrictions:] none
|
||||||
|
|
||||||
|
|||||||
@ -120,6 +120,9 @@ cutoff (distance units)
|
|||||||
cutoff2 (distance units) :ul
|
cutoff2 (distance units) :ul
|
||||||
|
|
||||||
The second coefficient, rho, must be greater than zero.
|
The second coefficient, rho, must be greater than zero.
|
||||||
|
The coefficients A, rho, and C can be written as analytical expressions
|
||||||
|
of epsilon and sigma, in analogy to the Lennard-Jones potential
|
||||||
|
"(Khrapak)"_#Khrapak.
|
||||||
|
|
||||||
The latter 2 coefficients are optional. If not specified, the global
|
The latter 2 coefficients are optional. If not specified, the global
|
||||||
A,C and Coulombic cutoffs are used. If only one cutoff is specified,
|
A,C and Coulombic cutoffs are used. If only one cutoff is specified,
|
||||||
@ -127,7 +130,6 @@ it is used as the cutoff for both A,C and Coulombic interactions for
|
|||||||
this type pair. If both coefficients are specified, they are used as
|
this type pair. If both coefficients are specified, they are used as
|
||||||
the A,C and Coulombic cutoffs for this type pair. You cannot specify
|
the A,C and Coulombic cutoffs for this type pair. You cannot specify
|
||||||
2 cutoffs for style {buck}, since it has no Coulombic terms.
|
2 cutoffs for style {buck}, since it has no Coulombic terms.
|
||||||
|
|
||||||
For {buck/coul/long} only the LJ cutoff can be specified since a
|
For {buck/coul/long} only the LJ cutoff can be specified since a
|
||||||
Coulombic cutoff cannot be specified for an individual I,J type pair.
|
Coulombic cutoff cannot be specified for an individual I,J type pair.
|
||||||
All type pairs use the same global Coulombic cutoff specified in the
|
All type pairs use the same global Coulombic cutoff specified in the
|
||||||
@ -194,3 +196,6 @@ only enabled if LAMMPS was built with that package. See the
|
|||||||
"pair_coeff"_pair_coeff.html, "pair_style born"_pair_born.html
|
"pair_coeff"_pair_coeff.html, "pair_style born"_pair_born.html
|
||||||
|
|
||||||
[Default:] none
|
[Default:] none
|
||||||
|
|
||||||
|
:link(Khrapak)
|
||||||
|
[(Khrapak)] Khrapak, Chaudhuri, and Morfill, J Chem Phys, 134, 054120 (2011).
|
||||||
|
|||||||
@ -99,9 +99,10 @@ artifacts.
|
|||||||
|
|
||||||
NOTE: The newer {charmmfsw} or {charmmfsh} styles were released in
|
NOTE: The newer {charmmfsw} or {charmmfsh} styles were released in
|
||||||
March 2017. We recommend they be used instead of the older {charmm}
|
March 2017. We recommend they be used instead of the older {charmm}
|
||||||
styles. Eventually code from the new styles will propagate into the
|
styles. This includes the newer "dihedral_style
|
||||||
related pair styles (e.g. implicit, accelerator, free energy
|
charmmfsw"_dihedral_charmm.html command. Eventually code from the new
|
||||||
variants).
|
styles will propagate into the related pair styles (e.g. implicit,
|
||||||
|
accelerator, free energy variants).
|
||||||
|
|
||||||
The general CHARMM formulas are as follows
|
The general CHARMM formulas are as follows
|
||||||
|
|
||||||
|
|||||||
@ -9,11 +9,10 @@ boundary p p p
|
|||||||
atom_style full
|
atom_style full
|
||||||
bond_style harmonic
|
bond_style harmonic
|
||||||
angle_style charmm
|
angle_style charmm
|
||||||
dihedral_style charmm
|
dihedral_style charmmfsw
|
||||||
improper_style harmonic
|
improper_style harmonic
|
||||||
|
|
||||||
pair_style lj/charmm/coul/charmm 8 12
|
pair_style lj/charmmfsw/coul/charmmfsh 8 12
|
||||||
#pair_style lj/charmmfsw/coul/charmmfsh 8 12
|
|
||||||
pair_modify mix arithmetic
|
pair_modify mix arithmetic
|
||||||
|
|
||||||
fix cmap all cmap charmm22.cmap
|
fix cmap all cmap charmm22.cmap
|
||||||
|
|||||||
@ -1,201 +0,0 @@
|
|||||||
LAMMPS (5 Oct 2016)
|
|
||||||
# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016
|
|
||||||
|
|
||||||
units real
|
|
||||||
neigh_modify delay 2 every 1
|
|
||||||
#newton off
|
|
||||||
|
|
||||||
boundary p p p
|
|
||||||
|
|
||||||
atom_style full
|
|
||||||
bond_style harmonic
|
|
||||||
angle_style charmm
|
|
||||||
dihedral_style charmm
|
|
||||||
improper_style harmonic
|
|
||||||
|
|
||||||
pair_style lj/charmm/coul/charmm 8 12
|
|
||||||
#pair_style lj/charmmfsw/coul/charmmfsh 8 12
|
|
||||||
pair_modify mix arithmetic
|
|
||||||
|
|
||||||
fix cmap all cmap charmm22.cmap
|
|
||||||
Reading potential file charmm22.cmap with DATE: 2016-09-26
|
|
||||||
fix_modify cmap energy yes
|
|
||||||
|
|
||||||
read_data gagg.data fix cmap crossterm CMAP
|
|
||||||
orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509)
|
|
||||||
1 by 1 by 1 MPI processor grid
|
|
||||||
reading atoms ...
|
|
||||||
34 atoms
|
|
||||||
scanning bonds ...
|
|
||||||
4 = max bonds/atom
|
|
||||||
scanning angles ...
|
|
||||||
6 = max angles/atom
|
|
||||||
scanning dihedrals ...
|
|
||||||
12 = max dihedrals/atom
|
|
||||||
scanning impropers ...
|
|
||||||
1 = max impropers/atom
|
|
||||||
reading bonds ...
|
|
||||||
33 bonds
|
|
||||||
reading angles ...
|
|
||||||
57 angles
|
|
||||||
reading dihedrals ...
|
|
||||||
75 dihedrals
|
|
||||||
reading impropers ...
|
|
||||||
7 impropers
|
|
||||||
4 = max # of 1-2 neighbors
|
|
||||||
7 = max # of 1-3 neighbors
|
|
||||||
13 = max # of 1-4 neighbors
|
|
||||||
16 = max # of special neighbors
|
|
||||||
|
|
||||||
special_bonds charmm
|
|
||||||
fix 1 all nve
|
|
||||||
|
|
||||||
#fix 1 all nvt temp 300 300 100.0
|
|
||||||
#fix 2 all shake 1e-9 500 0 m 1.0
|
|
||||||
|
|
||||||
velocity all create 0.0 12345678 dist uniform
|
|
||||||
|
|
||||||
thermo 1000
|
|
||||||
thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp
|
|
||||||
timestep 2.0
|
|
||||||
|
|
||||||
run 100000
|
|
||||||
Neighbor list info ...
|
|
||||||
1 neighbor list requests
|
|
||||||
update every 1 steps, delay 2 steps, check yes
|
|
||||||
max neighbors/atom: 2000, page size: 100000
|
|
||||||
master list distance cutoff = 14
|
|
||||||
ghost atom cutoff = 14
|
|
||||||
binsize = 7 -> bins = 12 12 12
|
|
||||||
Memory usage per processor = 14.6355 Mbytes
|
|
||||||
Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro
|
|
||||||
0 26.542777 -0.93822087 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023
|
|
||||||
1000 28.673005 -0.47724367 0.80029132 3.151679 4.4684446 -2.3928648 0.18604953
|
|
||||||
2000 27.67955 -1.170342 0.72018905 4.0400131 4.4713764 -2.5490207 0.21834436
|
|
||||||
3000 29.256656 -0.35856055 0.73303546 3.7411606 4.4710568 -2.8939692 0.37728884
|
|
||||||
4000 30.097549 -1.1353905 0.79007053 3.0688444 4.4091469 -2.3383587 0.20743631
|
|
||||||
5000 28.357525 -1.0723742 0.9180297 3.6579424 4.8792664 -2.3185572 0.088366962
|
|
||||||
6000 29.214175 -0.95299225 0.81926009 3.6805429 4.6742897 -2.9343577 0.26697813
|
|
||||||
7000 27.018614 -0.52423475 0.72502764 3.8840137 4.7780956 -2.3916009 0.24952584
|
|
||||||
8000 29.682167 -1.0939711 0.76111486 3.1090116 4.9359719 -2.5662984 0.1411154
|
|
||||||
9000 27.909695 -0.80905986 0.78952533 4.203187 4.1301204 -2.000402 0.088859259
|
|
||||||
10000 27.480298 -0.86273377 1.1293962 4.3857421 4.899282 -3.3895621 0.12126215
|
|
||||||
11000 28.303203 -1.0221152 0.62762348 4.055414 4.5863024 -2.5842816 0.17996907
|
|
||||||
12000 28.311127 -0.94227367 0.91859012 3.6673926 4.7018632 -3.902715 0.30065704
|
|
||||||
13000 30.818607 -1.5220116 0.95710386 3.3364371 4.543427 -3.0423067 0.16712905
|
|
||||||
14000 27.643736 -1.0144117 0.95806952 4.1046912 4.800236 -4.0534389 0.29293405
|
|
||||||
15000 27.660491 -1.0390086 0.78061056 4.1139174 4.7197202 -2.3670379 0.22126985
|
|
||||||
16000 27.845157 -0.63654502 0.78007478 3.9365994 4.949418 -3.1470214 0.22335355
|
|
||||||
17000 28.44772 -1.0255112 0.70402007 4.0573343 4.2887527 -2.2099596 0.048050962
|
|
||||||
18000 27.128323 -0.96218536 1.1327159 4.3222585 4.326607 -2.2881766 0.13491257
|
|
||||||
19000 27.337633 -0.78999574 0.80152298 4.2239689 4.7073478 -2.2924164 0.12710292
|
|
||||||
20000 27.780537 -0.46458072 0.79707671 3.7232618 4.943417 -2.5290628 0.26191223
|
|
||||||
21000 26.435484 -0.7803224 1.0753217 4.4196051 5.9945933 -2.3340925 0.16448475
|
|
||||||
22000 28.619429 -1.1623149 0.9401731 3.8508844 5.1636737 -2.5551846 0.25318434
|
|
||||||
23000 28.399338 -0.79700962 0.85575503 4.488526 4.5975422 -2.5663549 0.13601693
|
|
||||||
24000 29.645532 -1.158744 0.83180313 3.8193399 4.60319 -2.6847864 0.24260466
|
|
||||||
25000 28.695339 -1.4802204 0.76583757 3.6786272 4.8959496 -2.3627896 0.080867326
|
|
||||||
26000 28.149711 -1.029689 0.79383806 3.7885067 4.3345813 -2.1041553 0.14598209
|
|
||||||
27000 29.580373 -1.0525813 1.0262723 3.7767318 4.6119758 -2.2802386 0.088556038
|
|
||||||
28000 28.44308 -0.93411225 0.8794395 3.948079 4.780246 -2.1814583 0.14340149
|
|
||||||
29000 29.335621 -1.6087988 0.71803091 3.7819186 4.6688385 -2.4282242 0.16061111
|
|
||||||
30000 28.706138 -1.3938241 0.67713818 4.031275 4.4756505 -2.1807056 0.11461356
|
|
||||||
31000 27.451944 0.010297225 0.65064883 3.6402029 4.3607811 -2.5511516 0.12637237
|
|
||||||
32000 27.070878 -1.103158 1.1932199 5.1329709 4.5201653 -2.2224479 0.11215427
|
|
||||||
33000 29.889976 -1.6228316 0.69407996 3.5361991 4.3502767 -1.9847454 0.09089949
|
|
||||||
34000 28.223151 -0.927208 1.043253 3.4650939 5.1028142 -2.8127219 0.10648823
|
|
||||||
35000 27.985986 -0.48153861 0.63878449 3.3724641 4.9551679 -2.6565919 0.12123115
|
|
||||||
36000 28.580688 -1.4500694 1.055762 4.0490064 4.423782 -2.3103578 0.072747638
|
|
||||||
37000 29.192947 -0.49678176 1.1146731 2.9233947 4.5738603 -2.4376144 0.22874047
|
|
||||||
38000 26.954594 -0.53812359 0.79230685 4.3356989 5.0284656 -2.3791255 0.0486081
|
|
||||||
39000 27.567555 -0.57870028 0.73614374 4.191991 4.9209556 -2.6122044 0.08635571
|
|
||||||
40000 28.494172 -0.79057135 0.79072816 4.1893209 4.4826919 -2.4179635 0.14612898
|
|
||||||
41000 28.44904 -1.1002948 0.93405654 4.3586358 4.4338415 -2.2950944 0.15705834
|
|
||||||
42000 28.95725 -1.0297067 1.1632348 4.274711 4.9979487 -2.7611464 0.15944725
|
|
||||||
43000 28.640394 -0.70938882 0.68100893 3.1844315 5.1817454 -2.2837487 0.14189233
|
|
||||||
44000 27.997558 -1.0115099 0.59125208 4.0883422 4.6033907 -2.2775964 0.094273258
|
|
||||||
45000 27.67163 -0.67992747 1.1225552 3.9020703 4.8171056 -2.1952679 0.041418433
|
|
||||||
46000 28.822607 -0.6687953 0.74160059 3.3193715 4.5546965 -2.3024572 0.047569065
|
|
||||||
47000 29.20147 -1.4456785 0.79223353 3.8288813 4.5811826 -2.5154936 0.061230141
|
|
||||||
48000 27.843026 -1.0222301 0.87322137 4.3432743 4.4266307 -2.1414153 0.06802794
|
|
||||||
49000 28.199573 -1.1887794 1.2781088 4.0779644 4.5881353 -2.319775 0.094803547
|
|
||||||
50000 28.759212 -1.354416 0.68534569 3.8394841 4.2308134 -2.1281844 0.1395951
|
|
||||||
51000 27.876455 -1.5705462 0.76557156 4.5335223 4.523708 -2.203702 0.14679803
|
|
||||||
52000 27.930587 -1.2277489 0.96071516 3.960953 5.1152188 -2.4101451 0.060949521
|
|
||||||
53000 27.031236 -1.4746477 1.2341141 5.0540975 4.3656865 -2.1288513 0.092725656
|
|
||||||
54000 28.809394 -1.1162427 0.94350207 3.4013958 4.4755547 -2.3342811 0.18855912
|
|
||||||
55000 28.948415 -1.1560418 0.6260139 3.5386373 4.5244978 -2.340212 0.17474657
|
|
||||||
56000 28.048368 -0.95784532 0.76432571 4.1404665 4.4570033 -2.0899628 0.045693628
|
|
||||||
57000 28.707642 -1.366574 0.9907873 3.729903 4.3131997 -2.2777698 0.065420213
|
|
||||||
58000 26.361663 -1.0424403 1.0452563 5.0977108 4.7035231 -2.3101244 0.13671642
|
|
||||||
59000 29.218218 -1.2210564 0.62435875 3.4236327 4.5481681 -2.1575943 0.037984042
|
|
||||||
60000 27.655546 -1.1053224 0.86323501 3.7641375 4.8946898 -2.2422249 0.077725979
|
|
||||||
61000 27.252108 -1.3744824 1.1150806 5.0444848 4.4878135 -2.2743829 0.058331257
|
|
||||||
62000 27.163469 -1.1715781 0.72099321 4.5295501 4.9509918 -2.2993961 0.050401105
|
|
||||||
63000 29.581575 -1.2238537 0.86303245 3.1194038 5.2218965 -2.5002427 0.055032632
|
|
||||||
64000 27.897822 -1.1011516 0.74540883 4.2869228 4.3394269 -2.2552393 0.1403321
|
|
||||||
65000 27.083245 -1.0633392 0.92771724 5.0805224 4.2747962 -2.2388039 0.064196692
|
|
||||||
66000 29.072723 -1.5514209 0.89798805 4.2600224 4.4261812 -2.3524752 0.15067414
|
|
||||||
67000 27.308181 -0.72224802 0.97109517 4.5074578 4.4559352 -2.1381121 0.089297603
|
|
||||||
68000 27.505686 -0.43855431 0.80785812 4.1917251 5.0157721 -2.3382145 0.11105164
|
|
||||||
69000 29.041681 -0.64735378 0.89874684 3.3891579 4.3753361 -2.2320941 0.14716747
|
|
||||||
70000 29.735756 -1.7061457 0.9206878 3.5767878 4.3851664 -2.2516304 0.097196062
|
|
||||||
71000 28.224352 -0.92217702 0.86093586 3.9507157 4.5596589 -2.2173397 0.089116669
|
|
||||||
72000 29.282336 -1.056142 0.65185725 3.8735742 4.4839333 -2.4314756 0.071909704
|
|
||||||
73000 26.257283 -0.64273826 0.98300685 5.063943 5.045958 -2.5544375 0.2180275
|
|
||||||
74000 28.825119 -0.97736616 0.87201848 3.55875 4.3653309 -2.2303567 0.098963875
|
|
||||||
75000 29.239507 -0.96508809 0.74517323 3.4306236 4.7651921 -2.6077732 0.17883654
|
|
||||||
76000 27.349841 -0.50990238 1.1183613 4.4252451 4.4097775 -2.4125794 0.18483606
|
|
||||||
77000 28.130197 -1.4081219 0.94921357 4.2572132 4.5162849 -2.4013797 0.073744606
|
|
||||||
78000 28.235774 -0.9214321 0.6324981 3.8697686 4.8092154 -2.2272847 0.092108346
|
|
||||||
79000 26.732846 -0.55949486 1.0989617 5.0088609 4.4930687 -2.277945 0.03855146
|
|
||||||
80000 28.529208 -0.94244671 0.79407482 3.961106 4.3930011 -2.3127726 0.091124948
|
|
||||||
81000 29.603852 -1.6116062 1.060847 3.7824932 4.151001 -1.9139868 0.19875986
|
|
||||||
82000 28.232876 -1.1833011 1.0182713 3.4195758 5.1394333 -2.4632697 0.28501012
|
|
||||||
83000 29.565482 -1.3479552 0.99056973 3.7851802 4.4781011 -2.7872481 0.2031991
|
|
||||||
84000 28.780274 -1.3073882 1.0512637 4.004638 4.502282 -2.3789146 0.015656202
|
|
||||||
85000 27.262312 -1.1305346 1.203524 4.7938623 4.1747105 -2.0952844 0.054240361
|
|
||||||
86000 28.157348 -1.0662817 0.81163796 3.9912709 4.8320213 -2.255237 0.14698333
|
|
||||||
87000 28.445543 -1.3365026 0.78156195 4.4767689 4.4457575 -2.5008786 0.13879386
|
|
||||||
88000 27.656717 -1.1490599 0.87974869 4.4629952 4.7023033 -2.3258145 0.081904139
|
|
||||||
89000 28.838821 -1.020709 0.85587929 3.7110705 4.4938307 -2.4914483 0.11447952
|
|
||||||
90000 27.356497 -0.59107077 0.81879666 4.5209332 4.4703836 -2.3806717 0.071307775
|
|
||||||
91000 27.780445 -0.80564513 0.94752313 3.8468943 4.2924253 -2.1011134 0.1118672
|
|
||||||
92000 28.555276 -1.3514732 0.80826674 3.9590742 4.5775954 -2.4891232 0.054254978
|
|
||||||
93000 28.747267 -1.2133243 0.75507246 4.1319789 4.9048611 -2.4913887 0.13045693
|
|
||||||
94000 27.479343 -0.69973695 0.99696121 3.5966229 4.549025 -2.4155312 0.41745762
|
|
||||||
95000 27.726945 -1.1905026 1.1120842 4.7433275 4.5386861 -2.7947142 0.33671682
|
|
||||||
96000 28.021114 -1.0341645 0.6663033 4.2397505 4.6203984 -1.9904034 0.10972565
|
|
||||||
97000 28.382022 -1.3916008 1.180588 4.0729621 4.6741792 -2.554927 0.13462346
|
|
||||||
98000 27.895969 -0.7496449 1.3072185 4.2611888 4.3726077 -2.1320701 0.15376665
|
|
||||||
99000 28.517889 -1.2183957 1.279778 3.957647 4.2638434 -2.2888407 0.042705003
|
|
||||||
100000 28.109211 -1.2538948 0.83671785 4.3734766 4.544545 -2.3076497 0.042189096
|
|
||||||
Loop time of 2.84552 on 1 procs for 100000 steps with 34 atoms
|
|
||||||
|
|
||||||
Performance: 6072.706 ns/day, 0.004 hours/ns, 35142.973 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 | 0.94207 | 0.94207 | 0.94207 | 0.0 | 33.11
|
|
||||||
Bond | 1.6125 | 1.6125 | 1.6125 | 0.0 | 56.67
|
|
||||||
Neigh | 0.0073986 | 0.0073986 | 0.0073986 | 0.0 | 0.26
|
|
||||||
Comm | 0.012739 | 0.012739 | 0.012739 | 0.0 | 0.45
|
|
||||||
Output | 0.00075531 | 0.00075531 | 0.00075531 | 0.0 | 0.03
|
|
||||||
Modify | 0.21483 | 0.21483 | 0.21483 | 0.0 | 7.55
|
|
||||||
Other | | 0.05524 | | | 1.94
|
|
||||||
|
|
||||||
Nlocal: 34 ave 34 max 34 min
|
|
||||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
|
||||||
Nghost: 0 ave 0 max 0 min
|
|
||||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
|
||||||
Neighs: 395 ave 395 max 395 min
|
|
||||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
|
||||||
|
|
||||||
Total # of neighbors = 395
|
|
||||||
Ave neighs/atom = 11.6176
|
|
||||||
Ave special neighs/atom = 9.52941
|
|
||||||
Neighbor list builds = 237
|
|
||||||
Dangerous builds = 0
|
|
||||||
Total wall time: 0:00:02
|
|
||||||
@ -1,201 +0,0 @@
|
|||||||
LAMMPS (5 Oct 2016)
|
|
||||||
# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016
|
|
||||||
|
|
||||||
units real
|
|
||||||
neigh_modify delay 2 every 1
|
|
||||||
#newton off
|
|
||||||
|
|
||||||
boundary p p p
|
|
||||||
|
|
||||||
atom_style full
|
|
||||||
bond_style harmonic
|
|
||||||
angle_style charmm
|
|
||||||
dihedral_style charmm
|
|
||||||
improper_style harmonic
|
|
||||||
|
|
||||||
pair_style lj/charmm/coul/charmm 8 12
|
|
||||||
#pair_style lj/charmmfsw/coul/charmmfsh 8 12
|
|
||||||
pair_modify mix arithmetic
|
|
||||||
|
|
||||||
fix cmap all cmap charmm22.cmap
|
|
||||||
Reading potential file charmm22.cmap with DATE: 2016-09-26
|
|
||||||
fix_modify cmap energy yes
|
|
||||||
|
|
||||||
read_data gagg.data fix cmap crossterm CMAP
|
|
||||||
orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509)
|
|
||||||
1 by 2 by 2 MPI processor grid
|
|
||||||
reading atoms ...
|
|
||||||
34 atoms
|
|
||||||
scanning bonds ...
|
|
||||||
4 = max bonds/atom
|
|
||||||
scanning angles ...
|
|
||||||
6 = max angles/atom
|
|
||||||
scanning dihedrals ...
|
|
||||||
12 = max dihedrals/atom
|
|
||||||
scanning impropers ...
|
|
||||||
1 = max impropers/atom
|
|
||||||
reading bonds ...
|
|
||||||
33 bonds
|
|
||||||
reading angles ...
|
|
||||||
57 angles
|
|
||||||
reading dihedrals ...
|
|
||||||
75 dihedrals
|
|
||||||
reading impropers ...
|
|
||||||
7 impropers
|
|
||||||
4 = max # of 1-2 neighbors
|
|
||||||
7 = max # of 1-3 neighbors
|
|
||||||
13 = max # of 1-4 neighbors
|
|
||||||
16 = max # of special neighbors
|
|
||||||
|
|
||||||
special_bonds charmm
|
|
||||||
fix 1 all nve
|
|
||||||
|
|
||||||
#fix 1 all nvt temp 300 300 100.0
|
|
||||||
#fix 2 all shake 1e-9 500 0 m 1.0
|
|
||||||
|
|
||||||
velocity all create 0.0 12345678 dist uniform
|
|
||||||
|
|
||||||
thermo 1000
|
|
||||||
thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp
|
|
||||||
timestep 2.0
|
|
||||||
|
|
||||||
run 100000
|
|
||||||
Neighbor list info ...
|
|
||||||
1 neighbor list requests
|
|
||||||
update every 1 steps, delay 2 steps, check yes
|
|
||||||
max neighbors/atom: 2000, page size: 100000
|
|
||||||
master list distance cutoff = 14
|
|
||||||
ghost atom cutoff = 14
|
|
||||||
binsize = 7 -> bins = 12 12 12
|
|
||||||
Memory usage per processor = 15.9307 Mbytes
|
|
||||||
Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro
|
|
||||||
0 26.542777 -0.93822087 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023
|
|
||||||
1000 28.673005 -0.47724367 0.80029132 3.151679 4.4684446 -2.3928648 0.18604953
|
|
||||||
2000 27.67955 -1.170342 0.72018905 4.0400131 4.4713764 -2.5490207 0.21834436
|
|
||||||
3000 29.256656 -0.35856055 0.73303546 3.7411606 4.4710568 -2.8939692 0.37728884
|
|
||||||
4000 30.097549 -1.1353905 0.79007053 3.0688444 4.4091469 -2.3383587 0.20743631
|
|
||||||
5000 28.357525 -1.0723742 0.9180297 3.6579424 4.8792663 -2.3185572 0.088366962
|
|
||||||
6000 29.214175 -0.95299239 0.81926011 3.6805428 4.6742897 -2.9343578 0.26697816
|
|
||||||
7000 27.018614 -0.52423469 0.72502751 3.8840141 4.7780958 -2.3916014 0.24952572
|
|
||||||
8000 29.682494 -1.0940368 0.76113051 3.1089345 4.9357863 -2.5662256 0.14112613
|
|
||||||
9000 27.853918 -0.7913741 0.79503268 4.2177256 4.146792 -2.00475 0.090585666
|
|
||||||
10000 27.13754 -0.80551128 1.1325023 4.4718283 5.2460631 -3.4947725 0.11893125
|
|
||||||
11000 28.277434 -1.4897448 0.90075953 4.1895717 4.3594269 -1.9553119 0.090222212
|
|
||||||
12000 28.630973 -1.222206 0.67796385 3.3905661 4.9691334 -2.9052721 0.13897658
|
|
||||||
13000 28.593007 -0.95684026 0.75585196 3.7242568 4.7417932 -2.3893117 0.2074121
|
|
||||||
14000 26.147115 -0.6026921 0.93591488 5.1292829 4.9821952 -2.2571835 0.11872421
|
|
||||||
15000 26.29432 -0.82424162 1.048979 4.5569495 5.1189308 -2.9750422 0.16195676
|
|
||||||
16000 29.189992 -0.80998247 0.74093508 3.8299275 4.4536688 -2.5497538 0.19155639
|
|
||||||
17000 25.878012 -0.3519646 1.0988924 4.7359591 5.3923098 -2.7211029 0.13405223
|
|
||||||
18000 27.726135 -0.28229987 0.63072344 4.1777888 4.7237271 -2.2177157 0.15939372
|
|
||||||
19000 27.153504 -0.66477422 0.77910129 4.2036117 5.113851 -2.3494315 0.094793307
|
|
||||||
20000 28.044833 -1.2835827 0.88745367 3.9955526 4.5077788 -3.0116467 0.17197859
|
|
||||||
21000 27.205696 -0.74090037 1.0023251 4.3421733 4.912671 -2.3473271 0.26089356
|
|
||||||
22000 27.385785 -0.93740972 0.84554838 4.562743 4.883866 -2.2110955 0.11573301
|
|
||||||
23000 27.05534 -0.95605442 0.96719024 3.9277618 5.0359014 -2.6135949 0.21368061
|
|
||||||
24000 28.273378 -0.97543103 0.8983443 4.2067985 4.4782971 -2.4230505 0.30311692
|
|
||||||
25000 27.477789 -0.20383849 0.8380706 3.8037992 4.8312504 -2.5831791 0.093843746
|
|
||||||
26000 30.344199 -1.9773473 0.92882437 3.7821405 4.5176677 -2.3020968 0.2194307
|
|
||||||
27000 27.32767 -0.9803839 0.92988865 3.7611603 5.0328211 -2.4647656 0.18213622
|
|
||||||
28000 27.34208 -1.037938 0.74488346 4.1727342 4.7056812 -2.2718346 0.17741362
|
|
||||||
29000 27.682777 -0.51006495 0.57074224 4.7332237 4.7080462 -2.0491512 0.2130517
|
|
||||||
30000 24.925731 0.13670248 0.84976065 4.4143762 6.0677158 -3.5479173 0.28059419
|
|
||||||
31000 28.623419 -0.90725708 1.0710501 3.6930688 4.6639301 -2.2225373 0.20988139
|
|
||||||
32000 27.732286 -1.1948367 0.89230134 4.4398373 4.8923907 -3.5849327 0.49167488
|
|
||||||
33000 28.800772 -1.5319589 0.93455495 4.1634728 4.6107706 -2.3503486 0.22636535
|
|
||||||
34000 27.374398 -1.0957453 0.89450276 3.9829508 4.991786 -2.3548834 0.15869465
|
|
||||||
35000 28.38753 -0.89261166 0.90000776 3.536864 4.4293294 -2.4218118 0.10640557
|
|
||||||
36000 27.713974 0.088038031 0.85190574 3.8969601 4.6256355 -2.7935475 0.34671662
|
|
||||||
37000 29.13007 -1.378597 0.74412556 3.131538 4.6458653 -2.9373734 0.38035616
|
|
||||||
38000 28.556573 -1.4055344 1.139984 4.0035753 4.2938358 -2.489329 0.25338326
|
|
||||||
39000 26.447036 -1.1829705 0.87032438 5.0804461 4.5772023 -2.7346466 0.32165802
|
|
||||||
40000 27.991454 -0.64295679 0.61020872 4.165871 4.4623087 -2.2244194 0.13826991
|
|
||||||
41000 29.483296 -1.2400745 0.66926627 3.3473666 4.5766617 -2.3051145 0.12171554
|
|
||||||
42000 26.948627 -1.2162288 1.1440628 4.3993073 5.1176533 -2.4734485 0.15497709
|
|
||||||
43000 28.04459 -0.26543193 0.83647367 3.5160747 4.6964397 -2.2805068 0.12618821
|
|
||||||
44000 28.213608 -1.216128 0.9132792 4.0206483 4.9483599 -2.3387049 0.10132022
|
|
||||||
45000 28.283506 -1.0390766 0.86113772 4.504509 4.7209088 -2.3043085 0.14588362
|
|
||||||
46000 27.433853 -0.57912107 0.78448334 4.5998579 5.1181394 -2.6165094 0.18722528
|
|
||||||
47000 27.552939 -1.1128925 0.80087638 4.3448001 4.8062869 -2.4296883 0.2702479
|
|
||||||
48000 28.874034 -1.3242519 0.71770727 3.5648565 4.4671824 -2.2608958 0.16115978
|
|
||||||
49000 29.216186 -1.2210307 0.76937497 3.9260628 4.7550577 -2.7316081 0.085505664
|
|
||||||
50000 28.065856 -1.1545547 0.86953819 4.4137666 4.732157 -2.4450867 0.23320539
|
|
||||||
51000 26.308975 -0.99728352 0.90408444 4.2400186 5.6340425 -2.2090554 0.079882158
|
|
||||||
52000 28.517571 -1.5027398 0.83520278 3.8176552 4.3001251 -2.0731682 0.1665375
|
|
||||||
53000 28.77579 -1.3564268 0.97253881 3.6866407 4.8532347 -2.5330776 0.17668411
|
|
||||||
54000 29.135315 -1.0994106 0.67605671 3.6819254 4.3134408 -1.9796929 0.076951331
|
|
||||||
55000 26.168938 -0.76247492 0.88784685 4.6533473 6.0484793 -2.1334561 0.036876985
|
|
||||||
56000 27.471775 -0.68648837 1.0576168 4.0354311 4.4767052 -2.2368959 0.24950568
|
|
||||||
57000 29.787083 -1.4914384 1.0702944 3.5388133 4.5173097 -2.6694464 0.27937092
|
|
||||||
58000 28.705448 -1.3016617 0.63337853 3.9552713 4.4119825 -1.8774657 0.17540021
|
|
||||||
59000 29.130155 -0.91647363 0.84384883 3.1076903 4.5346348 -2.3457338 0.16674486
|
|
||||||
60000 26.874199 -0.81598034 1.3432151 5.1322624 4.9545484 -2.9566615 0.25950486
|
|
||||||
61000 27.401306 -0.82895856 1.1636949 4.020154 4.5745928 -2.601466 0.18061051
|
|
||||||
62000 28.930313 -1.5231967 0.85173243 4.3517328 4.4878662 -2.5859205 0.1755493
|
|
||||||
63000 26.56874 0.026147233 0.60836216 4.4231618 4.4390677 -2.1721849 0.08594237
|
|
||||||
64000 26.729023 -0.76953985 0.76734633 4.5104288 5.0886456 -2.2118551 0.11339216
|
|
||||||
65000 28.900471 -1.3901477 0.86194657 4.2774976 4.498325 -2.3672362 0.20668335
|
|
||||||
66000 26.884253 -0.21198879 0.98509625 4.0843117 4.4344172 -2.3289416 0.23631017
|
|
||||||
67000 27.210888 -0.84075559 1.0396559 4.7253607 4.4314589 -2.2985702 0.19326507
|
|
||||||
68000 28.042102 -1.1898715 1.053534 3.8748712 4.4358449 -2.3998723 0.2431659
|
|
||||||
69000 28.939141 -1.6968936 0.98155912 4.0460838 5.0075204 -2.5547087 0.28645131
|
|
||||||
70000 27.15577 -0.85202797 1.1469079 4.7645212 4.6133209 -2.3410451 0.086576572
|
|
||||||
71000 25.507417 -0.27780727 0.95157881 4.8759406 4.853401 -2.9598705 0.41011008
|
|
||||||
72000 29.804703 -1.4847015 0.96345767 3.6797304 4.3678377 -2.4594626 0.14480206
|
|
||||||
73000 28.602798 -1.4906143 0.72497266 4.2442974 4.5360598 -2.3621638 0.14385651
|
|
||||||
74000 28.4928 -0.91319873 1.0377472 3.8033127 4.3991601 -2.4051911 0.095567428
|
|
||||||
75000 26.38168 -0.70733237 1.1557817 5.697939 4.5935618 -2.4285007 0.058980519
|
|
||||||
76000 27.16626 -0.83631031 0.84844246 4.7460887 4.5801472 -2.1260014 0.12845946
|
|
||||||
77000 29.040661 -1.3089499 0.80285084 4.664804 4.5215895 -2.6861939 0.13215598
|
|
||||||
78000 27.477871 -1.0600977 0.88595045 4.6264017 5.4095605 -2.474411 0.10987174
|
|
||||||
79000 26.151797 -0.55779685 0.91382436 4.99964 4.9184022 -2.2547241 0.22854038
|
|
||||||
80000 28.14523 -0.54460026 0.8982411 3.5374555 4.3785673 -2.3196807 0.088567964
|
|
||||||
81000 29.029941 -1.6467789 0.79042284 3.7269899 4.7407998 -2.3795824 0.1408727
|
|
||||||
82000 27.920287 -0.72798032 1.0076975 3.4449461 4.5621371 -2.8239074 0.25103454
|
|
||||||
83000 29.131054 -1.114367 0.76887285 3.459639 4.5163922 -2.607825 0.19991648
|
|
||||||
84000 28.249768 -0.69944068 1.0510846 4.0436296 4.6430538 -2.4213355 0.077299966
|
|
||||||
85000 28.06888 -0.62132922 0.91829312 4.1294147 4.3099557 -2.354063 0.15866186
|
|
||||||
86000 28.664264 -1.1022906 0.87831695 4.5773522 4.6045802 -2.9206875 0.33950063
|
|
||||||
87000 27.960967 -1.2852756 0.77694253 3.9011301 4.9114139 -3.2374868 0.3068138
|
|
||||||
88000 27.190678 -1.2803268 1.1545301 4.5769709 5.2404761 -2.3825838 0.10356039
|
|
||||||
89000 26.792931 -0.44516641 1.0236244 4.2007253 4.7098685 -2.3608551 0.034447062
|
|
||||||
90000 27.173991 -0.87185611 1.065719 4.1953618 4.6856408 -2.6539232 0.16957757
|
|
||||||
91000 28.626528 -1.239257 0.89524651 4.7048012 4.6344201 -2.7367901 0.43534143
|
|
||||||
92000 27.661812 -1.109044 0.92817391 5.0294489 4.3890711 -2.4108669 0.12570139
|
|
||||||
93000 28.156793 -1.0820907 0.92812693 4.938385 4.4901426 -2.4023366 0.30135781
|
|
||||||
94000 28.842149 -1.3524969 1.1451109 4.3125908 4.6959035 -2.6747199 0.2254607
|
|
||||||
95000 27.862247 -1.2119045 1.0218976 4.2614082 4.4931316 -2.6902934 0.16345201
|
|
||||||
96000 27.084973 -0.93738328 1.3984324 4.5647189 4.4232205 -2.2834097 0.11217888
|
|
||||||
97000 27.587078 -0.89397255 0.78218462 3.8944421 4.3981479 -2.4205318 0.16570942
|
|
||||||
98000 27.981746 -1.2380545 0.84847869 4.311441 4.7340377 -2.4270441 0.023565612
|
|
||||||
99000 27.476625 -0.8569146 0.82550381 4.1656963 4.4064921 -2.4169708 0.160814
|
|
||||||
100000 26.121325 -0.63610855 1.0803389 4.9257118 4.7073263 -2.4010334 0.066303044
|
|
||||||
Loop time of 2.693 on 4 procs for 100000 steps with 34 atoms
|
|
||||||
|
|
||||||
Performance: 6416.646 ns/day, 0.004 hours/ns, 37133.367 timesteps/s
|
|
||||||
98.4% CPU use with 4 MPI tasks x no OpenMP threads
|
|
||||||
|
|
||||||
MPI task timing breakdown:
|
|
||||||
Section | min time | avg time | max time |%varavg| %total
|
|
||||||
---------------------------------------------------------------
|
|
||||||
Pair | 0.065478 | 0.2501 | 0.63682 | 45.6 | 9.29
|
|
||||||
Bond | 0.066944 | 0.44772 | 0.88814 | 53.7 | 16.63
|
|
||||||
Neigh | 0.0076509 | 0.0077319 | 0.0078275 | 0.1 | 0.29
|
|
||||||
Comm | 0.57917 | 1.4166 | 1.9823 | 46.9 | 52.60
|
|
||||||
Output | 0.0033755 | 0.0035856 | 0.0037644 | 0.2 | 0.13
|
|
||||||
Modify | 0.03866 | 0.1366 | 0.23978 | 24.6 | 5.07
|
|
||||||
Other | | 0.4306 | | | 15.99
|
|
||||||
|
|
||||||
Nlocal: 8.5 ave 15 max 2 min
|
|
||||||
Histogram: 1 1 0 0 0 0 0 0 1 1
|
|
||||||
Nghost: 25.5 ave 32 max 19 min
|
|
||||||
Histogram: 1 1 0 0 0 0 0 0 1 1
|
|
||||||
Neighs: 98.75 ave 257 max 18 min
|
|
||||||
Histogram: 1 1 1 0 0 0 0 0 0 1
|
|
||||||
|
|
||||||
Total # of neighbors = 395
|
|
||||||
Ave neighs/atom = 11.6176
|
|
||||||
Ave special neighs/atom = 9.52941
|
|
||||||
Neighbor list builds = 294
|
|
||||||
Dangerous builds = 0
|
|
||||||
Total wall time: 0:00:02
|
|
||||||
116
lib/voronoi/Install.py
Normal file
116
lib/voronoi/Install.py
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
# install.py tool to download, unpack, build, and link to the Voro++ library
|
||||||
|
# used to automate the steps described in the README file in this dir
|
||||||
|
|
||||||
|
import sys,os,re,urllib,commands
|
||||||
|
|
||||||
|
# help message
|
||||||
|
|
||||||
|
help = """
|
||||||
|
Syntax: install.py -v version -g gdir [gname] -b bdir -l ldir
|
||||||
|
specify one or more options, order does not matter
|
||||||
|
gdir,bdir,ldir can be paths relative to lib/latte, full paths, or contain ~
|
||||||
|
-v = version of Voro++ to download and build
|
||||||
|
default = voro++-0.4.6 (current as of Jan 2015)
|
||||||
|
-g = grab (download) from math.lbl.gov/voro++ website
|
||||||
|
unpack tarfile in gdir to produce version dir (e.g. voro++-0.4.6)
|
||||||
|
if optional gname specified, rename version dir to gname within gdir
|
||||||
|
-b = build Voro++, bdir = Voro++ home directory
|
||||||
|
note that bdir must include the version suffix unless renamed
|
||||||
|
-l = create 2 softlinks (includelink,liblink)
|
||||||
|
in lib/voronoi to src dir of ldir = Voro++ home directory
|
||||||
|
note that ldir must include the version suffix unless renamed
|
||||||
|
"""
|
||||||
|
|
||||||
|
# settings
|
||||||
|
|
||||||
|
version = "voro++-0.4.6"
|
||||||
|
url = "http://math.lbl.gov/voro++/download/dir/%s.tar.gz" % version
|
||||||
|
|
||||||
|
# print error message or help
|
||||||
|
|
||||||
|
def error(str=None):
|
||||||
|
if not str: print help
|
||||||
|
else: print "ERROR",str
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
# expand to full path name
|
||||||
|
# process leading '~' or relative path
|
||||||
|
|
||||||
|
def fullpath(path):
|
||||||
|
return os.path.abspath(os.path.expanduser(path))
|
||||||
|
|
||||||
|
# parse args
|
||||||
|
|
||||||
|
args = sys.argv[1:]
|
||||||
|
nargs = len(args)
|
||||||
|
if nargs == 0: error()
|
||||||
|
|
||||||
|
grabflag = 0
|
||||||
|
buildflag = 0
|
||||||
|
linkflag = 0
|
||||||
|
|
||||||
|
iarg = 0
|
||||||
|
while iarg < nargs:
|
||||||
|
if args[iarg] == "-v":
|
||||||
|
if iarg+2 > nargs: error()
|
||||||
|
version = args[iarg+1]
|
||||||
|
iarg += 2
|
||||||
|
elif args[iarg] == "-g":
|
||||||
|
if iarg+2 > nargs: error()
|
||||||
|
grabflag = 1
|
||||||
|
grabdir = args[iarg+1]
|
||||||
|
grabname = None
|
||||||
|
if iarg+2 < nargs and args[iarg+2][0] != '-':
|
||||||
|
grabname = args[iarg+2]
|
||||||
|
iarg += 1
|
||||||
|
iarg += 2
|
||||||
|
elif args[iarg] == "-b":
|
||||||
|
if iarg+2 > nargs: error()
|
||||||
|
buildflag = 1
|
||||||
|
builddir = args[iarg+1]
|
||||||
|
iarg += 2
|
||||||
|
elif args[iarg] == "-l":
|
||||||
|
if iarg+2 > nargs: error()
|
||||||
|
linkflag = 1
|
||||||
|
linkdir = args[iarg+1]
|
||||||
|
iarg += 2
|
||||||
|
else: error()
|
||||||
|
|
||||||
|
# download and unpack Voro++ tarball
|
||||||
|
|
||||||
|
if grabflag:
|
||||||
|
print "Downloading Voro++ ..."
|
||||||
|
grabdir = fullpath(grabdir)
|
||||||
|
if not os.path.isdir(grabdir): error("Grab directory does not exist")
|
||||||
|
urllib.urlretrieve(url,"%s/%s.tar.gz" % (grabdir,version))
|
||||||
|
|
||||||
|
print "Unpacking Voro++ tarball ..."
|
||||||
|
tardir = "%s/%s" % (grabdir,version)
|
||||||
|
if os.path.exists(tardir): commands.getoutput("rm -rf %s" % tardir)
|
||||||
|
cmd = "cd %s; tar zxvf %s.tar.gz" % (grabdir,version)
|
||||||
|
txt = commands.getoutput(cmd)
|
||||||
|
print tardir,grabdir,grabname
|
||||||
|
if grabname: os.rename(tardir,"%s/%s" % (grabdir,grabname))
|
||||||
|
|
||||||
|
# build Voro++
|
||||||
|
|
||||||
|
if buildflag:
|
||||||
|
print "Building Voro++ ..."
|
||||||
|
cmd = "cd %s; make" % builddir
|
||||||
|
txt = commands.getoutput(cmd)
|
||||||
|
print txt
|
||||||
|
|
||||||
|
# create 2 links in lib/voronoi to Voro++ src dir
|
||||||
|
|
||||||
|
if linkflag:
|
||||||
|
print "Creating links to Voro++ include and lib files"
|
||||||
|
if os.path.isfile("includelink") or os.path.islink("includelink"):
|
||||||
|
os.remove("includelink")
|
||||||
|
if os.path.isfile("liblink") or os.path.islink("liblink"):
|
||||||
|
os.remove("liblink")
|
||||||
|
cmd = "ln -s %s/src includelink" % linkdir
|
||||||
|
commands.getoutput(cmd)
|
||||||
|
cmd = "ln -s %s/src liblink" % linkdir
|
||||||
|
commands.getoutput(cmd)
|
||||||
@ -9,8 +9,8 @@ Laboratory.
|
|||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
You must perform the following steps yourself, or you can use the
|
You must perform the following steps yourself, or you can use the
|
||||||
install.py Python script to automate any or all steps of the process.
|
Install.py Python script to automate any or all steps of the process.
|
||||||
Type "python install.py" for instructions.
|
Type "python Install.py" for instructions.
|
||||||
|
|
||||||
1. Download Voro++ at http://math.lbl.gov/voro++/download
|
1. Download Voro++ at http://math.lbl.gov/voro++/download
|
||||||
either as a tarball or via SVN, and unpack the
|
either as a tarball or via SVN, and unpack the
|
||||||
|
|||||||
@ -1,163 +0,0 @@
|
|||||||
#!usr/local/python
|
|
||||||
|
|
||||||
# install.py tool to download, unpack, build, and link to the Voro++ library
|
|
||||||
# used to automate the steps described in the README file in this dir
|
|
||||||
|
|
||||||
import sys,os,re,urllib,commands
|
|
||||||
|
|
||||||
help = """
|
|
||||||
Syntax: install.py -d dir -v version -g -b -i installdir -l incdir libdir
|
|
||||||
specify one or more options, order does not matter
|
|
||||||
-d = dir to download tarball to, unpack tarball in, perform build in
|
|
||||||
dir will be created if it doesn't exist (only last level)
|
|
||||||
default = this dir
|
|
||||||
-v = version of Voro++ to download and work with
|
|
||||||
default = voro++-0.4.6 (current as of Jan 2015)
|
|
||||||
-g = download (grab) tarball from
|
|
||||||
http://math.lbl.gov/voro++/download/dir/version
|
|
||||||
-b = build Voro++ by invoking "make" in its home dir
|
|
||||||
no default
|
|
||||||
-i = install Voro++ by invoking "make install" in its home dir
|
|
||||||
installdir arg is optional:
|
|
||||||
if not specified, installs at PREFIX defined in config.mk file
|
|
||||||
if specified, will overwrite PREFIX and install there
|
|
||||||
if PREFIX starts with /usr, will invoke "sudo make install"
|
|
||||||
-l = create two links to incdir and libdir
|
|
||||||
incdir and libdir are optional (specify neither or both):
|
|
||||||
if specified, includelink and liblink are to those two dirs
|
|
||||||
these are dirs where Voro++ include files and lib file are
|
|
||||||
if not specified and no install, links are to Voro++ src dir
|
|
||||||
if not specified and install performed,
|
|
||||||
links are to include and lib dirs under PREFIX
|
|
||||||
"""
|
|
||||||
|
|
||||||
def error():
|
|
||||||
print help
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
# parse args
|
|
||||||
|
|
||||||
args = sys.argv
|
|
||||||
|
|
||||||
if len(args) == 1: error()
|
|
||||||
|
|
||||||
dir = "."
|
|
||||||
version = "voro++-0.4.6"
|
|
||||||
grabflag = 0
|
|
||||||
buildflag = 0
|
|
||||||
installflag = 0
|
|
||||||
linkflag = 0
|
|
||||||
|
|
||||||
iarg = 1
|
|
||||||
while iarg < len(args):
|
|
||||||
if args[iarg] == "-d":
|
|
||||||
if iarg+2 > len(args): error()
|
|
||||||
dir = args[iarg+1]
|
|
||||||
iarg += 2
|
|
||||||
elif args[iarg] == "-v":
|
|
||||||
if iarg+2 > len(args): error()
|
|
||||||
version = args[iarg+1]
|
|
||||||
iarg += 2
|
|
||||||
elif args[iarg] == "-g":
|
|
||||||
grabflag = 1
|
|
||||||
iarg += 1
|
|
||||||
elif args[iarg] == "-b":
|
|
||||||
buildflag = 1
|
|
||||||
iarg += 1
|
|
||||||
elif args[iarg] == "-i":
|
|
||||||
installflag = 1
|
|
||||||
if iarg+1 == len(args) or args[iarg+1][0] == '-':
|
|
||||||
installdir = ""
|
|
||||||
iarg += 1
|
|
||||||
else:
|
|
||||||
if iarg+2 > len(args): error()
|
|
||||||
installdir = args[iarg+1]
|
|
||||||
iarg += 2
|
|
||||||
elif args[iarg] == "-l":
|
|
||||||
linkflag = 1
|
|
||||||
if iarg+1 == len(args) or args[iarg+1][0] == '-' or \
|
|
||||||
iarg+2 == len(args) or args[iarg+2][0] == '-':
|
|
||||||
includedir = libdir = ""
|
|
||||||
iarg += 1
|
|
||||||
else:
|
|
||||||
if iarg+3 > len(args): error()
|
|
||||||
includedir = args[iarg+1]
|
|
||||||
libdir = args[iarg+2]
|
|
||||||
iarg += 3
|
|
||||||
else: error()
|
|
||||||
|
|
||||||
dir = os.path.abspath(dir)
|
|
||||||
url = "http://math.lbl.gov/voro++/download/dir/%s.tar.gz" % version
|
|
||||||
|
|
||||||
# create dir if does not exist
|
|
||||||
|
|
||||||
if not os.path.isdir(dir):
|
|
||||||
if os.path.isfile(dir):
|
|
||||||
print "ERROR: Dir already exists as file"
|
|
||||||
sys.exit()
|
|
||||||
os.mkdir(dir)
|
|
||||||
if not os.path.isdir(dir):
|
|
||||||
print "ERROR: Unable to create dir"
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
# download and unpack tarball
|
|
||||||
|
|
||||||
if grabflag:
|
|
||||||
print "Downloading Voro++ tarball ..."
|
|
||||||
urllib.urlretrieve(url,"%s/%s.tar.gz" % (dir,version))
|
|
||||||
print "Unpacking Voro++ tarball ..."
|
|
||||||
cmd = "cd %s; tar zxvf %s.tar.gz" % (dir,version)
|
|
||||||
txt = commands.getoutput(cmd)
|
|
||||||
|
|
||||||
# build Voro++ in its dir
|
|
||||||
|
|
||||||
if buildflag:
|
|
||||||
print "Building Voro++ ..."
|
|
||||||
cmd = "cd %s/%s; make" % (dir,version)
|
|
||||||
txt = commands.getoutput(cmd)
|
|
||||||
print txt
|
|
||||||
|
|
||||||
# install Voro++
|
|
||||||
# if installdir set, overwrite PREFIX var in its config.mk file
|
|
||||||
# if PREFIX var starts with /usr, invoke sudo make install, else make install
|
|
||||||
|
|
||||||
if installflag:
|
|
||||||
print "Installing Voro++ ..."
|
|
||||||
if installdir:
|
|
||||||
txt = open("%s/%s/config.mk" % (dir,version),'r').read()
|
|
||||||
txt = re.sub("PREFIX=.*?\n","PREFIX=%s\n" % installdir,txt)
|
|
||||||
open("%s/%s/config.mk" % (dir,version),'w').write(txt)
|
|
||||||
print "TXT:",txt
|
|
||||||
txt = open("%s/%s/config.mk" % (dir,version),'r').read()
|
|
||||||
var = re.findall("PREFIX=.*?\n",txt)
|
|
||||||
prefix = var[0].split('=')[1].strip()
|
|
||||||
if prefix.startswith("/usr"):
|
|
||||||
cmd = "cd %s/%s; sudo make install" % (dir,version)
|
|
||||||
else:
|
|
||||||
cmd = "cd %s/%s; make install" % (dir,version)
|
|
||||||
txt = commands.getoutput(cmd)
|
|
||||||
print txt
|
|
||||||
|
|
||||||
# create links in this dir to Voro++ include and lib files
|
|
||||||
|
|
||||||
if linkflag:
|
|
||||||
print "Creating links to Voro++ include and lib files"
|
|
||||||
if os.path.isfile("includelink") or os.path.islink("includelink"):
|
|
||||||
os.remove("includelink")
|
|
||||||
if os.path.isfile("liblink") or os.path.islink("liblink"):
|
|
||||||
os.remove("liblink")
|
|
||||||
if includedir:
|
|
||||||
cmd = "ln -s %s includelink" % includedir
|
|
||||||
txt = commands.getoutput(cmd)
|
|
||||||
cmd = "ln -s %s liblink" % linkdir
|
|
||||||
txt = commands.getoutput(cmd)
|
|
||||||
elif not installflag:
|
|
||||||
cmd = "ln -s %s/%s/src includelink" % (dir,version)
|
|
||||||
txt = commands.getoutput(cmd)
|
|
||||||
cmd = "ln -s %s/%s/src liblink" % (dir,version)
|
|
||||||
txt = commands.getoutput(cmd)
|
|
||||||
else:
|
|
||||||
cmd = "ln -s %s/include includelink" % prefix
|
|
||||||
txt = commands.getoutput(cmd)
|
|
||||||
cmd = "ln -s %s/lib liblink" % prefix
|
|
||||||
txt = commands.getoutput(cmd)
|
|
||||||
@ -73,6 +73,11 @@ ComputeTempAsphere::ComputeTempAsphere(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
} else error->all(FLERR,"Illegal compute temp/asphere command");
|
} else error->all(FLERR,"Illegal compute temp/asphere command");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// when computing only the rotational temperature,
|
||||||
|
// do not remove DOFs for translation as set by default
|
||||||
|
|
||||||
|
if (mode == ROTATE) extra_dof = 0;
|
||||||
|
|
||||||
vector = new double[6];
|
vector = new double[6];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -33,5 +33,5 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -60,7 +60,7 @@ using namespace MathConst;
|
|||||||
// this must be lower than MAXENERGYSIGNAL
|
// this must be lower than MAXENERGYSIGNAL
|
||||||
// by a large amount, so that it is still
|
// by a large amount, so that it is still
|
||||||
// less than total energy when negative
|
// less than total energy when negative
|
||||||
// energy changes are added to MAXENERGYSIGNAL
|
// energy contributions are added to MAXENERGYSIGNAL
|
||||||
|
|
||||||
#define MAXENERGYTEST 1.0e50
|
#define MAXENERGYTEST 1.0e50
|
||||||
|
|
||||||
@ -701,6 +701,9 @@ void FixGCMC::pre_exchange()
|
|||||||
|
|
||||||
if (full_flag) {
|
if (full_flag) {
|
||||||
energy_stored = energy_full();
|
energy_stored = energy_full();
|
||||||
|
if (overlap_flag && energy_stored > MAXENERGYTEST)
|
||||||
|
error->warning(FLERR,"Energy of old configuration in "
|
||||||
|
"fix gcmc is > MAXENERGYTEST.");
|
||||||
|
|
||||||
if (mode == MOLECULE) {
|
if (mode == MOLECULE) {
|
||||||
for (int i = 0; i < ncycles; i++) {
|
for (int i = 0; i < ncycles; i++) {
|
||||||
@ -778,6 +781,9 @@ void FixGCMC::attempt_atomic_translation()
|
|||||||
if (i >= 0) {
|
if (i >= 0) {
|
||||||
double **x = atom->x;
|
double **x = atom->x;
|
||||||
double energy_before = energy(i,ngcmc_type,-1,x[i]);
|
double energy_before = energy(i,ngcmc_type,-1,x[i]);
|
||||||
|
if (overlap_flag && energy_before > MAXENERGYTEST)
|
||||||
|
error->warning(FLERR,"Energy of old configuration in "
|
||||||
|
"fix gcmc is > MAXENERGYTEST.");
|
||||||
double rsq = 1.1;
|
double rsq = 1.1;
|
||||||
double rx,ry,rz;
|
double rx,ry,rz;
|
||||||
rx = ry = rz = 0.0;
|
rx = ry = rz = 0.0;
|
||||||
@ -998,6 +1004,9 @@ void FixGCMC::attempt_molecule_translation()
|
|||||||
if (translation_molecule == -1) return;
|
if (translation_molecule == -1) return;
|
||||||
|
|
||||||
double energy_before_sum = molecule_energy(translation_molecule);
|
double energy_before_sum = molecule_energy(translation_molecule);
|
||||||
|
if (overlap_flag && energy_before_sum > MAXENERGYTEST)
|
||||||
|
error->warning(FLERR,"Energy of old configuration in "
|
||||||
|
"fix gcmc is > MAXENERGYTEST.");
|
||||||
|
|
||||||
double **x = atom->x;
|
double **x = atom->x;
|
||||||
double rx,ry,rz;
|
double rx,ry,rz;
|
||||||
@ -1095,6 +1104,9 @@ void FixGCMC::attempt_molecule_rotation()
|
|||||||
if (rotation_molecule == -1) return;
|
if (rotation_molecule == -1) return;
|
||||||
|
|
||||||
double energy_before_sum = molecule_energy(rotation_molecule);
|
double energy_before_sum = molecule_energy(rotation_molecule);
|
||||||
|
if (overlap_flag && energy_before_sum > MAXENERGYTEST)
|
||||||
|
error->warning(FLERR,"Energy of old configuration in "
|
||||||
|
"fix gcmc is > MAXENERGYTEST.");
|
||||||
|
|
||||||
int nlocal = atom->nlocal;
|
int nlocal = atom->nlocal;
|
||||||
int *mask = atom->mask;
|
int *mask = atom->mask;
|
||||||
@ -2170,6 +2182,8 @@ double FixGCMC::molecule_energy(tagint gas_molecule_id)
|
|||||||
|
|
||||||
double FixGCMC::energy_full()
|
double FixGCMC::energy_full()
|
||||||
{
|
{
|
||||||
|
int imolecule;
|
||||||
|
|
||||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||||
domain->pbc();
|
domain->pbc();
|
||||||
comm->exchange();
|
comm->exchange();
|
||||||
@ -2185,14 +2199,15 @@ double FixGCMC::energy_full()
|
|||||||
// return signal value for energy
|
// return signal value for energy
|
||||||
|
|
||||||
if (overlap_flag) {
|
if (overlap_flag) {
|
||||||
|
int overlaptestall;
|
||||||
|
int overlaptest = 0;
|
||||||
double delx,dely,delz,rsq;
|
double delx,dely,delz,rsq;
|
||||||
double **x = atom->x;
|
double **x = atom->x;
|
||||||
tagint *molecule = atom->molecule;
|
tagint *molecule = atom->molecule;
|
||||||
int nall = atom->nlocal + atom->nghost;
|
int nall = atom->nlocal + atom->nghost;
|
||||||
for (int i = 0; i < atom->nlocal; i++) {
|
for (int i = 0; i < atom->nlocal; i++) {
|
||||||
int imolecule = molecule[i];
|
if (mode == MOLECULE) imolecule = molecule[i];
|
||||||
for (int j = i+1; j < nall; j++) {
|
for (int j = i+1; j < nall; j++) {
|
||||||
|
|
||||||
if (mode == MOLECULE)
|
if (mode == MOLECULE)
|
||||||
if (imolecule == molecule[j]) continue;
|
if (imolecule == molecule[j]) continue;
|
||||||
|
|
||||||
@ -2201,9 +2216,16 @@ double FixGCMC::energy_full()
|
|||||||
delz = x[i][2] - x[j][2];
|
delz = x[i][2] - x[j][2];
|
||||||
rsq = delx*delx + dely*dely + delz*delz;
|
rsq = delx*delx + dely*dely + delz*delz;
|
||||||
|
|
||||||
if (rsq < overlap_cutoff) return MAXENERGYSIGNAL;
|
if (rsq < overlap_cutoff) {
|
||||||
|
overlaptest = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (overlaptest) break;
|
||||||
|
}
|
||||||
|
MPI_Allreduce(&overlaptest, &overlaptestall, 1,
|
||||||
|
MPI_INT, MPI_MAX, world);
|
||||||
|
if (overlaptestall) return MAXENERGYSIGNAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clear forces so they don't accumulate over multiple
|
// clear forces so they don't accumulate over multiple
|
||||||
|
|||||||
@ -106,7 +106,7 @@ class FixGCMC : public Fix {
|
|||||||
double xlo,xhi,ylo,yhi,zlo,zhi;
|
double xlo,xhi,ylo,yhi,zlo,zhi;
|
||||||
double region_xlo,region_xhi,region_ylo,region_yhi,region_zlo,region_zhi;
|
double region_xlo,region_xhi,region_ylo,region_yhi,region_zlo,region_zhi;
|
||||||
double region_volume;
|
double region_volume;
|
||||||
double energy_stored;
|
double energy_stored; // full energy of old/current configuration
|
||||||
double *sublo,*subhi;
|
double *sublo,*subhi;
|
||||||
int *local_gas_list;
|
int *local_gas_list;
|
||||||
double **cutsq;
|
double **cutsq;
|
||||||
@ -214,9 +214,14 @@ W: Fix gcmc using full_energy option
|
|||||||
|
|
||||||
Fix gcmc has automatically turned on the full_energy option since it
|
Fix gcmc has automatically turned on the full_energy option since it
|
||||||
is required for systems like the one specified by the user. User input
|
is required for systems like the one specified by the user. User input
|
||||||
included one or more of the following: kspace, triclinic, a hybrid
|
included one or more of the following: kspace, a hybrid
|
||||||
pair style, an eam pair style, or no "single" function for the pair
|
pair style, an eam pair style, tail correction,
|
||||||
style.
|
or no "single" function for the pair style.
|
||||||
|
|
||||||
|
W: Energy of old configuration in fix gcmc is > MAXENERGYTEST.
|
||||||
|
|
||||||
|
This probably means that a pair of atoms are closer than the
|
||||||
|
overlap cutoff distance for keyword overlap_cutoff.
|
||||||
|
|
||||||
E: Invalid atom type in fix gcmc command
|
E: Invalid atom type in fix gcmc command
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include "bond_harmonic.h"
|
#include "bond_harmonic.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
@ -26,7 +27,10 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
BondHarmonic::BondHarmonic(LAMMPS *lmp) : Bond(lmp) {}
|
BondHarmonic::BondHarmonic(LAMMPS *lmp) : Bond(lmp)
|
||||||
|
{
|
||||||
|
reinitflag = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -196,3 +200,16 @@ double BondHarmonic::single(int type, double rsq, int i, int j,
|
|||||||
if (r > 0.0) fforce = -2.0*rk/r;
|
if (r > 0.0) fforce = -2.0*rk/r;
|
||||||
return rk*dr;
|
return rk*dr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
Return ptr to internal members upon request.
|
||||||
|
------------------------------------------------------------------------ */
|
||||||
|
void *BondHarmonic::extract( char *str, int &dim )
|
||||||
|
{
|
||||||
|
dim = 1;
|
||||||
|
if( strcmp(str,"kappa")==0) return (void*) k;
|
||||||
|
if( strcmp(str,"r0")==0) return (void*) r0;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -36,6 +36,7 @@ class BondHarmonic : public Bond {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_data(FILE *);
|
void write_data(FILE *);
|
||||||
double single(int, double, int, int, double &);
|
double single(int, double, int, int, double &);
|
||||||
|
virtual void *extract(char *, int &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double *k,*r0;
|
double *k,*r0;
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "dihedral_charmmfsh.h"
|
#include "dihedral_charmmfsw.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
@ -40,7 +40,7 @@ using namespace MathConst;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
DihedralCharmmfsh::DihedralCharmmfsh(LAMMPS *lmp) : Dihedral(lmp)
|
DihedralCharmmfsw::DihedralCharmmfsw(LAMMPS *lmp) : Dihedral(lmp)
|
||||||
{
|
{
|
||||||
weightflag = 0;
|
weightflag = 0;
|
||||||
writedata = 1;
|
writedata = 1;
|
||||||
@ -48,7 +48,7 @@ DihedralCharmmfsh::DihedralCharmmfsh(LAMMPS *lmp) : Dihedral(lmp)
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
DihedralCharmmfsh::~DihedralCharmmfsh()
|
DihedralCharmmfsw::~DihedralCharmmfsw()
|
||||||
{
|
{
|
||||||
if (allocated && !copymode) {
|
if (allocated && !copymode) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
@ -63,7 +63,7 @@ DihedralCharmmfsh::~DihedralCharmmfsh()
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void DihedralCharmmfsh::compute(int eflag, int vflag)
|
void DihedralCharmmfsw::compute(int eflag, int vflag)
|
||||||
{
|
{
|
||||||
int i1,i2,i3,i4,i,m,n,type;
|
int i1,i2,i3,i4,i,m,n,type;
|
||||||
double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z,vb2xm,vb2ym,vb2zm;
|
double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z,vb2xm,vb2ym,vb2zm;
|
||||||
@ -322,7 +322,7 @@ void DihedralCharmmfsh::compute(int eflag, int vflag)
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void DihedralCharmmfsh::allocate()
|
void DihedralCharmmfsw::allocate()
|
||||||
{
|
{
|
||||||
allocated = 1;
|
allocated = 1;
|
||||||
int n = atom->ndihedraltypes;
|
int n = atom->ndihedraltypes;
|
||||||
@ -342,7 +342,7 @@ void DihedralCharmmfsh::allocate()
|
|||||||
set coeffs for one type
|
set coeffs for one type
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void DihedralCharmmfsh::coeff(int narg, char **arg)
|
void DihedralCharmmfsw::coeff(int narg, char **arg)
|
||||||
{
|
{
|
||||||
if (narg != 5) error->all(FLERR,"Incorrect args for dihedral coefficients");
|
if (narg != 5) error->all(FLERR,"Incorrect args for dihedral coefficients");
|
||||||
if (!allocated) allocate();
|
if (!allocated) allocate();
|
||||||
@ -384,7 +384,7 @@ void DihedralCharmmfsh::coeff(int narg, char **arg)
|
|||||||
error check and initialize all values needed for force computation
|
error check and initialize all values needed for force computation
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void DihedralCharmmfsh::init_style()
|
void DihedralCharmmfsw::init_style()
|
||||||
{
|
{
|
||||||
// insure use of CHARMM pair_style if any weight factors are non-zero
|
// insure use of CHARMM pair_style if any weight factors are non-zero
|
||||||
// set local ptrs to LJ 14 arrays setup by Pair
|
// set local ptrs to LJ 14 arrays setup by Pair
|
||||||
@ -392,14 +392,14 @@ void DihedralCharmmfsh::init_style()
|
|||||||
if (weightflag) {
|
if (weightflag) {
|
||||||
int itmp;
|
int itmp;
|
||||||
if (force->pair == NULL)
|
if (force->pair == NULL)
|
||||||
error->all(FLERR,"Dihedral charmmfsh is incompatible with Pair style");
|
error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style");
|
||||||
lj14_1 = (double **) force->pair->extract("lj14_1",itmp);
|
lj14_1 = (double **) force->pair->extract("lj14_1",itmp);
|
||||||
lj14_2 = (double **) force->pair->extract("lj14_2",itmp);
|
lj14_2 = (double **) force->pair->extract("lj14_2",itmp);
|
||||||
lj14_3 = (double **) force->pair->extract("lj14_3",itmp);
|
lj14_3 = (double **) force->pair->extract("lj14_3",itmp);
|
||||||
lj14_4 = (double **) force->pair->extract("lj14_4",itmp);
|
lj14_4 = (double **) force->pair->extract("lj14_4",itmp);
|
||||||
int *ptr = (int *) force->pair->extract("implicit",itmp);
|
int *ptr = (int *) force->pair->extract("implicit",itmp);
|
||||||
if (!lj14_1 || !lj14_2 || !lj14_3 || !lj14_4 || !ptr)
|
if (!lj14_1 || !lj14_2 || !lj14_3 || !lj14_4 || !ptr)
|
||||||
error->all(FLERR,"Dihedral charmmfsh is incompatible with Pair style");
|
error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style");
|
||||||
implicit = *ptr;
|
implicit = *ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,7 +414,7 @@ void DihedralCharmmfsh::init_style()
|
|||||||
|
|
||||||
if (p_cutcoul == NULL || p_cutljinner == NULL ||
|
if (p_cutcoul == NULL || p_cutljinner == NULL ||
|
||||||
p_cutlj == NULL || p_dihedflag == NULL)
|
p_cutlj == NULL || p_dihedflag == NULL)
|
||||||
error->all(FLERR,"Dihedral charmmfsh is incompatible with Pair style");
|
error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style");
|
||||||
|
|
||||||
dihedflag = *p_dihedflag;
|
dihedflag = *p_dihedflag;
|
||||||
cut_coul14 = *p_cutcoul;
|
cut_coul14 = *p_cutcoul;
|
||||||
@ -433,7 +433,7 @@ void DihedralCharmmfsh::init_style()
|
|||||||
proc 0 writes out coeffs to restart file
|
proc 0 writes out coeffs to restart file
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void DihedralCharmmfsh::write_restart(FILE *fp)
|
void DihedralCharmmfsw::write_restart(FILE *fp)
|
||||||
{
|
{
|
||||||
fwrite(&k[1],sizeof(double),atom->ndihedraltypes,fp);
|
fwrite(&k[1],sizeof(double),atom->ndihedraltypes,fp);
|
||||||
fwrite(&multiplicity[1],sizeof(int),atom->ndihedraltypes,fp);
|
fwrite(&multiplicity[1],sizeof(int),atom->ndihedraltypes,fp);
|
||||||
@ -446,7 +446,7 @@ void DihedralCharmmfsh::write_restart(FILE *fp)
|
|||||||
proc 0 reads coeffs from restart file, bcasts them
|
proc 0 reads coeffs from restart file, bcasts them
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void DihedralCharmmfsh::read_restart(FILE *fp)
|
void DihedralCharmmfsw::read_restart(FILE *fp)
|
||||||
{
|
{
|
||||||
allocate();
|
allocate();
|
||||||
|
|
||||||
@ -474,7 +474,7 @@ void DihedralCharmmfsh::read_restart(FILE *fp)
|
|||||||
proc 0 writes to data file
|
proc 0 writes to data file
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void DihedralCharmmfsh::write_data(FILE *fp)
|
void DihedralCharmmfsw::write_data(FILE *fp)
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= atom->ndihedraltypes; i++)
|
for (int i = 1; i <= atom->ndihedraltypes; i++)
|
||||||
fprintf(fp,"%d %g %d %d %g\n",i,k[i],multiplicity[i],shift[i],weight[i]);
|
fprintf(fp,"%d %g %d %d %g\n",i,k[i],multiplicity[i],shift[i],weight[i]);
|
||||||
@ -13,22 +13,22 @@
|
|||||||
|
|
||||||
#ifdef DIHEDRAL_CLASS
|
#ifdef DIHEDRAL_CLASS
|
||||||
|
|
||||||
DihedralStyle(charmmfsh,DihedralCharmmfsh)
|
DihedralStyle(charmmfsw,DihedralCharmmfsw)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_DIHEDRAL_CHARMMFSH_H
|
#ifndef LMP_DIHEDRAL_CHARMMFSW_H
|
||||||
#define LMP_DIHEDRAL_CHARMMFSH_H
|
#define LMP_DIHEDRAL_CHARMMFSW_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "dihedral.h"
|
#include "dihedral.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class DihedralCharmmfsh : public Dihedral {
|
class DihedralCharmmfsw : public Dihedral {
|
||||||
public:
|
public:
|
||||||
DihedralCharmmfsh(class LAMMPS *);
|
DihedralCharmmfsw(class LAMMPS *);
|
||||||
virtual ~DihedralCharmmfsh();
|
virtual ~DihedralCharmmfsw();
|
||||||
virtual void compute(int, int);
|
virtual void compute(int, int);
|
||||||
virtual void coeff(int, char **);
|
virtual void coeff(int, char **);
|
||||||
virtual void init_style();
|
virtual void init_style();
|
||||||
@ -73,9 +73,9 @@ E: Incorrect weight arg for dihedral coefficients
|
|||||||
|
|
||||||
Self-explanatory. Check the input script or data file.
|
Self-explanatory. Check the input script or data file.
|
||||||
|
|
||||||
E: Dihedral charmmfsh is incompatible with Pair style
|
E: Dihedral charmmfsw is incompatible with Pair style
|
||||||
|
|
||||||
Dihedral style charmmfsh must be used with a pair style charmm
|
Dihedral style charmmfsw must be used with a pair style charmm
|
||||||
in order for the 1-4 epsilon/sigma parameters to be defined.
|
in order for the 1-4 epsilon/sigma parameters to be defined.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -36,7 +36,7 @@ touch ../write_restart.cpp
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package to include/exclude LMP_MPIIO setting
|
# edit 2 Makefile.package to include/exclude LMP_MPIIO setting
|
||||||
|
|||||||
@ -25,7 +25,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
71
src/Makefile
71
src/Makefile
@ -43,6 +43,15 @@ endif
|
|||||||
|
|
||||||
# Package variables
|
# Package variables
|
||||||
|
|
||||||
|
# PACKAGE = standard packages
|
||||||
|
# PACKUSER = user packagse
|
||||||
|
# PACKLIB = all packages that require an additional lib
|
||||||
|
# PACKSYS = subset that reqiure a common system library
|
||||||
|
# PACKINT = subset that require an internal (provided) library
|
||||||
|
# PACKEXT = subset that require an external (downloaded) library
|
||||||
|
# PACKLIB = PACKSYS + PACKING + PACKEXT
|
||||||
|
# PACKSCRIPT = libs under lammps/lib that have an Install.py script
|
||||||
|
|
||||||
PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \
|
PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \
|
||||||
granular kim kokkos kspace manybody mc meam misc molecule \
|
granular kim kokkos kspace manybody mc meam misc molecule \
|
||||||
mpiio mscg opt peri poems \
|
mpiio mscg opt peri poems \
|
||||||
@ -55,10 +64,21 @@ PACKUSER = user-atc user-awpmd user-cg-cmm user-cgdna user-colvars \
|
|||||||
user-quip user-reaxc user-smd user-smtbq user-sph user-tally \
|
user-quip user-reaxc user-smd user-smtbq user-sph user-tally \
|
||||||
user-vtk
|
user-vtk
|
||||||
|
|
||||||
PACKLIB = compress gpu kim kokkos meam mpiio mscg poems python reax voronoi \
|
PACKLIB = compress gpu kim kokkos meam mpiio mscg poems \
|
||||||
user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \
|
python reax voronoi \
|
||||||
|
user-atc user-awpmd user-colvars user-h5md user-molfile \
|
||||||
user-nc-dump user-qmmm user-quip user-smd user-vtk
|
user-nc-dump user-qmmm user-quip user-smd user-vtk
|
||||||
|
|
||||||
|
PACKSYS = compress mpiio python
|
||||||
|
|
||||||
|
PACKINT = gpu kokkos meam poems reax user-atc user-awpmd user-colvars
|
||||||
|
|
||||||
|
PACKEXT = kim mscg voronoi \
|
||||||
|
user-h5md user-molfile user-nc-dump user-qmmm user-quip \
|
||||||
|
user-smd user-vtk
|
||||||
|
|
||||||
|
PACKSCRIPT = voronoi
|
||||||
|
|
||||||
PACKALL = $(PACKAGE) $(PACKUSER)
|
PACKALL = $(PACKAGE) $(PACKUSER)
|
||||||
|
|
||||||
PACKAGEUC = $(shell echo $(PACKAGE) | tr a-z A-Z)
|
PACKAGEUC = $(shell echo $(PACKAGE) | tr a-z A-Z)
|
||||||
@ -66,6 +86,7 @@ PACKUSERUC = $(shell echo $(PACKUSER) | tr a-z A-Z)
|
|||||||
|
|
||||||
YESDIR = $(shell echo $(@:yes-%=%) | tr a-z A-Z)
|
YESDIR = $(shell echo $(@:yes-%=%) | tr a-z A-Z)
|
||||||
NODIR = $(shell echo $(@:no-%=%) | tr a-z A-Z)
|
NODIR = $(shell echo $(@:no-%=%) | tr a-z A-Z)
|
||||||
|
LIBDIR = $(shell echo $(@:lib-%=%))
|
||||||
|
|
||||||
# List of all targets
|
# List of all targets
|
||||||
|
|
||||||
@ -75,9 +96,9 @@ help:
|
|||||||
@echo 'make clean-machine delete object files for one machine'
|
@echo 'make clean-machine delete object files for one machine'
|
||||||
@echo 'make mpi-stubs build dummy MPI library in STUBS'
|
@echo 'make mpi-stubs build dummy MPI library in STUBS'
|
||||||
@echo 'make install-python install LAMMPS wrapper in Python'
|
@echo 'make install-python install LAMMPS wrapper in Python'
|
||||||
@echo 'make tar create lmp_src.tar.gz of src dir and packages'
|
@echo 'make tar create lmp_src.tar.gz for src dir and packages'
|
||||||
@echo ''
|
@echo ''
|
||||||
@echo 'make package list available packages'
|
@echo 'make package list available packages and their dependencies'
|
||||||
@echo 'make package-status (ps) status of all packages'
|
@echo 'make package-status (ps) status of all packages'
|
||||||
@echo 'make yes-package install a single pgk in src dir'
|
@echo 'make yes-package install a single pgk in src dir'
|
||||||
@echo 'make no-package remove a single pkg from src dir'
|
@echo 'make no-package remove a single pkg from src dir'
|
||||||
@ -87,11 +108,16 @@ help:
|
|||||||
@echo 'make no-standard (no-std) remove all standard pkgs'
|
@echo 'make no-standard (no-std) remove all standard pkgs'
|
||||||
@echo 'make yes-user install all user pkgs'
|
@echo 'make yes-user install all user pkgs'
|
||||||
@echo 'make no-user remove all user pkgs'
|
@echo 'make no-user remove all user pkgs'
|
||||||
@echo 'make no-lib remove all pkgs with external libs'
|
@echo 'make yes-lib install all pkgs with libs (incldued or ext)'
|
||||||
|
@echo 'make no-lib remove all pkgs with libs (included or ext)'
|
||||||
|
@echo 'make yes-ext install all pkgs with external libs'
|
||||||
|
@echo 'make no-ext remove all pkgs with external libs'
|
||||||
@echo ''
|
@echo ''
|
||||||
@echo 'make package-update (pu) replace src files with updated package files'
|
@echo 'make package-update (pu) replace src files with updated package files'
|
||||||
@echo 'make package-overwrite replace package files with src files'
|
@echo 'make package-overwrite replace package files with src files'
|
||||||
@echo 'make package-diff (pd) diff src files against package files'
|
@echo 'make package-diff (pd) diff src files against package files'
|
||||||
|
@echo ''
|
||||||
|
@echo 'make lib-package download/build/install a package library'
|
||||||
@echo 'make purge purge obsolete copies of source files'
|
@echo 'make purge purge obsolete copies of source files'
|
||||||
@echo ''
|
@echo ''
|
||||||
@echo 'make machine build LAMMPS for machine'
|
@echo 'make machine build LAMMPS for machine'
|
||||||
@ -221,6 +247,13 @@ package:
|
|||||||
@echo ''
|
@echo ''
|
||||||
@echo 'User-contributed packages:' $(PACKUSER)
|
@echo 'User-contributed packages:' $(PACKUSER)
|
||||||
@echo ''
|
@echo ''
|
||||||
|
@echo 'Packages that need system libraries:' $(PACKSYS)
|
||||||
|
@echo ''
|
||||||
|
@echo 'Packages that need provided libraries:' $(PACKINT)
|
||||||
|
@echo ''
|
||||||
|
@echo 'Packages that need external libraries:' $(PACKEXT)
|
||||||
|
@echo ''
|
||||||
|
@echo 'make package list available packages'
|
||||||
@echo 'make package list available packages'
|
@echo 'make package list available packages'
|
||||||
@echo 'make package-status (ps) status of all packages'
|
@echo 'make package-status (ps) status of all packages'
|
||||||
@echo 'make yes-package install a single pgk in src dir'
|
@echo 'make yes-package install a single pgk in src dir'
|
||||||
@ -229,13 +262,18 @@ package:
|
|||||||
@echo 'make no-all remove all pkgs from src dir'
|
@echo 'make no-all remove all pkgs from src dir'
|
||||||
@echo 'make yes-standard (yes-std) install all standard pkgs'
|
@echo 'make yes-standard (yes-std) install all standard pkgs'
|
||||||
@echo 'make no-standard (no-srd) remove all standard pkgs'
|
@echo 'make no-standard (no-srd) remove all standard pkgs'
|
||||||
@echo ''
|
|
||||||
@echo 'make yes-user install all user pkgs'
|
@echo 'make yes-user install all user pkgs'
|
||||||
@echo 'make no-user remove all user pkgs'
|
@echo 'make no-user remove all user pkgs'
|
||||||
@echo 'make no-lib remove all pkgs with external libs'
|
@echo 'make yes-lib install all pkgs with libs (included or ext)'
|
||||||
|
@echo 'make no-lib remove all pkgs with libs (included or ext)'
|
||||||
|
@echo 'make yes-ext install all pkgs with external libs'
|
||||||
|
@echo 'make no-ext remove all pkgs with external libs'
|
||||||
|
@echo ''
|
||||||
@echo 'make package-update (pu) replace src files with package files'
|
@echo 'make package-update (pu) replace src files with package files'
|
||||||
@echo 'make package-overwrite replace package files with src files'
|
@echo 'make package-overwrite replace package files with src files'
|
||||||
@echo 'make package-diff (pd) diff src files against package file'
|
@echo 'make package-diff (pd) diff src files against package file'
|
||||||
|
@echo ''
|
||||||
|
@echo 'make lib-package download/build/install a package library'
|
||||||
|
|
||||||
yes-all:
|
yes-all:
|
||||||
@for p in $(PACKALL); do $(MAKE) yes-$$p; done
|
@for p in $(PACKALL); do $(MAKE) yes-$$p; done
|
||||||
@ -255,9 +293,18 @@ yes-user:
|
|||||||
no-user:
|
no-user:
|
||||||
@for p in $(PACKUSER); do $(MAKE) no-$$p; done
|
@for p in $(PACKUSER); do $(MAKE) no-$$p; done
|
||||||
|
|
||||||
|
yes-lib:
|
||||||
|
@for p in $(PACKLIB); do $(MAKE) yes-$$p; done
|
||||||
|
|
||||||
no-lib:
|
no-lib:
|
||||||
@for p in $(PACKLIB); do $(MAKE) no-$$p; done
|
@for p in $(PACKLIB); do $(MAKE) no-$$p; done
|
||||||
|
|
||||||
|
yes-ext:
|
||||||
|
@for p in $(PACKEXT); do $(MAKE) yes-$$p; done
|
||||||
|
|
||||||
|
no-ext:
|
||||||
|
@for p in $(PACKEXT); do $(MAKE) no-$$p; done
|
||||||
|
|
||||||
yes-%:
|
yes-%:
|
||||||
@if [ ! -e Makefile.package ]; \
|
@if [ ! -e Makefile.package ]; \
|
||||||
then cp Makefile.package.empty Makefile.package; fi
|
then cp Makefile.package.empty Makefile.package; fi
|
||||||
@ -288,6 +335,16 @@ no-%:
|
|||||||
$(SHELL) Depend.sh $(NODIR) 0; \
|
$(SHELL) Depend.sh $(NODIR) 0; \
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
# download/build/install a package library
|
||||||
|
|
||||||
|
lib-%:
|
||||||
|
@if [ ! -e ../lib/$(LIBDIR)/Install.py ]; then \
|
||||||
|
echo "Install script for lib $(@:lib-%=%) does not exist"; \
|
||||||
|
else \
|
||||||
|
echo "Installing lib for package $(@:lib-%=%)"; \
|
||||||
|
cd ../lib/$(LIBDIR); python Install.py $(args); \
|
||||||
|
fi;
|
||||||
|
|
||||||
# status = list src files that differ from package files
|
# status = list src files that differ from package files
|
||||||
# update = replace src files with newer package files
|
# update = replace src files with newer package files
|
||||||
# overwrite = overwrite package files with newer src files
|
# overwrite = overwrite package files with newer src files
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -35,7 +35,7 @@ touch ../variable.cpp
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -37,6 +37,8 @@ Python::Python(LAMMPS *lmp) : Pointers(lmp)
|
|||||||
|
|
||||||
nfunc = 0;
|
nfunc = 0;
|
||||||
pfuncs = NULL;
|
pfuncs = NULL;
|
||||||
|
|
||||||
|
external_interpreter = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -44,6 +46,7 @@ Python::Python(LAMMPS *lmp) : Pointers(lmp)
|
|||||||
Python::~Python()
|
Python::~Python()
|
||||||
{
|
{
|
||||||
// clean up
|
// clean up
|
||||||
|
PyGILState_STATE gstate = PyGILState_Ensure();
|
||||||
|
|
||||||
for (int i = 0; i < nfunc; i++) {
|
for (int i = 0; i < nfunc; i++) {
|
||||||
delete [] pfuncs[i].name;
|
delete [] pfuncs[i].name;
|
||||||
@ -54,7 +57,12 @@ Python::~Python()
|
|||||||
|
|
||||||
// shutdown Python interpreter
|
// shutdown Python interpreter
|
||||||
|
|
||||||
if (pyMain) Py_Finalize();
|
if (pyMain && !external_interpreter) {
|
||||||
|
Py_Finalize();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
|
}
|
||||||
|
|
||||||
memory->sfree(pfuncs);
|
memory->sfree(pfuncs);
|
||||||
}
|
}
|
||||||
@ -147,27 +155,20 @@ void Python::command(int narg, char **arg)
|
|||||||
int ifunc = create_entry(arg[0]);
|
int ifunc = create_entry(arg[0]);
|
||||||
|
|
||||||
// one-time initialization of Python interpreter
|
// one-time initialization of Python interpreter
|
||||||
// Py_SetArgv() enables finding of *.py module files in current dir
|
|
||||||
// only needed for module load, not for direct file read into __main__
|
|
||||||
// pymain stores pointer to main module
|
// pymain stores pointer to main module
|
||||||
|
PyGILState_STATE gstate;
|
||||||
|
|
||||||
if (pyMain == NULL) {
|
if (pyMain == NULL) {
|
||||||
if (Py_IsInitialized())
|
external_interpreter = Py_IsInitialized();
|
||||||
error->all(FLERR,"Cannot embed Python when also "
|
|
||||||
"extending Python with LAMMPS");
|
|
||||||
Py_Initialize();
|
Py_Initialize();
|
||||||
|
PyEval_InitThreads();
|
||||||
//char *arg = (char *) "./lmp";
|
gstate = PyGILState_Ensure();
|
||||||
//PySys_SetArgv(1,&arg);
|
|
||||||
|
|
||||||
//PyObject *pName = PyString_FromString("__main__");
|
|
||||||
//if (!pName) errorX->all(FLERR,"Bad pName");
|
|
||||||
//PyObject *pModule = PyImport_Import(pName);
|
|
||||||
//Py_DECREF(pName);
|
|
||||||
|
|
||||||
PyObject *pModule = PyImport_AddModule("__main__");
|
PyObject *pModule = PyImport_AddModule("__main__");
|
||||||
if (!pModule) error->all(FLERR,"Could not initialize embedded Python");
|
if (!pModule) error->all(FLERR,"Could not initialize embedded Python");
|
||||||
pyMain = (void *) pModule;
|
pyMain = (void *) pModule;
|
||||||
|
} else {
|
||||||
|
gstate = PyGILState_Ensure();
|
||||||
}
|
}
|
||||||
|
|
||||||
// send Python code to Python interpreter
|
// send Python code to Python interpreter
|
||||||
@ -177,22 +178,44 @@ void Python::command(int narg, char **arg)
|
|||||||
|
|
||||||
if (pyfile) {
|
if (pyfile) {
|
||||||
FILE *fp = fopen(pyfile,"r");
|
FILE *fp = fopen(pyfile,"r");
|
||||||
if (fp == NULL) error->all(FLERR,"Could not open Python file");
|
|
||||||
|
if (fp == NULL) {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
|
error->all(FLERR,"Could not open Python file");
|
||||||
|
}
|
||||||
|
|
||||||
int err = PyRun_SimpleFile(fp,pyfile);
|
int err = PyRun_SimpleFile(fp,pyfile);
|
||||||
if (err) error->all(FLERR,"Could not process Python file");
|
|
||||||
|
if (err) {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
|
error->all(FLERR,"Could not process Python file");
|
||||||
|
}
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
} else if (herestr) {
|
} else if (herestr) {
|
||||||
int err = PyRun_SimpleString(herestr);
|
int err = PyRun_SimpleString(herestr);
|
||||||
if (err) error->all(FLERR,"Could not process Python string");
|
|
||||||
|
if (err) {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
|
error->all(FLERR,"Could not process Python string");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// pFunc = function object for requested function
|
// pFunc = function object for requested function
|
||||||
|
|
||||||
PyObject *pModule = (PyObject *) pyMain;
|
PyObject *pModule = (PyObject *) pyMain;
|
||||||
PyObject *pFunc = PyObject_GetAttrString(pModule,pfuncs[ifunc].name);
|
PyObject *pFunc = PyObject_GetAttrString(pModule,pfuncs[ifunc].name);
|
||||||
if (!pFunc) error->all(FLERR,"Could not find Python function");
|
|
||||||
if (!PyCallable_Check(pFunc))
|
if (!pFunc) {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
|
error->all(FLERR,"Could not find Python function");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!PyCallable_Check(pFunc)) {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
error->all(FLERR,"Python function is not callable");
|
error->all(FLERR,"Python function is not callable");
|
||||||
|
}
|
||||||
|
|
||||||
pfuncs[ifunc].pFunc = (void *) pFunc;
|
pfuncs[ifunc].pFunc = (void *) pFunc;
|
||||||
|
|
||||||
// clean-up input storage
|
// clean-up input storage
|
||||||
@ -200,12 +223,14 @@ void Python::command(int narg, char **arg)
|
|||||||
delete [] istr;
|
delete [] istr;
|
||||||
delete [] format;
|
delete [] format;
|
||||||
delete [] pyfile;
|
delete [] pyfile;
|
||||||
|
PyGILState_Release(gstate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
void Python::invoke_function(int ifunc, char *result)
|
void Python::invoke_function(int ifunc, char *result)
|
||||||
{
|
{
|
||||||
|
PyGILState_STATE gstate = PyGILState_Ensure();
|
||||||
PyObject *pValue;
|
PyObject *pValue;
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
@ -215,29 +240,43 @@ void Python::invoke_function(int ifunc, char *result)
|
|||||||
|
|
||||||
int ninput = pfuncs[ifunc].ninput;
|
int ninput = pfuncs[ifunc].ninput;
|
||||||
PyObject *pArgs = PyTuple_New(ninput);
|
PyObject *pArgs = PyTuple_New(ninput);
|
||||||
if (!pArgs) error->all(FLERR,"Could not create Python function arguments");
|
|
||||||
|
if (!pArgs) {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
|
error->all(FLERR,"Could not create Python function arguments");
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < ninput; i++) {
|
for (int i = 0; i < ninput; i++) {
|
||||||
int itype = pfuncs[ifunc].itype[i];
|
int itype = pfuncs[ifunc].itype[i];
|
||||||
if (itype == INT) {
|
if (itype == INT) {
|
||||||
if (pfuncs[ifunc].ivarflag[i]) {
|
if (pfuncs[ifunc].ivarflag[i]) {
|
||||||
str = input->variable->retrieve(pfuncs[ifunc].svalue[i]);
|
str = input->variable->retrieve(pfuncs[ifunc].svalue[i]);
|
||||||
if (!str)
|
|
||||||
|
if (!str) {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
error->all(FLERR,"Could not evaluate Python function input variable");
|
error->all(FLERR,"Could not evaluate Python function input variable");
|
||||||
|
}
|
||||||
|
|
||||||
pValue = PyInt_FromLong(atoi(str));
|
pValue = PyInt_FromLong(atoi(str));
|
||||||
} else pValue = PyInt_FromLong(pfuncs[ifunc].ivalue[i]);
|
} else pValue = PyInt_FromLong(pfuncs[ifunc].ivalue[i]);
|
||||||
} else if (itype == DOUBLE) {
|
} else if (itype == DOUBLE) {
|
||||||
if (pfuncs[ifunc].ivarflag[i]) {
|
if (pfuncs[ifunc].ivarflag[i]) {
|
||||||
str = input->variable->retrieve(pfuncs[ifunc].svalue[i]);
|
str = input->variable->retrieve(pfuncs[ifunc].svalue[i]);
|
||||||
if (!str)
|
|
||||||
|
if (!str) {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
error->all(FLERR,"Could not evaluate Python function input variable");
|
error->all(FLERR,"Could not evaluate Python function input variable");
|
||||||
|
}
|
||||||
|
|
||||||
pValue = PyFloat_FromDouble(atof(str));
|
pValue = PyFloat_FromDouble(atof(str));
|
||||||
} else pValue = PyFloat_FromDouble(pfuncs[ifunc].dvalue[i]);
|
} else pValue = PyFloat_FromDouble(pfuncs[ifunc].dvalue[i]);
|
||||||
} else if (itype == STRING) {
|
} else if (itype == STRING) {
|
||||||
if (pfuncs[ifunc].ivarflag[i]) {
|
if (pfuncs[ifunc].ivarflag[i]) {
|
||||||
str = input->variable->retrieve(pfuncs[ifunc].svalue[i]);
|
str = input->variable->retrieve(pfuncs[ifunc].svalue[i]);
|
||||||
if (!str)
|
if (!str) {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
error->all(FLERR,"Could not evaluate Python function input variable");
|
error->all(FLERR,"Could not evaluate Python function input variable");
|
||||||
|
}
|
||||||
pValue = PyString_FromString(str);
|
pValue = PyString_FromString(str);
|
||||||
} else pValue = PyString_FromString(pfuncs[ifunc].svalue[i]);
|
} else pValue = PyString_FromString(pfuncs[ifunc].svalue[i]);
|
||||||
} else if (itype == PTR) {
|
} else if (itype == PTR) {
|
||||||
@ -250,7 +289,12 @@ void Python::invoke_function(int ifunc, char *result)
|
|||||||
// error check with one() since only some procs may fail
|
// error check with one() since only some procs may fail
|
||||||
|
|
||||||
pValue = PyObject_CallObject(pFunc,pArgs);
|
pValue = PyObject_CallObject(pFunc,pArgs);
|
||||||
if (!pValue) error->one(FLERR,"Python function evaluation failed");
|
|
||||||
|
if (!pValue) {
|
||||||
|
PyGILState_Release(gstate);
|
||||||
|
error->one(FLERR,"Python function evaluation failed");
|
||||||
|
}
|
||||||
|
|
||||||
Py_DECREF(pArgs);
|
Py_DECREF(pArgs);
|
||||||
|
|
||||||
// function returned a value
|
// function returned a value
|
||||||
@ -271,6 +315,8 @@ void Python::invoke_function(int ifunc, char *result)
|
|||||||
}
|
}
|
||||||
Py_DECREF(pValue);
|
Py_DECREF(pValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PyGILState_Release(gstate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
|
|||||||
@ -21,6 +21,7 @@ namespace LAMMPS_NS {
|
|||||||
class Python : protected Pointers {
|
class Python : protected Pointers {
|
||||||
public:
|
public:
|
||||||
int python_exists;
|
int python_exists;
|
||||||
|
bool external_interpreter;
|
||||||
|
|
||||||
Python(class LAMMPS *);
|
Python(class LAMMPS *);
|
||||||
~Python();
|
~Python();
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -84,7 +84,7 @@ void ComputeEventDisplace::init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
return non-zero if an atom has moved > displace_dist since last event
|
return non-zero if any atom has moved > displace_dist since last event
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
double ComputeEventDisplace::compute_scalar()
|
double ComputeEventDisplace::compute_scalar()
|
||||||
@ -145,6 +145,62 @@ double ComputeEventDisplace::compute_scalar()
|
|||||||
return scalar;
|
return scalar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
return count of atoms that have moved > displace_dist since last event
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
int ComputeEventDisplace::all_events()
|
||||||
|
{
|
||||||
|
invoked_scalar = update->ntimestep;
|
||||||
|
|
||||||
|
if (id_event == NULL) return 0.0;
|
||||||
|
|
||||||
|
int event = 0;
|
||||||
|
double **xevent = fix_event->array_atom;
|
||||||
|
|
||||||
|
double **x = atom->x;
|
||||||
|
int *mask = atom->mask;
|
||||||
|
imageint *image = atom->image;
|
||||||
|
int nlocal = atom->nlocal;
|
||||||
|
|
||||||
|
double *h = domain->h;
|
||||||
|
double xprd = domain->xprd;
|
||||||
|
double yprd = domain->yprd;
|
||||||
|
double zprd = domain->zprd;
|
||||||
|
int xbox,ybox,zbox;
|
||||||
|
double dx,dy,dz,rsq;
|
||||||
|
|
||||||
|
if (triclinic == 0) {
|
||||||
|
for (int i = 0; i < nlocal; i++)
|
||||||
|
if (mask[i] & groupbit) {
|
||||||
|
xbox = (image[i] & IMGMASK) - IMGMAX;
|
||||||
|
ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX;
|
||||||
|
zbox = (image[i] >> IMG2BITS) - IMGMAX;
|
||||||
|
dx = x[i][0] + xbox*xprd - xevent[i][0];
|
||||||
|
dy = x[i][1] + ybox*yprd - xevent[i][1];
|
||||||
|
dz = x[i][2] + zbox*zprd - xevent[i][2];
|
||||||
|
rsq = dx*dx + dy*dy + dz*dz;
|
||||||
|
if (rsq >= displace_distsq) event++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (int i = 0; i < nlocal; i++)
|
||||||
|
if (mask[i] & groupbit) {
|
||||||
|
xbox = (image[i] & IMGMASK) - IMGMAX;
|
||||||
|
ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX;
|
||||||
|
zbox = (image[i] >> IMG2BITS) - IMGMAX;
|
||||||
|
dx = x[i][0] + h[0]*xbox + h[5]*ybox + h[4]*zbox - xevent[i][0];
|
||||||
|
dy = x[i][1] + h[1]*ybox + h[3]*zbox - xevent[i][1];
|
||||||
|
dz = x[i][2] + h[2]*zbox - xevent[i][2];
|
||||||
|
rsq = dx*dx + dy*dy + dz*dz;
|
||||||
|
if (rsq >= displace_distsq) event++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int allevents;
|
||||||
|
MPI_Allreduce(&event,&allevents,1,MPI_INT,MPI_SUM,world);
|
||||||
|
|
||||||
|
return allevents;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|||||||
@ -30,8 +30,11 @@ class ComputeEventDisplace : public Compute {
|
|||||||
~ComputeEventDisplace();
|
~ComputeEventDisplace();
|
||||||
void init();
|
void init();
|
||||||
double compute_scalar();
|
double compute_scalar();
|
||||||
|
|
||||||
|
int all_events();
|
||||||
void reset_extra_compute_fix(const char *);
|
void reset_extra_compute_fix(const char *);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int triclinic;
|
int triclinic;
|
||||||
double displace_distsq;
|
double displace_distsq;
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -27,7 +27,7 @@ action () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -94,6 +94,7 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg,
|
|||||||
dof_flag = 1;
|
dof_flag = 1;
|
||||||
|
|
||||||
nevery = 0;
|
nevery = 0;
|
||||||
|
next_output = 0;
|
||||||
dtv = dtf = 0;
|
dtv = dtf = 0;
|
||||||
|
|
||||||
tolerance = force->numeric( FLERR, arg[3] );
|
tolerance = force->numeric( FLERR, arg[3] );
|
||||||
@ -145,6 +146,11 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg,
|
|||||||
while( argi < narg ){
|
while( argi < narg ){
|
||||||
if( strcmp(arg[argi], "every") == 0 ){
|
if( strcmp(arg[argi], "every") == 0 ){
|
||||||
nevery = force->inumeric(FLERR,arg[argi+1]);
|
nevery = force->inumeric(FLERR,arg[argi+1]);
|
||||||
|
next_output = update->ntimestep + nevery;
|
||||||
|
if( comm->me == 0 ){
|
||||||
|
fprintf(screen,"Outputing every %d steps, next is %d\n",
|
||||||
|
nevery, next_output);
|
||||||
|
}
|
||||||
argi += 2;
|
argi += 2;
|
||||||
}else if( error_on_unknown_keyword ){
|
}else if( error_on_unknown_keyword ){
|
||||||
char msg[2048];
|
char msg[2048];
|
||||||
@ -220,6 +226,11 @@ void FixNVEManifoldRattle::print_stats( const char *header )
|
|||||||
x_iters * inv_tdiff, v_iters * inv_tdiff, stats.dofs_removed);
|
x_iters * inv_tdiff, v_iters * inv_tdiff, stats.dofs_removed);
|
||||||
fprintf(screen,"\n");
|
fprintf(screen,"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stats.x_iters_per_atom = 0;
|
||||||
|
stats.v_iters_per_atom = 0;
|
||||||
|
stats.x_iters = 0;
|
||||||
|
stats.v_iters = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -263,14 +274,6 @@ void FixNVEManifoldRattle::init()
|
|||||||
void FixNVEManifoldRattle::update_var_params()
|
void FixNVEManifoldRattle::update_var_params()
|
||||||
{
|
{
|
||||||
|
|
||||||
if( nevery > 0 ){
|
|
||||||
stats.x_iters = 0;
|
|
||||||
stats.v_iters = 0;
|
|
||||||
stats.natoms = 0;
|
|
||||||
stats.x_iters_per_atom = 0.0;
|
|
||||||
stats.v_iters_per_atom = 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
double *ptr_params = ptr_m->params;
|
double *ptr_params = ptr_m->params;
|
||||||
|
|
||||||
for( int i = 0; i < nvars; ++i ){
|
for( int i = 0; i < nvars; ++i ){
|
||||||
@ -358,7 +361,12 @@ void FixNVEManifoldRattle::final_integrate()
|
|||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
void FixNVEManifoldRattle::end_of_step()
|
void FixNVEManifoldRattle::end_of_step()
|
||||||
{
|
{
|
||||||
|
if (nevery && (update->ntimestep == next_output)){
|
||||||
|
if( comm->me == 0 ){
|
||||||
print_stats( "nve/manifold/rattle" );
|
print_stats( "nve/manifold/rattle" );
|
||||||
|
next_output += nevery;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -81,7 +81,7 @@ namespace LAMMPS_NS {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
int nevery;
|
int nevery, next_output;
|
||||||
|
|
||||||
double dtv, dtf;
|
double dtv, dtf;
|
||||||
double tolerance;
|
double tolerance;
|
||||||
|
|||||||
@ -35,6 +35,6 @@ for file in *.cpp *.h; do
|
|||||||
elif (test $file = "pair_cdeam.h") then
|
elif (test $file = "pair_cdeam.h") then
|
||||||
action pair_cdeam.h pair_eam_alloy.cpp
|
action pair_cdeam.h pair_eam_alloy.cpp
|
||||||
else
|
else
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -27,7 +27,7 @@ action () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -27,7 +27,7 @@ action () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
@ -29,7 +29,7 @@ action () {
|
|||||||
# all package files with no dependencies
|
# all package files with no dependencies
|
||||||
|
|
||||||
for file in *.cpp *.h; do
|
for file in *.cpp *.h; do
|
||||||
action $file
|
test -f ${file} && action $file
|
||||||
done
|
done
|
||||||
|
|
||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|||||||
11
src/bond.cpp
11
src/bond.cpp
@ -292,3 +292,14 @@ double Bond::memory_usage()
|
|||||||
bytes += comm->nthreads*maxvatom*6 * sizeof(double);
|
bytes += comm->nthreads*maxvatom*6 * sizeof(double);
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------
|
||||||
|
Reset all type-based bond params via init.
|
||||||
|
-------------------------------------------------------------------------- */
|
||||||
|
void Bond::reinit()
|
||||||
|
{
|
||||||
|
if (!reinitflag)
|
||||||
|
error->all(FLERR,"Fix adapt interface to this bond style not supported");
|
||||||
|
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|||||||
@ -30,6 +30,8 @@ class Bond : protected Pointers {
|
|||||||
double virial[6]; // accumulated virial
|
double virial[6]; // accumulated virial
|
||||||
double *eatom,**vatom; // accumulated per-atom energy/virial
|
double *eatom,**vatom; // accumulated per-atom energy/virial
|
||||||
|
|
||||||
|
int reinitflag; // 1 if compatible with fix adapt and alike
|
||||||
|
|
||||||
// KOKKOS host/device flag and data masks
|
// KOKKOS host/device flag and data masks
|
||||||
|
|
||||||
ExecutionSpace execution_space;
|
ExecutionSpace execution_space;
|
||||||
@ -49,6 +51,8 @@ class Bond : protected Pointers {
|
|||||||
virtual void write_data(FILE *) {}
|
virtual void write_data(FILE *) {}
|
||||||
virtual double single(int, double, int, int, double &) = 0;
|
virtual double single(int, double, int, int, double &) = 0;
|
||||||
virtual double memory_usage();
|
virtual double memory_usage();
|
||||||
|
virtual void *extract(char *, int &) {return NULL;}
|
||||||
|
virtual void reinit();
|
||||||
|
|
||||||
void write_file(int, char**);
|
void write_file(int, char**);
|
||||||
|
|
||||||
|
|||||||
@ -67,6 +67,11 @@ ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
} else error->all(FLERR,"Illegal compute temp/sphere command");
|
} else error->all(FLERR,"Illegal compute temp/sphere command");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// when computing only the rotational temperature,
|
||||||
|
// do not remove DOFs for translation as set by default
|
||||||
|
|
||||||
|
if (mode == ROTATE) extra_dof = 0;
|
||||||
|
|
||||||
vector = new double[6];
|
vector = new double[6];
|
||||||
|
|
||||||
// error checks
|
// error checks
|
||||||
|
|||||||
@ -162,6 +162,7 @@ void Finish::end(int flag)
|
|||||||
|
|
||||||
// CPU use on MPI tasks and OpenMP threads
|
// CPU use on MPI tasks and OpenMP threads
|
||||||
|
|
||||||
|
if (timeflag) {
|
||||||
if (lmp->kokkos) {
|
if (lmp->kokkos) {
|
||||||
const char fmt2[] =
|
const char fmt2[] =
|
||||||
"%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n";
|
"%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n";
|
||||||
@ -184,6 +185,7 @@ void Finish::end(int flag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// avoid division by zero for very short runs
|
// avoid division by zero for very short runs
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "fix_adapt.h"
|
#include "fix_adapt.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
|
#include "bond.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "group.h"
|
#include "group.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
@ -35,7 +36,7 @@ using namespace LAMMPS_NS;
|
|||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
enum{PAIR,KSPACE,ATOM};
|
enum{PAIR,KSPACE,ATOM,BOND};
|
||||||
enum{DIAMETER,CHARGE};
|
enum{DIAMETER,CHARGE};
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -68,6 +69,10 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL)
|
|||||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix adapt command");
|
if (iarg+3 > narg) error->all(FLERR,"Illegal fix adapt command");
|
||||||
nadapt++;
|
nadapt++;
|
||||||
iarg += 3;
|
iarg += 3;
|
||||||
|
} else if (strcmp(arg[iarg],"bond") == 0 ){
|
||||||
|
if (iarg+5 > narg) error->all(FLERR,"Illegal fix adapt command");
|
||||||
|
nadapt++;
|
||||||
|
iarg += 5;
|
||||||
} else break;
|
} else break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,6 +108,25 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL)
|
|||||||
} else error->all(FLERR,"Illegal fix adapt command");
|
} else error->all(FLERR,"Illegal fix adapt command");
|
||||||
nadapt++;
|
nadapt++;
|
||||||
iarg += 6;
|
iarg += 6;
|
||||||
|
} else if (strcmp(arg[iarg],"bond") == 0 ){
|
||||||
|
if (iarg+5 > narg) error->all(FLERR, "Illegal fix adapt command");
|
||||||
|
adapt[nadapt].which = BOND;
|
||||||
|
int n = strlen(arg[iarg+1]) + 1;
|
||||||
|
adapt[nadapt].bstyle = new char[n];
|
||||||
|
strcpy(adapt[nadapt].bstyle,arg[iarg+1]);
|
||||||
|
n = strlen(arg[iarg+2]) + 1;
|
||||||
|
adapt[nadapt].bparam = new char[n];
|
||||||
|
adapt[nadapt].bond = NULL;
|
||||||
|
strcpy(adapt[nadapt].bparam,arg[iarg+2]);
|
||||||
|
force->bounds(FLERR,arg[iarg+3],atom->ntypes,
|
||||||
|
adapt[nadapt].ilo,adapt[nadapt].ihi);
|
||||||
|
if (strstr(arg[iarg+4],"v_") == arg[iarg+4]) {
|
||||||
|
n = strlen(&arg[iarg+4][2]) + 1;
|
||||||
|
adapt[nadapt].var = new char[n];
|
||||||
|
strcpy(adapt[nadapt].var,&arg[iarg+4][2]);
|
||||||
|
} else error->all(FLERR,"Illegal fix adapt command");
|
||||||
|
nadapt++;
|
||||||
|
iarg += 5;
|
||||||
} else if (strcmp(arg[iarg],"kspace") == 0) {
|
} else if (strcmp(arg[iarg],"kspace") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix adapt command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal fix adapt command");
|
||||||
adapt[nadapt].which = KSPACE;
|
adapt[nadapt].which = KSPACE;
|
||||||
@ -160,6 +184,13 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL)
|
|||||||
for (int m = 0; m < nadapt; m++)
|
for (int m = 0; m < nadapt; m++)
|
||||||
if (adapt[m].which == PAIR)
|
if (adapt[m].which == PAIR)
|
||||||
memory->create(adapt[m].array_orig,n+1,n+1,"adapt:array_orig");
|
memory->create(adapt[m].array_orig,n+1,n+1,"adapt:array_orig");
|
||||||
|
|
||||||
|
// allocate bond style arrays:
|
||||||
|
|
||||||
|
n = atom->nbondtypes;
|
||||||
|
for (int m = 0; m < nadapt; ++m)
|
||||||
|
if (adapt[m].which == BOND)
|
||||||
|
memory->create(adapt[m].vector_orig,n+1,"adapt:vector_orig");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -172,6 +203,10 @@ FixAdapt::~FixAdapt()
|
|||||||
delete [] adapt[m].pstyle;
|
delete [] adapt[m].pstyle;
|
||||||
delete [] adapt[m].pparam;
|
delete [] adapt[m].pparam;
|
||||||
memory->destroy(adapt[m].array_orig);
|
memory->destroy(adapt[m].array_orig);
|
||||||
|
} else if (adapt[m].which == BOND) {
|
||||||
|
delete [] adapt[m].bstyle;
|
||||||
|
delete [] adapt[m].bparam;
|
||||||
|
memory->destroy(adapt[m].vector_orig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete [] adapt;
|
delete [] adapt;
|
||||||
@ -282,6 +317,7 @@ void FixAdapt::init()
|
|||||||
// setup and error checks
|
// setup and error checks
|
||||||
|
|
||||||
anypair = 0;
|
anypair = 0;
|
||||||
|
anybond = 0;
|
||||||
|
|
||||||
for (int m = 0; m < nadapt; m++) {
|
for (int m = 0; m < nadapt; m++) {
|
||||||
Adapt *ad = &adapt[m];
|
Adapt *ad = &adapt[m];
|
||||||
@ -350,6 +386,41 @@ void FixAdapt::init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete [] pstyle;
|
delete [] pstyle;
|
||||||
|
} else if (ad->which == BOND){
|
||||||
|
ad->bond = NULL;
|
||||||
|
anybond = 1;
|
||||||
|
|
||||||
|
int n = strlen(ad->bstyle) + 1;
|
||||||
|
char *bstyle = new char[n];
|
||||||
|
strcpy(bstyle,ad->bstyle);
|
||||||
|
|
||||||
|
if (lmp->suffix_enable) {
|
||||||
|
int len = 2 + strlen(bstyle) + strlen(lmp->suffix);
|
||||||
|
char *bsuffix = new char[len];
|
||||||
|
strcpy(bsuffix,bstyle);
|
||||||
|
strcat(bsuffix,"/");
|
||||||
|
strcat(bsuffix,lmp->suffix);
|
||||||
|
ad->bond = force->bond_match(bsuffix);
|
||||||
|
delete [] bsuffix;
|
||||||
|
}
|
||||||
|
if (ad->bond == NULL) ad->bond = force->bond_match(bstyle);
|
||||||
|
if (ad->bond == NULL )
|
||||||
|
error->all(FLERR,"Fix adapt bond style does not exist");
|
||||||
|
|
||||||
|
void *ptr = ad->bond->extract(ad->bparam,ad->bdim);
|
||||||
|
|
||||||
|
if (ptr == NULL)
|
||||||
|
error->all(FLERR,"Fix adapt bond style param not supported");
|
||||||
|
|
||||||
|
// for bond styles, use a vector
|
||||||
|
|
||||||
|
if (ad->bdim == 1) ad->vector = (double *) ptr;
|
||||||
|
|
||||||
|
if (strcmp(force->bond_style,"hybrid") == 0 ||
|
||||||
|
strcmp(force->bond_style,"hybrid_overlay") == 0)
|
||||||
|
error->all(FLERR,"Fix adapt does not support bond_style hybrid");
|
||||||
|
|
||||||
|
delete [] bstyle;
|
||||||
|
|
||||||
} else if (ad->which == KSPACE) {
|
} else if (ad->which == KSPACE) {
|
||||||
if (force->kspace == NULL)
|
if (force->kspace == NULL)
|
||||||
@ -368,7 +439,7 @@ void FixAdapt::init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// make copy of original pair array values
|
// make copy of original pair/bond array values
|
||||||
|
|
||||||
for (int m = 0; m < nadapt; m++) {
|
for (int m = 0; m < nadapt; m++) {
|
||||||
Adapt *ad = &adapt[m];
|
Adapt *ad = &adapt[m];
|
||||||
@ -378,7 +449,12 @@ void FixAdapt::init()
|
|||||||
ad->array_orig[i][j] = ad->array[i][j];
|
ad->array_orig[i][j] = ad->array[i][j];
|
||||||
} else if (ad->which == PAIR && ad->pdim == 0){
|
} else if (ad->which == PAIR && ad->pdim == 0){
|
||||||
ad->scalar_orig = *ad->scalar;
|
ad->scalar_orig = *ad->scalar;
|
||||||
|
|
||||||
|
} else if (ad->which == BOND && ad->bdim == 1){
|
||||||
|
for (i = ad->ilo; i <= ad->ihi; ++i )
|
||||||
|
ad->vector_orig[i] = ad->vector[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fixes that store initial per-atom values
|
// fixes that store initial per-atom values
|
||||||
@ -470,6 +546,18 @@ void FixAdapt::change_settings()
|
|||||||
ad->array[i][j] = value;
|
ad->array[i][j] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set bond type array values:
|
||||||
|
|
||||||
|
} else if (ad->which == BOND) {
|
||||||
|
if (ad->bdim == 1){
|
||||||
|
if (scaleflag)
|
||||||
|
for (i = ad->ilo; i <= ad->ihi; ++i )
|
||||||
|
ad->vector[i] = value*ad->vector_orig[i];
|
||||||
|
else
|
||||||
|
for (i = ad->ilo; i <= ad->ihi; ++i )
|
||||||
|
ad->vector[i] = value;
|
||||||
|
}
|
||||||
|
|
||||||
// set kspace scale factor
|
// set kspace scale factor
|
||||||
|
|
||||||
} else if (ad->which == KSPACE) {
|
} else if (ad->which == KSPACE) {
|
||||||
@ -522,8 +610,10 @@ void FixAdapt::change_settings()
|
|||||||
modify->addstep_compute(update->ntimestep + nevery);
|
modify->addstep_compute(update->ntimestep + nevery);
|
||||||
|
|
||||||
// re-initialize pair styles if any PAIR settings were changed
|
// re-initialize pair styles if any PAIR settings were changed
|
||||||
|
// ditto for bond styles if any BOND setitings were changes
|
||||||
// this resets other coeffs that may depend on changed values,
|
// this resets other coeffs that may depend on changed values,
|
||||||
// and also offset and tail corrections
|
// and also offset and tail corrections
|
||||||
|
|
||||||
if (anypair) {
|
if (anypair) {
|
||||||
for (int m = 0; m < nadapt; m++) {
|
for (int m = 0; m < nadapt; m++) {
|
||||||
Adapt *ad = &adapt[m];
|
Adapt *ad = &adapt[m];
|
||||||
@ -532,6 +622,14 @@ void FixAdapt::change_settings()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (anybond) {
|
||||||
|
for (int m = 0; m < nadapt; ++m ) {
|
||||||
|
Adapt *ad = &adapt[m];
|
||||||
|
if (ad->which == BOND) {
|
||||||
|
ad->bond->reinit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// reset KSpace charges if charges have changed
|
// reset KSpace charges if charges have changed
|
||||||
|
|
||||||
@ -554,6 +652,12 @@ void FixAdapt::restore_settings()
|
|||||||
ad->array[i][j] = ad->array_orig[i][j];
|
ad->array[i][j] = ad->array_orig[i][j];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else if (ad->which == BOND) {
|
||||||
|
if (ad->pdim == 1) {
|
||||||
|
for (int i = ad->ilo; i <= ad->ihi; i++)
|
||||||
|
ad->vector[i] = ad->vector_orig[i];
|
||||||
|
}
|
||||||
|
|
||||||
} else if (ad->which == KSPACE) {
|
} else if (ad->which == KSPACE) {
|
||||||
*kspace_scale = 1.0;
|
*kspace_scale = 1.0;
|
||||||
|
|
||||||
@ -588,6 +692,7 @@ void FixAdapt::restore_settings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (anypair) force->pair->reinit();
|
if (anypair) force->pair->reinit();
|
||||||
|
if (anybond) force->bond->reinit();
|
||||||
if (chgflag && force->kspace) force->kspace->qsum_qsq();
|
if (chgflag && force->kspace) force->kspace->qsum_qsq();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ class FixAdapt : public Fix {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
int nadapt,resetflag,scaleflag;
|
int nadapt,resetflag,scaleflag;
|
||||||
int anypair;
|
int anypair, anybond;
|
||||||
int nlevels_respa;
|
int nlevels_respa;
|
||||||
char *id_fix_diam,*id_fix_chg;
|
char *id_fix_diam,*id_fix_chg;
|
||||||
class FixStore *fix_diam,*fix_chg;
|
class FixStore *fix_diam,*fix_chg;
|
||||||
@ -52,12 +52,15 @@ class FixAdapt : public Fix {
|
|||||||
int which,ivar;
|
int which,ivar;
|
||||||
char *var;
|
char *var;
|
||||||
char *pstyle,*pparam;
|
char *pstyle,*pparam;
|
||||||
|
char *bstyle,*bparam;
|
||||||
int ilo,ihi,jlo,jhi;
|
int ilo,ihi,jlo,jhi;
|
||||||
int pdim;
|
int pdim,bdim;
|
||||||
double *scalar,scalar_orig;
|
double *scalar,scalar_orig;
|
||||||
|
double *vector,*vector_orig;
|
||||||
double **array,**array_orig;
|
double **array,**array_orig;
|
||||||
int aparam;
|
int aparam;
|
||||||
class Pair *pair;
|
class Pair *pair;
|
||||||
|
class Bond *bond;
|
||||||
};
|
};
|
||||||
|
|
||||||
Adapt *adapt;
|
Adapt *adapt;
|
||||||
|
|||||||
@ -205,14 +205,18 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
for (int i = 0; i < nvalues; i++) {
|
for (int i = 0; i < nvalues; i++) {
|
||||||
if (which[i] == X || which[i] == V || which[i] == F) kindflag = PERATOM;
|
if (which[i] == X || which[i] == V || which[i] == F) kindflag = PERATOM;
|
||||||
else if (which[i] == COMPUTE) {
|
else if (which[i] == COMPUTE) {
|
||||||
Compute *compute = modify->compute[modify->find_compute(ids[i])];
|
int c_id = modify->find_compute(ids[i]);
|
||||||
|
if (c_id < 0) error->all(FLERR,"Fix ave/histo input is invalid compute");
|
||||||
|
Compute *compute = modify->compute[c_id];
|
||||||
if (compute->scalar_flag || compute->vector_flag || compute->array_flag)
|
if (compute->scalar_flag || compute->vector_flag || compute->array_flag)
|
||||||
kindflag = GLOBAL;
|
kindflag = GLOBAL;
|
||||||
else if (compute->peratom_flag) kindflag = PERATOM;
|
else if (compute->peratom_flag) kindflag = PERATOM;
|
||||||
else if (compute->local_flag) kindflag = LOCAL;
|
else if (compute->local_flag) kindflag = LOCAL;
|
||||||
else error->all(FLERR,"Fix ave/histo input is invalid compute");
|
else error->all(FLERR,"Fix ave/histo input is invalid compute");
|
||||||
} else if (which[i] == FIX) {
|
} else if (which[i] == FIX) {
|
||||||
Fix *fix = modify->fix[modify->find_fix(ids[i])];
|
int f_id = modify->find_fix(ids[i]);
|
||||||
|
if (f_id < 0) error->all(FLERR,"Fix ave/histo input is invalid fix");
|
||||||
|
Fix *fix = modify->fix[f_id];
|
||||||
if (fix->scalar_flag || fix->vector_flag || fix->array_flag)
|
if (fix->scalar_flag || fix->vector_flag || fix->array_flag)
|
||||||
kindflag = GLOBAL;
|
kindflag = GLOBAL;
|
||||||
else if (fix->peratom_flag) kindflag = PERATOM;
|
else if (fix->peratom_flag) kindflag = PERATOM;
|
||||||
@ -220,6 +224,7 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
else error->all(FLERR,"Fix ave/histo input is invalid fix");
|
else error->all(FLERR,"Fix ave/histo input is invalid fix");
|
||||||
} else if (which[i] == VARIABLE) {
|
} else if (which[i] == VARIABLE) {
|
||||||
int ivariable = input->variable->find(ids[i]);
|
int ivariable = input->variable->find(ids[i]);
|
||||||
|
if (ivariable < 0) error->all(FLERR,"Fix ave/histo input is invalid variable");
|
||||||
if (input->variable->equalstyle(ivariable)) kindflag = GLOBAL;
|
if (input->variable->equalstyle(ivariable)) kindflag = GLOBAL;
|
||||||
else if (input->variable->atomstyle(ivariable)) kindflag = PERATOM;
|
else if (input->variable->atomstyle(ivariable)) kindflag = PERATOM;
|
||||||
else error->all(FLERR,"Fix ave/histo input is invalid variable");
|
else error->all(FLERR,"Fix ave/histo input is invalid variable");
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class Integrate : protected Pointers {
|
|||||||
Integrate(class LAMMPS *, int, char **);
|
Integrate(class LAMMPS *, int, char **);
|
||||||
virtual ~Integrate();
|
virtual ~Integrate();
|
||||||
virtual void init();
|
virtual void init();
|
||||||
virtual void setup() = 0;
|
virtual void setup(int flag=1) = 0;
|
||||||
virtual void setup_minimal(int) = 0;
|
virtual void setup_minimal(int) = 0;
|
||||||
virtual void run(int) = 0;
|
virtual void run(int) = 0;
|
||||||
virtual void cleanup() {}
|
virtual void cleanup() {}
|
||||||
|
|||||||
@ -180,14 +180,16 @@ void Min::init()
|
|||||||
setup before run
|
setup before run
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void Min::setup()
|
void Min::setup(int flag)
|
||||||
{
|
{
|
||||||
if (comm->me == 0 && screen) {
|
if (comm->me == 0 && screen) {
|
||||||
fprintf(screen,"Setting up %s style minimization ...\n",
|
fprintf(screen,"Setting up %s style minimization ...\n",
|
||||||
update->minimize_style);
|
update->minimize_style);
|
||||||
|
if (flag) {
|
||||||
fprintf(screen," Unit style : %s\n", update->unit_style);
|
fprintf(screen," Unit style : %s\n", update->unit_style);
|
||||||
timer->print_timeout(screen);
|
timer->print_timeout(screen);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
update->setupflag = 1;
|
update->setupflag = 1;
|
||||||
|
|
||||||
// setup extra global dof due to fixes
|
// setup extra global dof due to fixes
|
||||||
@ -294,7 +296,7 @@ void Min::setup()
|
|||||||
requestor[m]->min_xf_get(m);
|
requestor[m]->min_xf_get(m);
|
||||||
|
|
||||||
modify->setup(vflag);
|
modify->setup(vflag);
|
||||||
output->setup();
|
output->setup(flag);
|
||||||
update->setupflag = 0;
|
update->setupflag = 0;
|
||||||
|
|
||||||
// stats for initial thermo output
|
// stats for initial thermo output
|
||||||
|
|||||||
@ -31,7 +31,7 @@ class Min : protected Pointers {
|
|||||||
Min(class LAMMPS *);
|
Min(class LAMMPS *);
|
||||||
virtual ~Min();
|
virtual ~Min();
|
||||||
virtual void init();
|
virtual void init();
|
||||||
void setup();
|
void setup(int flag=1);
|
||||||
void setup_minimal(int);
|
void setup_minimal(int);
|
||||||
void run(int);
|
void run(int);
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
|||||||
@ -652,6 +652,21 @@ void Output::delete_dump(char *id)
|
|||||||
ndump--;
|
ndump--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
find a dump by ID
|
||||||
|
return index of dump or -1 if not found
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
int Output::find_dump(const char *id)
|
||||||
|
{
|
||||||
|
if (id == NULL) return -1;
|
||||||
|
int idump;
|
||||||
|
for (idump = 0; idump < ndump; idump++)
|
||||||
|
if (strcmp(id,dump[idump]->id) == 0) break;
|
||||||
|
if (idump == ndump) return -1;
|
||||||
|
return idump;
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
set thermo output frequency from input script
|
set thermo output frequency from input script
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -76,6 +76,7 @@ class Output : protected Pointers {
|
|||||||
void add_dump(int, char **); // add a Dump to Dump list
|
void add_dump(int, char **); // add a Dump to Dump list
|
||||||
void modify_dump(int, char **); // modify a Dump
|
void modify_dump(int, char **); // modify a Dump
|
||||||
void delete_dump(char *); // delete a Dump from Dump list
|
void delete_dump(char *); // delete a Dump from Dump list
|
||||||
|
int find_dump(const char *); // find a Dump ID
|
||||||
|
|
||||||
void set_thermo(int, char **); // set thermo output freqquency
|
void set_thermo(int, char **); // set thermo output freqquency
|
||||||
void create_thermo(int, char **); // create a thermo style
|
void create_thermo(int, char **); // create a thermo style
|
||||||
|
|||||||
@ -398,12 +398,14 @@ void Respa::init()
|
|||||||
setup before run
|
setup before run
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void Respa::setup()
|
void Respa::setup(int flag)
|
||||||
{
|
{
|
||||||
if (comm->me == 0 && screen) {
|
if (comm->me == 0 && screen) {
|
||||||
fprintf(screen,"Setting up r-RESPA run ...\n");
|
fprintf(screen,"Setting up r-RESPA run ...\n");
|
||||||
|
if (flag) {
|
||||||
fprintf(screen," Unit style : %s\n", update->unit_style);
|
fprintf(screen," Unit style : %s\n", update->unit_style);
|
||||||
fprintf(screen," Current step : " BIGINT_FORMAT "\n", update->ntimestep);
|
fprintf(screen," Current step : " BIGINT_FORMAT "\n",
|
||||||
|
update->ntimestep);
|
||||||
fprintf(screen," Time steps :");
|
fprintf(screen," Time steps :");
|
||||||
for (int ilevel=0; ilevel < nlevels; ++ilevel)
|
for (int ilevel=0; ilevel < nlevels; ++ilevel)
|
||||||
fprintf(screen," %d:%g",ilevel+1, step[ilevel]);
|
fprintf(screen," %d:%g",ilevel+1, step[ilevel]);
|
||||||
@ -417,6 +419,7 @@ void Respa::setup()
|
|||||||
fprintf(screen,"\n");
|
fprintf(screen,"\n");
|
||||||
timer->print_timeout(screen);
|
timer->print_timeout(screen);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
update->setupflag = 1;
|
update->setupflag = 1;
|
||||||
|
|
||||||
@ -482,7 +485,7 @@ void Respa::setup()
|
|||||||
|
|
||||||
sum_flevel_f();
|
sum_flevel_f();
|
||||||
modify->setup(vflag);
|
modify->setup(vflag);
|
||||||
output->setup();
|
output->setup(flag);
|
||||||
update->setupflag = 0;
|
update->setupflag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class Respa : public Integrate {
|
|||||||
Respa(class LAMMPS *, int, char **);
|
Respa(class LAMMPS *, int, char **);
|
||||||
virtual ~Respa();
|
virtual ~Respa();
|
||||||
virtual void init();
|
virtual void init();
|
||||||
virtual void setup();
|
virtual void setup(int flag=1);
|
||||||
virtual void setup_minimal(int);
|
virtual void setup_minimal(int);
|
||||||
virtual void run(int);
|
virtual void run(int);
|
||||||
virtual void cleanup();
|
virtual void cleanup();
|
||||||
|
|||||||
@ -85,15 +85,18 @@ void Verlet::init()
|
|||||||
setup before run
|
setup before run
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void Verlet::setup()
|
void Verlet::setup(int flag)
|
||||||
{
|
{
|
||||||
if (comm->me == 0 && screen) {
|
if (comm->me == 0 && screen) {
|
||||||
fprintf(screen,"Setting up Verlet run ...\n");
|
fprintf(screen,"Setting up Verlet run ...\n");
|
||||||
|
if (flag) {
|
||||||
fprintf(screen," Unit style : %s\n", update->unit_style);
|
fprintf(screen," Unit style : %s\n", update->unit_style);
|
||||||
fprintf(screen," Current step : " BIGINT_FORMAT "\n", update->ntimestep);
|
fprintf(screen," Current step : " BIGINT_FORMAT "\n",
|
||||||
|
update->ntimestep);
|
||||||
fprintf(screen," Time step : %g\n", update->dt);
|
fprintf(screen," Time step : %g\n", update->dt);
|
||||||
timer->print_timeout(screen);
|
timer->print_timeout(screen);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (lmp->kokkos)
|
if (lmp->kokkos)
|
||||||
error->all(FLERR,"KOKKOS package requires run_style verlet/kk");
|
error->all(FLERR,"KOKKOS package requires run_style verlet/kk");
|
||||||
@ -148,7 +151,7 @@ void Verlet::setup()
|
|||||||
if (force->newton) comm->reverse_comm();
|
if (force->newton) comm->reverse_comm();
|
||||||
|
|
||||||
modify->setup(vflag);
|
modify->setup(vflag);
|
||||||
output->setup();
|
output->setup(flag);
|
||||||
update->setupflag = 0;
|
update->setupflag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class Verlet : public Integrate {
|
|||||||
Verlet(class LAMMPS *, int, char **);
|
Verlet(class LAMMPS *, int, char **);
|
||||||
virtual ~Verlet() {}
|
virtual ~Verlet() {}
|
||||||
virtual void init();
|
virtual void init();
|
||||||
virtual void setup();
|
virtual void setup(int flag=1);
|
||||||
virtual void setup_minimal(int);
|
virtual void setup_minimal(int);
|
||||||
virtual void run(int);
|
virtual void run(int);
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
#define LAMMPS_VERSION "31 Mar 2017"
|
#define LAMMPS_VERSION "11 Apr 2017"
|
||||||
|
|||||||
@ -297,6 +297,9 @@ void WriteRestart::write(char *file)
|
|||||||
|
|
||||||
// communication buffer for my atom info
|
// communication buffer for my atom info
|
||||||
// max_size = largest buffer needed by any proc
|
// max_size = largest buffer needed by any proc
|
||||||
|
// NOTE: are assuming size_restart() returns 32-bit int
|
||||||
|
// for a huge one-proc problem, nlocal could be 32-bit
|
||||||
|
// but nlocal * doubles-peratom could oveflow
|
||||||
|
|
||||||
int max_size;
|
int max_size;
|
||||||
int send_size = atom->avec->size_restart();
|
int send_size = atom->avec->size_restart();
|
||||||
|
|||||||
Reference in New Issue
Block a user