|
@ -68,7 +68,8 @@ How quickly your contribution will be integrated depends largely on how much eff
|
|||
Here is a checklist of steps you need to follow to submit a single file or user package for our consideration. Following these steps will save both you and us time. See existing files in packages in the source directory for examples. If you are uncertain, please ask on the lammps-users mailing list.
|
||||
|
||||
* All source files you provide must compile with the most current version of LAMMPS with multiple configurations. In particular you need to test compiling LAMMPS from scratch with `-DLAMMPS_BIGBIG` set in addition to the default `-DLAMMPS_SMALLBIG` setting. Your code will need to work correctly in serial and in parallel using MPI.
|
||||
* For consistency with the rest of LAMMPS and especially, if you want your contribution(s) to be added to main LAMMPS code or one of its standard packages, it needs to be written in a style compatible with other LAMMPS source files. This means: 2-character indentation per level, no tabs, no lines over 80 characters. I/O is done via the C-style stdio library, style class header files should not import any system headers outside of <cstdio>, STL containers should be avoided in headers, and forward declarations used where possible or needed. All added code should be placed into the LAMMPS_NS namespace or a sub-namespace; global or static variables should be avoided, as they conflict with the modular nature of LAMMPS and the C++ class structure. There MUST NOT be any "using namespace XXX;" statements in headers. In the implementation file (<name>.cpp) system includes should be placed in angular brackets (<>) and for c-library functions the C++ style header files should be included (<cstdio> instead of <stdio.h>, or <cstring> instead of <string.h>). This all is so the developers can more easily understand, integrate, and maintain your contribution and reduce conflicts with other parts of LAMMPS. This basically means that the code accesses data structures, performs its operations, and is formatted similar to other LAMMPS source files, including the use of the error class for error and warning messages.
|
||||
* For consistency with the rest of LAMMPS and especially, if you want your contribution(s) to be added to main LAMMPS code or one of its standard packages, it needs to be written in a style compatible with other LAMMPS source files. This means: 2-character indentation per level, no tabs, no lines over 80 characters. I/O is done via the C-style stdio library, style class header files should not import any system headers, STL containers should be avoided in headers, and forward declarations used where possible or needed. All added code should be placed into the LAMMPS_NS namespace or a sub-namespace; global or static variables should be avoided, as they conflict with the modular nature of LAMMPS and the C++ class structure. There MUST NOT be any "using namespace XXX;" statements in headers. In the implementation file (<name>.cpp) system includes should be placed in angular brackets (<>) and for c-library functions the C++ style header files should be included (<cstdio> instead of <stdio.h>, or <cstring> instead of <string.h>). This all is so the developers can more easily understand, integrate, and maintain your contribution and reduce conflicts with other parts of LAMMPS. This basically means that the code accesses data structures, performs its operations, and is formatted similar to other LAMMPS source files, including the use of the error class for error and warning messages.
|
||||
* Source, style name, and documentation file should follow the following naming convention: style names should be lowercase and words separated by a forward slash; for a new fix style 'foo/bar', the class should be named FixFooBar, the name of the source files should be 'fix_foo_bar.h' and 'fix_foo_bar.cpp' and the corresponding documentation should be in a file 'fix_foo_bar.txt'.
|
||||
* If you want your contribution to be added as a user-contributed feature, and it is a single file (actually a `<name>.cpp` and `<name>.h` file) it can be rapidly added to the USER-MISC directory. Include the one-line entry to add to the USER-MISC/README file in that directory, along with the 2 source files. You can do this multiple times if you wish to contribute several individual features.
|
||||
* If you want your contribution to be added as a user-contribution and it is several related features, it is probably best to make it a user package directory with a name like USER-FOO. In addition to your new files, the directory should contain a README text file. The README should contain your name and contact information and a brief description of what your new package does. If your files depend on other LAMMPS style files also being installed (e.g. because your file is a derived class from the other LAMMPS class), then an Install.sh file is also needed to check for those dependencies. See other README and Install.sh files in other USER directories as examples. Send us a tarball of this USER-FOO directory.
|
||||
* Your new source files need to have the LAMMPS copyright, GPL notice, and your name and email address at the top, like other user-contributed LAMMPS source files. They need to create a class that is inside the LAMMPS namespace. If the file is for one of the USER packages, including USER-MISC, then we are not as picky about the coding style (see above). I.e. the files do not need to be in the same stylistic format and syntax as other LAMMPS files, though that would be nice for developers as well as users who try to read your code.
|
||||
|
|
|
@ -1,15 +1,24 @@
|
|||
if(PKG_KOKKOS)
|
||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||
set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos)
|
||||
# TODO: this option needs to be documented when this works with a
|
||||
# regular release version of KOKKOS, and a version compatibility check
|
||||
# of external KOKKOS lib versus what the KOKKOS package needs is required.
|
||||
option(EXTERNAL_KOKKOS "Build against external kokkos library")
|
||||
if(EXTERNAL_KOKKOS)
|
||||
find_package(Kokkos REQUIRED)
|
||||
list(APPEND LAMMPS_LINK_LIBS Kokkos::kokkos)
|
||||
else()
|
||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||
set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos)
|
||||
add_subdirectory(${LAMMPS_LIB_KOKKOS_SRC_DIR} ${LAMMPS_LIB_KOKKOS_BIN_DIR})
|
||||
|
||||
set(Kokkos_INCLUDE_DIRS ${LAMMPS_LIB_KOKKOS_SRC_DIR}/core/src
|
||||
${LAMMPS_LIB_KOKKOS_SRC_DIR}/containers/src
|
||||
${LAMMPS_LIB_KOKKOS_SRC_DIR}/algorithms/src
|
||||
${LAMMPS_LIB_KOKKOS_BIN_DIR})
|
||||
include_directories(${Kokkos_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS kokkos)
|
||||
endif()
|
||||
add_definitions(-DLMP_KOKKOS)
|
||||
add_subdirectory(${LAMMPS_LIB_KOKKOS_SRC_DIR} ${LAMMPS_LIB_KOKKOS_BIN_DIR})
|
||||
|
||||
set(Kokkos_INCLUDE_DIRS ${LAMMPS_LIB_KOKKOS_SRC_DIR}/core/src
|
||||
${LAMMPS_LIB_KOKKOS_SRC_DIR}/containers/src
|
||||
${LAMMPS_LIB_KOKKOS_SRC_DIR}/algorithms/src
|
||||
${LAMMPS_LIB_KOKKOS_BIN_DIR})
|
||||
include_directories(${Kokkos_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS kokkos)
|
||||
|
||||
set(KOKKOS_PKG_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/KOKKOS)
|
||||
set(KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/kokkos.cpp
|
||||
|
|
|
@ -69,6 +69,7 @@ html: $(OBJECTS) $(ANCHORCHECK)
|
|||
sphinx-build $(SPHINXEXTRA) -b html -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
|
||||
echo "############################################" ;\
|
||||
doc_anchor_check src/*.txt ;\
|
||||
env LC_ALL=C grep -n '[^ -~]' src/*.txt ;\
|
||||
echo "############################################" ;\
|
||||
deactivate ;\
|
||||
)
|
||||
|
|
|
@ -124,6 +124,7 @@ An alphabetic list of all general LAMMPS commands.
|
|||
"thermo"_thermo.html,
|
||||
"thermo_modify"_thermo_modify.html,
|
||||
"thermo_style"_thermo_style.html,
|
||||
"third_order"_third_order.html,
|
||||
"timer"_timer.html,
|
||||
"timestep"_timestep.html,
|
||||
"uncompute"_uncompute.html,
|
||||
|
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,15 @@
|
|||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
|| \vec{F} ||_{inf}
|
||||
= {\rm max}\left(|F_1^1|, |F_1^2|, |F_1^3| \cdots,
|
||||
|F_N^1|, |F_N^2|, |F_N^3|\right)
|
||||
\nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
After Width: | Height: | Size: 9.2 KiB |
|
@ -0,0 +1,15 @@
|
|||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
% \left| \left| \vec{F} \right| \right|_2
|
||||
|| \vec{F} ||_{max}
|
||||
= {\rm max}\left(||\vec{F}_1||, \cdots, ||\vec{F}_N||\right)
|
||||
\nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
After Width: | Height: | Size: 5.9 KiB |
|
@ -0,0 +1,15 @@
|
|||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
% \left| \left| \vec{F} \right| \right|_2
|
||||
|| \vec{F} ||_{2}
|
||||
= \sqrt{\vec{F}_1+ \cdots + \vec{F}_N}
|
||||
\nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
|
@ -4791,6 +4791,22 @@ Self-explanatory. :dd
|
|||
|
||||
This fix option cannot be used with point particles. :dd
|
||||
|
||||
{Fix langevin gjf and respa are not compatible} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Fix langevin gjf cannot have period equal to dt/2} :dt
|
||||
|
||||
If the period is equal to dt/2 then division by zero will happen. :dd
|
||||
|
||||
{Fix langevin gjf should come before fix nve} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Fix langevin gjf with tbias is not yet implemented with kokkos} :dt
|
||||
|
||||
This option is not yet available. :dd
|
||||
|
||||
{Fix langevin omega is not yet implemented with kokkos} :dt
|
||||
|
||||
This option is not yet available. :dd
|
||||
|
|
|
@ -248,6 +248,10 @@ included one or more of the following: kspace, triclinic, a hybrid
|
|||
pair style, an eam pair style, or no "single" function for the pair
|
||||
style. :dd
|
||||
|
||||
{Fix langevin gjf using random gaussians is not implemented with kokkos} :dt
|
||||
|
||||
This will most likely cause errors in kinetic fluctuations.
|
||||
|
||||
{Fix property/atom mol or charge w/out ghost communication} :dt
|
||||
|
||||
A model typically needs these properties defined for ghost atoms. :dd
|
||||
|
|
|
@ -141,6 +141,7 @@ HEAT: compute thermal conductivity for LJ and water via fix ehex
|
|||
KAPPA: compute thermal conductivity via several methods
|
||||
MC: using LAMMPS in a Monte Carlo mode to relax the energy of a system
|
||||
SPIN: examples for features of the SPIN package
|
||||
UNITS: examples that run the same simulation in lj, real, metal units
|
||||
USER: examples for USER packages and USER-contributed commands
|
||||
VISCOSITY: compute viscosity via several methods :tb(s=:)
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ variable d equal $p*$s # dump interval :pre
|
|||
|
||||
# convert from LAMMPS real units to SI :pre
|
||||
|
||||
variable kB equal 1.3806504e-23 # \[J/K/] Boltzmann
|
||||
variable kB equal 1.3806504e-23 # \[J/K\] Boltzmann
|
||||
variable atm2Pa equal 101325.0
|
||||
variable A2m equal 1.0e-10
|
||||
variable fs2s equal 1.0e-15
|
||||
|
|
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 24 KiB |
|
@ -1746,11 +1746,12 @@ USER-PHONON package :link(PKG-USER-PHONON),h4
|
|||
A "fix phonon"_fix_phonon.html command that calculates dynamical
|
||||
matrices, which can then be used to compute phonon dispersion
|
||||
relations, directly from molecular dynamics simulations.
|
||||
And a "dynamical_matrix" command to compute the dynamical matrix
|
||||
from finite differences.
|
||||
And a "dynamical_matrix"_dynamical_matrix.html as well as a
|
||||
"third_order"_third_order.html command to compute the dynamical matrix
|
||||
and third order tensor from finite differences.
|
||||
|
||||
[Authors:] Ling-Ti Kong (Shanghai Jiao Tong University) for "fix phonon"
|
||||
and Charlie Sievers (UC Davis) for "dynamical_matrix"
|
||||
and Charlie Sievers (UC Davis) for "dynamical_matrix" and "third_order"
|
||||
|
||||
|
||||
[Supporting info:]
|
||||
|
@ -1759,6 +1760,7 @@ src/USER-PHONON: filenames -> commands
|
|||
src/USER-PHONON/README
|
||||
"fix phonon"_fix_phonon.html
|
||||
"dynamical_matrix"_dynamical_matrix.html
|
||||
"third_order"_third_order.html
|
||||
examples/USER/phonon :ul
|
||||
|
||||
:line
|
||||
|
|
|
@ -108,6 +108,7 @@ Commands :h1
|
|||
thermo
|
||||
thermo_modify
|
||||
thermo_style
|
||||
third_order
|
||||
timer
|
||||
timestep
|
||||
uncompute
|
||||
|
|
|
@ -23,11 +23,14 @@ style = {many} or {single/bond} or {single/angle} or {single/dihedral} :ule,l
|
|||
btype = bond type of new bond
|
||||
batom1,batom2 = atom IDs for two atoms in bond
|
||||
{single/angle} args = atype aatom1 aatom2 aatom3
|
||||
atype = bond type of new angle
|
||||
atype = angle type of new angle
|
||||
aatom1,aatom2,aatom3 = atom IDs for three atoms in angle
|
||||
{single/dihedral} args = dtype datom1 datom2 datom3 datom4
|
||||
dtype = bond type of new dihedral
|
||||
datom1,datom2,datom3,datom4 = atom IDs for four atoms in dihedral :pre
|
||||
dtype = dihedral type of new dihedral
|
||||
datom1,datom2,datom3,datom4 = atom IDs for four atoms in dihedral
|
||||
{single/improper} args = itype iatom1 iatom2 iatom3 iatom4
|
||||
itype = improper type of new improper
|
||||
iatom1,iatom2,iatom3,iatom4 = atom IDs for four atoms in improper :pre
|
||||
zero or more keyword/value pairs may be appended :l
|
||||
keyword = {special} :l
|
||||
{special} value = {yes} or {no} :pre
|
||||
|
@ -38,51 +41,54 @@ keyword = {special} :l
|
|||
create_bonds many all all 1 1.0 1.2
|
||||
create_bonds many surf solvent 3 2.0 2.4
|
||||
create_bonds single/bond 1 1 2
|
||||
create_bonds single/angle 5 52 98 107 special no :pre
|
||||
create_bonds single/angle 5 52 98 107 special no
|
||||
create_bonds single/dihedral 2 4 19 27 101
|
||||
create_bonds single/improper 3 23 26 31 57 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Create bonds between pairs of atoms that meet a specified distance
|
||||
criteria. Or create a single bond, angle, or dihedral between 2, 3,
|
||||
criteria. Or create a single bond, angle, dihedral or improper between 2, 3,
|
||||
or 4 specified atoms.
|
||||
|
||||
The new bond (angle, dihedral) interactions will then be computed
|
||||
during a simulation by the bond (angle, dihedral) potential defined by
|
||||
The new bond (angle, dihedral, improper) interactions will then be computed
|
||||
during a simulation by the bond (angle, dihedral, improper) potential defined by
|
||||
the "bond_style"_bond_style.html, "bond_coeff"_bond_coeff.html,
|
||||
"angle_style"_angle_style.html, "angle_coeff"_angle_coeff.html,
|
||||
"dihedral_style"_dihedral_style.html,
|
||||
"dihedral_coeff"_dihedral_coeff.html commands.
|
||||
"dihedral_coeff"_dihedral_coeff.html, "improper_style"_improper_style.html,
|
||||
"improper_coeff"_improper_coeff.html commands.
|
||||
|
||||
The {many} style is useful for adding bonds to a system, e.g. between
|
||||
nearest neighbors in a lattice of atoms, without having to enumerate
|
||||
all the bonds in the data file read by the "read_data"_read_data.html
|
||||
command.
|
||||
|
||||
The {single} styles are useful for adding bonds, angles, dihedrals
|
||||
The {single} styles are useful for adding bonds, angles, dihedrals, impropers
|
||||
to a system incrementally, then continuing a simulation.
|
||||
|
||||
Note that this command does not auto-create any angle or dihedral
|
||||
Note that this command does not auto-create any angle, dihedral or improper
|
||||
interactions when a bond is added. Nor does it auto-create any bonds
|
||||
when an angle or dihedral is added. Or auto-create any angles when a
|
||||
dihedral is added. Thus the flexibility of this command is limited.
|
||||
when an angle, dihedral or improper is added. Or auto-create any angles when a
|
||||
dihedral or improper is added. Thus the flexibility of this command is limited.
|
||||
It can be used several times to create different types of bond at
|
||||
different distances. But it cannot typically auto-create all the
|
||||
bonds or angles or dihedral that would normally be defined in a data
|
||||
file for a complex system of molecules.
|
||||
bonds or angles or dihedrals or impropers that would normally be defined in a
|
||||
data file for a complex system of molecules.
|
||||
|
||||
NOTE: If the system has no bonds (angles, dihedrals) to begin with, or
|
||||
if more bonds per atom are being added than currently exist, then you
|
||||
NOTE: If the system has no bonds (angles, dihedrals, impropers) to begin with,
|
||||
or if more bonds per atom are being added than currently exist, then you
|
||||
must insure that the number of bond types and the maximum number of
|
||||
bonds per atom are set to large enough values. And similarly for
|
||||
angles and dihedrals. Otherwise an error may occur when too many
|
||||
bonds (angles, dihedrals) are added to an atom. If the
|
||||
angles, dihedrals and impropers. Otherwise an error may occur when too many
|
||||
bonds (angles, dihedrals, impropers) are added to an atom. If the
|
||||
"read_data"_read_data.html command is used to define the system, these
|
||||
parameters can be set via the "bond types" and "extra bond per atom"
|
||||
fields in the header section of the data file. If the
|
||||
"create_box"_create_box.html command is used to define the system,
|
||||
these 2 parameters can be set via its optional "bond/types" and
|
||||
"extra/bond/per/atom" arguments. And similarly for angles and
|
||||
dihedrals. See the doc pages for these 2 commands for details.
|
||||
"extra/bond/per/atom" arguments. And similarly for angles, dihedrals and
|
||||
impropers. See the doc pages for these 2 commands for details.
|
||||
|
||||
:line
|
||||
|
||||
|
@ -137,18 +143,25 @@ ordered linearly within the angle; the central atom is {aatom2}.
|
|||
{Atype} must be a value between 1 and the number of angle types
|
||||
defined.
|
||||
|
||||
The {single/dihedral} style creates a single dihedral of type {btype}
|
||||
between two atoms with IDs {batom1} and {batom2}. The ordering of the
|
||||
atoms is the same as in the {Dihedrals} section of a data file read by
|
||||
the "read_data"_read_data.html command. I.e. the 4 atoms are ordered
|
||||
linearly within the dihedral. {Dtype} must be a value between 1 and
|
||||
The {single/dihedral} style creates a single dihedral of type {dtype}
|
||||
between four atoms with IDs {datom1}, {datom2}, {datom3}, and {datom4}. The
|
||||
ordering of the atoms is the same as in the {Dihedrals} section of a data file
|
||||
read by the "read_data"_read_data.html command. I.e. the 4 atoms are ordered
|
||||
linearly within the dihedral. {dtype} must be a value between 1 and
|
||||
the number of dihedral types defined.
|
||||
|
||||
The {single/improper} style creates a single improper of type {itype}
|
||||
between four atoms with IDs {iatom1}, {iatom2}, {iatom3}, and {iatom4}. The
|
||||
ordering of the atoms is the same as in the {Impropers} section of a data file
|
||||
read by the "read_data"_read_data.html command. I.e. the 4 atoms are ordered
|
||||
linearly within the improper. {itype} must be a value between 1 and
|
||||
the number of improper types defined.
|
||||
|
||||
:line
|
||||
|
||||
The keyword {special} controls whether an internal list of special
|
||||
bonds is created after one or more bonds, or a single angle or
|
||||
dihedral is added to the system.
|
||||
bonds is created after one or more bonds, or a single angle, dihedral or
|
||||
improper is added to the system.
|
||||
|
||||
The default value is {yes}. A value of {no} cannot be used
|
||||
with the {many} style.
|
||||
|
@ -161,16 +174,16 @@ see the "special_bonds"_special_bonds.html command for details.
|
|||
Thus if you are adding a few bonds or a large list of angles all at
|
||||
the same time, by using this command repeatedly, it is more efficient
|
||||
to only trigger the internal list to be created once, after the last
|
||||
bond (or angle, or dihedral) is added:
|
||||
bond (or angle, or dihedral, or improper) is added:
|
||||
|
||||
create_bonds single/bond 5 52 98 special no
|
||||
create_bonds single/bond 5 73 74 special no
|
||||
create_bonds single/bond 5 73 74 special no
|
||||
...
|
||||
create_bonds single/bond 5 17 386 special no
|
||||
create_bonds single/bond 4 112 183 special yes :pre
|
||||
|
||||
Note that you MUST insure the internal list is re-built after the last
|
||||
bond (angle, dihedral) is added, before performing a simulation.
|
||||
bond (angle, dihedral, improper) is added, before performing a simulation.
|
||||
Otherwise pairwise interactions will not be properly excluded or
|
||||
weighted. LAMMPS does NOT check that you have done this correctly.
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ dump_modify dump-ID keyword values ... :pre
|
|||
dump-ID = ID of dump to modify :ulb,l
|
||||
one or more keyword/value pairs may be appended :l
|
||||
these keywords apply to various dump styles :l
|
||||
keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {maxfiles} or {nfile} or {pad} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l
|
||||
keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {maxfiles} or {nfile} or {pad} or {pbc} or {precision} or {region} or {refresh} or {scale} or {sfactor} or {sort} or {tfactor} or {thermo} or {thresh} or {time} or {units} or {unwrap} :l
|
||||
{append} arg = {yes} or {no}
|
||||
{at} arg = N
|
||||
N = index of frame written upon first dump
|
||||
|
@ -30,10 +30,10 @@ keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fi
|
|||
{fileper} arg = Np
|
||||
Np = write one file for every this many processors
|
||||
{first} arg = {yes} or {no}
|
||||
{flush} arg = {yes} or {no}
|
||||
{format} args = {line} string, {int} string, {float} string, M string, or {none}
|
||||
string = C-style format string
|
||||
M = integer from 1 to N, where N = # of per-atom quantities being output
|
||||
{flush} arg = {yes} or {no}
|
||||
{image} arg = {yes} or {no}
|
||||
{label} arg = string
|
||||
string = character string (e.g. BONDS) to use in header of dump local file
|
||||
|
@ -48,19 +48,20 @@ keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fi
|
|||
{refresh} arg = c_ID = compute ID that supports a refresh operation
|
||||
{scale} arg = {yes} or {no}
|
||||
{sfactor} arg = coordinate scaling factor (> 0.0)
|
||||
{thermo} arg = {yes} or {no}
|
||||
{tfactor} arg = time scaling factor (> 0.0)
|
||||
{units} arg = {yes} or {no}
|
||||
{sort} arg = {off} or {id} or N or -N
|
||||
off = no sorting of per-atom lines within a snapshot
|
||||
id = sort per-atom lines by atom ID
|
||||
N = sort per-atom lines in ascending order by the Nth column
|
||||
-N = sort per-atom lines in descending order by the Nth column
|
||||
{tfactor} arg = time scaling factor (> 0.0)
|
||||
{thermo} arg = {yes} or {no}
|
||||
{time} arg = {yes} or {no}
|
||||
{thresh} args = attribute operator value
|
||||
attribute = same attributes (x,fy,etotal,sxx,etc) used by dump custom style
|
||||
operator = "<" or "<=" or ">" or ">=" or "==" or "!=" or "|^"
|
||||
value = numeric value to compare to, or LAST
|
||||
these 3 args can be replaced by the word "none" to turn off thresholding
|
||||
{units} arg = {yes} or {no}
|
||||
{unwrap} arg = {yes} or {no} :pre
|
||||
these keywords apply only to the {image} and {movie} "styles"_dump_image.html :l
|
||||
keyword = {acolor} or {adiam} or {amap} or {backcolor} or {bcolor} or {bdiam} or {boxcolor} or {color} or {bitrate} or {framerate} :l
|
||||
|
@ -621,6 +622,22 @@ threshold criterion is met. Otherwise it is not met.
|
|||
|
||||
:line
|
||||
|
||||
The {time} keyword only applies to the dump {atom}, {custom}, and
|
||||
{local} styles (and their COMPRESS package versions {atom/gz},
|
||||
{custom/gz} and {local/gz}). If set to {yes}, each frame will will
|
||||
contain two extra lines before the "ITEM: TIMESTEP" entry:
|
||||
|
||||
ITEM: TIME
|
||||
\<elapsed time\> :pre
|
||||
|
||||
This will output the current elapsed simulation time in current
|
||||
time units equivalent to the "thermo keyword"_thermo_style.html {time}.
|
||||
This is to simplify post-processing of trajectories using a variable time
|
||||
step, e.g. when using "fix dt/reset"_fix_dt_reset.html.
|
||||
The default setting is {no}.
|
||||
|
||||
:line
|
||||
|
||||
The {units} keyword only applies to the dump {atom}, {custom}, and
|
||||
{local} styles (and their COMPRESS package versions {atom/gz},
|
||||
{custom/gz} and {local/gz}). If set to {yes}, each individual dump
|
||||
|
|
|
@ -30,14 +30,29 @@ dynamical_matrix 5 eskm 0.00000001 file dynamical.dat binary yes :pre
|
|||
|
||||
[Description:]
|
||||
|
||||
Calculate the dynamical matrix of the selected group.
|
||||
Calculate the dynamical matrix by finite difference of the selected group,
|
||||
|
||||
:c,image(JPG/dynamical_matrix_dynmat.jpg)
|
||||
|
||||
where D is the dynamical matrix and Phi is the force constant matrix defined by
|
||||
|
||||
:c,image(JPG/dynamical_matrix_force_constant.jpg).
|
||||
|
||||
The output for the dynamical matrix is printed three elements at a time. The
|
||||
three elements are the three beta elements for a respective i/alpha/j combination.
|
||||
Each line is printed in order of j increasing first, alpha second, and i last.
|
||||
|
||||
If the style eskm is selected, the dynamical matrix will be in units of inverse squared
|
||||
femtoseconds. These units will then conveniently leave frequencies in THz, where
|
||||
frequencies, represented as omega, can be calculated from
|
||||
|
||||
:c, image(Eqs/dynamical_matrix_phonons.jpg)
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
The command collects the entire dynamical matrix a single MPI rank,
|
||||
so the memory requirements can be very significant for large systems.
|
||||
|
||||
This command assumes a periodic system.
|
||||
The command collects an array of nine times the number of atoms in a group
|
||||
on every single MPI rank, so the memory requirements can be very significant
|
||||
for large systems.
|
||||
|
||||
This command is part of the USER-PHONON package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Build
|
||||
|
|
|
@ -188,7 +188,7 @@ accelerated styles exist.
|
|||
"box/relax"_fix_box_relax.html - relax box size during energy minimization
|
||||
"client/md"_fix_client_md.html - MD client for client/server simulations
|
||||
"cmap"_fix_cmap.html - enables CMAP cross-terms of the CHARMM force field
|
||||
"colvars"_fix_colvars.html - interface to the collective variables “Colvars” library
|
||||
"colvars"_fix_colvars.html - interface to the collective variables "Colvars" library
|
||||
"controller"_fix_controller.html - apply control loop feedback mechanism
|
||||
"deform"_fix_deform.html - change the simulation box size/shape
|
||||
"deposit"_fix_deposit.html - add new atoms above a surface
|
||||
|
@ -221,7 +221,7 @@ accelerated styles exist.
|
|||
"heat"_fix_heat.html - add/subtract momentum-conserving heat
|
||||
"hyper/global"_fix_hyper_global.html - global hyperdynamics
|
||||
"hyper/local"_fix_hyper_local.html - local hyperdynamics
|
||||
"imd"_fix_imd.html - implements the “Interactive MD” (IMD) protocol
|
||||
"imd"_fix_imd.html - implements the "Interactive MD" (IMD) protocol
|
||||
"indent"_fix_indent.html - impose force due to an indenter
|
||||
"ipi"_fix_ipi.html - enable LAMMPS to run as a client for i-PI path-integral simulations
|
||||
"langevin"_fix_langevin.html - Langevin temperature control
|
||||
|
|
|
@ -24,9 +24,10 @@ keyword = {angmom} or {omega} or {scale} or {tally} or {zero} :l
|
|||
{angmom} value = {no} or factor
|
||||
{no} = do not thermostat rotational degrees of freedom via the angular momentum
|
||||
factor = do thermostat rotational degrees of freedom via the angular momentum and apply numeric scale factor as discussed below
|
||||
{gjf} value = {no} or {yes}
|
||||
{gjf} value = {no} or {vfull} or {vhalf}
|
||||
{no} = use standard formulation
|
||||
{yes} = use Gronbech-Jensen/Farago formulation
|
||||
{vfull} = use Gronbech-Jensen/Farago formulation
|
||||
{vhalf} = use 2GJ formulation
|
||||
{omega} value = {no} or {yes}
|
||||
{no} = do not thermostat rotational degrees of freedom via the angular velocity
|
||||
{yes} = do thermostat rotational degrees of freedom via the angular velocity
|
||||
|
@ -217,6 +218,10 @@ the particles. As described below, this energy can then be printed
|
|||
out or added to the potential energy of the system to monitor energy
|
||||
conservation.
|
||||
|
||||
NOTE: this accumulated energy does NOT include kinetic energy removed
|
||||
by the {zero} flag. LAMMPS will print a warning when both options are
|
||||
active.
|
||||
|
||||
The keyword {zero} can be used to eliminate drift due to the
|
||||
thermostat. Because the random forces on different atoms are
|
||||
independent, they do not sum exactly to zero. As a result, this fix
|
||||
|
@ -232,29 +237,24 @@ The keyword {gjf} can be used to run the "Gronbech-Jensen/Farago
|
|||
described in the papers cited below, the purpose of this method is to
|
||||
enable longer timesteps to be used (up to the numerical stability
|
||||
limit of the integrator), while still producing the correct Boltzmann
|
||||
distribution of atom positions. It is implemented within LAMMPS, by
|
||||
changing how the random force is applied so that it is composed of
|
||||
the average of two random forces representing half-contributions from
|
||||
the previous and current time intervals.
|
||||
distribution of atom positions.
|
||||
|
||||
In common with all methods based on Verlet integration, the
|
||||
discretized velocities generated by this method in conjunction with
|
||||
velocity-Verlet time integration are not exactly conjugate to the
|
||||
positions. As a result the temperature (computed from the discretized
|
||||
velocities) will be systematically lower than the target temperature,
|
||||
by a small amount which grows with the timestep. Nonetheless, the
|
||||
distribution of atom positions will still be consistent with the
|
||||
The current implementation provides the user with the option to output
|
||||
the velocity in one of two forms: {vfull} or {vhalf}, which replaces
|
||||
the outdated option {yes}. The {gjf} option {vfull} outputs the on-site
|
||||
velocity given in "Gronbech-Jensen/Farago"_#Gronbech-Jensen; this velocity
|
||||
is shown to be systematically lower than the target temperature by a small
|
||||
amount, which grows quadratically with the timestep.
|
||||
The {gjf} option {vhalf} outputs the 2GJ half-step velocity given in
|
||||
"Gronbech Jensen/Gronbech-Jensen"_#2Gronbech-Jensen; for linear systems,
|
||||
this velocity is shown to not have any statistical errors for any stable time step.
|
||||
An overview of statistically correct Boltzmann and Maxwell-Boltzmann
|
||||
sampling of true on-site and true half-step velocities is given in
|
||||
"Gronbech-Jensen"_#1Gronbech-Jensen.
|
||||
Regardless of the choice of output velocity, the sampling of the configurational
|
||||
distribution of atom positions is the same, and linearly consistent with the
|
||||
target temperature.
|
||||
|
||||
As an example of using the {gjf} keyword, for molecules containing C-H
|
||||
bonds, configurational properties generated with dt = 2.5 fs and tdamp
|
||||
= 100 fs are indistinguishable from dt = 0.5 fs. Because the velocity
|
||||
distribution systematically decreases with increasing timestep, the
|
||||
method should not be used to generate properties that depend on the
|
||||
velocity distribution, such as the velocity auto-correlation function
|
||||
(VACF). In this example, the velocity distribution at dt = 2.5fs
|
||||
generates an average temperature of 220 K, instead of 300 K.
|
||||
|
||||
:line
|
||||
|
||||
Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are
|
||||
|
@ -312,7 +312,10 @@ This fix can ramp its target temperature over multiple runs, using the
|
|||
|
||||
This fix is not invoked during "energy minimization"_minimize.html.
|
||||
|
||||
[Restrictions:] none
|
||||
[Restrictions:]
|
||||
|
||||
For {gjf} do not choose damp=dt/2. {gjf} is not compatible
|
||||
with run_style respa.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
|
@ -335,5 +338,10 @@ types, tally = no, zero = no, gjf = no.
|
|||
|
||||
:link(Gronbech-Jensen)
|
||||
[(Gronbech-Jensen)] Gronbech-Jensen and Farago, Mol Phys, 111, 983
|
||||
(2013); Gronbech-Jensen, Hayre, and Farago, Comp Phys Comm,
|
||||
185, 524 (2014)
|
||||
(2013); Gronbech-Jensen, Hayre, and Farago, Comp Phys Comm, 185, 524 (2014)
|
||||
|
||||
:link(2Gronbech-Jensen)
|
||||
[(Gronbech-Jensen)] Gronbech Jensen and Gronbech-Jensen, Mol Phys, 117, 2511 (2019)
|
||||
|
||||
:link(1Gronbech-Jensen)
|
||||
[(Gronbech-Jensen)] Gronbech-Jensen, Mol Phys (2019); https://doi.org/10.1080/00268976.2019.1662506
|
||||
|
|
|
@ -50,7 +50,7 @@ As an example:
|
|||
|
||||
fix 1 all precession/spin zeeman 0.01 0.0 0.0 1.0
|
||||
fix 2 all langevin/spin 300.0 0.01 21
|
||||
fix 3 all nve/spin lattice yes :pre
|
||||
fix 3 all nve/spin lattice moving :pre
|
||||
|
||||
is correct, but defining a force/spin command after the langevin/spin command
|
||||
would give an error message.
|
||||
|
|
|
@ -15,22 +15,26 @@ fix ID group-ID nve/spin keyword values :pre
|
|||
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
||||
nve/spin = style name of this fix command :l
|
||||
keyword = {lattice} :l
|
||||
{lattice} value = {no} or {yes} :pre
|
||||
{lattice} value = {moving} or {frozen}
|
||||
moving = integrate both spin and atomic degress of freedom
|
||||
frozen = integrate spins on a fixed lattice :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 1 all nve/spin lattice no :pre
|
||||
fix 3 all nve/spin lattice moving
|
||||
fix 1 all nve/spin lattice frozen :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Perform a symplectic integration for the spin or spin-lattice system.
|
||||
|
||||
The {lattice} keyword defines if the spins are integrated on a lattice
|
||||
of fixed atoms (lattice = no), or if atoms are moving (lattice = yes).
|
||||
|
||||
By default (lattice = yes), a spin-lattice integration is performed.
|
||||
of fixed atoms (lattice = frozen), or if atoms are moving
|
||||
(lattice = moving).
|
||||
The first case corresponds to a spin dynamics calculation, and
|
||||
the second to a spin-lattice calculation.
|
||||
By default a spin-lattice integration is performed (lattice = moving).
|
||||
|
||||
The {nve/spin} fix applies a Suzuki-Trotter decomposition to
|
||||
the equations of motion of the spin lattice system, following the scheme:
|
||||
|
@ -63,7 +67,9 @@ instead of "array" is also valid.
|
|||
|
||||
"atom_style spin"_atom_style.html, "fix nve"_fix_nve.html
|
||||
|
||||
[Default:] none
|
||||
[Default:]
|
||||
|
||||
The option default is lattice = moving.
|
||||
|
||||
:line
|
||||
|
||||
|
|
|
@ -217,6 +217,7 @@ temper_npt.html
|
|||
thermo.html
|
||||
thermo_modify.html
|
||||
thermo_style.html
|
||||
third_order.html
|
||||
timer.html
|
||||
timestep.html
|
||||
uncompute.html
|
||||
|
|
|
@ -13,11 +13,15 @@ min_modify command :h3
|
|||
min_modify keyword values ... :pre
|
||||
|
||||
one or more keyword/value pairs may be listed :ulb,l
|
||||
keyword = {dmax} or {line} or {alpha_damp} or {discrete_factor}
|
||||
keyword = {dmax} or {line} or {norm} or {alpha_damp} or {discrete_factor}
|
||||
{dmax} value = max
|
||||
max = maximum distance for line search to move (distance units)
|
||||
{line} value = {backtrack} or {quadratic} or {forcezero}
|
||||
backtrack,quadratic,forcezero = style of linesearch to use
|
||||
{line} value = {backtrack} or {quadratic} or {forcezero} or {spin_cubic} or {spin_none}
|
||||
backtrack,quadratic,forcezero,spin_cubic,spin_none = style of linesearch to use
|
||||
{norm} value = {two} or {max}
|
||||
two = Euclidean two-norm (length of 3N vector)
|
||||
inf = max force component across all 3-vectors
|
||||
max = max force norm across all 3-vectors
|
||||
{alpha_damp} value = damping
|
||||
damping = fictitious Gilbert damping for spin minimization (adim)
|
||||
{discrete_factor} value = factor
|
||||
|
@ -69,6 +73,28 @@ difference of two large values (energy before and energy after) and
|
|||
that difference may be smaller than machine epsilon even if atoms
|
||||
could move in the gradient direction to reduce forces further.
|
||||
|
||||
The choice of a norm can be modified for the min styles {cg}, {sd},
|
||||
{quickmin}, {fire}, {spin}, {spin/cg} and {spin/lbfgs} using
|
||||
the {norm} keyword.
|
||||
The default {two} norm computes the 2-norm (Euclidean length) of the
|
||||
global force vector:
|
||||
|
||||
:c,image(Eqs/norm_two.jpg)
|
||||
|
||||
The {max} norm computes the length of the 3-vector force
|
||||
for each atom (2-norm), and takes the maximum value of those across
|
||||
all atoms
|
||||
|
||||
:c,image(Eqs/norm_max.jpg)
|
||||
|
||||
The {inf} norm takes the maximum component across the forces of
|
||||
all atoms in the system:
|
||||
|
||||
:c,image(Eqs/norm_inf.jpg)
|
||||
|
||||
For the min styles {spin}, {spin/cg} and {spin/lbfgs}, the force
|
||||
norm is replaced by the spin-torque norm.
|
||||
|
||||
Keywords {alpha_damp} and {discrete_factor} only make sense when
|
||||
a "min_spin"_min_spin.html command is declared.
|
||||
Keyword {alpha_damp} defines an analog of a magnetic Gilbert
|
||||
|
@ -77,10 +103,24 @@ a given magnetic system.
|
|||
Keyword {discrete_factor} defines a discretization factor for the
|
||||
adaptive timestep used in the {spin} minimization.
|
||||
See "min_spin"_min_spin.html for more information about those
|
||||
quantities.
|
||||
Default values are {alpha_damp} = 1.0 and {discrete_factor} = 10.0.
|
||||
quantities.
|
||||
|
||||
[Restrictions:] none
|
||||
The choice of a line search algorithm for the {spin/cg} and
|
||||
{spin/lbfgs} styles can be specified via the {line} keyword.
|
||||
The {spin_cubic} and {spin_none} only make sense when one of those
|
||||
two minimization styles is declared.
|
||||
The {spin_cubic} performs the line search based on a cubic interpolation
|
||||
of the energy along the search direction. The {spin_none} keyword
|
||||
deactivates the line search procedure.
|
||||
The {spin_none} is a default value for {line} keyword for both {spin/lbfgs}
|
||||
and {spin/cg}. Convergence of {spin/lbfgs} can be more robust if
|
||||
{spin_cubic} line search is used.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
For magnetic GNEB calculations, only {spin_none} value for {line} keyword can be used
|
||||
when styles {spin/cg} and {spin/lbfgs} are employed.
|
||||
See "neb/spin"_neb_spin.html for more explanation.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
|
@ -88,4 +128,8 @@ Default values are {alpha_damp} = 1.0 and {discrete_factor} = 10.0.
|
|||
|
||||
[Default:]
|
||||
|
||||
The option defaults are dmax = 0.1 and line = quadratic.
|
||||
The option defaults are dmax = 0.1, line = quadratic and norm = two.
|
||||
|
||||
For the {spin}, {spin/cg} and {spin/lbfgs} styles, the
|
||||
option defaults are alpha_damp = 1.0, discrete_factor = 10.0,
|
||||
line = spin_none, and norm = euclidean.
|
||||
|
|
|
@ -6,14 +6,19 @@
|
|||
:line
|
||||
|
||||
min_style spin command :h3
|
||||
min_style spin/cg command :h3
|
||||
min_style spin/lbfgs command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
min_style spin :pre
|
||||
min_style spin
|
||||
min_style spin/cg
|
||||
min_style spin/lbfgs :pre
|
||||
|
||||
[Examples:]
|
||||
|
||||
min_style spin :pre
|
||||
min_style spin/lbfgs
|
||||
min_modify line spin_cubic discrete_factor 10.0 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
|
@ -46,10 +51,39 @@ definition of this timestep.
|
|||
{discrete_factor} can be defined with the "min_modify"_min_modify.html
|
||||
command.
|
||||
|
||||
NOTE: The {spin} style replaces the force tolerance by a torque
|
||||
tolerance. See "minimize"_minimize.html for more explanation.
|
||||
Style {spin/cg} defines an orthogonal spin optimization
|
||||
(OSO) combined to a conjugate gradient (CG) algorithm.
|
||||
The "min_modify"_min_modify.html command can be used to
|
||||
couple the {spin/cg} to a line search procedure, and to modify the
|
||||
discretization factor {discrete_factor}.
|
||||
By default, style {spin/cg} does not employ the line search procedure
|
||||
and uses the adaptive time-step technique in the same way as style {spin}.
|
||||
|
||||
[Restrictions:]
|
||||
Style {spin/lbfgs} defines an orthogonal spin optimization
|
||||
(OSO) combined to a limited-memory Broyden-Fletcher-Goldfarb-Shanno
|
||||
(L-BFGS) algorithm.
|
||||
By default, style {spin/lbfgs} does not employ line search procedure.
|
||||
If the line search procedure is not used then the discrete factor defines
|
||||
the maximum root mean squared rotation angle of spins by equation {pi/(5*Kappa)}.
|
||||
The default value for Kappa is 10.
|
||||
The {spin_cubic} line search can improve the convergence of the
|
||||
{spin/lbfgs} algorithm.
|
||||
|
||||
The "min_modify"_min_modify.html command can be used to
|
||||
activate the line search procedure, and to modify the
|
||||
discretization factor {discrete_factor}.
|
||||
|
||||
For more information about styles {spin/cg} and {spin/lbfgs},
|
||||
see their implementation reported in "(Ivanov)"_#Ivanov1.
|
||||
|
||||
NOTE: All the {spin} styles replace the force tolerance by a torque
|
||||
tolerance. See "minimize"_minimize.html for more explanation.
|
||||
|
||||
NOTE: The {spin/cg} and {spin/lbfgs} styles can be used
|
||||
for magnetic NEB calculations only if the line search procedure
|
||||
is deactivated. See "neb/spin"_neb_spin.html for more explanation.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This minimization procedure is only applied to spin degrees of
|
||||
freedom for a frozen lattice configuration.
|
||||
|
@ -61,5 +95,10 @@ freedom for a frozen lattice configuration.
|
|||
|
||||
[Default:]
|
||||
|
||||
The option defaults are {alpha_damp} = 1.0 and {discrete_factor} =
|
||||
10.0.
|
||||
The option defaults are {alpha_damp} = 1.0, {discrete_factor} =
|
||||
10.0, {line} = spin_none and {norm} = euclidean.
|
||||
|
||||
:line
|
||||
|
||||
:link(Ivanov1)
|
||||
[(Ivanov)] Ivanov, Uzdin, Jonsson. arXiv preprint arXiv:1904.02669, (2019).
|
||||
|
|
|
@ -11,7 +11,7 @@ min_style command :h3
|
|||
|
||||
min_style style :pre
|
||||
|
||||
style = {cg} or {cg/kk} or {hftn} or {sd} or {quickmin} or {fire} or {spin} :ul
|
||||
style = {cg} or {hftn} or {sd} or {quickmin} or {fire} or {spin} or {spin/cg} or {spin/lbfgs} :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
|
@ -64,11 +64,25 @@ a minimization.
|
|||
|
||||
Style {spin} is a damped spin dynamics with an adaptive
|
||||
timestep.
|
||||
See the "min/spin"_min_spin.html doc page for more information.
|
||||
|
||||
Style {spin/cg} uses an orthogonal spin optimization (OSO)
|
||||
combined to a conjugate gradient (CG) approach to minimize spin
|
||||
configurations.
|
||||
|
||||
Style {spin/lbfgs} uses an orthogonal spin optimization (OSO)
|
||||
combined to a limited-memory Broyden-Fletcher-Goldfarb-Shanno
|
||||
(LBFGS) approach to minimize spin configurations.
|
||||
|
||||
See the "min/spin"_min_spin.html doc page for more information
|
||||
about the {spin}, {spin/cg} and {spin/lbfgs} styles.
|
||||
|
||||
Either the {quickmin} and {fire} styles are useful in the context of
|
||||
nudged elastic band (NEB) calculations via the "neb"_neb.html command.
|
||||
|
||||
Either the {spin}, {spin/cg} and {spin/lbfgs} styles are useful
|
||||
in the context of magnetic geodesic nudged elastic band (GNEB) calculations
|
||||
via the "neb/spin"_neb_spin.html command.
|
||||
|
||||
NOTE: The damped dynamic minimizers use whatever timestep you have
|
||||
defined via the "timestep"_timestep.html command. Often they will
|
||||
converge more quickly if you use a timestep about 10x larger than you
|
||||
|
|
|
@ -104,12 +104,13 @@ the line search fails because the step distance backtracks to 0.0
|
|||
the number of outer iterations or timesteps exceeds {maxiter}
|
||||
the number of total force evaluations exceeds {maxeval} :ul
|
||||
|
||||
NOTE: the "minimization style"_min_style.html {spin} replaces
|
||||
NOTE: the "minimization style"_min_style.html {spin},
|
||||
{spin/cg}, and {spin/lbfgs} replace
|
||||
the force tolerance {ftol} by a torque tolerance.
|
||||
The minimization procedure stops if the 2-norm (length) of the
|
||||
global torque vector (defined as the cross product between the
|
||||
spins and their precession vectors omega) is less than {ftol},
|
||||
or if any of the other criteria are met.
|
||||
The minimization procedure stops if the 2-norm (length) of the torque vector on atom
|
||||
(defined as the cross product between the
|
||||
atomic spin and its precession vectors omega) is less than {ftol},
|
||||
or if any of the other criteria are met. Torque have the same units as the energy.
|
||||
|
||||
NOTE: You can also use the "fix halt"_fix_halt.html command to specify
|
||||
a general criterion for exiting a minimization, that is a calculation
|
||||
|
|
|
@ -59,9 +59,9 @@ performance speed-up you would see with one or more physical
|
|||
processors per replica. See the "Howto replica"_Howto_replica.html
|
||||
doc page for further discussion.
|
||||
|
||||
NOTE: As explained below, a GNEB calculation performs a damped dynamics
|
||||
minimization across all the replicas. The "spin"_min_spin.html
|
||||
style minimizer has to be defined in your input script.
|
||||
NOTE: As explained below, a GNEB calculation performs a
|
||||
minimization across all the replicas. One of the "spin"_min_spin.html
|
||||
style minimizers has to be defined in your input script.
|
||||
|
||||
When a GNEB calculation is performed, it is assumed that each replica
|
||||
is running the same system, though LAMMPS does not check for this.
|
||||
|
@ -170,10 +170,11 @@ command is issued.
|
|||
:line
|
||||
|
||||
A NEB calculation proceeds in two stages, each of which is a
|
||||
minimization procedure, performed via damped dynamics. To enable
|
||||
this, you must first define a damped spin dynamics
|
||||
"min_style"_min_style.html, using the {spin} style (see
|
||||
"min_spin"_min_spin.html for more information).
|
||||
minimization procedure. To enable
|
||||
this, you must first define a
|
||||
"min_style"_min_style.html, using either the {spin},
|
||||
{spin/cg}, or {spin/lbfgs} style (see
|
||||
"min_spin"_min_spin.html for more information).
|
||||
The other styles cannot be used, since they relax the lattice
|
||||
degrees of freedom instead of the spins.
|
||||
|
||||
|
@ -358,6 +359,9 @@ This command can only be used if LAMMPS was built with the SPIN
|
|||
package. See the "Build package"_Build_package.html doc
|
||||
page for more info.
|
||||
|
||||
For magnetic GNEB calculations, only {spin_none} value for {line} keyword can be used
|
||||
when styles {spin/cg} and {spin/lbfgs} are employed.
|
||||
|
||||
:line
|
||||
|
||||
[Related commands:]
|
||||
|
|
|
@ -100,7 +100,7 @@ on particle {i} due to contact with particle {j} is given by:
|
|||
\mathbf\{F\}_\{ne, Hooke\} = k_N \delta_\{ij\} \mathbf\{n\}
|
||||
\end\{equation\}
|
||||
|
||||
Where \(\delta = R_i + R_j - \|\mathbf\{r\}_\{ij\}\|\) is the particle
|
||||
Where \(\delta_\{ij\} = R_i + R_j - \|\mathbf\{r\}_\{ij\}\|\) is the particle
|
||||
overlap, \(R_i, R_j\) are the particle radii, \(\mathbf\{r\}_\{ij\} =
|
||||
\mathbf\{r\}_i - \mathbf\{r\}_j\) is the vector separating the two
|
||||
particle centers (note the i-j ordering so that \(F_\{ne\}\) is
|
||||
|
@ -177,7 +177,7 @@ following general form:
|
|||
\end\{equation\}
|
||||
|
||||
Here, \(\mathbf\{v\}_\{n,rel\} = (\mathbf\{v\}_j - \mathbf\{v\}_i)
|
||||
\cdot \mathbf\{n\}\) is the component of relative velocity along
|
||||
\cdot \mathbf\{n\} \mathbf\{n\}\) is the component of relative velocity along
|
||||
\(\mathbf\{n\}\).
|
||||
|
||||
The optional {damping} keyword to the {pair_coeff} command followed by
|
||||
|
@ -299,8 +299,8 @@ the normal damping \(\eta_n\) (see above):
|
|||
\eta_t = -x_\{\gamma,t\} \eta_n
|
||||
\end\{equation\}
|
||||
|
||||
The normal damping prefactor \(\eta_n\) is determined by the choice of
|
||||
the {damping} keyword, as discussed above. Thus, the {damping}
|
||||
The normal damping prefactor \(\eta_n\) is determined by the choice
|
||||
of the {damping} keyword, as discussed above. Thus, the {damping}
|
||||
keyword also affects the tangential damping. The parameter
|
||||
\(x_\{\gamma,t\}\) is a scaling coefficient. Several works in the
|
||||
literature use \(x_\{\gamma,t\} = 1\) ("Marshall"_#Marshall2009,
|
||||
|
@ -308,10 +308,10 @@ literature use \(x_\{\gamma,t\} = 1\) ("Marshall"_#Marshall2009,
|
|||
tangential velocity at the point of contact is given by
|
||||
\(\mathbf\{v\}_\{t, rel\} = \mathbf\{v\}_\{t\} - (R_i\Omega_i +
|
||||
R_j\Omega_j) \times \mathbf\{n\}\), where \(\mathbf\{v\}_\{t\} =
|
||||
\mathbf\{v\}_r - \mathbf\{v\}_r\cdot\mathbf\{n\}\), \(\mathbf\{v\}_r =
|
||||
\mathbf\{v\}_j - \mathbf\{v\}_i\). The direction of the applied force
|
||||
is \(\mathbf\{t\} =
|
||||
\mathbf\{v_\{t,rel\}\}/\|\mathbf\{v_\{t,rel\}\}\|\).
|
||||
\mathbf\{v\}_r - \mathbf\{v\}_r\cdot\mathbf\{n\}\{n\}\),
|
||||
\(\mathbf\{v\}_r = \mathbf\{v\}_j - \mathbf\{v\}_i\).
|
||||
The direction of the applied force is \(\mathbf\{t\} =
|
||||
\mathbf\{v_\{t,rel\}\}/\|\mathbf\{v_\{t,rel\}\}\|\) .
|
||||
|
||||
The normal force value \(F_\{n0\}\) used to compute the critical force
|
||||
depends on the form of the contact model. For non-cohesive models
|
||||
|
@ -411,8 +411,8 @@ option by an additional factor of {a}, the radius of the contact region. The tan
|
|||
\mathbf\{F\}_t = -min(\mu_t F_\{n0\}, \|-k_t a \mathbf\{\xi\} + \mathbf\{F\}_\mathrm\{t,damp\}\|) \mathbf\{t\}
|
||||
\end\{equation\}
|
||||
|
||||
Here, {a} is the radius of the contact region, given by \(a = \delta
|
||||
R\) for all normal contact models, except for {jkr}, where it is given
|
||||
Here, {a} is the radius of the contact region, given by \(a =\sqrt\{R\delta\}\)
|
||||
for all normal contact models, except for {jkr}, where it is given
|
||||
implicitly by \(\delta = a^2/R - 2\sqrt\{\pi \gamma a/E\}\), see
|
||||
discussion above. To match the Mindlin solution, one should set \(k_t
|
||||
= 8G\), where \(G\) is the shear modulus, related to Young's modulus
|
||||
|
@ -680,7 +680,7 @@ The single() function of these pair styles returns 0.0 for the energy
|
|||
of a pairwise interaction, since energy is not conserved in these
|
||||
dissipative potentials. It also returns only the normal component of
|
||||
the pairwise interaction force. However, the single() function also
|
||||
calculates 10 extra pairwise quantities. The first 3 are the
|
||||
calculates 12 extra pairwise quantities. The first 3 are the
|
||||
components of the tangential force between particles I and J, acting
|
||||
on particle I. The 4th is the magnitude of this tangential force.
|
||||
The next 3 (5-7) are the components of the rolling torque acting on
|
||||
|
|
|
@ -25,9 +25,8 @@ pair_coeff * * 10.0
|
|||
pair_coeff 2 3 8.0 :pre
|
||||
|
||||
pair_style spin/dipole/long 9.0
|
||||
pair_coeff * * 1.0 1.0
|
||||
pair_coeff 2 3 1.0 1.0 2.5 4.0 scale 0.5
|
||||
pair_coeff 2 3 1.0 1.0 2.5 4.0 :pre
|
||||
pair_coeff * * 10.0
|
||||
pair_coeff 2 3 6.0 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Commands_all.html)
|
||||
|
||||
:line
|
||||
|
||||
third_order command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
third_order group-ID style delta args keyword value ... :pre
|
||||
|
||||
group-ID = ID of group of atoms to displace :ulb,l
|
||||
style = {regular} or {eskm} :l
|
||||
delta = finite different displacement length (distance units) :l
|
||||
one or more keyword/arg pairs may be appended :l
|
||||
keyword = {file} or {binary}
|
||||
{file} name = name of output file for the third order tensor
|
||||
{binary} arg = {yes} or {no} or {gzip} :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
third_order 1 regular 0.000001
|
||||
third_order 1 eskm 0.000001
|
||||
third_order 3 regular 0.00004 file third_order.dat
|
||||
third_order 5 eskm 0.00000001 file third_order.dat binary yes :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Calculate the third order force constant tensor by finite difference of the selected group,
|
||||
|
||||
:c,image(JPG/third_order_force_constant.png))
|
||||
|
||||
where Phi is the third order force constant tensor.
|
||||
|
||||
The output of the command is the tensor, three elements at a time. The
|
||||
three elements correspond to the three gamma elements for a specific i/alpha/j/beta/k.
|
||||
The initial five numbers are i, alpha, j, beta, and k respectively.
|
||||
|
||||
If the style eskm is selected, the tensor will be using energy units of 10 J/mol.
|
||||
These units conform to eskm style from the dynamical_matrix command, which
|
||||
will simplify operations using dynamical matrices with third order tensors.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
The command collects a 9 times the number of atoms in the group on every single MPI rank,
|
||||
so the memory requirements can be very significant for large systems.
|
||||
|
||||
This command is part of the USER-PHONON package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Build
|
||||
package"_Build_package.html doc page for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"fix phonon"_fix_phonon.html "dynamical_matrix"_dynamical_matrix.html
|
||||
|
||||
[Default:]
|
||||
|
||||
The default settings are file = "third_order.dat", binary = no
|
|
@ -275,6 +275,7 @@ Broadwell
|
|||
Broglie
|
||||
brownian
|
||||
brownw
|
||||
Broyden
|
||||
Bryantsev
|
||||
Btarget
|
||||
btype
|
||||
|
@ -780,6 +781,7 @@ erotate
|
|||
Ertas
|
||||
ervel
|
||||
Espanol
|
||||
eskm
|
||||
esu
|
||||
esub
|
||||
esw
|
||||
|
@ -988,6 +990,7 @@ gmask
|
|||
Gmask
|
||||
gneb
|
||||
GNEB
|
||||
Goldfarb
|
||||
googlemail
|
||||
Gordan
|
||||
GPa
|
||||
|
@ -1405,6 +1408,7 @@ Laupretre
|
|||
lavenderblush
|
||||
lawngreen
|
||||
lB
|
||||
lbfgs
|
||||
lbl
|
||||
LBtype
|
||||
lcbop
|
||||
|
@ -2041,6 +2045,7 @@ Orsi
|
|||
ortho
|
||||
orthonormal
|
||||
orthorhombic
|
||||
oso
|
||||
ot
|
||||
Otype
|
||||
Ouldridge
|
||||
|
@ -2125,6 +2130,7 @@ ph
|
|||
Phillpot
|
||||
phiphi
|
||||
phonon
|
||||
phonons
|
||||
phophorous
|
||||
phosphide
|
||||
Phs
|
||||
|
@ -2272,6 +2278,7 @@ qoffload
|
|||
qopenmp
|
||||
qoverride
|
||||
qtb
|
||||
quadratically
|
||||
quadrupolar
|
||||
Quant
|
||||
quartic
|
||||
|
@ -2513,6 +2520,7 @@ setvel
|
|||
sfftw
|
||||
Sg
|
||||
Shan
|
||||
Shanno
|
||||
shapex
|
||||
shapey
|
||||
shapez
|
||||
|
|
|
@ -76,6 +76,7 @@ ellipse: ellipsoidal particles in spherical solvent, 2d system
|
|||
flow: Couette and Poiseuille flow in a 2d channel
|
||||
friction: frictional contact of spherical asperities between 2d surfaces
|
||||
gcmc: Grand Canonical Monte Carlo (GCMC) via the fix gcmc command
|
||||
gjf: use of fix langevin Gronbech-Jensen/Farago option
|
||||
granregion: use of fix wall/region/gran as boundary on granular particles
|
||||
hugoniostat: Hugoniostat shock dynamics
|
||||
hyper: global and local hyperdynamics of diffusion on Pt surface
|
||||
|
@ -163,6 +164,12 @@ The MC directory has an example script for using LAMMPS as an
|
|||
energy-evaluation engine in a iterative Monte Carlo energy-relaxation
|
||||
loop.
|
||||
|
||||
The UNITS directory contains examples of input scripts modeling the
|
||||
same Lennard-Jones liquid model, written in 3 different unit systems:
|
||||
lj, real, and metal. So that you can see how to scale/unscale input
|
||||
and output values read/written by LAMMPS to verify you are performing
|
||||
the same simulation in different unit systems.
|
||||
|
||||
The USER directory contains subdirectories of user-provided example
|
||||
scripts for ser packages. See the README files in those directories
|
||||
for more info. See the doc/Section_start.html file for more info
|
||||
|
|
|
@ -32,7 +32,7 @@ neigh_modify every 10 check yes delay 20
|
|||
|
||||
fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0
|
||||
fix 2 all langevin/spin 0.0 0.1 21
|
||||
fix 3 all nve/spin lattice no
|
||||
fix 3 all nve/spin lattice frozen
|
||||
|
||||
timestep 0.0002
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ fix_modify 1 energy yes
|
|||
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
timestep 0.0001
|
||||
|
||||
# compute and output options
|
||||
|
|
|
@ -37,7 +37,7 @@ neigh_modify every 10 check yes delay 20
|
|||
fix 1 all precession/spin anisotropy 0.01 0.0 0.0 1.0
|
||||
#fix 2 all langevin/spin 0.0 0.0 21
|
||||
fix 2 all langevin/spin 0.0 0.1 21
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
|
||||
timestep 0.0001
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ fix 1 all precession/spin cubic 0.001 0.0005 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1
|
|||
fix_modify 1 energy yes
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
timestep 0.0001
|
||||
|
||||
# compute and output options
|
||||
|
|
|
@ -35,7 +35,7 @@ fix 1 all precession/spin cubic 0.001 0.0005 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1
|
|||
fix_modify 1 energy yes
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
timestep 0.0001
|
||||
|
||||
# compute and output options
|
||||
|
|
|
@ -36,7 +36,7 @@ fix 1 all precession/spin cubic 0.001 0.0005 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1
|
|||
fix_modify 1 energy yes
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
timestep 0.0001
|
||||
|
||||
# compute and output options
|
||||
|
|
|
@ -33,7 +33,7 @@ neigh_modify every 10 check yes delay 20
|
|||
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
timestep 0.0001
|
||||
|
||||
# compute and output options
|
||||
|
|
|
@ -31,7 +31,7 @@ fix 1 all precession/spin cubic 0.001 0.0005 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1
|
|||
fix_modify 1 energy yes
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
timestep 0.0001
|
||||
|
||||
# compute and output options
|
||||
|
|
|
@ -33,7 +33,7 @@ neigh_modify every 10 check yes delay 20
|
|||
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
timestep 0.0001
|
||||
|
||||
# compute and output options
|
||||
|
|
|
@ -35,7 +35,7 @@ fix 1 all precession/spin cubic -0.0001 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.
|
|||
fix_modify 1 energy yes
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
timestep 0.0001
|
||||
|
||||
# compute and output options
|
||||
|
|
|
@ -20,7 +20,7 @@ neigh_modify every 1 check no delay 0
|
|||
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
timestep 0.0001
|
||||
|
||||
# define outputs and computes
|
||||
|
|
|
@ -24,7 +24,7 @@ neigh_modify every 1 check no delay 0
|
|||
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 3 all nve/spin lattice moving
|
||||
timestep 0.0001
|
||||
|
||||
# define outputs
|
||||
|
|
|
@ -29,7 +29,7 @@ neigh_modify every 10 check yes delay 20
|
|||
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
|
||||
fix 2 all langevin/spin 100.0 0.01 21
|
||||
|
||||
fix 3 all nve/spin lattice no
|
||||
fix 3 all nve/spin lattice frozen
|
||||
timestep 0.0001
|
||||
|
||||
# compute and output options
|
||||
|
|
|
@ -35,7 +35,7 @@ fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 anisotropy 5e-05 0.0 0.0 1.0
|
|||
fix_modify 1 energy yes
|
||||
fix 2 fixed_spin setforce/spin 0.0 0.0 0.0
|
||||
fix 3 all langevin/spin 0.0 0.1 21
|
||||
fix 4 all nve/spin lattice no
|
||||
fix 4 all nve/spin lattice frozen
|
||||
|
||||
timestep 0.0001
|
||||
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
# bfo in a 3d periodic box
|
||||
|
||||
units metal
|
||||
dimension 3
|
||||
boundary p p f
|
||||
atom_style spin
|
||||
|
||||
# necessary for the serial algorithm (sametag)
|
||||
atom_modify map array
|
||||
|
||||
lattice sc 3.96
|
||||
region box block 0.0 34.0 0.0 34.0 0.0 1.0
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
|
||||
# setting mass, mag. moments, and interactions for bcc iron
|
||||
|
||||
mass 1 1.0
|
||||
set group all spin/random 11 2.50
|
||||
|
||||
pair_style hybrid/overlay spin/exchange 6.0 spin/magelec 4.5 spin/dmi 4.5
|
||||
pair_coeff * * spin/exchange exchange 6.0 -0.01575 0.0 1.965
|
||||
# pair_coeff * * spin/magelec magelec 4.5 0.000109 1.0 1.0 1.0
|
||||
pair_coeff * * spin/magelec magelec 4.5 0.00109 1.0 1.0 1.0
|
||||
pair_coeff * * spin/dmi dmi 4.5 0.00005 1.0 1.0 1.0
|
||||
|
||||
neighbor 0.1 bin
|
||||
neigh_modify every 10 check yes delay 20
|
||||
|
||||
fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0
|
||||
fix_modify 1 energy yes
|
||||
|
||||
timestep 0.0001
|
||||
|
||||
compute out_mag all spin
|
||||
compute out_pe all pe
|
||||
compute out_ke all ke
|
||||
compute out_temp all temp
|
||||
|
||||
variable magz equal c_out_mag[3]
|
||||
variable magnorm equal c_out_mag[4]
|
||||
variable emag equal c_out_mag[5]
|
||||
variable tmag equal c_out_mag[6]
|
||||
|
||||
thermo 100
|
||||
thermo_style custom step time v_magnorm v_emag v_tmag temp etotal
|
||||
thermo_modify format float %20.15g
|
||||
|
||||
compute outsp all property/atom spx spy spz sp fmx fmy fmz
|
||||
dump 1 all custom 50 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7]
|
||||
|
||||
min_style spin/cg
|
||||
# min_modify line spin_none discrete_factor 10.0
|
||||
minimize 1.0e-10 1.0e-10 10000 10000
|
|
@ -0,0 +1,55 @@
|
|||
# bfo in a 3d periodic box
|
||||
|
||||
units metal
|
||||
dimension 3
|
||||
boundary p p f
|
||||
atom_style spin
|
||||
|
||||
# necessary for the serial algorithm (sametag)
|
||||
atom_modify map array
|
||||
|
||||
lattice sc 3.96
|
||||
region box block 0.0 34.0 0.0 34.0 0.0 1.0
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
|
||||
# setting mass, mag. moments, and interactions for bcc iron
|
||||
|
||||
mass 1 1.0
|
||||
set group all spin/random 11 2.50
|
||||
|
||||
pair_style hybrid/overlay spin/exchange 6.0 spin/magelec 4.5 spin/dmi 4.5
|
||||
pair_coeff * * spin/exchange exchange 6.0 -0.01575 0.0 1.965
|
||||
#pair_coeff * * spin/magelec magelec 4.5 0.000109 1.0 1.0 1.0
|
||||
pair_coeff * * spin/magelec magelec 4.5 0.00109 1.0 1.0 1.0
|
||||
pair_coeff * * spin/dmi dmi 4.5 0.00005 1.0 1.0 1.0
|
||||
|
||||
neighbor 0.1 bin
|
||||
neigh_modify every 10 check yes delay 20
|
||||
|
||||
fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0
|
||||
fix_modify 1 energy yes
|
||||
|
||||
timestep 0.0001
|
||||
|
||||
compute out_mag all spin
|
||||
compute out_pe all pe
|
||||
compute out_ke all ke
|
||||
compute out_temp all temp
|
||||
|
||||
variable magz equal c_out_mag[3]
|
||||
variable magnorm equal c_out_mag[4]
|
||||
variable emag equal c_out_mag[5]
|
||||
variable tmag equal c_out_mag[6]
|
||||
|
||||
thermo 50
|
||||
thermo_style custom step time v_magnorm v_emag v_tmag temp etotal
|
||||
thermo_modify format float %20.15g
|
||||
|
||||
compute outsp all property/atom spx spy spz sp fmx fmy fmz
|
||||
dump 1 all custom 50 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7]
|
||||
|
||||
min_style spin/lbfgs
|
||||
# min_modify line spin_cubic discrete_factor 10.0
|
||||
min_modify norm max
|
||||
minimize 1.0e-15 1.0e-10 10000 1000
|
|
@ -0,0 +1,54 @@
|
|||
This directory has 3 scripts which show how to run the same problem
|
||||
using the 3 most common units system used in LAMMPS: lj, real, and
|
||||
metal units. As stated on the units command doc page:
|
||||
|
||||
"Any simulation you perform for one choice of units can be duplicated
|
||||
with any other unit setting LAMMPS supports. ... To perform the same
|
||||
simulation in a different set of units you must change all the
|
||||
unit-based input parameters in your input script and other input files
|
||||
(data file, potential files, etc) correctly to the new units. And you
|
||||
must correctly convert all output from the new units to the old units
|
||||
when comparing to the original results. That is often not simple to
|
||||
do."
|
||||
|
||||
These examples are meant to illustrate how to do this for a simple
|
||||
Lennard-Jones liquid (argon). All of the scripts have a set of
|
||||
variables defined at the top which can be changed as command line
|
||||
arguments (e.g. -v cutoff 3.0). All 3 scripts give identical output,
|
||||
modulo round-offs due to the finite precision of the conversion
|
||||
factors used, either internally in LAMMPS or in the scripts. If there
|
||||
were run for a long time, the trajectories would diverge, but they
|
||||
would still give statistically identical results.
|
||||
|
||||
The LJ script is the simplest; it is similar to the bench/in.lj
|
||||
script.
|
||||
|
||||
The real and metal scripts each have a set of variables at the top
|
||||
which define scale factors for converting quantities like distance,
|
||||
energy, pressure from reduced LJ units to real or metal units. Once
|
||||
these are defined the rest of the input script is very similar to the
|
||||
LJ script. The approprate scale factor is applied to every input.
|
||||
Output quantities are printed in both the native real/metal units and
|
||||
unscaled back to LJ units. So that you can see the outputs are the
|
||||
same if you examine the log files. Comments about this comparison
|
||||
are at the bottom of the real and metal scripts.
|
||||
|
||||
These 3 scripts are provided, because converting from lj reduced units
|
||||
to physical units (e.g. real or metal) or vice versa is the trickiest
|
||||
case. Converting input scripts between 2 sets of physical units
|
||||
(e.g. reak <--> metal) is much easier. But you can use the same ideas
|
||||
as in these scripts; just define a set of scale/unscale factors.
|
||||
|
||||
See Allen & Tildesley's Computer Simulation of Liquids, Appendix B for
|
||||
a nice discussion of reduced units. It will explain the conversion
|
||||
formulas used in the real and metal scripts.
|
||||
|
||||
Hopefully, if you study these scripts, you should be able to convert
|
||||
an input script of your own, written in one set of units, to an
|
||||
identical input script in an alternate set of units. Where
|
||||
"identical" means it runs the same simulation in a statistical sense.
|
||||
|
||||
You can find the full set of scale factors LAMMPS uses internally for
|
||||
different unit systems it supports, at the top of the src/udpate.cpp
|
||||
file. A couple of those values are used in the real and metal
|
||||
scripts.
|
|
@ -0,0 +1,43 @@
|
|||
# Ar in lj units
|
||||
|
||||
# simulation params in reduced units
|
||||
# settable from command line
|
||||
# epsilon = sigma = mass = 1.0
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable rhostar index 0.8842
|
||||
variable dt index 0.005
|
||||
variable cutoff index 2.5
|
||||
variable skin index 0.3
|
||||
variable tinitial index 1.0
|
||||
variable nthermo index 10
|
||||
variable nsteps index 100
|
||||
|
||||
# script
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc ${rhostar}
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
|
||||
velocity all create ${tinitial} 12345
|
||||
|
||||
pair_style lj/cut ${cutoff}
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
|
||||
neighbor ${skin} bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
|
||||
fix 1 all nve
|
||||
|
||||
timestep ${dt}
|
||||
|
||||
thermo 10
|
||||
|
||||
run 100
|
|
@ -0,0 +1,98 @@
|
|||
# Ar in metal units
|
||||
|
||||
# simulation params in reduced units
|
||||
# settable from command line
|
||||
# epsilon, sigma, mass set below
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable rhostar index 0.8842
|
||||
variable dt index 0.005
|
||||
variable cutoff index 2.5
|
||||
variable skin index 0.3
|
||||
variable tinitial index 1.0
|
||||
variable nthermo index 10
|
||||
variable nsteps index 100
|
||||
|
||||
# physical constants from update.cpp
|
||||
|
||||
variable kb index 8.617343e-5 # kB in eV/K
|
||||
variable avogadro index 6.02214129e23 # Avogadro's number
|
||||
|
||||
# Ar properties in metal units
|
||||
|
||||
variable epskb index 117.7 # LJ epsilon/kB in degrees K
|
||||
variable sigma index 3.504 # LJ sigma in Angstroms
|
||||
variable epsilon equal ${epskb}*${kb} # LJ epsilon in eV
|
||||
variable mass index 39.95 # mass in g/mole
|
||||
|
||||
# scale factors
|
||||
|
||||
# sigma = scale factor on distance, converts reduced distance to Angs
|
||||
# epsilon = scale factor on energy, converts reduced energy to eV
|
||||
# tmpscale = scale factor on temperature, converts reduced temp to degrees K
|
||||
# tscale = scale factor on time, converts reduced time to ps
|
||||
# formula is t = t* / sqrt(epsilon/mass/sigma^2), but need t in fs
|
||||
# use epsilon (Joule), mass (kg/atom), sigma (meter) to get t in seconds
|
||||
# pscale = scale factor on pressure, converts reduced pressure to bars
|
||||
# formula is P = P* / (sigma^3/epsilon), but need P in atmospheres
|
||||
# use sigma (meter), epsilon (Joule) to get P in nt/meter^2, convert to bars
|
||||
|
||||
variable eVtoJoule index 1.602e-19 # convert eV to Joules
|
||||
variable NtMtoAtm equal 1.0e-5 # convert Nt/meter^2 to bars
|
||||
|
||||
variable tmpscale equal ${epskb}
|
||||
variable epsilonJ equal ${epsilon}*${eVtoJoule}
|
||||
variable massKgAtom equal ${mass}/1000.0/${avogadro}
|
||||
variable sigmaM equal ${sigma}/1.0e10
|
||||
variable sigmaMsq equal ${sigmaM}*${sigmaM}
|
||||
variable tscale equal 1.0e12/sqrt(${epsilonJ}/${massKgAtom}/${sigmaMsq})
|
||||
variable sigmaM3 equal ${sigmaM}*${sigmaM}*${sigmaM}
|
||||
variable pscale equal ${NtMtoAtm}/(${sigmaM3}/(${epsilonJ}))
|
||||
|
||||
# variables
|
||||
# alat = lattice constant in Angs (at reduced density rhostar)
|
||||
# temp = reduced temperature for output
|
||||
# epair,emol,etotal = reduced epair,emol,etotal energies for output
|
||||
# press = reduced pressure for output
|
||||
|
||||
variable alat equal (4.0*${sigma}*${sigma}*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable temp equal temp/${tmpscale}
|
||||
variable epair equal epair/${epsilon}
|
||||
variable emol equal emol/${epsilon}
|
||||
variable etotal equal etotal/${epsilon}
|
||||
variable press equal press/${pscale}
|
||||
|
||||
# same script as in.ar.lj
|
||||
|
||||
units metal
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc ${alat}
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 ${mass}
|
||||
|
||||
velocity all create $(v_tinitial*v_epskb) 12345
|
||||
|
||||
pair_style lj/cut $(v_cutoff*v_sigma)
|
||||
pair_coeff 1 1 ${epsilon} ${sigma}
|
||||
|
||||
neighbor $(v_skin*v_sigma) bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
|
||||
fix 1 all nve
|
||||
|
||||
timestep $(v_dt*v_tscale)
|
||||
|
||||
# columns 2,3,4 = temp,pe,press in metal units
|
||||
# columns 5-9 = temp,energy.press in reduced units, compare to in.ar.lj
|
||||
# need to include metal unit output to enable use of reduced variables
|
||||
|
||||
thermo_style custom step temp pe press v_temp v_epair v_emol v_etotal v_press
|
||||
thermo_modify norm yes
|
||||
thermo ${nthermo}
|
||||
|
||||
run ${nsteps}
|
|
@ -0,0 +1,98 @@
|
|||
# Ar in real units
|
||||
|
||||
# simulation params in reduced units
|
||||
# settable from command line
|
||||
# epsilon, sigma, mass set below
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable rhostar index 0.8842
|
||||
variable dt index 0.005
|
||||
variable cutoff index 2.5
|
||||
variable skin index 0.3
|
||||
variable tinitial index 1.0
|
||||
variable nthermo index 10
|
||||
variable nsteps index 100
|
||||
|
||||
# physical constants from update.cpp
|
||||
|
||||
variable kb index 0.0019872067 # kB in Kcal/mole/K
|
||||
variable avogadro index 6.02214129e23 # Avogadro's number
|
||||
|
||||
# Ar properties in real units
|
||||
|
||||
variable epskb index 117.7 # LJ epsilon/kB in degrees K
|
||||
variable sigma index 3.504 # LJ sigma in Angstroms
|
||||
variable epsilon equal ${epskb}*${kb} # LJ epsilon in Kcal/mole
|
||||
variable mass index 39.95 # mass in g/mole
|
||||
|
||||
# scale factors
|
||||
|
||||
# sigma = scale factor on distance, converts reduced distance to Angs
|
||||
# epsilon = scale factor on energy, converts reduced energy to Kcal/mole
|
||||
# tmpscale = scale factor on temperature, converts reduced temp to degrees K
|
||||
# tscale = scale factor on time, converts reduced time to fs
|
||||
# formula is t = t* / sqrt(epsilon/mass/sigma^2), but need t in fs
|
||||
# use epsilon (Joule/mole), mass (kg/mole), sigma (meter) to get t in seconds
|
||||
# pscale = scale factor on pressure, converts reduced pressure to atmospheres
|
||||
# formula is P = P* / (sigma^3/epsilon), but need P in atmospheres
|
||||
# use sigma (meter), epsilon (Joule) to get P in nt/meter^2, convert to atms
|
||||
|
||||
variable KcaltoJoule index 4.1868e3 # convert Kcals to Joules
|
||||
variable NtMtoAtm equal 1.0/1.0135e5 # convert Nt/meter^2 to Atmospheres
|
||||
|
||||
variable tmpscale equal ${epskb}
|
||||
variable epsJmole equal ${epsilon}*${KcaltoJoule}
|
||||
variable massKgmole equal ${mass}/1000.0
|
||||
variable sigmaM equal ${sigma}/1.0e10
|
||||
variable sigmaMsq equal ${sigmaM}*${sigmaM}
|
||||
variable tscale equal 1.0e15/sqrt(${epsJmole}/${massKgmole}/${sigmaMsq})
|
||||
variable sigmaM3 equal ${sigmaM}*${sigmaM}*${sigmaM}
|
||||
variable pscale equal ${NtMtoAtm}/(${sigmaM3}/(${epsJmole}/${avogadro}))
|
||||
|
||||
# variables
|
||||
# alat = lattice constant in Angs (at reduced density rhostar)
|
||||
# temp = reduced temperature for output
|
||||
# epair,emol,etotal = reduced epair,emol,etotal energies for output
|
||||
# press = reduced pressure for output
|
||||
|
||||
variable alat equal (4.0*${sigma}*${sigma}*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable temp equal temp/${tmpscale}
|
||||
variable epair equal epair/${epsilon}
|
||||
variable emol equal emol/${epsilon}
|
||||
variable etotal equal etotal/${epsilon}
|
||||
variable press equal press/${pscale}
|
||||
|
||||
# same script as in.ar.lj
|
||||
|
||||
units real
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc ${alat}
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 ${mass}
|
||||
|
||||
velocity all create $(v_tinitial*v_epskb) 12345
|
||||
|
||||
pair_style lj/cut $(v_cutoff*v_sigma)
|
||||
pair_coeff 1 1 ${epsilon} ${sigma}
|
||||
|
||||
neighbor $(v_skin*v_sigma) bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
|
||||
fix 1 all nve
|
||||
|
||||
timestep $(v_dt*v_tscale)
|
||||
|
||||
# columns 2,3,4 = temp,pe,press in real units
|
||||
# columns 5-9 = temp,energy.press in reduced units, compare to in.ar.lj
|
||||
# need to include real unit output to enable use of reduced variables
|
||||
|
||||
thermo_style custom step temp pe press v_temp v_epair v_emol v_etotal v_press
|
||||
thermo_modify norm yes
|
||||
thermo ${nthermo}
|
||||
|
||||
run ${nsteps}
|
|
@ -0,0 +1,109 @@
|
|||
LAMMPS (19 Sep 2019)
|
||||
# Ar in lj units
|
||||
|
||||
# simulation params in reduced units
|
||||
# settable from command line
|
||||
# epsilon = sigma = mass = 1.0
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable rhostar index 0.8842
|
||||
variable dt index 0.005
|
||||
variable cutoff index 2.5
|
||||
variable skin index 0.3
|
||||
variable tinitial index 1.0
|
||||
variable nthermo index 10
|
||||
variable nsteps index 100
|
||||
|
||||
# script
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc ${rhostar}
|
||||
lattice fcc 0.8842
|
||||
Lattice spacing in x,y,z = 1.65388 1.65388 1.65388
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
region box block 0 5 0 $y 0 $z
|
||||
region box block 0 5 0 5 0 $z
|
||||
region box block 0 5 0 5 0 5
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (8.26938 8.26938 8.26938)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 500 atoms
|
||||
create_atoms CPU = 0.000547171 secs
|
||||
mass 1 1.0
|
||||
|
||||
velocity all create ${tinitial} 12345
|
||||
velocity all create 1.0 12345
|
||||
|
||||
pair_style lj/cut ${cutoff}
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
|
||||
neighbor ${skin} bin
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
|
||||
fix 1 all nve
|
||||
|
||||
timestep ${dt}
|
||||
timestep 0.005
|
||||
|
||||
thermo 10
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 20 steps, delay 0 steps, check no
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 2.8
|
||||
ghost atom cutoff = 2.8
|
||||
binsize = 1.4, bins = 6 6 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 2.644 | 2.644 | 2.644 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 1 -7.1026383 0 -5.6056383 -5.1224757
|
||||
10 0.74213042 -6.7245488 0 -5.6135795 -3.1363153
|
||||
20 0.36167746 -6.1681704 0 -5.6267393 -0.40461854
|
||||
30 0.4684512 -6.3315744 0 -5.630303 -1.0390065
|
||||
40 0.46774191 -6.3308002 0 -5.6305906 -1.077533
|
||||
50 0.48323399 -6.3533122 0 -5.6299109 -1.1506287
|
||||
60 0.49569105 -6.3711644 0 -5.6291149 -1.2296104
|
||||
70 0.5208333 -6.4096336 0 -5.6299462 -1.4483636
|
||||
80 0.53708431 -6.4345933 0 -5.6305781 -1.5945708
|
||||
90 0.52618946 -6.4185937 0 -5.6308881 -1.5264055
|
||||
100 0.52862701 -6.4231724 0 -5.6318178 -1.5714077
|
||||
Loop time of 0.065218 on 1 procs for 100 steps with 500 atoms
|
||||
|
||||
Performance: 662394.104 tau/day, 1533.320 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.053584 | 0.053584 | 0.053584 | 0.0 | 82.16
|
||||
Neigh | 0.0075939 | 0.0075939 | 0.0075939 | 0.0 | 11.64
|
||||
Comm | 0.0022638 | 0.0022638 | 0.0022638 | 0.0 | 3.47
|
||||
Output | 0.00021172 | 0.00021172 | 0.00021172 | 0.0 | 0.32
|
||||
Modify | 0.0011077 | 0.0011077 | 0.0011077 | 0.0 | 1.70
|
||||
Other | | 0.0004568 | | | 0.70
|
||||
|
||||
Nlocal: 500 ave 500 max 500 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 1946 ave 1946 max 1946 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 19572 ave 19572 max 19572 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 19572
|
||||
Ave neighs/atom = 39.144
|
||||
Neighbor list builds = 5
|
||||
Dangerous builds not checked
|
||||
Total wall time: 0:00:00
|
|
@ -0,0 +1,109 @@
|
|||
LAMMPS (19 Sep 2019)
|
||||
# Ar in lj units
|
||||
|
||||
# simulation params in reduced units
|
||||
# settable from command line
|
||||
# epsilon = sigma = mass = 1.0
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable rhostar index 0.8842
|
||||
variable dt index 0.005
|
||||
variable cutoff index 2.5
|
||||
variable skin index 0.3
|
||||
variable tinitial index 1.0
|
||||
variable nthermo index 10
|
||||
variable nsteps index 100
|
||||
|
||||
# script
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc ${rhostar}
|
||||
lattice fcc 0.8842
|
||||
Lattice spacing in x,y,z = 1.65388 1.65388 1.65388
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
region box block 0 5 0 $y 0 $z
|
||||
region box block 0 5 0 5 0 $z
|
||||
region box block 0 5 0 5 0 5
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (8.26938 8.26938 8.26938)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 500 atoms
|
||||
create_atoms CPU = 0.000570774 secs
|
||||
mass 1 1.0
|
||||
|
||||
velocity all create ${tinitial} 12345
|
||||
velocity all create 1.0 12345
|
||||
|
||||
pair_style lj/cut ${cutoff}
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
|
||||
neighbor ${skin} bin
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
|
||||
fix 1 all nve
|
||||
|
||||
timestep ${dt}
|
||||
timestep 0.005
|
||||
|
||||
thermo 10
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 20 steps, delay 0 steps, check no
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 2.8
|
||||
ghost atom cutoff = 2.8
|
||||
binsize = 1.4, bins = 6 6 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 2.609 | 2.609 | 2.609 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 1 -7.1026383 0 -5.6056383 -5.1224757
|
||||
10 0.73621446 -6.7154544 0 -5.6133413 -3.089257
|
||||
20 0.35775263 -6.1618707 0 -5.626315 -0.37875949
|
||||
30 0.47139877 -6.3359656 0 -5.6302816 -1.1018761
|
||||
40 0.46337135 -6.3247084 0 -5.6310415 -1.0985336
|
||||
50 0.48738877 -6.360393 0 -5.630772 -1.2274707
|
||||
60 0.50832261 -6.3913892 0 -5.6304302 -1.374293
|
||||
70 0.50988271 -6.3936997 0 -5.6304053 -1.4112286
|
||||
80 0.53931444 -6.4367444 0 -5.6293906 -1.6484686
|
||||
90 0.55277272 -6.4563334 0 -5.6288326 -1.760598
|
||||
100 0.54916776 -6.4507537 0 -5.6286495 -1.728837
|
||||
Loop time of 0.0237499 on 4 procs for 100 steps with 500 atoms
|
||||
|
||||
Performance: 1818955.951 tau/day, 4210.546 timesteps/s
|
||||
97.1% 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.0098808 | 0.011585 | 0.015043 | 1.9 | 48.78
|
||||
Neigh | 0.0015168 | 0.0017335 | 0.001997 | 0.4 | 7.30
|
||||
Comm | 0.005949 | 0.0097297 | 0.011739 | 2.3 | 40.97
|
||||
Output | 0.00019789 | 0.0002324 | 0.00032282 | 0.0 | 0.98
|
||||
Modify | 0.00021482 | 0.00025994 | 0.00031853 | 0.0 | 1.09
|
||||
Other | | 0.0002095 | | | 0.88
|
||||
|
||||
Nlocal: 125 ave 133 max 117 min
|
||||
Histogram: 1 0 0 1 0 0 1 0 0 1
|
||||
Nghost: 1099 ave 1107 max 1091 min
|
||||
Histogram: 1 0 0 1 0 0 1 0 0 1
|
||||
Neighs: 4909 ave 5493 max 4644 min
|
||||
Histogram: 1 2 0 0 0 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 19636
|
||||
Ave neighs/atom = 39.272
|
||||
Neighbor list builds = 5
|
||||
Dangerous builds not checked
|
||||
Total wall time: 0:00:00
|
|
@ -0,0 +1,197 @@
|
|||
LAMMPS (19 Sep 2019)
|
||||
# Ar in metal units
|
||||
|
||||
# simulation params in reduced units
|
||||
# settable from command line
|
||||
# epsilon, sigma, mass set below
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable rhostar index 0.8842
|
||||
variable dt index 0.005
|
||||
variable cutoff index 2.5
|
||||
variable skin index 0.3
|
||||
variable tinitial index 1.0
|
||||
variable nthermo index 10
|
||||
variable nsteps index 100
|
||||
|
||||
# physical constants from update.cpp
|
||||
|
||||
variable kb index 8.617343e-5 # kB in eV/K
|
||||
variable avogadro index 6.02214129e23 # Avogadro's number
|
||||
|
||||
# Ar properties in metal units
|
||||
|
||||
variable epskb index 117.7 # LJ epsilon/kB in degrees K
|
||||
variable sigma index 3.504 # LJ sigma in Angstroms
|
||||
variable epsilon equal ${epskb}*${kb} # LJ epsilon in eV
|
||||
variable epsilon equal 117.7*${kb}
|
||||
variable epsilon equal 117.7*8.617343e-5
|
||||
variable mass index 39.95 # mass in g/mole
|
||||
|
||||
# scale factors
|
||||
|
||||
# sigma = scale factor on distance, converts reduced distance to Angs
|
||||
# epsilon = scale factor on energy, converts reduced energy to eV
|
||||
# tmpscale = scale factor on temperature, converts reduced temp to degrees K
|
||||
# tscale = scale factor on time, converts reduced time to ps
|
||||
# formula is t = t* / sqrt(epsilon/mass/sigma^2), but need t in fs
|
||||
# use epsilon (Joule), mass (kg/atom), sigma (meter) to get t in seconds
|
||||
# pscale = scale factor on pressure, converts reduced pressure to bars
|
||||
# formula is P = P* / (sigma^3/epsilon), but need P in atmospheres
|
||||
# use sigma (meter), epsilon (Joule) to get P in nt/meter^2, convert to bars
|
||||
|
||||
variable eVtoJoule index 1.602e-19 # convert eV to Joules
|
||||
variable NtMtoAtm equal 1.0e-5 # convert Nt/meter^2 to bars
|
||||
|
||||
variable tmpscale equal ${epskb}
|
||||
variable tmpscale equal 117.7
|
||||
variable epsilonJ equal ${epsilon}*${eVtoJoule}
|
||||
variable epsilonJ equal 0.010142612711*${eVtoJoule}
|
||||
variable epsilonJ equal 0.010142612711*1.602e-19
|
||||
variable massKgAtom equal ${mass}/1000.0/${avogadro}
|
||||
variable massKgAtom equal 39.95/1000.0/${avogadro}
|
||||
variable massKgAtom equal 39.95/1000.0/6.02214129e23
|
||||
variable sigmaM equal ${sigma}/1.0e10
|
||||
variable sigmaM equal 3.504/1.0e10
|
||||
variable sigmaMsq equal ${sigmaM}*${sigmaM}
|
||||
variable sigmaMsq equal 3.504e-10*${sigmaM}
|
||||
variable sigmaMsq equal 3.504e-10*3.504e-10
|
||||
variable tscale equal 1.0e12/sqrt(${epsilonJ}/${massKgAtom}/${sigmaMsq})
|
||||
variable tscale equal 1.0e12/sqrt(1.6248465563022e-21/${massKgAtom}/${sigmaMsq})
|
||||
variable tscale equal 1.0e12/sqrt(1.6248465563022e-21/6.6338529895236e-26/${sigmaMsq})
|
||||
variable tscale equal 1.0e12/sqrt(1.6248465563022e-21/6.6338529895236e-26/1.2278016e-19)
|
||||
variable sigmaM3 equal ${sigmaM}*${sigmaM}*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*${sigmaM}*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*3.504e-10*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*3.504e-10*3.504e-10
|
||||
variable pscale equal ${NtMtoAtm}/(${sigmaM3}/(${epsilonJ}))
|
||||
variable pscale equal 1e-05/(${sigmaM3}/(${epsilonJ}))
|
||||
variable pscale equal 1e-05/(4.3022168064e-29/(${epsilonJ}))
|
||||
variable pscale equal 1e-05/(4.3022168064e-29/(1.6248465563022e-21))
|
||||
|
||||
# variables
|
||||
# alat = lattice constant in Angs (at reduced density rhostar)
|
||||
# temp = reduced temperature for output
|
||||
# epair,emol,etotal = reduced epair,emol,etotal energies for output
|
||||
# press = reduced pressure for output
|
||||
|
||||
variable alat equal (4.0*${sigma}*${sigma}*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*${sigma}*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*3.504/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*3.504/0.8842)^(1.0/3.0)
|
||||
variable temp equal temp/${tmpscale}
|
||||
variable temp equal temp/117.7
|
||||
variable epair equal epair/${epsilon}
|
||||
variable epair equal epair/0.010142612711
|
||||
variable emol equal emol/${epsilon}
|
||||
variable emol equal emol/0.010142612711
|
||||
variable etotal equal etotal/${epsilon}
|
||||
variable etotal equal etotal/0.010142612711
|
||||
variable press equal press/${pscale}
|
||||
variable press equal press/377.676586146256
|
||||
|
||||
# same script as in.ar.lj
|
||||
|
||||
units metal
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc ${alat}
|
||||
lattice fcc 5.79518437579763
|
||||
Lattice spacing in x,y,z = 5.79518 5.79518 5.79518
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
region box block 0 5 0 $y 0 $z
|
||||
region box block 0 5 0 5 0 $z
|
||||
region box block 0 5 0 5 0 5
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (28.9759 28.9759 28.9759)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 500 atoms
|
||||
create_atoms CPU = 0.000549078 secs
|
||||
mass 1 ${mass}
|
||||
mass 1 39.95
|
||||
|
||||
velocity all create $(v_tinitial*v_epskb) 12345
|
||||
velocity all create 117.70000000000000284 12345
|
||||
|
||||
pair_style lj/cut $(v_cutoff*v_sigma)
|
||||
pair_style lj/cut 8.7599999999999997868
|
||||
pair_coeff 1 1 ${epsilon} ${sigma}
|
||||
pair_coeff 1 1 0.010142612711 ${sigma}
|
||||
pair_coeff 1 1 0.010142612711 3.504
|
||||
|
||||
neighbor $(v_skin*v_sigma) bin
|
||||
neighbor 1.0511999999999999122 bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
|
||||
fix 1 all nve
|
||||
|
||||
timestep $(v_dt*v_tscale)
|
||||
timestep 0.011194658410003900315
|
||||
|
||||
# columns 2,3,4 = temp,pe,press in metal units
|
||||
# columns 5-9 = temp,energy.press in reduced units, compare to in.ar.lj
|
||||
# need to include metal unit output to enable use of reduced variables
|
||||
|
||||
thermo_style custom step temp pe press v_temp v_epair v_emol v_etotal v_press
|
||||
thermo_modify norm yes
|
||||
thermo ${nthermo}
|
||||
thermo 10
|
||||
|
||||
run ${nsteps}
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 20 steps, delay 0 steps, check no
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 9.8112
|
||||
ghost atom cutoff = 9.8112
|
||||
binsize = 4.9056, bins = 6 6 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 2.644 | 2.644 | 2.644 Mbytes
|
||||
Step Temp PotEng Press v_temp v_epair v_emol v_etotal v_press
|
||||
0 117.7 -0.07203931 -1934.8523 1 -7.1026383 0 -5.6056383 -5.12304
|
||||
10 87.345225 -0.06820404 -1184.5618 0.74210047 -6.724504 0 -5.6135796 -3.1364449
|
||||
20 42.569809 -0.062561408 -152.82812 0.36168062 -6.1681748 0 -5.6267389 -0.40465341
|
||||
30 55.137637 -0.064219154 -392.49645 0.46845911 -6.3316185 0 -5.6303352 -1.0392396
|
||||
40 55.053014 -0.064210828 -406.99941 0.46774014 -6.3307976 0 -5.6305906 -1.07764
|
||||
50 56.87723 -0.064439241 -434.61958 0.483239 -6.3533177 0 -5.6299089 -1.1507718
|
||||
60 58.344019 -0.064620383 -464.4684 0.4957011 -6.3711772 0 -5.6291126 -1.2298046
|
||||
70 61.30301 -0.065010529 -547.09852 0.5208412 -6.4096433 0 -5.629944 -1.44859
|
||||
80 63.214836 -0.065263563 -602.29599 0.53708442 -6.4345909 0 -5.6305755 -1.5947401
|
||||
90 61.931826 -0.065101194 -576.5342 0.52618374 -6.4185823 0 -5.6308852 -1.5265288
|
||||
100 62.221816 -0.065148028 -593.59878 0.52864755 -6.4231998 0 -5.6318144 -1.5717119
|
||||
Loop time of 0.04864 on 1 procs for 100 steps with 500 atoms
|
||||
|
||||
Performance: 1988.524 ns/day, 0.012 hours/ns, 2055.921 timesteps/s
|
||||
99.8% 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.039802 | 0.039802 | 0.039802 | 0.0 | 81.83
|
||||
Neigh | 0.0057771 | 0.0057771 | 0.0057771 | 0.0 | 11.88
|
||||
Comm | 0.0015905 | 0.0015905 | 0.0015905 | 0.0 | 3.27
|
||||
Output | 0.00033736 | 0.00033736 | 0.00033736 | 0.0 | 0.69
|
||||
Modify | 0.00077343 | 0.00077343 | 0.00077343 | 0.0 | 1.59
|
||||
Other | | 0.0003595 | | | 0.74
|
||||
|
||||
Nlocal: 500 ave 500 max 500 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 1946 ave 1946 max 1946 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 19572 ave 19572 max 19572 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 19572
|
||||
Ave neighs/atom = 39.144
|
||||
Neighbor list builds = 5
|
||||
Dangerous builds not checked
|
||||
Total wall time: 0:00:00
|
|
@ -0,0 +1,197 @@
|
|||
LAMMPS (19 Sep 2019)
|
||||
# Ar in metal units
|
||||
|
||||
# simulation params in reduced units
|
||||
# settable from command line
|
||||
# epsilon, sigma, mass set below
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable rhostar index 0.8842
|
||||
variable dt index 0.005
|
||||
variable cutoff index 2.5
|
||||
variable skin index 0.3
|
||||
variable tinitial index 1.0
|
||||
variable nthermo index 10
|
||||
variable nsteps index 100
|
||||
|
||||
# physical constants from update.cpp
|
||||
|
||||
variable kb index 8.617343e-5 # kB in eV/K
|
||||
variable avogadro index 6.02214129e23 # Avogadro's number
|
||||
|
||||
# Ar properties in metal units
|
||||
|
||||
variable epskb index 117.7 # LJ epsilon/kB in degrees K
|
||||
variable sigma index 3.504 # LJ sigma in Angstroms
|
||||
variable epsilon equal ${epskb}*${kb} # LJ epsilon in eV
|
||||
variable epsilon equal 117.7*${kb}
|
||||
variable epsilon equal 117.7*8.617343e-5
|
||||
variable mass index 39.95 # mass in g/mole
|
||||
|
||||
# scale factors
|
||||
|
||||
# sigma = scale factor on distance, converts reduced distance to Angs
|
||||
# epsilon = scale factor on energy, converts reduced energy to eV
|
||||
# tmpscale = scale factor on temperature, converts reduced temp to degrees K
|
||||
# tscale = scale factor on time, converts reduced time to ps
|
||||
# formula is t = t* / sqrt(epsilon/mass/sigma^2), but need t in fs
|
||||
# use epsilon (Joule), mass (kg/atom), sigma (meter) to get t in seconds
|
||||
# pscale = scale factor on pressure, converts reduced pressure to bars
|
||||
# formula is P = P* / (sigma^3/epsilon), but need P in atmospheres
|
||||
# use sigma (meter), epsilon (Joule) to get P in nt/meter^2, convert to bars
|
||||
|
||||
variable eVtoJoule index 1.602e-19 # convert eV to Joules
|
||||
variable NtMtoAtm equal 1.0e-5 # convert Nt/meter^2 to bars
|
||||
|
||||
variable tmpscale equal ${epskb}
|
||||
variable tmpscale equal 117.7
|
||||
variable epsilonJ equal ${epsilon}*${eVtoJoule}
|
||||
variable epsilonJ equal 0.010142612711*${eVtoJoule}
|
||||
variable epsilonJ equal 0.010142612711*1.602e-19
|
||||
variable massKgAtom equal ${mass}/1000.0/${avogadro}
|
||||
variable massKgAtom equal 39.95/1000.0/${avogadro}
|
||||
variable massKgAtom equal 39.95/1000.0/6.02214129e23
|
||||
variable sigmaM equal ${sigma}/1.0e10
|
||||
variable sigmaM equal 3.504/1.0e10
|
||||
variable sigmaMsq equal ${sigmaM}*${sigmaM}
|
||||
variable sigmaMsq equal 3.504e-10*${sigmaM}
|
||||
variable sigmaMsq equal 3.504e-10*3.504e-10
|
||||
variable tscale equal 1.0e12/sqrt(${epsilonJ}/${massKgAtom}/${sigmaMsq})
|
||||
variable tscale equal 1.0e12/sqrt(1.6248465563022e-21/${massKgAtom}/${sigmaMsq})
|
||||
variable tscale equal 1.0e12/sqrt(1.6248465563022e-21/6.6338529895236e-26/${sigmaMsq})
|
||||
variable tscale equal 1.0e12/sqrt(1.6248465563022e-21/6.6338529895236e-26/1.2278016e-19)
|
||||
variable sigmaM3 equal ${sigmaM}*${sigmaM}*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*${sigmaM}*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*3.504e-10*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*3.504e-10*3.504e-10
|
||||
variable pscale equal ${NtMtoAtm}/(${sigmaM3}/(${epsilonJ}))
|
||||
variable pscale equal 1e-05/(${sigmaM3}/(${epsilonJ}))
|
||||
variable pscale equal 1e-05/(4.3022168064e-29/(${epsilonJ}))
|
||||
variable pscale equal 1e-05/(4.3022168064e-29/(1.6248465563022e-21))
|
||||
|
||||
# variables
|
||||
# alat = lattice constant in Angs (at reduced density rhostar)
|
||||
# temp = reduced temperature for output
|
||||
# epair,emol,etotal = reduced epair,emol,etotal energies for output
|
||||
# press = reduced pressure for output
|
||||
|
||||
variable alat equal (4.0*${sigma}*${sigma}*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*${sigma}*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*3.504/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*3.504/0.8842)^(1.0/3.0)
|
||||
variable temp equal temp/${tmpscale}
|
||||
variable temp equal temp/117.7
|
||||
variable epair equal epair/${epsilon}
|
||||
variable epair equal epair/0.010142612711
|
||||
variable emol equal emol/${epsilon}
|
||||
variable emol equal emol/0.010142612711
|
||||
variable etotal equal etotal/${epsilon}
|
||||
variable etotal equal etotal/0.010142612711
|
||||
variable press equal press/${pscale}
|
||||
variable press equal press/377.676586146256
|
||||
|
||||
# same script as in.ar.lj
|
||||
|
||||
units metal
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc ${alat}
|
||||
lattice fcc 5.79518437579763
|
||||
Lattice spacing in x,y,z = 5.79518 5.79518 5.79518
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
region box block 0 5 0 $y 0 $z
|
||||
region box block 0 5 0 5 0 $z
|
||||
region box block 0 5 0 5 0 5
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (28.9759 28.9759 28.9759)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 500 atoms
|
||||
create_atoms CPU = 0.000674009 secs
|
||||
mass 1 ${mass}
|
||||
mass 1 39.95
|
||||
|
||||
velocity all create $(v_tinitial*v_epskb) 12345
|
||||
velocity all create 117.70000000000000284 12345
|
||||
|
||||
pair_style lj/cut $(v_cutoff*v_sigma)
|
||||
pair_style lj/cut 8.7599999999999997868
|
||||
pair_coeff 1 1 ${epsilon} ${sigma}
|
||||
pair_coeff 1 1 0.010142612711 ${sigma}
|
||||
pair_coeff 1 1 0.010142612711 3.504
|
||||
|
||||
neighbor $(v_skin*v_sigma) bin
|
||||
neighbor 1.0511999999999999122 bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
|
||||
fix 1 all nve
|
||||
|
||||
timestep $(v_dt*v_tscale)
|
||||
timestep 0.011194658410003900315
|
||||
|
||||
# columns 2,3,4 = temp,pe,press in metal units
|
||||
# columns 5-9 = temp,energy.press in reduced units, compare to in.ar.lj
|
||||
# need to include metal unit output to enable use of reduced variables
|
||||
|
||||
thermo_style custom step temp pe press v_temp v_epair v_emol v_etotal v_press
|
||||
thermo_modify norm yes
|
||||
thermo ${nthermo}
|
||||
thermo 10
|
||||
|
||||
run ${nsteps}
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 20 steps, delay 0 steps, check no
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 9.8112
|
||||
ghost atom cutoff = 9.8112
|
||||
binsize = 4.9056, bins = 6 6 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 2.609 | 2.609 | 2.609 Mbytes
|
||||
Step Temp PotEng Press v_temp v_epair v_emol v_etotal v_press
|
||||
0 117.7 -0.07203931 -1934.8523 1 -7.1026383 0 -5.6056383 -5.12304
|
||||
10 86.648851 -0.06811179 -1166.7855 0.73618395 -6.7154088 0 -5.6133414 -3.0893774
|
||||
20 42.107954 -0.062497536 -143.06615 0.35775662 -6.1618774 0 -5.6263157 -0.37880598
|
||||
30 55.484504 -0.064263032 -416.20245 0.47140615 -6.3359445 0 -5.6302495 -1.1020075
|
||||
40 54.538222 -0.064148334 -414.88071 0.46336637 -6.3246361 0 -5.6309766 -1.0985079
|
||||
50 57.367693 -0.064511259 -463.67683 0.48740606 -6.3604182 0 -5.6307714 -1.2277087
|
||||
60 59.828794 -0.064824938 -519.05997 0.50831601 -6.3913451 0 -5.630396 -1.3743504
|
||||
70 60.014616 -0.064848979 -533.07604 0.50989478 -6.3937154 0 -5.6304029 -1.4114617
|
||||
80 63.47861 -0.065285885 -622.71073 0.53932549 -6.4367917 0 -5.6294215 -1.6487936
|
||||
90 65.060881 -0.065484011 -664.99883 0.55276874 -6.4563257 0 -5.6288309 -1.7607627
|
||||
100 64.637033 -0.065427467 -653.00765 0.54916765 -6.4507508 0 -5.6286468 -1.7290128
|
||||
Loop time of 0.0258265 on 4 procs for 100 steps with 500 atoms
|
||||
|
||||
Performance: 3745.060 ns/day, 0.006 hours/ns, 3871.990 timesteps/s
|
||||
99.6% 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.0090213 | 0.012419 | 0.015494 | 2.1 | 48.09
|
||||
Neigh | 0.0013709 | 0.0018765 | 0.0022483 | 0.7 | 7.27
|
||||
Comm | 0.0071132 | 0.010597 | 0.014538 | 2.6 | 41.03
|
||||
Output | 0.00039983 | 0.00042897 | 0.00049567 | 0.0 | 1.66
|
||||
Modify | 0.00024104 | 0.00028801 | 0.00031543 | 0.0 | 1.12
|
||||
Other | | 0.0002173 | | | 0.84
|
||||
|
||||
Nlocal: 125 ave 133 max 117 min
|
||||
Histogram: 1 0 0 1 0 0 1 0 0 1
|
||||
Nghost: 1099 ave 1107 max 1091 min
|
||||
Histogram: 1 0 0 1 0 0 1 0 0 1
|
||||
Neighs: 4908.75 ave 5492 max 4644 min
|
||||
Histogram: 1 2 0 0 0 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 19635
|
||||
Ave neighs/atom = 39.27
|
||||
Neighbor list builds = 5
|
||||
Dangerous builds not checked
|
||||
Total wall time: 0:00:00
|
|
@ -0,0 +1,197 @@
|
|||
LAMMPS (19 Sep 2019)
|
||||
# Ar in real units
|
||||
|
||||
# simulation params in reduced units
|
||||
# settable from command line
|
||||
# epsilon, sigma, mass set below
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable rhostar index 0.8842
|
||||
variable dt index 0.005
|
||||
variable cutoff index 2.5
|
||||
variable skin index 0.3
|
||||
variable tinitial index 1.0
|
||||
variable nthermo index 10
|
||||
variable nsteps index 100
|
||||
|
||||
# physical constants from update.cpp
|
||||
|
||||
variable kb index 0.0019872067 # kB in Kcal/mole/K
|
||||
variable avogadro index 6.02214129e23 # Avogadro's number
|
||||
|
||||
# Ar properties in real units
|
||||
|
||||
variable epskb index 117.7 # LJ epsilon/kB in degrees K
|
||||
variable sigma index 3.504 # LJ sigma in Angstroms
|
||||
variable epsilon equal ${epskb}*${kb} # LJ epsilon in Kcal/mole
|
||||
variable epsilon equal 117.7*${kb}
|
||||
variable epsilon equal 117.7*0.0019872067
|
||||
variable mass index 39.95 # mass in g/mole
|
||||
|
||||
# scale factors
|
||||
|
||||
# sigma = scale factor on distance, converts reduced distance to Angs
|
||||
# epsilon = scale factor on energy, converts reduced energy to Kcal/mole
|
||||
# tmpscale = scale factor on temperature, converts reduced temp to degrees K
|
||||
# tscale = scale factor on time, converts reduced time to fs
|
||||
# formula is t = t* / sqrt(epsilon/mass/sigma^2), but need t in fs
|
||||
# use epsilon (Joule/mole), mass (kg/mole), sigma (meter) to get t in seconds
|
||||
# pscale = scale factor on pressure, converts reduced pressure to atmospheres
|
||||
# formula is P = P* / (sigma^3/epsilon), but need P in atmospheres
|
||||
# use sigma (meter), epsilon (Joule) to get P in nt/meter^2, convert to atms
|
||||
|
||||
variable KcaltoJoule index 4.1868e3 # convert Kcals to Joules
|
||||
variable NtMtoAtm equal 1.0/1.0135e5 # convert Nt/meter^2 to Atmospheres
|
||||
|
||||
variable tmpscale equal ${epskb}
|
||||
variable tmpscale equal 117.7
|
||||
variable epsJmole equal ${epsilon}*${KcaltoJoule}
|
||||
variable epsJmole equal 0.23389422859*${KcaltoJoule}
|
||||
variable epsJmole equal 0.23389422859*4.1868e3
|
||||
variable massKgmole equal ${mass}/1000.0
|
||||
variable massKgmole equal 39.95/1000.0
|
||||
variable sigmaM equal ${sigma}/1.0e10
|
||||
variable sigmaM equal 3.504/1.0e10
|
||||
variable sigmaMsq equal ${sigmaM}*${sigmaM}
|
||||
variable sigmaMsq equal 3.504e-10*${sigmaM}
|
||||
variable sigmaMsq equal 3.504e-10*3.504e-10
|
||||
variable tscale equal 1.0e15/sqrt(${epsJmole}/${massKgmole}/${sigmaMsq})
|
||||
variable tscale equal 1.0e15/sqrt(979.268356260612/${massKgmole}/${sigmaMsq})
|
||||
variable tscale equal 1.0e15/sqrt(979.268356260612/0.03995/${sigmaMsq})
|
||||
variable tscale equal 1.0e15/sqrt(979.268356260612/0.03995/1.2278016e-19)
|
||||
variable sigmaM3 equal ${sigmaM}*${sigmaM}*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*${sigmaM}*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*3.504e-10*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*3.504e-10*3.504e-10
|
||||
variable pscale equal ${NtMtoAtm}/(${sigmaM3}/(${epsJmole}/${avogadro}))
|
||||
variable pscale equal 9.86679822397632e-06/(${sigmaM3}/(${epsJmole}/${avogadro}))
|
||||
variable pscale equal 9.86679822397632e-06/(4.3022168064e-29/(${epsJmole}/${avogadro}))
|
||||
variable pscale equal 9.86679822397632e-06/(4.3022168064e-29/(979.268356260612/${avogadro}))
|
||||
variable pscale equal 9.86679822397632e-06/(4.3022168064e-29/(979.268356260612/6.02214129e23))
|
||||
|
||||
# variables
|
||||
# alat = lattice constant in Angs (at reduced density rhostar)
|
||||
# temp = reduced temperature for output
|
||||
# epair,emol,etotal = reduced epair,emol,etotal energies for output
|
||||
# press = reduced pressure for output
|
||||
|
||||
variable alat equal (4.0*${sigma}*${sigma}*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*${sigma}*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*3.504/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*3.504/0.8842)^(1.0/3.0)
|
||||
variable temp equal temp/${tmpscale}
|
||||
variable temp equal temp/117.7
|
||||
variable epair equal epair/${epsilon}
|
||||
variable epair equal epair/0.23389422859
|
||||
variable emol equal emol/${epsilon}
|
||||
variable emol equal emol/0.23389422859
|
||||
variable etotal equal etotal/${epsilon}
|
||||
variable etotal equal etotal/0.23389422859
|
||||
variable press equal press/${pscale}
|
||||
variable press equal press/372.936366301003
|
||||
|
||||
# same script as in.ar.lj
|
||||
|
||||
units real
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc ${alat}
|
||||
lattice fcc 5.79518437579763
|
||||
Lattice spacing in x,y,z = 5.79518 5.79518 5.79518
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
region box block 0 5 0 $y 0 $z
|
||||
region box block 0 5 0 5 0 $z
|
||||
region box block 0 5 0 5 0 5
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (28.9759 28.9759 28.9759)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 500 atoms
|
||||
create_atoms CPU = 0.000550985 secs
|
||||
mass 1 ${mass}
|
||||
mass 1 39.95
|
||||
|
||||
velocity all create $(v_tinitial*v_epskb) 12345
|
||||
velocity all create 117.70000000000000284 12345
|
||||
|
||||
pair_style lj/cut $(v_cutoff*v_sigma)
|
||||
pair_style lj/cut 8.7599999999999997868
|
||||
pair_coeff 1 1 ${epsilon} ${sigma}
|
||||
pair_coeff 1 1 0.23389422859 ${sigma}
|
||||
pair_coeff 1 1 0.23389422859 3.504
|
||||
|
||||
neighbor $(v_skin*v_sigma) bin
|
||||
neighbor 1.0511999999999999122 bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
|
||||
fix 1 all nve
|
||||
|
||||
timestep $(v_dt*v_tscale)
|
||||
timestep 11.190297512378050371
|
||||
|
||||
# columns 2,3,4 = temp,pe,press in real units
|
||||
# columns 5-9 = temp,energy.press in reduced units, compare to in.ar.lj
|
||||
# need to include real unit output to enable use of reduced variables
|
||||
|
||||
thermo_style custom step temp pe press v_temp v_epair v_emol v_etotal v_press
|
||||
thermo_modify norm yes
|
||||
thermo ${nthermo}
|
||||
thermo 10
|
||||
|
||||
run ${nsteps}
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 20 steps, delay 0 steps, check no
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 9.8112
|
||||
ghost atom cutoff = 9.8112
|
||||
binsize = 4.9056, bins = 6 6 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 2.644 | 2.644 | 2.644 Mbytes
|
||||
Step Temp PotEng Press v_temp v_epair v_emol v_etotal v_press
|
||||
0 117.7 -1.6612661 -1909.5509 1 -7.1026383 0 -5.6056383 -5.1203128
|
||||
10 87.369977 -1.5728967 -1169.6414 0.74231077 -6.7248204 0 -5.6135812 -3.1363029
|
||||
20 42.567295 -1.4427006 -150.87379 0.36165926 -6.1681752 0 -5.6267713 -0.40455638
|
||||
30 55.130978 -1.480902 -387.17817 0.46840253 -6.3315028 0 -5.6303042 -1.0381883
|
||||
40 55.054202 -1.4807485 -401.72653 0.46775023 -6.3308469 0 -5.6306248 -1.0771986
|
||||
50 56.873955 -1.4860029 -428.9126 0.48321117 -6.3533113 0 -5.6299442 -1.1500959
|
||||
60 58.33701 -1.490161 -458.23636 0.49564154 -6.3710892 0 -5.6291138 -1.2287253
|
||||
70 61.29671 -1.4991528 -539.72484 0.52078768 -6.4095331 0 -5.629914 -1.4472304
|
||||
80 63.214984 -1.504992 -594.34987 0.53708567 -6.4344983 0 -5.630481 -1.5937032
|
||||
90 61.936907 -1.5013008 -569.13985 0.5262269 -6.4187169 0 -5.6309552 -1.5261045
|
||||
100 62.20662 -1.5023046 -585.49121 0.52851844 -6.4230083 0 -5.6318162 -1.5699494
|
||||
Loop time of 0.047307 on 1 procs for 100 steps with 500 atoms
|
||||
|
||||
Performance: 2043.760 ns/day, 0.012 hours/ns, 2113.851 timesteps/s
|
||||
98.0% 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.038646 | 0.038646 | 0.038646 | 0.0 | 81.69
|
||||
Neigh | 0.0056832 | 0.0056832 | 0.0056832 | 0.0 | 12.01
|
||||
Comm | 0.0015347 | 0.0015347 | 0.0015347 | 0.0 | 3.24
|
||||
Output | 0.0003581 | 0.0003581 | 0.0003581 | 0.0 | 0.76
|
||||
Modify | 0.00075364 | 0.00075364 | 0.00075364 | 0.0 | 1.59
|
||||
Other | | 0.0003314 | | | 0.70
|
||||
|
||||
Nlocal: 500 ave 500 max 500 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 1946 ave 1946 max 1946 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 19572 ave 19572 max 19572 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 19572
|
||||
Ave neighs/atom = 39.144
|
||||
Neighbor list builds = 5
|
||||
Dangerous builds not checked
|
||||
Total wall time: 0:00:00
|
|
@ -0,0 +1,197 @@
|
|||
LAMMPS (19 Sep 2019)
|
||||
# Ar in real units
|
||||
|
||||
# simulation params in reduced units
|
||||
# settable from command line
|
||||
# epsilon, sigma, mass set below
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable rhostar index 0.8842
|
||||
variable dt index 0.005
|
||||
variable cutoff index 2.5
|
||||
variable skin index 0.3
|
||||
variable tinitial index 1.0
|
||||
variable nthermo index 10
|
||||
variable nsteps index 100
|
||||
|
||||
# physical constants from update.cpp
|
||||
|
||||
variable kb index 0.0019872067 # kB in Kcal/mole/K
|
||||
variable avogadro index 6.02214129e23 # Avogadro's number
|
||||
|
||||
# Ar properties in real units
|
||||
|
||||
variable epskb index 117.7 # LJ epsilon/kB in degrees K
|
||||
variable sigma index 3.504 # LJ sigma in Angstroms
|
||||
variable epsilon equal ${epskb}*${kb} # LJ epsilon in Kcal/mole
|
||||
variable epsilon equal 117.7*${kb}
|
||||
variable epsilon equal 117.7*0.0019872067
|
||||
variable mass index 39.95 # mass in g/mole
|
||||
|
||||
# scale factors
|
||||
|
||||
# sigma = scale factor on distance, converts reduced distance to Angs
|
||||
# epsilon = scale factor on energy, converts reduced energy to Kcal/mole
|
||||
# tmpscale = scale factor on temperature, converts reduced temp to degrees K
|
||||
# tscale = scale factor on time, converts reduced time to fs
|
||||
# formula is t = t* / sqrt(epsilon/mass/sigma^2), but need t in fs
|
||||
# use epsilon (Joule/mole), mass (kg/mole), sigma (meter) to get t in seconds
|
||||
# pscale = scale factor on pressure, converts reduced pressure to atmospheres
|
||||
# formula is P = P* / (sigma^3/epsilon), but need P in atmospheres
|
||||
# use sigma (meter), epsilon (Joule) to get P in nt/meter^2, convert to atms
|
||||
|
||||
variable KcaltoJoule index 4.1868e3 # convert Kcals to Joules
|
||||
variable NtMtoAtm equal 1.0/1.0135e5 # convert Nt/meter^2 to Atmospheres
|
||||
|
||||
variable tmpscale equal ${epskb}
|
||||
variable tmpscale equal 117.7
|
||||
variable epsJmole equal ${epsilon}*${KcaltoJoule}
|
||||
variable epsJmole equal 0.23389422859*${KcaltoJoule}
|
||||
variable epsJmole equal 0.23389422859*4.1868e3
|
||||
variable massKgmole equal ${mass}/1000.0
|
||||
variable massKgmole equal 39.95/1000.0
|
||||
variable sigmaM equal ${sigma}/1.0e10
|
||||
variable sigmaM equal 3.504/1.0e10
|
||||
variable sigmaMsq equal ${sigmaM}*${sigmaM}
|
||||
variable sigmaMsq equal 3.504e-10*${sigmaM}
|
||||
variable sigmaMsq equal 3.504e-10*3.504e-10
|
||||
variable tscale equal 1.0e15/sqrt(${epsJmole}/${massKgmole}/${sigmaMsq})
|
||||
variable tscale equal 1.0e15/sqrt(979.268356260612/${massKgmole}/${sigmaMsq})
|
||||
variable tscale equal 1.0e15/sqrt(979.268356260612/0.03995/${sigmaMsq})
|
||||
variable tscale equal 1.0e15/sqrt(979.268356260612/0.03995/1.2278016e-19)
|
||||
variable sigmaM3 equal ${sigmaM}*${sigmaM}*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*${sigmaM}*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*3.504e-10*${sigmaM}
|
||||
variable sigmaM3 equal 3.504e-10*3.504e-10*3.504e-10
|
||||
variable pscale equal ${NtMtoAtm}/(${sigmaM3}/(${epsJmole}/${avogadro}))
|
||||
variable pscale equal 9.86679822397632e-06/(${sigmaM3}/(${epsJmole}/${avogadro}))
|
||||
variable pscale equal 9.86679822397632e-06/(4.3022168064e-29/(${epsJmole}/${avogadro}))
|
||||
variable pscale equal 9.86679822397632e-06/(4.3022168064e-29/(979.268356260612/${avogadro}))
|
||||
variable pscale equal 9.86679822397632e-06/(4.3022168064e-29/(979.268356260612/6.02214129e23))
|
||||
|
||||
# variables
|
||||
# alat = lattice constant in Angs (at reduced density rhostar)
|
||||
# temp = reduced temperature for output
|
||||
# epair,emol,etotal = reduced epair,emol,etotal energies for output
|
||||
# press = reduced pressure for output
|
||||
|
||||
variable alat equal (4.0*${sigma}*${sigma}*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*${sigma}*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*${sigma}/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*3.504/${rhostar})^(1.0/3.0)
|
||||
variable alat equal (4.0*3.504*3.504*3.504/0.8842)^(1.0/3.0)
|
||||
variable temp equal temp/${tmpscale}
|
||||
variable temp equal temp/117.7
|
||||
variable epair equal epair/${epsilon}
|
||||
variable epair equal epair/0.23389422859
|
||||
variable emol equal emol/${epsilon}
|
||||
variable emol equal emol/0.23389422859
|
||||
variable etotal equal etotal/${epsilon}
|
||||
variable etotal equal etotal/0.23389422859
|
||||
variable press equal press/${pscale}
|
||||
variable press equal press/372.936366301003
|
||||
|
||||
# same script as in.ar.lj
|
||||
|
||||
units real
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc ${alat}
|
||||
lattice fcc 5.79518437579763
|
||||
Lattice spacing in x,y,z = 5.79518 5.79518 5.79518
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
region box block 0 5 0 $y 0 $z
|
||||
region box block 0 5 0 5 0 $z
|
||||
region box block 0 5 0 5 0 5
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (28.9759 28.9759 28.9759)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 500 atoms
|
||||
create_atoms CPU = 0.000664949 secs
|
||||
mass 1 ${mass}
|
||||
mass 1 39.95
|
||||
|
||||
velocity all create $(v_tinitial*v_epskb) 12345
|
||||
velocity all create 117.70000000000000284 12345
|
||||
|
||||
pair_style lj/cut $(v_cutoff*v_sigma)
|
||||
pair_style lj/cut 8.7599999999999997868
|
||||
pair_coeff 1 1 ${epsilon} ${sigma}
|
||||
pair_coeff 1 1 0.23389422859 ${sigma}
|
||||
pair_coeff 1 1 0.23389422859 3.504
|
||||
|
||||
neighbor $(v_skin*v_sigma) bin
|
||||
neighbor 1.0511999999999999122 bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
|
||||
fix 1 all nve
|
||||
|
||||
timestep $(v_dt*v_tscale)
|
||||
timestep 11.190297512378050371
|
||||
|
||||
# columns 2,3,4 = temp,pe,press in real units
|
||||
# columns 5-9 = temp,energy.press in reduced units, compare to in.ar.lj
|
||||
# need to include real unit output to enable use of reduced variables
|
||||
|
||||
thermo_style custom step temp pe press v_temp v_epair v_emol v_etotal v_press
|
||||
thermo_modify norm yes
|
||||
thermo ${nthermo}
|
||||
thermo 10
|
||||
|
||||
run ${nsteps}
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 20 steps, delay 0 steps, check no
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 9.8112
|
||||
ghost atom cutoff = 9.8112
|
||||
binsize = 4.9056, bins = 6 6 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 2.609 | 2.609 | 2.609 Mbytes
|
||||
Step Temp PotEng Press v_temp v_epair v_emol v_etotal v_press
|
||||
0 117.7 -1.6612661 -1909.5509 1 -7.1026383 0 -5.6056383 -5.1203128
|
||||
10 86.674156 -1.5707707 -1152.1077 0.73639895 -6.715731 0 -5.6133417 -3.0892877
|
||||
20 42.104452 -1.4412091 -141.16344 0.35772687 -6.1617986 0 -5.6262815 -0.37851883
|
||||
30 55.478223 -1.4819221 -410.58592 0.47135278 -6.3358644 0 -5.6302493 -1.1009544
|
||||
40 54.54231 -1.4793231 -409.58446 0.4634011 -6.3247524 0 -5.631041 -1.098269
|
||||
50 57.354168 -1.4876242 -457.34719 0.48729115 -6.3602431 0 -5.6307682 -1.2263411
|
||||
60 59.835295 -1.4949249 -512.38519 0.50837124 -6.391457 0 -5.6304252 -1.3739212
|
||||
70 60.005554 -1.4954174 -525.858 0.50981779 -6.3935625 0 -5.6303653 -1.4100475
|
||||
80 63.469566 -1.505493 -614.29111 0.53924865 -6.4366403 0 -5.6293851 -1.6471741
|
||||
90 65.064012 -1.5100983 -656.32951 0.55279535 -6.4563301 0 -5.6287955 -1.7598968
|
||||
100 64.63774 -1.5088033 -644.51211 0.54917366 -6.4507932 0 -5.6286803 -1.7282093
|
||||
Loop time of 0.0285767 on 4 procs for 100 steps with 500 atoms
|
||||
|
||||
Performance: 3383.318 ns/day, 0.007 hours/ns, 3499.350 timesteps/s
|
||||
99.7% 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.012398 | 0.014826 | 0.016774 | 1.6 | 51.88
|
||||
Neigh | 0.001797 | 0.0021547 | 0.0025899 | 0.6 | 7.54
|
||||
Comm | 0.0079622 | 0.010444 | 0.013427 | 2.3 | 36.55
|
||||
Output | 0.00042987 | 0.00047708 | 0.00059676 | 0.0 | 1.67
|
||||
Modify | 0.00028896 | 0.00038844 | 0.00049448 | 0.0 | 1.36
|
||||
Other | | 0.0002864 | | | 1.00
|
||||
|
||||
Nlocal: 125 ave 133 max 117 min
|
||||
Histogram: 1 0 0 1 0 0 1 0 0 1
|
||||
Nghost: 1099 ave 1107 max 1091 min
|
||||
Histogram: 1 0 0 1 0 0 1 0 0 1
|
||||
Neighs: 4908.75 ave 5493 max 4644 min
|
||||
Histogram: 1 2 0 0 0 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 19635
|
||||
Ave neighs/atom = 39.27
|
||||
Neighbor list builds = 5
|
||||
Dangerous builds not checked
|
||||
Total wall time: 0:00:00
|
|
@ -0,0 +1,12 @@
|
|||
# LAMMPS LATTICE DYNAMICS COMMANDS
|
||||
|
||||
## DYNAMICAL MATRIX CALCULATOR
|
||||
|
||||
This directory contains the ingredients to calculate a dynamical matrix with python.
|
||||
|
||||
Example:
|
||||
```
|
||||
python dynmat.py
|
||||
```
|
||||
|
||||
## Requires: MANYBODY and MOLECULE packages and the Python Library Interface
|
|
@ -0,0 +1,42 @@
|
|||
"""Made by Charlie Sievers Ph.D. Candidate, UC Davis, Donadio Lab 2019"""
|
||||
# from mpi4py import MPI
|
||||
from lammps import lammps
|
||||
import numpy as np
|
||||
|
||||
# comm = MPI.COMM_WORLD
|
||||
# rank = comm.Get_rank()
|
||||
|
||||
""" LAMMPS VARIABLES """
|
||||
|
||||
# data files
|
||||
infile = "silicon_input_file.lmp"
|
||||
ff_file = "ff-silicon.lmp"
|
||||
|
||||
# full output useful for testing
|
||||
lmp = lammps()
|
||||
|
||||
# reduced output useful reducing IO for production runs
|
||||
# lmp = lammps(cmdargs=["-screen", "none", "-log", "none"])
|
||||
|
||||
# lammps commands
|
||||
lmp.command("atom_style full")
|
||||
lmp.command("units metal")
|
||||
lmp.command("processors * * *")
|
||||
lmp.command("neighbor 1 bin")
|
||||
lmp.command("boundary p p p")
|
||||
|
||||
# read data and force field file
|
||||
lmp.command("read_data {}".format(infile))
|
||||
lmp.file("{}".format(ff_file))
|
||||
|
||||
lmp.command("dynamical_matrix all eskm 0.000001 file dynmat.dat")
|
||||
|
||||
dynmat = np.loadtxt("dynmat.dat")
|
||||
dynlen = int(3*np.sqrt(len(dynmat)/3))
|
||||
dynmat = dynmat.reshape((dynlen, dynlen))
|
||||
|
||||
eigvals, eigvecs = np.linalg.eig(dynmat)
|
||||
|
||||
# frequencies in THz
|
||||
omegas = np.sqrt(np.abs(eigvals))
|
||||
print(omegas)
|
|
@ -12,15 +12,15 @@ Coords
|
|||
|
||||
Types
|
||||
|
||||
1 1
|
||||
2 2
|
||||
3 2
|
||||
1 1
|
||||
2 2
|
||||
3 2
|
||||
|
||||
Charges
|
||||
Charges
|
||||
|
||||
1 0.7
|
||||
2 -0.35
|
||||
3 -0.35
|
||||
1 0.7
|
||||
2 -0.35
|
||||
3 -0.35
|
||||
|
||||
Bonds
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# CO2 molecule file. TraPPE model.
|
||||
# Water molecule. SPC/E model.
|
||||
|
||||
3 atoms
|
||||
2 bonds
|
||||
|
@ -12,15 +12,15 @@ Coords
|
|||
|
||||
Types
|
||||
|
||||
1 1
|
||||
2 2
|
||||
3 2
|
||||
1 1
|
||||
2 2
|
||||
3 2
|
||||
|
||||
Charges
|
||||
Charges
|
||||
|
||||
1 -0.8472
|
||||
2 0.4236
|
||||
3 0.4236
|
||||
2 0.4236
|
||||
3 0.4236
|
||||
|
||||
Bonds
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# LAMMPS GJF-2GJ THERMOSTAT EXAMPLE
|
||||
|
||||
## GJF-2GJ THERMOSTAT
|
||||
|
||||
This directory contains the ingredients to run an NVT simulation using the GJF-2GJ thermostat.
|
||||
|
||||
Example:
|
||||
```
|
||||
NP=4 #number of processors
|
||||
mpirun -np $NP lmp_mpi -in.gjf.vhalf
|
||||
```
|
||||
|
||||
## Required LAMMPS packages: MOLECULE package
|
|
@ -0,0 +1,886 @@
|
|||
LAMMPS description
|
||||
|
||||
864 atoms
|
||||
0 bonds
|
||||
0 angles
|
||||
0 dihedrals
|
||||
0 impropers
|
||||
|
||||
1 atom types
|
||||
0 bond types
|
||||
0 angle types
|
||||
0 dihedral types
|
||||
0 improper types
|
||||
|
||||
|
||||
0.0000000 32.146000 xlo xhi
|
||||
0.0000000 32.146000 ylo yhi
|
||||
0.0000000 32.146000 zlo zhi
|
||||
|
||||
Atoms
|
||||
|
||||
1 1 1 0.0000000 0.0000000 2.6790000 2.6790000
|
||||
2 2 1 0.0000000 0.0000000 2.6790000 8.0360000
|
||||
3 3 1 0.0000000 0.0000000 2.6790000 13.3940000
|
||||
4 4 1 0.0000000 0.0000000 2.6790000 18.7520000
|
||||
5 5 1 0.0000000 0.0000000 2.6790000 24.1090000
|
||||
6 6 1 0.0000000 0.0000000 2.6790000 29.4670000
|
||||
7 7 1 0.0000000 0.0000000 8.0360000 2.6790000
|
||||
8 8 1 0.0000000 0.0000000 8.0360000 8.0360000
|
||||
9 9 1 0.0000000 0.0000000 8.0360000 13.3940000
|
||||
10 10 1 0.0000000 0.0000000 8.0360000 18.7520000
|
||||
11 11 1 0.0000000 0.0000000 8.0360000 24.1090000
|
||||
12 12 1 0.0000000 0.0000000 8.0360000 29.4670000
|
||||
13 13 1 0.0000000 0.0000000 13.3940000 2.6790000
|
||||
14 14 1 0.0000000 0.0000000 13.3940000 8.0360000
|
||||
15 15 1 0.0000000 0.0000000 13.3940000 13.3940000
|
||||
16 16 1 0.0000000 0.0000000 13.3940000 18.7520000
|
||||
17 17 1 0.0000000 0.0000000 13.3940000 24.1090000
|
||||
18 18 1 0.0000000 0.0000000 13.3940000 29.4670000
|
||||
19 19 1 0.0000000 0.0000000 18.7520000 2.6790000
|
||||
20 20 1 0.0000000 0.0000000 18.7520000 8.0360000
|
||||
21 21 1 0.0000000 0.0000000 18.7520000 13.3940000
|
||||
22 22 1 0.0000000 0.0000000 18.7520000 18.7520000
|
||||
23 23 1 0.0000000 0.0000000 18.7520000 24.1090000
|
||||
24 24 1 0.0000000 0.0000000 18.7520000 29.4670000
|
||||
25 25 1 0.0000000 0.0000000 24.1090000 2.6790000
|
||||
26 26 1 0.0000000 0.0000000 24.1090000 8.0360000
|
||||
27 27 1 0.0000000 0.0000000 24.1090000 13.3940000
|
||||
28 28 1 0.0000000 0.0000000 24.1090000 18.7520000
|
||||
29 29 1 0.0000000 0.0000000 24.1090000 24.1090000
|
||||
30 30 1 0.0000000 0.0000000 24.1090000 29.4670000
|
||||
31 31 1 0.0000000 0.0000000 29.4670000 2.6790000
|
||||
32 32 1 0.0000000 0.0000000 29.4670000 8.0360000
|
||||
33 33 1 0.0000000 0.0000000 29.4670000 13.3940000
|
||||
34 34 1 0.0000000 0.0000000 29.4670000 18.7520000
|
||||
35 35 1 0.0000000 0.0000000 29.4670000 24.1090000
|
||||
36 36 1 0.0000000 0.0000000 29.4670000 29.4670000
|
||||
37 37 1 0.0000000 5.3580000 2.6790000 2.6790000
|
||||
38 38 1 0.0000000 5.3580000 2.6790000 8.0360000
|
||||
39 39 1 0.0000000 5.3580000 2.6790000 13.3940000
|
||||
40 40 1 0.0000000 5.3580000 2.6790000 18.7520000
|
||||
41 41 1 0.0000000 5.3580000 2.6790000 24.1090000
|
||||
42 42 1 0.0000000 5.3580000 2.6790000 29.4670000
|
||||
43 43 1 0.0000000 5.3580000 8.0360000 2.6790000
|
||||
44 44 1 0.0000000 5.3580000 8.0360000 8.0360000
|
||||
45 45 1 0.0000000 5.3580000 8.0360000 13.3940000
|
||||
46 46 1 0.0000000 5.3580000 8.0360000 18.7520000
|
||||
47 47 1 0.0000000 5.3580000 8.0360000 24.1090000
|
||||
48 48 1 0.0000000 5.3580000 8.0360000 29.4670000
|
||||
49 49 1 0.0000000 5.3580000 13.3940000 2.6790000
|
||||
50 50 1 0.0000000 5.3580000 13.3940000 8.0360000
|
||||
51 51 1 0.0000000 5.3580000 13.3940000 13.3940000
|
||||
52 52 1 0.0000000 5.3580000 13.3940000 18.7520000
|
||||
53 53 1 0.0000000 5.3580000 13.3940000 24.1090000
|
||||
54 54 1 0.0000000 5.3580000 13.3940000 29.4670000
|
||||
55 55 1 0.0000000 5.3580000 18.7520000 2.6790000
|
||||
56 56 1 0.0000000 5.3580000 18.7520000 8.0360000
|
||||
57 57 1 0.0000000 5.3580000 18.7520000 13.3940000
|
||||
58 58 1 0.0000000 5.3580000 18.7520000 18.7520000
|
||||
59 59 1 0.0000000 5.3580000 18.7520000 24.1090000
|
||||
60 60 1 0.0000000 5.3580000 18.7520000 29.4670000
|
||||
61 61 1 0.0000000 5.3580000 24.1090000 2.6790000
|
||||
62 62 1 0.0000000 5.3580000 24.1090000 8.0360000
|
||||
63 63 1 0.0000000 5.3580000 24.1090000 13.3940000
|
||||
64 64 1 0.0000000 5.3580000 24.1090000 18.7520000
|
||||
65 65 1 0.0000000 5.3580000 24.1090000 24.1090000
|
||||
66 66 1 0.0000000 5.3580000 24.1090000 29.4670000
|
||||
67 67 1 0.0000000 5.3580000 29.4670000 2.6790000
|
||||
68 68 1 0.0000000 5.3580000 29.4670000 8.0360000
|
||||
69 69 1 0.0000000 5.3580000 29.4670000 13.3940000
|
||||
70 70 1 0.0000000 5.3580000 29.4670000 18.7520000
|
||||
71 71 1 0.0000000 5.3580000 29.4670000 24.1090000
|
||||
72 72 1 0.0000000 5.3580000 29.4670000 29.4670000
|
||||
73 73 1 0.0000000 10.7150000 2.6790000 2.6790000
|
||||
74 74 1 0.0000000 10.7150000 2.6790000 8.0360000
|
||||
75 75 1 0.0000000 10.7150000 2.6790000 13.3940000
|
||||
76 76 1 0.0000000 10.7150000 2.6790000 18.7520000
|
||||
77 77 1 0.0000000 10.7150000 2.6790000 24.1090000
|
||||
78 78 1 0.0000000 10.7150000 2.6790000 29.4670000
|
||||
79 79 1 0.0000000 10.7150000 8.0360000 2.6790000
|
||||
80 80 1 0.0000000 10.7150000 8.0360000 8.0360000
|
||||
81 81 1 0.0000000 10.7150000 8.0360000 13.3940000
|
||||
82 82 1 0.0000000 10.7150000 8.0360000 18.7520000
|
||||
83 83 1 0.0000000 10.7150000 8.0360000 24.1090000
|
||||
84 84 1 0.0000000 10.7150000 8.0360000 29.4670000
|
||||
85 85 1 0.0000000 10.7150000 13.3940000 2.6790000
|
||||
86 86 1 0.0000000 10.7150000 13.3940000 8.0360000
|
||||
87 87 1 0.0000000 10.7150000 13.3940000 13.3940000
|
||||
88 88 1 0.0000000 10.7150000 13.3940000 18.7520000
|
||||
89 89 1 0.0000000 10.7150000 13.3940000 24.1090000
|
||||
90 90 1 0.0000000 10.7150000 13.3940000 29.4670000
|
||||
91 91 1 0.0000000 10.7150000 18.7520000 2.6790000
|
||||
92 92 1 0.0000000 10.7150000 18.7520000 8.0360000
|
||||
93 93 1 0.0000000 10.7150000 18.7520000 13.3940000
|
||||
94 94 1 0.0000000 10.7150000 18.7520000 18.7520000
|
||||
95 95 1 0.0000000 10.7150000 18.7520000 24.1090000
|
||||
96 96 1 0.0000000 10.7150000 18.7520000 29.4670000
|
||||
97 97 1 0.0000000 10.7150000 24.1090000 2.6790000
|
||||
98 98 1 0.0000000 10.7150000 24.1090000 8.0360000
|
||||
99 99 1 0.0000000 10.7150000 24.1090000 13.3940000
|
||||
100 100 1 0.0000000 10.7150000 24.1090000 18.7520000
|
||||
101 101 1 0.0000000 10.7150000 24.1090000 24.1090000
|
||||
102 102 1 0.0000000 10.7150000 24.1090000 29.4670000
|
||||
103 103 1 0.0000000 10.7150000 29.4670000 2.6790000
|
||||
104 104 1 0.0000000 10.7150000 29.4670000 8.0360000
|
||||
105 105 1 0.0000000 10.7150000 29.4670000 13.3940000
|
||||
106 106 1 0.0000000 10.7150000 29.4670000 18.7520000
|
||||
107 107 1 0.0000000 10.7150000 29.4670000 24.1090000
|
||||
108 108 1 0.0000000 10.7150000 29.4670000 29.4670000
|
||||
109 109 1 0.0000000 16.0730000 2.6790000 2.6790000
|
||||
110 110 1 0.0000000 16.0730000 2.6790000 8.0360000
|
||||
111 111 1 0.0000000 16.0730000 2.6790000 13.3940000
|
||||
112 112 1 0.0000000 16.0730000 2.6790000 18.7520000
|
||||
113 113 1 0.0000000 16.0730000 2.6790000 24.1090000
|
||||
114 114 1 0.0000000 16.0730000 2.6790000 29.4670000
|
||||
115 115 1 0.0000000 16.0730000 8.0360000 2.6790000
|
||||
116 116 1 0.0000000 16.0730000 8.0360000 8.0360000
|
||||
117 117 1 0.0000000 16.0730000 8.0360000 13.3940000
|
||||
118 118 1 0.0000000 16.0730000 8.0360000 18.7520000
|
||||
119 119 1 0.0000000 16.0730000 8.0360000 24.1090000
|
||||
120 120 1 0.0000000 16.0730000 8.0360000 29.4670000
|
||||
121 121 1 0.0000000 16.0730000 13.3940000 2.6790000
|
||||
122 122 1 0.0000000 16.0730000 13.3940000 8.0360000
|
||||
123 123 1 0.0000000 16.0730000 13.3940000 13.3940000
|
||||
124 124 1 0.0000000 16.0730000 13.3940000 18.7520000
|
||||
125 125 1 0.0000000 16.0730000 13.3940000 24.1090000
|
||||
126 126 1 0.0000000 16.0730000 13.3940000 29.4670000
|
||||
127 127 1 0.0000000 16.0730000 18.7520000 2.6790000
|
||||
128 128 1 0.0000000 16.0730000 18.7520000 8.0360000
|
||||
129 129 1 0.0000000 16.0730000 18.7520000 13.3940000
|
||||
130 130 1 0.0000000 16.0730000 18.7520000 18.7520000
|
||||
131 131 1 0.0000000 16.0730000 18.7520000 24.1090000
|
||||
132 132 1 0.0000000 16.0730000 18.7520000 29.4670000
|
||||
133 133 1 0.0000000 16.0730000 24.1090000 2.6790000
|
||||
134 134 1 0.0000000 16.0730000 24.1090000 8.0360000
|
||||
135 135 1 0.0000000 16.0730000 24.1090000 13.3940000
|
||||
136 136 1 0.0000000 16.0730000 24.1090000 18.7520000
|
||||
137 137 1 0.0000000 16.0730000 24.1090000 24.1090000
|
||||
138 138 1 0.0000000 16.0730000 24.1090000 29.4670000
|
||||
139 139 1 0.0000000 16.0730000 29.4670000 2.6790000
|
||||
140 140 1 0.0000000 16.0730000 29.4670000 8.0360000
|
||||
141 141 1 0.0000000 16.0730000 29.4670000 13.3940000
|
||||
142 142 1 0.0000000 16.0730000 29.4670000 18.7520000
|
||||
143 143 1 0.0000000 16.0730000 29.4670000 24.1090000
|
||||
144 144 1 0.0000000 16.0730000 29.4670000 29.4670000
|
||||
145 145 1 0.0000000 21.4310000 2.6790000 2.6790000
|
||||
146 146 1 0.0000000 21.4310000 2.6790000 8.0360000
|
||||
147 147 1 0.0000000 21.4310000 2.6790000 13.3940000
|
||||
148 148 1 0.0000000 21.4310000 2.6790000 18.7520000
|
||||
149 149 1 0.0000000 21.4310000 2.6790000 24.1090000
|
||||
150 150 1 0.0000000 21.4310000 2.6790000 29.4670000
|
||||
151 151 1 0.0000000 21.4310000 8.0360000 2.6790000
|
||||
152 152 1 0.0000000 21.4310000 8.0360000 8.0360000
|
||||
153 153 1 0.0000000 21.4310000 8.0360000 13.3940000
|
||||
154 154 1 0.0000000 21.4310000 8.0360000 18.7520000
|
||||
155 155 1 0.0000000 21.4310000 8.0360000 24.1090000
|
||||
156 156 1 0.0000000 21.4310000 8.0360000 29.4670000
|
||||
157 157 1 0.0000000 21.4310000 13.3940000 2.6790000
|
||||
158 158 1 0.0000000 21.4310000 13.3940000 8.0360000
|
||||
159 159 1 0.0000000 21.4310000 13.3940000 13.3940000
|
||||
160 160 1 0.0000000 21.4310000 13.3940000 18.7520000
|
||||
161 161 1 0.0000000 21.4310000 13.3940000 24.1090000
|
||||
162 162 1 0.0000000 21.4310000 13.3940000 29.4670000
|
||||
163 163 1 0.0000000 21.4310000 18.7520000 2.6790000
|
||||
164 164 1 0.0000000 21.4310000 18.7520000 8.0360000
|
||||
165 165 1 0.0000000 21.4310000 18.7520000 13.3940000
|
||||
166 166 1 0.0000000 21.4310000 18.7520000 18.7520000
|
||||
167 167 1 0.0000000 21.4310000 18.7520000 24.1090000
|
||||
168 168 1 0.0000000 21.4310000 18.7520000 29.4670000
|
||||
169 169 1 0.0000000 21.4310000 24.1090000 2.6790000
|
||||
170 170 1 0.0000000 21.4310000 24.1090000 8.0360000
|
||||
171 171 1 0.0000000 21.4310000 24.1090000 13.3940000
|
||||
172 172 1 0.0000000 21.4310000 24.1090000 18.7520000
|
||||
173 173 1 0.0000000 21.4310000 24.1090000 24.1090000
|
||||
174 174 1 0.0000000 21.4310000 24.1090000 29.4670000
|
||||
175 175 1 0.0000000 21.4310000 29.4670000 2.6790000
|
||||
176 176 1 0.0000000 21.4310000 29.4670000 8.0360000
|
||||
177 177 1 0.0000000 21.4310000 29.4670000 13.3940000
|
||||
178 178 1 0.0000000 21.4310000 29.4670000 18.7520000
|
||||
179 179 1 0.0000000 21.4310000 29.4670000 24.1090000
|
||||
180 180 1 0.0000000 21.4310000 29.4670000 29.4670000
|
||||
181 181 1 0.0000000 26.7880000 2.6790000 2.6790000
|
||||
182 182 1 0.0000000 26.7880000 2.6790000 8.0360000
|
||||
183 183 1 0.0000000 26.7880000 2.6790000 13.3940000
|
||||
184 184 1 0.0000000 26.7880000 2.6790000 18.7520000
|
||||
185 185 1 0.0000000 26.7880000 2.6790000 24.1090000
|
||||
186 186 1 0.0000000 26.7880000 2.6790000 29.4670000
|
||||
187 187 1 0.0000000 26.7880000 8.0360000 2.6790000
|
||||
188 188 1 0.0000000 26.7880000 8.0360000 8.0360000
|
||||
189 189 1 0.0000000 26.7880000 8.0360000 13.3940000
|
||||
190 190 1 0.0000000 26.7880000 8.0360000 18.7520000
|
||||
191 191 1 0.0000000 26.7880000 8.0360000 24.1090000
|
||||
192 192 1 0.0000000 26.7880000 8.0360000 29.4670000
|
||||
193 193 1 0.0000000 26.7880000 13.3940000 2.6790000
|
||||
194 194 1 0.0000000 26.7880000 13.3940000 8.0360000
|
||||
195 195 1 0.0000000 26.7880000 13.3940000 13.3940000
|
||||
196 196 1 0.0000000 26.7880000 13.3940000 18.7520000
|
||||
197 197 1 0.0000000 26.7880000 13.3940000 24.1090000
|
||||
198 198 1 0.0000000 26.7880000 13.3940000 29.4670000
|
||||
199 199 1 0.0000000 26.7880000 18.7520000 2.6790000
|
||||
200 200 1 0.0000000 26.7880000 18.7520000 8.0360000
|
||||
201 201 1 0.0000000 26.7880000 18.7520000 13.3940000
|
||||
202 202 1 0.0000000 26.7880000 18.7520000 18.7520000
|
||||
203 203 1 0.0000000 26.7880000 18.7520000 24.1090000
|
||||
204 204 1 0.0000000 26.7880000 18.7520000 29.4670000
|
||||
205 205 1 0.0000000 26.7880000 24.1090000 2.6790000
|
||||
206 206 1 0.0000000 26.7880000 24.1090000 8.0360000
|
||||
207 207 1 0.0000000 26.7880000 24.1090000 13.3940000
|
||||
208 208 1 0.0000000 26.7880000 24.1090000 18.7520000
|
||||
209 209 1 0.0000000 26.7880000 24.1090000 24.1090000
|
||||
210 210 1 0.0000000 26.7880000 24.1090000 29.4670000
|
||||
211 211 1 0.0000000 26.7880000 29.4670000 2.6790000
|
||||
212 212 1 0.0000000 26.7880000 29.4670000 8.0360000
|
||||
213 213 1 0.0000000 26.7880000 29.4670000 13.3940000
|
||||
214 214 1 0.0000000 26.7880000 29.4670000 18.7520000
|
||||
215 215 1 0.0000000 26.7880000 29.4670000 24.1090000
|
||||
216 216 1 0.0000000 26.7880000 29.4670000 29.4670000
|
||||
217 217 1 0.0000000 2.6790000 5.3580000 2.6790000
|
||||
218 218 1 0.0000000 2.6790000 5.3580000 8.0360000
|
||||
219 219 1 0.0000000 2.6790000 5.3580000 13.3940000
|
||||
220 220 1 0.0000000 2.6790000 5.3580000 18.7520000
|
||||
221 221 1 0.0000000 2.6790000 5.3580000 24.1090000
|
||||
222 222 1 0.0000000 2.6790000 5.3580000 29.4670000
|
||||
223 223 1 0.0000000 2.6790000 10.7150000 2.6790000
|
||||
224 224 1 0.0000000 2.6790000 10.7150000 8.0360000
|
||||
225 225 1 0.0000000 2.6790000 10.7150000 13.3940000
|
||||
226 226 1 0.0000000 2.6790000 10.7150000 18.7520000
|
||||
227 227 1 0.0000000 2.6790000 10.7150000 24.1090000
|
||||
228 228 1 0.0000000 2.6790000 10.7150000 29.4670000
|
||||
229 229 1 0.0000000 2.6790000 16.0730000 2.6790000
|
||||
230 230 1 0.0000000 2.6790000 16.0730000 8.0360000
|
||||
231 231 1 0.0000000 2.6790000 16.0730000 13.3940000
|
||||
232 232 1 0.0000000 2.6790000 16.0730000 18.7520000
|
||||
233 233 1 0.0000000 2.6790000 16.0730000 24.1090000
|
||||
234 234 1 0.0000000 2.6790000 16.0730000 29.4670000
|
||||
235 235 1 0.0000000 2.6790000 21.4310000 2.6790000
|
||||
236 236 1 0.0000000 2.6790000 21.4310000 8.0360000
|
||||
237 237 1 0.0000000 2.6790000 21.4310000 13.3940000
|
||||
238 238 1 0.0000000 2.6790000 21.4310000 18.7520000
|
||||
239 239 1 0.0000000 2.6790000 21.4310000 24.1090000
|
||||
240 240 1 0.0000000 2.6790000 21.4310000 29.4670000
|
||||
241 241 1 0.0000000 2.6790000 26.7880000 2.6790000
|
||||
242 242 1 0.0000000 2.6790000 26.7880000 8.0360000
|
||||
243 243 1 0.0000000 2.6790000 26.7880000 13.3940000
|
||||
244 244 1 0.0000000 2.6790000 26.7880000 18.7520000
|
||||
245 245 1 0.0000000 2.6790000 26.7880000 24.1090000
|
||||
246 246 1 0.0000000 2.6790000 26.7880000 29.4670000
|
||||
247 247 1 0.0000000 2.6790000 32.1460000 2.6790000
|
||||
248 248 1 0.0000000 2.6790000 32.1460000 8.0360000
|
||||
249 249 1 0.0000000 2.6790000 32.1460000 13.3940000
|
||||
250 250 1 0.0000000 2.6790000 32.1460000 18.7520000
|
||||
251 251 1 0.0000000 2.6790000 32.1460000 24.1090000
|
||||
252 252 1 0.0000000 2.6790000 32.1460000 29.4670000
|
||||
253 253 1 0.0000000 8.0360000 5.3580000 2.6790000
|
||||
254 254 1 0.0000000 8.0360000 5.3580000 8.0360000
|
||||
255 255 1 0.0000000 8.0360000 5.3580000 13.3940000
|
||||
256 256 1 0.0000000 8.0360000 5.3580000 18.7520000
|
||||
257 257 1 0.0000000 8.0360000 5.3580000 24.1090000
|
||||
258 258 1 0.0000000 8.0360000 5.3580000 29.4670000
|
||||
259 259 1 0.0000000 8.0360000 10.7150000 2.6790000
|
||||
260 260 1 0.0000000 8.0360000 10.7150000 8.0360000
|
||||
261 261 1 0.0000000 8.0360000 10.7150000 13.3940000
|
||||
262 262 1 0.0000000 8.0360000 10.7150000 18.7520000
|
||||
263 263 1 0.0000000 8.0360000 10.7150000 24.1090000
|
||||
264 264 1 0.0000000 8.0360000 10.7150000 29.4670000
|
||||
265 265 1 0.0000000 8.0360000 16.0730000 2.6790000
|
||||
266 266 1 0.0000000 8.0360000 16.0730000 8.0360000
|
||||
267 267 1 0.0000000 8.0360000 16.0730000 13.3940000
|
||||
268 268 1 0.0000000 8.0360000 16.0730000 18.7520000
|
||||
269 269 1 0.0000000 8.0360000 16.0730000 24.1090000
|
||||
270 270 1 0.0000000 8.0360000 16.0730000 29.4670000
|
||||
271 271 1 0.0000000 8.0360000 21.4310000 2.6790000
|
||||
272 272 1 0.0000000 8.0360000 21.4310000 8.0360000
|
||||
273 273 1 0.0000000 8.0360000 21.4310000 13.3940000
|
||||
274 274 1 0.0000000 8.0360000 21.4310000 18.7520000
|
||||
275 275 1 0.0000000 8.0360000 21.4310000 24.1090000
|
||||
276 276 1 0.0000000 8.0360000 21.4310000 29.4670000
|
||||
277 277 1 0.0000000 8.0360000 26.7880000 2.6790000
|
||||
278 278 1 0.0000000 8.0360000 26.7880000 8.0360000
|
||||
279 279 1 0.0000000 8.0360000 26.7880000 13.3940000
|
||||
280 280 1 0.0000000 8.0360000 26.7880000 18.7520000
|
||||
281 281 1 0.0000000 8.0360000 26.7880000 24.1090000
|
||||
282 282 1 0.0000000 8.0360000 26.7880000 29.4670000
|
||||
283 283 1 0.0000000 8.0360000 32.1460000 2.6790000
|
||||
284 284 1 0.0000000 8.0360000 32.1460000 8.0360000
|
||||
285 285 1 0.0000000 8.0360000 32.1460000 13.3940000
|
||||
286 286 1 0.0000000 8.0360000 32.1460000 18.7520000
|
||||
287 287 1 0.0000000 8.0360000 32.1460000 24.1090000
|
||||
288 288 1 0.0000000 8.0360000 32.1460000 29.4670000
|
||||
289 289 1 0.0000000 13.3940000 5.3580000 2.6790000
|
||||
290 290 1 0.0000000 13.3940000 5.3580000 8.0360000
|
||||
291 291 1 0.0000000 13.3940000 5.3580000 13.3940000
|
||||
292 292 1 0.0000000 13.3940000 5.3580000 18.7520000
|
||||
293 293 1 0.0000000 13.3940000 5.3580000 24.1090000
|
||||
294 294 1 0.0000000 13.3940000 5.3580000 29.4670000
|
||||
295 295 1 0.0000000 13.3940000 10.7150000 2.6790000
|
||||
296 296 1 0.0000000 13.3940000 10.7150000 8.0360000
|
||||
297 297 1 0.0000000 13.3940000 10.7150000 13.3940000
|
||||
298 298 1 0.0000000 13.3940000 10.7150000 18.7520000
|
||||
299 299 1 0.0000000 13.3940000 10.7150000 24.1090000
|
||||
300 300 1 0.0000000 13.3940000 10.7150000 29.4670000
|
||||
301 301 1 0.0000000 13.3940000 16.0730000 2.6790000
|
||||
302 302 1 0.0000000 13.3940000 16.0730000 8.0360000
|
||||
303 303 1 0.0000000 13.3940000 16.0730000 13.3940000
|
||||
304 304 1 0.0000000 13.3940000 16.0730000 18.7520000
|
||||
305 305 1 0.0000000 13.3940000 16.0730000 24.1090000
|
||||
306 306 1 0.0000000 13.3940000 16.0730000 29.4670000
|
||||
307 307 1 0.0000000 13.3940000 21.4310000 2.6790000
|
||||
308 308 1 0.0000000 13.3940000 21.4310000 8.0360000
|
||||
309 309 1 0.0000000 13.3940000 21.4310000 13.3940000
|
||||
310 310 1 0.0000000 13.3940000 21.4310000 18.7520000
|
||||
311 311 1 0.0000000 13.3940000 21.4310000 24.1090000
|
||||
312 312 1 0.0000000 13.3940000 21.4310000 29.4670000
|
||||
313 313 1 0.0000000 13.3940000 26.7880000 2.6790000
|
||||
314 314 1 0.0000000 13.3940000 26.7880000 8.0360000
|
||||
315 315 1 0.0000000 13.3940000 26.7880000 13.3940000
|
||||
316 316 1 0.0000000 13.3940000 26.7880000 18.7520000
|
||||
317 317 1 0.0000000 13.3940000 26.7880000 24.1090000
|
||||
318 318 1 0.0000000 13.3940000 26.7880000 29.4670000
|
||||
319 319 1 0.0000000 13.3940000 32.1460000 2.6790000
|
||||
320 320 1 0.0000000 13.3940000 32.1460000 8.0360000
|
||||
321 321 1 0.0000000 13.3940000 32.1460000 13.3940000
|
||||
322 322 1 0.0000000 13.3940000 32.1460000 18.7520000
|
||||
323 323 1 0.0000000 13.3940000 32.1460000 24.1090000
|
||||
324 324 1 0.0000000 13.3940000 32.1460000 29.4670000
|
||||
325 325 1 0.0000000 18.7520000 5.3580000 2.6790000
|
||||
326 326 1 0.0000000 18.7520000 5.3580000 8.0360000
|
||||
327 327 1 0.0000000 18.7520000 5.3580000 13.3940000
|
||||
328 328 1 0.0000000 18.7520000 5.3580000 18.7520000
|
||||
329 329 1 0.0000000 18.7520000 5.3580000 24.1090000
|
||||
330 330 1 0.0000000 18.7520000 5.3580000 29.4670000
|
||||
331 331 1 0.0000000 18.7520000 10.7150000 2.6790000
|
||||
332 332 1 0.0000000 18.7520000 10.7150000 8.0360000
|
||||
333 333 1 0.0000000 18.7520000 10.7150000 13.3940000
|
||||
334 334 1 0.0000000 18.7520000 10.7150000 18.7520000
|
||||
335 335 1 0.0000000 18.7520000 10.7150000 24.1090000
|
||||
336 336 1 0.0000000 18.7520000 10.7150000 29.4670000
|
||||
337 337 1 0.0000000 18.7520000 16.0730000 2.6790000
|
||||
338 338 1 0.0000000 18.7520000 16.0730000 8.0360000
|
||||
339 339 1 0.0000000 18.7520000 16.0730000 13.3940000
|
||||
340 340 1 0.0000000 18.7520000 16.0730000 18.7520000
|
||||
341 341 1 0.0000000 18.7520000 16.0730000 24.1090000
|
||||
342 342 1 0.0000000 18.7520000 16.0730000 29.4670000
|
||||
343 343 1 0.0000000 18.7520000 21.4310000 2.6790000
|
||||
344 344 1 0.0000000 18.7520000 21.4310000 8.0360000
|
||||
345 345 1 0.0000000 18.7520000 21.4310000 13.3940000
|
||||
346 346 1 0.0000000 18.7520000 21.4310000 18.7520000
|
||||
347 347 1 0.0000000 18.7520000 21.4310000 24.1090000
|
||||
348 348 1 0.0000000 18.7520000 21.4310000 29.4670000
|
||||
349 349 1 0.0000000 18.7520000 26.7880000 2.6790000
|
||||
350 350 1 0.0000000 18.7520000 26.7880000 8.0360000
|
||||
351 351 1 0.0000000 18.7520000 26.7880000 13.3940000
|
||||
352 352 1 0.0000000 18.7520000 26.7880000 18.7520000
|
||||
353 353 1 0.0000000 18.7520000 26.7880000 24.1090000
|
||||
354 354 1 0.0000000 18.7520000 26.7880000 29.4670000
|
||||
355 355 1 0.0000000 18.7520000 32.1460000 2.6790000
|
||||
356 356 1 0.0000000 18.7520000 32.1460000 8.0360000
|
||||
357 357 1 0.0000000 18.7520000 32.1460000 13.3940000
|
||||
358 358 1 0.0000000 18.7520000 32.1460000 18.7520000
|
||||
359 359 1 0.0000000 18.7520000 32.1460000 24.1090000
|
||||
360 360 1 0.0000000 18.7520000 32.1460000 29.4670000
|
||||
361 361 1 0.0000000 24.1090000 5.3580000 2.6790000
|
||||
362 362 1 0.0000000 24.1090000 5.3580000 8.0360000
|
||||
363 363 1 0.0000000 24.1090000 5.3580000 13.3940000
|
||||
364 364 1 0.0000000 24.1090000 5.3580000 18.7520000
|
||||
365 365 1 0.0000000 24.1090000 5.3580000 24.1090000
|
||||
366 366 1 0.0000000 24.1090000 5.3580000 29.4670000
|
||||
367 367 1 0.0000000 24.1090000 10.7150000 2.6790000
|
||||
368 368 1 0.0000000 24.1090000 10.7150000 8.0360000
|
||||
369 369 1 0.0000000 24.1090000 10.7150000 13.3940000
|
||||
370 370 1 0.0000000 24.1090000 10.7150000 18.7520000
|
||||
371 371 1 0.0000000 24.1090000 10.7150000 24.1090000
|
||||
372 372 1 0.0000000 24.1090000 10.7150000 29.4670000
|
||||
373 373 1 0.0000000 24.1090000 16.0730000 2.6790000
|
||||
374 374 1 0.0000000 24.1090000 16.0730000 8.0360000
|
||||
375 375 1 0.0000000 24.1090000 16.0730000 13.3940000
|
||||
376 376 1 0.0000000 24.1090000 16.0730000 18.7520000
|
||||
377 377 1 0.0000000 24.1090000 16.0730000 24.1090000
|
||||
378 378 1 0.0000000 24.1090000 16.0730000 29.4670000
|
||||
379 379 1 0.0000000 24.1090000 21.4310000 2.6790000
|
||||
380 380 1 0.0000000 24.1090000 21.4310000 8.0360000
|
||||
381 381 1 0.0000000 24.1090000 21.4310000 13.3940000
|
||||
382 382 1 0.0000000 24.1090000 21.4310000 18.7520000
|
||||
383 383 1 0.0000000 24.1090000 21.4310000 24.1090000
|
||||
384 384 1 0.0000000 24.1090000 21.4310000 29.4670000
|
||||
385 385 1 0.0000000 24.1090000 26.7880000 2.6790000
|
||||
386 386 1 0.0000000 24.1090000 26.7880000 8.0360000
|
||||
387 387 1 0.0000000 24.1090000 26.7880000 13.3940000
|
||||
388 388 1 0.0000000 24.1090000 26.7880000 18.7520000
|
||||
389 389 1 0.0000000 24.1090000 26.7880000 24.1090000
|
||||
390 390 1 0.0000000 24.1090000 26.7880000 29.4670000
|
||||
391 391 1 0.0000000 24.1090000 32.1460000 2.6790000
|
||||
392 392 1 0.0000000 24.1090000 32.1460000 8.0360000
|
||||
393 393 1 0.0000000 24.1090000 32.1460000 13.3940000
|
||||
394 394 1 0.0000000 24.1090000 32.1460000 18.7520000
|
||||
395 395 1 0.0000000 24.1090000 32.1460000 24.1090000
|
||||
396 396 1 0.0000000 24.1090000 32.1460000 29.4670000
|
||||
397 397 1 0.0000000 29.4670000 5.3580000 2.6790000
|
||||
398 398 1 0.0000000 29.4670000 5.3580000 8.0360000
|
||||
399 399 1 0.0000000 29.4670000 5.3580000 13.3940000
|
||||
400 400 1 0.0000000 29.4670000 5.3580000 18.7520000
|
||||
401 401 1 0.0000000 29.4670000 5.3580000 24.1090000
|
||||
402 402 1 0.0000000 29.4670000 5.3580000 29.4670000
|
||||
403 403 1 0.0000000 29.4670000 10.7150000 2.6790000
|
||||
404 404 1 0.0000000 29.4670000 10.7150000 8.0360000
|
||||
405 405 1 0.0000000 29.4670000 10.7150000 13.3940000
|
||||
406 406 1 0.0000000 29.4670000 10.7150000 18.7520000
|
||||
407 407 1 0.0000000 29.4670000 10.7150000 24.1090000
|
||||
408 408 1 0.0000000 29.4670000 10.7150000 29.4670000
|
||||
409 409 1 0.0000000 29.4670000 16.0730000 2.6790000
|
||||
410 410 1 0.0000000 29.4670000 16.0730000 8.0360000
|
||||
411 411 1 0.0000000 29.4670000 16.0730000 13.3940000
|
||||
412 412 1 0.0000000 29.4670000 16.0730000 18.7520000
|
||||
413 413 1 0.0000000 29.4670000 16.0730000 24.1090000
|
||||
414 414 1 0.0000000 29.4670000 16.0730000 29.4670000
|
||||
415 415 1 0.0000000 29.4670000 21.4310000 2.6790000
|
||||
416 416 1 0.0000000 29.4670000 21.4310000 8.0360000
|
||||
417 417 1 0.0000000 29.4670000 21.4310000 13.3940000
|
||||
418 418 1 0.0000000 29.4670000 21.4310000 18.7520000
|
||||
419 419 1 0.0000000 29.4670000 21.4310000 24.1090000
|
||||
420 420 1 0.0000000 29.4670000 21.4310000 29.4670000
|
||||
421 421 1 0.0000000 29.4670000 26.7880000 2.6790000
|
||||
422 422 1 0.0000000 29.4670000 26.7880000 8.0360000
|
||||
423 423 1 0.0000000 29.4670000 26.7880000 13.3940000
|
||||
424 424 1 0.0000000 29.4670000 26.7880000 18.7520000
|
||||
425 425 1 0.0000000 29.4670000 26.7880000 24.1090000
|
||||
426 426 1 0.0000000 29.4670000 26.7880000 29.4670000
|
||||
427 427 1 0.0000000 29.4670000 32.1460000 2.6790000
|
||||
428 428 1 0.0000000 29.4670000 32.1460000 8.0360000
|
||||
429 429 1 0.0000000 29.4670000 32.1460000 13.3940000
|
||||
430 430 1 0.0000000 29.4670000 32.1460000 18.7520000
|
||||
431 431 1 0.0000000 29.4670000 32.1460000 24.1090000
|
||||
432 432 1 0.0000000 29.4670000 32.1460000 29.4670000
|
||||
433 433 1 0.0000000 2.6790000 2.6790000 5.3580000
|
||||
434 434 1 0.0000000 2.6790000 2.6790000 10.7150000
|
||||
435 435 1 0.0000000 2.6790000 2.6790000 16.0730000
|
||||
436 436 1 0.0000000 2.6790000 2.6790000 21.4310000
|
||||
437 437 1 0.0000000 2.6790000 2.6790000 26.7880000
|
||||
438 438 1 0.0000000 2.6790000 2.6790000 32.1460000
|
||||
439 439 1 0.0000000 2.6790000 8.0360000 5.3580000
|
||||
440 440 1 0.0000000 2.6790000 8.0360000 10.7150000
|
||||
441 441 1 0.0000000 2.6790000 8.0360000 16.0730000
|
||||
442 442 1 0.0000000 2.6790000 8.0360000 21.4310000
|
||||
443 443 1 0.0000000 2.6790000 8.0360000 26.7880000
|
||||
444 444 1 0.0000000 2.6790000 8.0360000 32.1460000
|
||||
445 445 1 0.0000000 2.6790000 13.3940000 5.3580000
|
||||
446 446 1 0.0000000 2.6790000 13.3940000 10.7150000
|
||||
447 447 1 0.0000000 2.6790000 13.3940000 16.0730000
|
||||
448 448 1 0.0000000 2.6790000 13.3940000 21.4310000
|
||||
449 449 1 0.0000000 2.6790000 13.3940000 26.7880000
|
||||
450 450 1 0.0000000 2.6790000 13.3940000 32.1460000
|
||||
451 451 1 0.0000000 2.6790000 18.7520000 5.3580000
|
||||
452 452 1 0.0000000 2.6790000 18.7520000 10.7150000
|
||||
453 453 1 0.0000000 2.6790000 18.7520000 16.0730000
|
||||
454 454 1 0.0000000 2.6790000 18.7520000 21.4310000
|
||||
455 455 1 0.0000000 2.6790000 18.7520000 26.7880000
|
||||
456 456 1 0.0000000 2.6790000 18.7520000 32.1460000
|
||||
457 457 1 0.0000000 2.6790000 24.1090000 5.3580000
|
||||
458 458 1 0.0000000 2.6790000 24.1090000 10.7150000
|
||||
459 459 1 0.0000000 2.6790000 24.1090000 16.0730000
|
||||
460 460 1 0.0000000 2.6790000 24.1090000 21.4310000
|
||||
461 461 1 0.0000000 2.6790000 24.1090000 26.7880000
|
||||
462 462 1 0.0000000 2.6790000 24.1090000 32.1460000
|
||||
463 463 1 0.0000000 2.6790000 29.4670000 5.3580000
|
||||
464 464 1 0.0000000 2.6790000 29.4670000 10.7150000
|
||||
465 465 1 0.0000000 2.6790000 29.4670000 16.0730000
|
||||
466 466 1 0.0000000 2.6790000 29.4670000 21.4310000
|
||||
467 467 1 0.0000000 2.6790000 29.4670000 26.7880000
|
||||
468 468 1 0.0000000 2.6790000 29.4670000 32.1460000
|
||||
469 469 1 0.0000000 8.0360000 2.6790000 5.3580000
|
||||
470 470 1 0.0000000 8.0360000 2.6790000 10.7150000
|
||||
471 471 1 0.0000000 8.0360000 2.6790000 16.0730000
|
||||
472 472 1 0.0000000 8.0360000 2.6790000 21.4310000
|
||||
473 473 1 0.0000000 8.0360000 2.6790000 26.7880000
|
||||
474 474 1 0.0000000 8.0360000 2.6790000 32.1460000
|
||||
475 475 1 0.0000000 8.0360000 8.0360000 5.3580000
|
||||
476 476 1 0.0000000 8.0360000 8.0360000 10.7150000
|
||||
477 477 1 0.0000000 8.0360000 8.0360000 16.0730000
|
||||
478 478 1 0.0000000 8.0360000 8.0360000 21.4310000
|
||||
479 479 1 0.0000000 8.0360000 8.0360000 26.7880000
|
||||
480 480 1 0.0000000 8.0360000 8.0360000 32.1460000
|
||||
481 481 1 0.0000000 8.0360000 13.3940000 5.3580000
|
||||
482 482 1 0.0000000 8.0360000 13.3940000 10.7150000
|
||||
483 483 1 0.0000000 8.0360000 13.3940000 16.0730000
|
||||
484 484 1 0.0000000 8.0360000 13.3940000 21.4310000
|
||||
485 485 1 0.0000000 8.0360000 13.3940000 26.7880000
|
||||
486 486 1 0.0000000 8.0360000 13.3940000 32.1460000
|
||||
487 487 1 0.0000000 8.0360000 18.7520000 5.3580000
|
||||
488 488 1 0.0000000 8.0360000 18.7520000 10.7150000
|
||||
489 489 1 0.0000000 8.0360000 18.7520000 16.0730000
|
||||
490 490 1 0.0000000 8.0360000 18.7520000 21.4310000
|
||||
491 491 1 0.0000000 8.0360000 18.7520000 26.7880000
|
||||
492 492 1 0.0000000 8.0360000 18.7520000 32.1460000
|
||||
493 493 1 0.0000000 8.0360000 24.1090000 5.3580000
|
||||
494 494 1 0.0000000 8.0360000 24.1090000 10.7150000
|
||||
495 495 1 0.0000000 8.0360000 24.1090000 16.0730000
|
||||
496 496 1 0.0000000 8.0360000 24.1090000 21.4310000
|
||||
497 497 1 0.0000000 8.0360000 24.1090000 26.7880000
|
||||
498 498 1 0.0000000 8.0360000 24.1090000 32.1460000
|
||||
499 499 1 0.0000000 8.0360000 29.4670000 5.3580000
|
||||
500 500 1 0.0000000 8.0360000 29.4670000 10.7150000
|
||||
501 501 1 0.0000000 8.0360000 29.4670000 16.0730000
|
||||
502 502 1 0.0000000 8.0360000 29.4670000 21.4310000
|
||||
503 503 1 0.0000000 8.0360000 29.4670000 26.7880000
|
||||
504 504 1 0.0000000 8.0360000 29.4670000 32.1460000
|
||||
505 505 1 0.0000000 13.3940000 2.6790000 5.3580000
|
||||
506 506 1 0.0000000 13.3940000 2.6790000 10.7150000
|
||||
507 507 1 0.0000000 13.3940000 2.6790000 16.0730000
|
||||
508 508 1 0.0000000 13.3940000 2.6790000 21.4310000
|
||||
509 509 1 0.0000000 13.3940000 2.6790000 26.7880000
|
||||
510 510 1 0.0000000 13.3940000 2.6790000 32.1460000
|
||||
511 511 1 0.0000000 13.3940000 8.0360000 5.3580000
|
||||
512 512 1 0.0000000 13.3940000 8.0360000 10.7150000
|
||||
513 513 1 0.0000000 13.3940000 8.0360000 16.0730000
|
||||
514 514 1 0.0000000 13.3940000 8.0360000 21.4310000
|
||||
515 515 1 0.0000000 13.3940000 8.0360000 26.7880000
|
||||
516 516 1 0.0000000 13.3940000 8.0360000 32.1460000
|
||||
517 517 1 0.0000000 13.3940000 13.3940000 5.3580000
|
||||
518 518 1 0.0000000 13.3940000 13.3940000 10.7150000
|
||||
519 519 1 0.0000000 13.3940000 13.3940000 16.0730000
|
||||
520 520 1 0.0000000 13.3940000 13.3940000 21.4310000
|
||||
521 521 1 0.0000000 13.3940000 13.3940000 26.7880000
|
||||
522 522 1 0.0000000 13.3940000 13.3940000 32.1460000
|
||||
523 523 1 0.0000000 13.3940000 18.7520000 5.3580000
|
||||
524 524 1 0.0000000 13.3940000 18.7520000 10.7150000
|
||||
525 525 1 0.0000000 13.3940000 18.7520000 16.0730000
|
||||
526 526 1 0.0000000 13.3940000 18.7520000 21.4310000
|
||||
527 527 1 0.0000000 13.3940000 18.7520000 26.7880000
|
||||
528 528 1 0.0000000 13.3940000 18.7520000 32.1460000
|
||||
529 529 1 0.0000000 13.3940000 24.1090000 5.3580000
|
||||
530 530 1 0.0000000 13.3940000 24.1090000 10.7150000
|
||||
531 531 1 0.0000000 13.3940000 24.1090000 16.0730000
|
||||
532 532 1 0.0000000 13.3940000 24.1090000 21.4310000
|
||||
533 533 1 0.0000000 13.3940000 24.1090000 26.7880000
|
||||
534 534 1 0.0000000 13.3940000 24.1090000 32.1460000
|
||||
535 535 1 0.0000000 13.3940000 29.4670000 5.3580000
|
||||
536 536 1 0.0000000 13.3940000 29.4670000 10.7150000
|
||||
537 537 1 0.0000000 13.3940000 29.4670000 16.0730000
|
||||
538 538 1 0.0000000 13.3940000 29.4670000 21.4310000
|
||||
539 539 1 0.0000000 13.3940000 29.4670000 26.7880000
|
||||
540 540 1 0.0000000 13.3940000 29.4670000 32.1460000
|
||||
541 541 1 0.0000000 18.7520000 2.6790000 5.3580000
|
||||
542 542 1 0.0000000 18.7520000 2.6790000 10.7150000
|
||||
543 543 1 0.0000000 18.7520000 2.6790000 16.0730000
|
||||
544 544 1 0.0000000 18.7520000 2.6790000 21.4310000
|
||||
545 545 1 0.0000000 18.7520000 2.6790000 26.7880000
|
||||
546 546 1 0.0000000 18.7520000 2.6790000 32.1460000
|
||||
547 547 1 0.0000000 18.7520000 8.0360000 5.3580000
|
||||
548 548 1 0.0000000 18.7520000 8.0360000 10.7150000
|
||||
549 549 1 0.0000000 18.7520000 8.0360000 16.0730000
|
||||
550 550 1 0.0000000 18.7520000 8.0360000 21.4310000
|
||||
551 551 1 0.0000000 18.7520000 8.0360000 26.7880000
|
||||
552 552 1 0.0000000 18.7520000 8.0360000 32.1460000
|
||||
553 553 1 0.0000000 18.7520000 13.3940000 5.3580000
|
||||
554 554 1 0.0000000 18.7520000 13.3940000 10.7150000
|
||||
555 555 1 0.0000000 18.7520000 13.3940000 16.0730000
|
||||
556 556 1 0.0000000 18.7520000 13.3940000 21.4310000
|
||||
557 557 1 0.0000000 18.7520000 13.3940000 26.7880000
|
||||
558 558 1 0.0000000 18.7520000 13.3940000 32.1460000
|
||||
559 559 1 0.0000000 18.7520000 18.7520000 5.3580000
|
||||
560 560 1 0.0000000 18.7520000 18.7520000 10.7150000
|
||||
561 561 1 0.0000000 18.7520000 18.7520000 16.0730000
|
||||
562 562 1 0.0000000 18.7520000 18.7520000 21.4310000
|
||||
563 563 1 0.0000000 18.7520000 18.7520000 26.7880000
|
||||
564 564 1 0.0000000 18.7520000 18.7520000 32.1460000
|
||||
565 565 1 0.0000000 18.7520000 24.1090000 5.3580000
|
||||
566 566 1 0.0000000 18.7520000 24.1090000 10.7150000
|
||||
567 567 1 0.0000000 18.7520000 24.1090000 16.0730000
|
||||
568 568 1 0.0000000 18.7520000 24.1090000 21.4310000
|
||||
569 569 1 0.0000000 18.7520000 24.1090000 26.7880000
|
||||
570 570 1 0.0000000 18.7520000 24.1090000 32.1460000
|
||||
571 571 1 0.0000000 18.7520000 29.4670000 5.3580000
|
||||
572 572 1 0.0000000 18.7520000 29.4670000 10.7150000
|
||||
573 573 1 0.0000000 18.7520000 29.4670000 16.0730000
|
||||
574 574 1 0.0000000 18.7520000 29.4670000 21.4310000
|
||||
575 575 1 0.0000000 18.7520000 29.4670000 26.7880000
|
||||
576 576 1 0.0000000 18.7520000 29.4670000 32.1460000
|
||||
577 577 1 0.0000000 24.1090000 2.6790000 5.3580000
|
||||
578 578 1 0.0000000 24.1090000 2.6790000 10.7150000
|
||||
579 579 1 0.0000000 24.1090000 2.6790000 16.0730000
|
||||
580 580 1 0.0000000 24.1090000 2.6790000 21.4310000
|
||||
581 581 1 0.0000000 24.1090000 2.6790000 26.7880000
|
||||
582 582 1 0.0000000 24.1090000 2.6790000 32.1460000
|
||||
583 583 1 0.0000000 24.1090000 8.0360000 5.3580000
|
||||
584 584 1 0.0000000 24.1090000 8.0360000 10.7150000
|
||||
585 585 1 0.0000000 24.1090000 8.0360000 16.0730000
|
||||
586 586 1 0.0000000 24.1090000 8.0360000 21.4310000
|
||||
587 587 1 0.0000000 24.1090000 8.0360000 26.7880000
|
||||
588 588 1 0.0000000 24.1090000 8.0360000 32.1460000
|
||||
589 589 1 0.0000000 24.1090000 13.3940000 5.3580000
|
||||
590 590 1 0.0000000 24.1090000 13.3940000 10.7150000
|
||||
591 591 1 0.0000000 24.1090000 13.3940000 16.0730000
|
||||
592 592 1 0.0000000 24.1090000 13.3940000 21.4310000
|
||||
593 593 1 0.0000000 24.1090000 13.3940000 26.7880000
|
||||
594 594 1 0.0000000 24.1090000 13.3940000 32.1460000
|
||||
595 595 1 0.0000000 24.1090000 18.7520000 5.3580000
|
||||
596 596 1 0.0000000 24.1090000 18.7520000 10.7150000
|
||||
597 597 1 0.0000000 24.1090000 18.7520000 16.0730000
|
||||
598 598 1 0.0000000 24.1090000 18.7520000 21.4310000
|
||||
599 599 1 0.0000000 24.1090000 18.7520000 26.7880000
|
||||
600 600 1 0.0000000 24.1090000 18.7520000 32.1460000
|
||||
601 601 1 0.0000000 24.1090000 24.1090000 5.3580000
|
||||
602 602 1 0.0000000 24.1090000 24.1090000 10.7150000
|
||||
603 603 1 0.0000000 24.1090000 24.1090000 16.0730000
|
||||
604 604 1 0.0000000 24.1090000 24.1090000 21.4310000
|
||||
605 605 1 0.0000000 24.1090000 24.1090000 26.7880000
|
||||
606 606 1 0.0000000 24.1090000 24.1090000 32.1460000
|
||||
607 607 1 0.0000000 24.1090000 29.4670000 5.3580000
|
||||
608 608 1 0.0000000 24.1090000 29.4670000 10.7150000
|
||||
609 609 1 0.0000000 24.1090000 29.4670000 16.0730000
|
||||
610 610 1 0.0000000 24.1090000 29.4670000 21.4310000
|
||||
611 611 1 0.0000000 24.1090000 29.4670000 26.7880000
|
||||
612 612 1 0.0000000 24.1090000 29.4670000 32.1460000
|
||||
613 613 1 0.0000000 29.4670000 2.6790000 5.3580000
|
||||
614 614 1 0.0000000 29.4670000 2.6790000 10.7150000
|
||||
615 615 1 0.0000000 29.4670000 2.6790000 16.0730000
|
||||
616 616 1 0.0000000 29.4670000 2.6790000 21.4310000
|
||||
617 617 1 0.0000000 29.4670000 2.6790000 26.7880000
|
||||
618 618 1 0.0000000 29.4670000 2.6790000 32.1460000
|
||||
619 619 1 0.0000000 29.4670000 8.0360000 5.3580000
|
||||
620 620 1 0.0000000 29.4670000 8.0360000 10.7150000
|
||||
621 621 1 0.0000000 29.4670000 8.0360000 16.0730000
|
||||
622 622 1 0.0000000 29.4670000 8.0360000 21.4310000
|
||||
623 623 1 0.0000000 29.4670000 8.0360000 26.7880000
|
||||
624 624 1 0.0000000 29.4670000 8.0360000 32.1460000
|
||||
625 625 1 0.0000000 29.4670000 13.3940000 5.3580000
|
||||
626 626 1 0.0000000 29.4670000 13.3940000 10.7150000
|
||||
627 627 1 0.0000000 29.4670000 13.3940000 16.0730000
|
||||
628 628 1 0.0000000 29.4670000 13.3940000 21.4310000
|
||||
629 629 1 0.0000000 29.4670000 13.3940000 26.7880000
|
||||
630 630 1 0.0000000 29.4670000 13.3940000 32.1460000
|
||||
631 631 1 0.0000000 29.4670000 18.7520000 5.3580000
|
||||
632 632 1 0.0000000 29.4670000 18.7520000 10.7150000
|
||||
633 633 1 0.0000000 29.4670000 18.7520000 16.0730000
|
||||
634 634 1 0.0000000 29.4670000 18.7520000 21.4310000
|
||||
635 635 1 0.0000000 29.4670000 18.7520000 26.7880000
|
||||
636 636 1 0.0000000 29.4670000 18.7520000 32.1460000
|
||||
637 637 1 0.0000000 29.4670000 24.1090000 5.3580000
|
||||
638 638 1 0.0000000 29.4670000 24.1090000 10.7150000
|
||||
639 639 1 0.0000000 29.4670000 24.1090000 16.0730000
|
||||
640 640 1 0.0000000 29.4670000 24.1090000 21.4310000
|
||||
641 641 1 0.0000000 29.4670000 24.1090000 26.7880000
|
||||
642 642 1 0.0000000 29.4670000 24.1090000 32.1460000
|
||||
643 643 1 0.0000000 29.4670000 29.4670000 5.3580000
|
||||
644 644 1 0.0000000 29.4670000 29.4670000 10.7150000
|
||||
645 645 1 0.0000000 29.4670000 29.4670000 16.0730000
|
||||
646 646 1 0.0000000 29.4670000 29.4670000 21.4310000
|
||||
647 647 1 0.0000000 29.4670000 29.4670000 26.7880000
|
||||
648 648 1 0.0000000 29.4670000 29.4670000 32.1460000
|
||||
649 649 1 0.0000000 0.0000000 5.3580000 5.3580000
|
||||
650 650 1 0.0000000 0.0000000 5.3580000 10.7150000
|
||||
651 651 1 0.0000000 0.0000000 5.3580000 16.0730000
|
||||
652 652 1 0.0000000 0.0000000 5.3580000 21.4310000
|
||||
653 653 1 0.0000000 0.0000000 5.3580000 26.7880000
|
||||
654 654 1 0.0000000 0.0000000 5.3580000 32.1460000
|
||||
655 655 1 0.0000000 0.0000000 10.7150000 5.3580000
|
||||
656 656 1 0.0000000 0.0000000 10.7150000 10.7150000
|
||||
657 657 1 0.0000000 0.0000000 10.7150000 16.0730000
|
||||
658 658 1 0.0000000 0.0000000 10.7150000 21.4310000
|
||||
659 659 1 0.0000000 0.0000000 10.7150000 26.7880000
|
||||
660 660 1 0.0000000 0.0000000 10.7150000 32.1460000
|
||||
661 661 1 0.0000000 0.0000000 16.0730000 5.3580000
|
||||
662 662 1 0.0000000 0.0000000 16.0730000 10.7150000
|
||||
663 663 1 0.0000000 0.0000000 16.0730000 16.0730000
|
||||
664 664 1 0.0000000 0.0000000 16.0730000 21.4310000
|
||||
665 665 1 0.0000000 0.0000000 16.0730000 26.7880000
|
||||
666 666 1 0.0000000 0.0000000 16.0730000 32.1460000
|
||||
667 667 1 0.0000000 0.0000000 21.4310000 5.3580000
|
||||
668 668 1 0.0000000 0.0000000 21.4310000 10.7150000
|
||||
669 669 1 0.0000000 0.0000000 21.4310000 16.0730000
|
||||
670 670 1 0.0000000 0.0000000 21.4310000 21.4310000
|
||||
671 671 1 0.0000000 0.0000000 21.4310000 26.7880000
|
||||
672 672 1 0.0000000 0.0000000 21.4310000 32.1460000
|
||||
673 673 1 0.0000000 0.0000000 26.7880000 5.3580000
|
||||
674 674 1 0.0000000 0.0000000 26.7880000 10.7150000
|
||||
675 675 1 0.0000000 0.0000000 26.7880000 16.0730000
|
||||
676 676 1 0.0000000 0.0000000 26.7880000 21.4310000
|
||||
677 677 1 0.0000000 0.0000000 26.7880000 26.7880000
|
||||
678 678 1 0.0000000 0.0000000 26.7880000 32.1460000
|
||||
679 679 1 0.0000000 0.0000000 32.1460000 5.3580000
|
||||
680 680 1 0.0000000 0.0000000 32.1460000 10.7150000
|
||||
681 681 1 0.0000000 0.0000000 32.1460000 16.0730000
|
||||
682 682 1 0.0000000 0.0000000 32.1460000 21.4310000
|
||||
683 683 1 0.0000000 0.0000000 32.1460000 26.7880000
|
||||
684 684 1 0.0000000 0.0000000 32.1460000 32.1460000
|
||||
685 685 1 0.0000000 5.3580000 5.3580000 5.3580000
|
||||
686 686 1 0.0000000 5.3580000 5.3580000 10.7150000
|
||||
687 687 1 0.0000000 5.3580000 5.3580000 16.0730000
|
||||
688 688 1 0.0000000 5.3580000 5.3580000 21.4310000
|
||||
689 689 1 0.0000000 5.3580000 5.3580000 26.7880000
|
||||
690 690 1 0.0000000 5.3580000 5.3580000 32.1460000
|
||||
691 691 1 0.0000000 5.3580000 10.7150000 5.3580000
|
||||
692 692 1 0.0000000 5.3580000 10.7150000 10.7150000
|
||||
693 693 1 0.0000000 5.3580000 10.7150000 16.0730000
|
||||
694 694 1 0.0000000 5.3580000 10.7150000 21.4310000
|
||||
695 695 1 0.0000000 5.3580000 10.7150000 26.7880000
|
||||
696 696 1 0.0000000 5.3580000 10.7150000 32.1460000
|
||||
697 697 1 0.0000000 5.3580000 16.0730000 5.3580000
|
||||
698 698 1 0.0000000 5.3580000 16.0730000 10.7150000
|
||||
699 699 1 0.0000000 5.3580000 16.0730000 16.0730000
|
||||
700 700 1 0.0000000 5.3580000 16.0730000 21.4310000
|
||||
701 701 1 0.0000000 5.3580000 16.0730000 26.7880000
|
||||
702 702 1 0.0000000 5.3580000 16.0730000 32.1460000
|
||||
703 703 1 0.0000000 5.3580000 21.4310000 5.3580000
|
||||
704 704 1 0.0000000 5.3580000 21.4310000 10.7150000
|
||||
705 705 1 0.0000000 5.3580000 21.4310000 16.0730000
|
||||
706 706 1 0.0000000 5.3580000 21.4310000 21.4310000
|
||||
707 707 1 0.0000000 5.3580000 21.4310000 26.7880000
|
||||
708 708 1 0.0000000 5.3580000 21.4310000 32.1460000
|
||||
709 709 1 0.0000000 5.3580000 26.7880000 5.3580000
|
||||
710 710 1 0.0000000 5.3580000 26.7880000 10.7150000
|
||||
711 711 1 0.0000000 5.3580000 26.7880000 16.0730000
|
||||
712 712 1 0.0000000 5.3580000 26.7880000 21.4310000
|
||||
713 713 1 0.0000000 5.3580000 26.7880000 26.7880000
|
||||
714 714 1 0.0000000 5.3580000 26.7880000 32.1460000
|
||||
715 715 1 0.0000000 5.3580000 32.1460000 5.3580000
|
||||
716 716 1 0.0000000 5.3580000 32.1460000 10.7150000
|
||||
717 717 1 0.0000000 5.3580000 32.1460000 16.0730000
|
||||
718 718 1 0.0000000 5.3580000 32.1460000 21.4310000
|
||||
719 719 1 0.0000000 5.3580000 32.1460000 26.7880000
|
||||
720 720 1 0.0000000 5.3580000 32.1460000 32.1460000
|
||||
721 721 1 0.0000000 10.7150000 5.3580000 5.3580000
|
||||
722 722 1 0.0000000 10.7150000 5.3580000 10.7150000
|
||||
723 723 1 0.0000000 10.7150000 5.3580000 16.0730000
|
||||
724 724 1 0.0000000 10.7150000 5.3580000 21.4310000
|
||||
725 725 1 0.0000000 10.7150000 5.3580000 26.7880000
|
||||
726 726 1 0.0000000 10.7150000 5.3580000 32.1460000
|
||||
727 727 1 0.0000000 10.7150000 10.7150000 5.3580000
|
||||
728 728 1 0.0000000 10.7150000 10.7150000 10.7150000
|
||||
729 729 1 0.0000000 10.7150000 10.7150000 16.0730000
|
||||
730 730 1 0.0000000 10.7150000 10.7150000 21.4310000
|
||||
731 731 1 0.0000000 10.7150000 10.7150000 26.7880000
|
||||
732 732 1 0.0000000 10.7150000 10.7150000 32.1460000
|
||||
733 733 1 0.0000000 10.7150000 16.0730000 5.3580000
|
||||
734 734 1 0.0000000 10.7150000 16.0730000 10.7150000
|
||||
735 735 1 0.0000000 10.7150000 16.0730000 16.0730000
|
||||
736 736 1 0.0000000 10.7150000 16.0730000 21.4310000
|
||||
737 737 1 0.0000000 10.7150000 16.0730000 26.7880000
|
||||
738 738 1 0.0000000 10.7150000 16.0730000 32.1460000
|
||||
739 739 1 0.0000000 10.7150000 21.4310000 5.3580000
|
||||
740 740 1 0.0000000 10.7150000 21.4310000 10.7150000
|
||||
741 741 1 0.0000000 10.7150000 21.4310000 16.0730000
|
||||
742 742 1 0.0000000 10.7150000 21.4310000 21.4310000
|
||||
743 743 1 0.0000000 10.7150000 21.4310000 26.7880000
|
||||
744 744 1 0.0000000 10.7150000 21.4310000 32.1460000
|
||||
745 745 1 0.0000000 10.7150000 26.7880000 5.3580000
|
||||
746 746 1 0.0000000 10.7150000 26.7880000 10.7150000
|
||||
747 747 1 0.0000000 10.7150000 26.7880000 16.0730000
|
||||
748 748 1 0.0000000 10.7150000 26.7880000 21.4310000
|
||||
749 749 1 0.0000000 10.7150000 26.7880000 26.7880000
|
||||
750 750 1 0.0000000 10.7150000 26.7880000 32.1460000
|
||||
751 751 1 0.0000000 10.7150000 32.1460000 5.3580000
|
||||
752 752 1 0.0000000 10.7150000 32.1460000 10.7150000
|
||||
753 753 1 0.0000000 10.7150000 32.1460000 16.0730000
|
||||
754 754 1 0.0000000 10.7150000 32.1460000 21.4310000
|
||||
755 755 1 0.0000000 10.7150000 32.1460000 26.7880000
|
||||
756 756 1 0.0000000 10.7150000 32.1460000 32.1460000
|
||||
757 757 1 0.0000000 16.0730000 5.3580000 5.3580000
|
||||
758 758 1 0.0000000 16.0730000 5.3580000 10.7150000
|
||||
759 759 1 0.0000000 16.0730000 5.3580000 16.0730000
|
||||
760 760 1 0.0000000 16.0730000 5.3580000 21.4310000
|
||||
761 761 1 0.0000000 16.0730000 5.3580000 26.7880000
|
||||
762 762 1 0.0000000 16.0730000 5.3580000 32.1460000
|
||||
763 763 1 0.0000000 16.0730000 10.7150000 5.3580000
|
||||
764 764 1 0.0000000 16.0730000 10.7150000 10.7150000
|
||||
765 765 1 0.0000000 16.0730000 10.7150000 16.0730000
|
||||
766 766 1 0.0000000 16.0730000 10.7150000 21.4310000
|
||||
767 767 1 0.0000000 16.0730000 10.7150000 26.7880000
|
||||
768 768 1 0.0000000 16.0730000 10.7150000 32.1460000
|
||||
769 769 1 0.0000000 16.0730000 16.0730000 5.3580000
|
||||
770 770 1 0.0000000 16.0730000 16.0730000 10.7150000
|
||||
771 771 1 0.0000000 16.0730000 16.0730000 16.0730000
|
||||
772 772 1 0.0000000 16.0730000 16.0730000 21.4310000
|
||||
773 773 1 0.0000000 16.0730000 16.0730000 26.7880000
|
||||
774 774 1 0.0000000 16.0730000 16.0730000 32.1460000
|
||||
775 775 1 0.0000000 16.0730000 21.4310000 5.3580000
|
||||
776 776 1 0.0000000 16.0730000 21.4310000 10.7150000
|
||||
777 777 1 0.0000000 16.0730000 21.4310000 16.0730000
|
||||
778 778 1 0.0000000 16.0730000 21.4310000 21.4310000
|
||||
779 779 1 0.0000000 16.0730000 21.4310000 26.7880000
|
||||
780 780 1 0.0000000 16.0730000 21.4310000 32.1460000
|
||||
781 781 1 0.0000000 16.0730000 26.7880000 5.3580000
|
||||
782 782 1 0.0000000 16.0730000 26.7880000 10.7150000
|
||||
783 783 1 0.0000000 16.0730000 26.7880000 16.0730000
|
||||
784 784 1 0.0000000 16.0730000 26.7880000 21.4310000
|
||||
785 785 1 0.0000000 16.0730000 26.7880000 26.7880000
|
||||
786 786 1 0.0000000 16.0730000 26.7880000 32.1460000
|
||||
787 787 1 0.0000000 16.0730000 32.1460000 5.3580000
|
||||
788 788 1 0.0000000 16.0730000 32.1460000 10.7150000
|
||||
789 789 1 0.0000000 16.0730000 32.1460000 16.0730000
|
||||
790 790 1 0.0000000 16.0730000 32.1460000 21.4310000
|
||||
791 791 1 0.0000000 16.0730000 32.1460000 26.7880000
|
||||
792 792 1 0.0000000 16.0730000 32.1460000 32.1460000
|
||||
793 793 1 0.0000000 21.4310000 5.3580000 5.3580000
|
||||
794 794 1 0.0000000 21.4310000 5.3580000 10.7150000
|
||||
795 795 1 0.0000000 21.4310000 5.3580000 16.0730000
|
||||
796 796 1 0.0000000 21.4310000 5.3580000 21.4310000
|
||||
797 797 1 0.0000000 21.4310000 5.3580000 26.7880000
|
||||
798 798 1 0.0000000 21.4310000 5.3580000 32.1460000
|
||||
799 799 1 0.0000000 21.4310000 10.7150000 5.3580000
|
||||
800 800 1 0.0000000 21.4310000 10.7150000 10.7150000
|
||||
801 801 1 0.0000000 21.4310000 10.7150000 16.0730000
|
||||
802 802 1 0.0000000 21.4310000 10.7150000 21.4310000
|
||||
803 803 1 0.0000000 21.4310000 10.7150000 26.7880000
|
||||
804 804 1 0.0000000 21.4310000 10.7150000 32.1460000
|
||||
805 805 1 0.0000000 21.4310000 16.0730000 5.3580000
|
||||
806 806 1 0.0000000 21.4310000 16.0730000 10.7150000
|
||||
807 807 1 0.0000000 21.4310000 16.0730000 16.0730000
|
||||
808 808 1 0.0000000 21.4310000 16.0730000 21.4310000
|
||||
809 809 1 0.0000000 21.4310000 16.0730000 26.7880000
|
||||
810 810 1 0.0000000 21.4310000 16.0730000 32.1460000
|
||||
811 811 1 0.0000000 21.4310000 21.4310000 5.3580000
|
||||
812 812 1 0.0000000 21.4310000 21.4310000 10.7150000
|
||||
813 813 1 0.0000000 21.4310000 21.4310000 16.0730000
|
||||
814 814 1 0.0000000 21.4310000 21.4310000 21.4310000
|
||||
815 815 1 0.0000000 21.4310000 21.4310000 26.7880000
|
||||
816 816 1 0.0000000 21.4310000 21.4310000 32.1460000
|
||||
817 817 1 0.0000000 21.4310000 26.7880000 5.3580000
|
||||
818 818 1 0.0000000 21.4310000 26.7880000 10.7150000
|
||||
819 819 1 0.0000000 21.4310000 26.7880000 16.0730000
|
||||
820 820 1 0.0000000 21.4310000 26.7880000 21.4310000
|
||||
821 821 1 0.0000000 21.4310000 26.7880000 26.7880000
|
||||
822 822 1 0.0000000 21.4310000 26.7880000 32.1460000
|
||||
823 823 1 0.0000000 21.4310000 32.1460000 5.3580000
|
||||
824 824 1 0.0000000 21.4310000 32.1460000 10.7150000
|
||||
825 825 1 0.0000000 21.4310000 32.1460000 16.0730000
|
||||
826 826 1 0.0000000 21.4310000 32.1460000 21.4310000
|
||||
827 827 1 0.0000000 21.4310000 32.1460000 26.7880000
|
||||
828 828 1 0.0000000 21.4310000 32.1460000 32.1460000
|
||||
829 829 1 0.0000000 26.7880000 5.3580000 5.3580000
|
||||
830 830 1 0.0000000 26.7880000 5.3580000 10.7150000
|
||||
831 831 1 0.0000000 26.7880000 5.3580000 16.0730000
|
||||
832 832 1 0.0000000 26.7880000 5.3580000 21.4310000
|
||||
833 833 1 0.0000000 26.7880000 5.3580000 26.7880000
|
||||
834 834 1 0.0000000 26.7880000 5.3580000 32.1460000
|
||||
835 835 1 0.0000000 26.7880000 10.7150000 5.3580000
|
||||
836 836 1 0.0000000 26.7880000 10.7150000 10.7150000
|
||||
837 837 1 0.0000000 26.7880000 10.7150000 16.0730000
|
||||
838 838 1 0.0000000 26.7880000 10.7150000 21.4310000
|
||||
839 839 1 0.0000000 26.7880000 10.7150000 26.7880000
|
||||
840 840 1 0.0000000 26.7880000 10.7150000 32.1460000
|
||||
841 841 1 0.0000000 26.7880000 16.0730000 5.3580000
|
||||
842 842 1 0.0000000 26.7880000 16.0730000 10.7150000
|
||||
843 843 1 0.0000000 26.7880000 16.0730000 16.0730000
|
||||
844 844 1 0.0000000 26.7880000 16.0730000 21.4310000
|
||||
845 845 1 0.0000000 26.7880000 16.0730000 26.7880000
|
||||
846 846 1 0.0000000 26.7880000 16.0730000 32.1460000
|
||||
847 847 1 0.0000000 26.7880000 21.4310000 5.3580000
|
||||
848 848 1 0.0000000 26.7880000 21.4310000 10.7150000
|
||||
849 849 1 0.0000000 26.7880000 21.4310000 16.0730000
|
||||
850 850 1 0.0000000 26.7880000 21.4310000 21.4310000
|
||||
851 851 1 0.0000000 26.7880000 21.4310000 26.7880000
|
||||
852 852 1 0.0000000 26.7880000 21.4310000 32.1460000
|
||||
853 853 1 0.0000000 26.7880000 26.7880000 5.3580000
|
||||
854 854 1 0.0000000 26.7880000 26.7880000 10.7150000
|
||||
855 855 1 0.0000000 26.7880000 26.7880000 16.0730000
|
||||
856 856 1 0.0000000 26.7880000 26.7880000 21.4310000
|
||||
857 857 1 0.0000000 26.7880000 26.7880000 26.7880000
|
||||
858 858 1 0.0000000 26.7880000 26.7880000 32.1460000
|
||||
859 859 1 0.0000000 26.7880000 32.1460000 5.3580000
|
||||
860 860 1 0.0000000 26.7880000 32.1460000 10.7150000
|
||||
861 861 1 0.0000000 26.7880000 32.1460000 16.0730000
|
||||
862 862 1 0.0000000 26.7880000 32.1460000 21.4310000
|
||||
863 863 1 0.0000000 26.7880000 32.1460000 26.7880000
|
||||
864 864 1 0.0000000 26.7880000 32.1460000 32.1460000
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#############################
|
||||
#Atoms types - mass - charge#
|
||||
#############################
|
||||
#@ 1 atom types #!THIS LINE IS NECESSARY DON'T SPEND HOURS FINDING THAT OUT!#
|
||||
|
||||
variable Ar equal 1
|
||||
|
||||
#############
|
||||
#Atom Masses#
|
||||
#############
|
||||
|
||||
mass ${Ar} 39.903
|
||||
|
||||
###########################
|
||||
#Pair Potentials - Tersoff#
|
||||
###########################
|
||||
|
||||
pair_style lj/cubic
|
||||
pair_coeff * * 0.0102701 3.42
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# GJF-2GJ thermostat
|
||||
|
||||
units metal
|
||||
atom_style full
|
||||
|
||||
boundary p p p
|
||||
read_data argon.lmp
|
||||
|
||||
include ff-argon.lmp
|
||||
|
||||
velocity all create 10 2357 mom yes dist gaussian
|
||||
|
||||
neighbor 1 bin
|
||||
|
||||
timestep 0.1
|
||||
|
||||
fix nve all nve
|
||||
fix lang all langevin 10 10 1 26488 gjf vfull
|
||||
|
||||
thermo 200
|
||||
run 50000
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# GJF-2GJ thermostat
|
||||
|
||||
units metal
|
||||
atom_style full
|
||||
|
||||
boundary p p p
|
||||
read_data argon.lmp
|
||||
|
||||
include ff-argon.lmp
|
||||
|
||||
velocity all create 10 2357 mom yes dist gaussian
|
||||
|
||||
neighbor 1 bin
|
||||
|
||||
timestep 0.1
|
||||
|
||||
fix nve all nve
|
||||
fix lang all langevin 10 10 1 26488 gjf vhalf
|
||||
|
||||
thermo 200
|
||||
run 50000
|
||||
|
||||
|
|
@ -161,6 +161,10 @@
|
|||
/fix_setforce_spin.h
|
||||
/min_spin.cpp
|
||||
/min_spin.h
|
||||
/min_spin_cg.cpp
|
||||
/min_spin_cg.h
|
||||
/min_spin_lbfgs.cpp
|
||||
/min_spin_lbfgs.h
|
||||
/neb_spin.cpp
|
||||
/neb_spin.h
|
||||
/pair_spin.cpp
|
||||
|
|
|
@ -112,6 +112,8 @@ void DumpAtomGZ::write_header(bigint ndump)
|
|||
++unit_count;
|
||||
gzprintf(gzFp,"ITEM: UNITS\n%s\n",update->unit_style);
|
||||
}
|
||||
if (time_flag) gzprintf(gzFp,"ITEM: TIME\n%.16g\n",compute_time());
|
||||
|
||||
gzprintf(gzFp,"ITEM: TIMESTEP\n");
|
||||
gzprintf(gzFp,BIGINT_FORMAT "\n",update->ntimestep);
|
||||
gzprintf(gzFp,"ITEM: NUMBER OF ATOMS\n");
|
||||
|
|
|
@ -112,6 +112,8 @@ void DumpCustomGZ::write_header(bigint ndump)
|
|||
++unit_count;
|
||||
gzprintf(gzFp,"ITEM: UNITS\n%s\n",update->unit_style);
|
||||
}
|
||||
if (time_flag) gzprintf(gzFp,"ITEM: TIME\n%.16g\n",compute_time());
|
||||
|
||||
gzprintf(gzFp,"ITEM: TIMESTEP\n");
|
||||
gzprintf(gzFp,BIGINT_FORMAT "\n",update->ntimestep);
|
||||
gzprintf(gzFp,"ITEM: NUMBER OF ATOMS\n");
|
||||
|
|
|
@ -112,6 +112,8 @@ void DumpLocalGZ::write_header(bigint ndump)
|
|||
++unit_count;
|
||||
gzprintf(gzFp,"ITEM: UNITS\n%s\n",update->unit_style);
|
||||
}
|
||||
if (time_flag) gzprintf(gzFp,"ITEM: TIME\n%.16g\n",compute_time());
|
||||
|
||||
gzprintf(gzFp,"ITEM: TIMESTEP\n");
|
||||
gzprintf(gzFp,BIGINT_FORMAT "\n",update->ntimestep);
|
||||
gzprintf(gzFp,"ITEM: NUMBER OF ATOMS\n");
|
||||
|
|
|
@ -305,7 +305,8 @@ void PairGranular::compute(int eflag, int vflag)
|
|||
|
||||
delta = radsum - r;
|
||||
dR = delta*Reff;
|
||||
if (normal_model[itype][jtype] == JKR) {
|
||||
|
||||
if (normal_model[itype][jtype] == JKR) {
|
||||
touch[jj] = 1;
|
||||
R2=Reff*Reff;
|
||||
coh = normal_coeffs[itype][jtype][3];
|
||||
|
@ -391,6 +392,7 @@ void PairGranular::compute(int eflag, int vflag)
|
|||
} else {
|
||||
Fncrit = fabs(Fntot);
|
||||
}
|
||||
Fscrit = tangential_coeffs[itype][jtype][2] * Fncrit;
|
||||
|
||||
//------------------------------
|
||||
// tangential forces
|
||||
|
@ -446,7 +448,6 @@ void PairGranular::compute(int eflag, int vflag)
|
|||
fs3 = -k_tangential*history[2] - damp_tangential*vtr3;
|
||||
|
||||
// rescale frictional displacements and forces if needed
|
||||
Fscrit = tangential_coeffs[itype][jtype][2] * Fncrit;
|
||||
fs = sqrt(fs1*fs1 + fs2*fs2 + fs3*fs3);
|
||||
if (fs > Fscrit) {
|
||||
shrmag = sqrt(history[0]*history[0] + history[1]*history[1] +
|
||||
|
@ -464,8 +465,8 @@ void PairGranular::compute(int eflag, int vflag)
|
|||
} else fs1 = fs2 = fs3 = 0.0;
|
||||
}
|
||||
} else { // classic pair gran/hooke (no history)
|
||||
fs = meff*damp_tangential*vrel;
|
||||
if (vrel != 0.0) Ft = MIN(Fne,fs) / vrel;
|
||||
fs = damp_tangential*vrel;
|
||||
if (vrel != 0.0) Ft = MIN(Fscrit,fs) / vrel;
|
||||
else Ft = 0.0;
|
||||
fs1 = -Ft*vtr1;
|
||||
fs2 = -Ft*vtr2;
|
||||
|
@ -635,7 +636,7 @@ void PairGranular::compute(int eflag, int vflag)
|
|||
torque[j][2] -= torroll3;
|
||||
}
|
||||
}
|
||||
if (evflag) ev_tally_xyz(i,j,nlocal,0,
|
||||
if (evflag) ev_tally_xyz(i,j,nlocal,force->newton_pair,
|
||||
0.0,0.0,fx,fy,fz,delx,dely,delz);
|
||||
}
|
||||
}
|
||||
|
@ -1374,22 +1375,6 @@ double PairGranular::single(int i, int j, int itype, int jtype,
|
|||
vn2 = ny*vnnr;
|
||||
vn3 = nz*vnnr;
|
||||
|
||||
double *rmass = atom->rmass;
|
||||
int *mask = atom->mask;
|
||||
mi = rmass[i];
|
||||
mj = rmass[j];
|
||||
if (fix_rigid) {
|
||||
if (mass_rigid[i] > 0.0) mi = mass_rigid[i];
|
||||
if (mass_rigid[j] > 0.0) mj = mass_rigid[j];
|
||||
}
|
||||
|
||||
meff = mi*mj / (mi+mj);
|
||||
if (mask[i] & freeze_group_bit) meff = mj;
|
||||
if (mask[j] & freeze_group_bit) meff = mi;
|
||||
|
||||
delta = radsum - r;
|
||||
dR = delta*Reff;
|
||||
|
||||
// tangential component
|
||||
|
||||
vt1 = vr1 - vn1;
|
||||
|
@ -1407,6 +1392,9 @@ double PairGranular::single(int i, int j, int itype, int jtype,
|
|||
// if I or J part of rigid body, use body mass
|
||||
// if I or J is frozen, meff is other particle
|
||||
|
||||
double *rmass = atom->rmass;
|
||||
int *mask = atom->mask;
|
||||
|
||||
mi = rmass[i];
|
||||
mj = rmass[j];
|
||||
if (fix_rigid) {
|
||||
|
@ -1451,11 +1439,13 @@ double PairGranular::single(int i, int j, int itype, int jtype,
|
|||
}
|
||||
|
||||
if (damping_model[itype][jtype] == VELOCITY) {
|
||||
damp_normal = normal_coeffs[itype][jtype][1];
|
||||
damp_normal = 1;
|
||||
} else if (damping_model[itype][jtype] == MASS_VELOCITY) {
|
||||
damp_normal = meff;
|
||||
} else if (damping_model[itype][jtype] == VISCOELASTIC) {
|
||||
damp_normal = normal_coeffs[itype][jtype][1]*a*meff;
|
||||
damp_normal = a*meff;
|
||||
} else if (damping_model[itype][jtype] == TSUJI) {
|
||||
damp_normal = normal_coeffs[itype][jtype][1]*sqrt(meff*knfac);
|
||||
damp_normal = sqrt(meff*knfac);
|
||||
}
|
||||
|
||||
damp_normal_prefactor = normal_coeffs[itype][jtype][1]*damp_normal;
|
||||
|
@ -1506,6 +1496,7 @@ double PairGranular::single(int i, int j, int itype, int jtype,
|
|||
} else {
|
||||
Fncrit = fabs(Fntot);
|
||||
}
|
||||
Fscrit = tangential_coeffs[itype][jtype][2] * Fncrit;
|
||||
|
||||
//------------------------------
|
||||
// tangential forces
|
||||
|
@ -1518,13 +1509,6 @@ double PairGranular::single(int i, int j, int itype, int jtype,
|
|||
k_tangential *= a;
|
||||
} else if (tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_RESCALE) {
|
||||
k_tangential *= a;
|
||||
// on unloading, rescale the shear displacements
|
||||
if (a < history[3]) {
|
||||
double factor = a/history[3];
|
||||
history[0] *= factor;
|
||||
history[1] *= factor;
|
||||
history[2] *= factor;
|
||||
}
|
||||
}
|
||||
|
||||
shrmag = sqrt(history[0]*history[0] + history[1]*history[1] +
|
||||
|
@ -1535,35 +1519,34 @@ double PairGranular::single(int i, int j, int itype, int jtype,
|
|||
fs2 = -k_tangential*history[1] - damp_tangential*vtr2;
|
||||
fs3 = -k_tangential*history[2] - damp_tangential*vtr3;
|
||||
|
||||
// rescale frictional displacements and forces if needed
|
||||
Fscrit = tangential_coeffs[itype][jtype][2] * Fncrit;
|
||||
// rescale frictional forces if needed
|
||||
fs = sqrt(fs1*fs1 + fs2*fs2 + fs3*fs3);
|
||||
if (fs > Fscrit) {
|
||||
if (shrmag != 0.0) {
|
||||
history[0] = -1.0/k_tangential*(Fscrit*fs1/fs + damp_tangential*vtr1);
|
||||
history[1] = -1.0/k_tangential*(Fscrit*fs2/fs + damp_tangential*vtr2);
|
||||
history[2] = -1.0/k_tangential*(Fscrit*fs3/fs + damp_tangential*vtr3);
|
||||
fs1 *= Fscrit/fs;
|
||||
fs2 *= Fscrit/fs;
|
||||
fs3 *= Fscrit/fs;
|
||||
} else fs1 = fs2 = fs3 = 0.0;
|
||||
fs *= Fscrit/fs;
|
||||
} else fs1 = fs2 = fs3 = fs = 0.0;
|
||||
}
|
||||
|
||||
// classic pair gran/hooke (no history)
|
||||
} else {
|
||||
fs = meff*damp_tangential*vrel;
|
||||
if (vrel != 0.0) Ft = MIN(Fne,fs) / vrel;
|
||||
fs = damp_tangential*vrel;
|
||||
if (vrel != 0.0) Ft = MIN(Fscrit,fs) / vrel;
|
||||
else Ft = 0.0;
|
||||
fs1 = -Ft*vtr1;
|
||||
fs2 = -Ft*vtr2;
|
||||
fs3 = -Ft*vtr3;
|
||||
fs = Ft*vrel;
|
||||
}
|
||||
|
||||
//****************************************
|
||||
// rolling resistance
|
||||
//****************************************
|
||||
|
||||
if (roll_model[itype][jtype] != ROLL_NONE) {
|
||||
if ((roll_model[itype][jtype] != ROLL_NONE)
|
||||
|| (twist_model[itype][jtype] != TWIST_NONE)) {
|
||||
relrot1 = omega[i][0] - omega[j][0];
|
||||
relrot2 = omega[i][1] - omega[j][1];
|
||||
relrot3 = omega[i][2] - omega[j][2];
|
||||
|
@ -1601,7 +1584,8 @@ double PairGranular::single(int i, int j, int itype, int jtype,
|
|||
fr1 *= Frcrit/fr;
|
||||
fr2 *= Frcrit/fr;
|
||||
fr3 *= Frcrit/fr;
|
||||
} else fr1 = fr2 = fr3 = 0.0;
|
||||
fr *= Frcrit/fr;
|
||||
} else fr1 = fr2 = fr3 = fr = 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1628,9 +1612,13 @@ double PairGranular::single(int i, int j, int itype, int jtype,
|
|||
Mtcrit = mu_twist*Fncrit; // critical torque (eq 44)
|
||||
if (fabs(magtortwist) > Mtcrit) {
|
||||
magtortwist = -Mtcrit * signtwist; // eq 34
|
||||
}
|
||||
} else magtortwist = 0.0;
|
||||
}
|
||||
|
||||
|
||||
// set force and return no energy
|
||||
|
||||
fforce = Fntot*rinv;
|
||||
|
||||
// set single_extra quantities
|
||||
|
||||
svector[0] = fs1;
|
||||
|
|
|
@ -61,7 +61,6 @@ FixLangevinKokkos<DeviceType>::FixLangevinKokkos(LAMMPS *lmp, int narg, char **a
|
|||
k_ratio.template modify<LMPHostType>();
|
||||
|
||||
if(gjfflag){
|
||||
nvalues = 3;
|
||||
grow_arrays(atomKK->nmax);
|
||||
atom->add_callback(0);
|
||||
// initialize franprev to zero
|
||||
|
@ -69,8 +68,12 @@ FixLangevinKokkos<DeviceType>::FixLangevinKokkos(LAMMPS *lmp, int narg, char **a
|
|||
franprev[i][0] = 0.0;
|
||||
franprev[i][1] = 0.0;
|
||||
franprev[i][2] = 0.0;
|
||||
lv[i][0] = 0.0;
|
||||
lv[i][1] = 0.0;
|
||||
lv[i][2] = 0.0;
|
||||
}
|
||||
k_franprev.template modify<LMPHostType>();
|
||||
k_lv.template modify<LMPHostType>();
|
||||
}
|
||||
if(zeroflag){
|
||||
k_fsumall = tdual_double_1d_3n("langevin:fsumall");
|
||||
|
@ -94,6 +97,7 @@ FixLangevinKokkos<DeviceType>::~FixLangevinKokkos()
|
|||
memoryKK->destroy_kokkos(k_ratio,ratio);
|
||||
memoryKK->destroy_kokkos(k_flangevin,flangevin);
|
||||
if(gjfflag) memoryKK->destroy_kokkos(k_franprev,franprev);
|
||||
if(gjfflag) memoryKK->destroy_kokkos(k_lv,lv);
|
||||
memoryKK->destroy_kokkos(k_tforce,tforce);
|
||||
}
|
||||
|
||||
|
@ -107,6 +111,10 @@ void FixLangevinKokkos<DeviceType>::init()
|
|||
error->all(FLERR,"Fix langevin omega is not yet implemented with kokkos");
|
||||
if(ascale)
|
||||
error->all(FLERR,"Fix langevin angmom is not yet implemented with kokkos");
|
||||
if(gjfflag && tbiasflag)
|
||||
error->all(FLERR,"Fix langevin gjf + tbias is not yet implemented with kokkos");
|
||||
if(gjfflag && tbiasflag)
|
||||
error->warning(FLERR,"Fix langevin gjf + kokkos is not implemented with random gaussians");
|
||||
|
||||
// prefactors are modified in the init
|
||||
k_gfactor1.template modify<LMPHostType>();
|
||||
|
@ -121,6 +129,40 @@ void FixLangevinKokkos<DeviceType>::grow_arrays(int nmax)
|
|||
memoryKK->grow_kokkos(k_franprev,franprev,nmax,3,"langevin:franprev");
|
||||
d_franprev = k_franprev.template view<DeviceType>();
|
||||
h_franprev = k_franprev.template view<LMPHostType>();
|
||||
memoryKK->grow_kokkos(k_lv,lv,nmax,3,"langevin:lv");
|
||||
d_lv = k_lv.template view<DeviceType>();
|
||||
h_lv = k_lv.template view<LMPHostType>();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
template<class DeviceType>
|
||||
void FixLangevinKokkos<DeviceType>::initial_integrate(int vflag)
|
||||
{
|
||||
atomKK->sync(execution_space,datamask_read);
|
||||
atomKK->modified(execution_space,datamask_modify);
|
||||
|
||||
v = atomKK->k_v.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
int nlocal = atomKK->nlocal;
|
||||
if (igroup == atomKK->firstgroup) nlocal = atomKK->nfirst;
|
||||
|
||||
FixLangevinKokkosInitialIntegrateFunctor<DeviceType> functor(this);
|
||||
Kokkos::parallel_for(nlocal,functor);
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void FixLangevinKokkos<DeviceType>::initial_integrate_item(int i) const
|
||||
{
|
||||
if (mask[i] & groupbit) {
|
||||
f(i,0) /= gjfa;
|
||||
f(i,1) /= gjfa;
|
||||
f(i,2) /= gjfa;
|
||||
v(i,0) = d_lv(i,0);
|
||||
v(i,1) = d_lv(i,1);
|
||||
v(i,2) = d_lv(i,2);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
@ -140,6 +182,7 @@ void FixLangevinKokkos<DeviceType>::post_force(int vflag)
|
|||
k_gfactor2.template sync<DeviceType>();
|
||||
k_ratio.template sync<DeviceType>();
|
||||
if(gjfflag) k_franprev.template sync<DeviceType>();
|
||||
if(gjfflag) k_lv.template sync<DeviceType>();
|
||||
|
||||
boltz = force->boltz;
|
||||
dt = update->dt;
|
||||
|
@ -177,7 +220,7 @@ void FixLangevinKokkos<DeviceType>::post_force(int vflag)
|
|||
atomKK->sync(temperature->execution_space,temperature->datamask_read);
|
||||
temperature->compute_scalar();
|
||||
temperature->remove_bias_all(); // modifies velocities
|
||||
// if temeprature compute is kokkosized host-devcie comm won't be needed
|
||||
// if temeprature compute is kokkosized host-device comm won't be needed
|
||||
atomKK->modified(temperature->execution_space,temperature->datamask_modify);
|
||||
atomKK->sync(execution_space,temperature->datamask_modify);
|
||||
}
|
||||
|
@ -481,6 +524,7 @@ void FixLangevinKokkos<DeviceType>::post_force(int vflag)
|
|||
|
||||
// set modify flags for the views modified in post_force functor
|
||||
if (gjfflag) k_franprev.template modify<DeviceType>();
|
||||
if (gjfflag) k_lv.template modify<DeviceType>();
|
||||
if (tallyflag) k_flangevin.template modify<DeviceType>();
|
||||
|
||||
// set total force to zero
|
||||
|
@ -550,6 +594,10 @@ FSUM FixLangevinKokkos<DeviceType>::post_force_item(int i) const
|
|||
}
|
||||
|
||||
if (Tp_GJF) {
|
||||
d_lv(i,0) = gjfsib*v(i,0);
|
||||
d_lv(i,1) = gjfsib*v(i,1);
|
||||
d_lv(i,2) = gjfsib*v(i,2);
|
||||
|
||||
fswap = 0.5*(fran[0]+d_franprev(i,0));
|
||||
d_franprev(i,0) = fran[0];
|
||||
fran[0] = fswap;
|
||||
|
@ -560,15 +608,15 @@ FSUM FixLangevinKokkos<DeviceType>::post_force_item(int i) const
|
|||
d_franprev(i,2) = fran[2];
|
||||
fran[2] = fswap;
|
||||
|
||||
fdrag[0] *= gjffac;
|
||||
fdrag[1] *= gjffac;
|
||||
fdrag[2] *= gjffac;
|
||||
fran[0] *= gjffac;
|
||||
fran[1] *= gjffac;
|
||||
fran[2] *= gjffac;
|
||||
f(i,0) *= gjffac;
|
||||
f(i,1) *= gjffac;
|
||||
f(i,2) *= gjffac;
|
||||
fdrag[0] *= gjfa;
|
||||
fdrag[1] *= gjfa;
|
||||
fdrag[2] *= gjfa;
|
||||
fran[0] *= gjfa;
|
||||
fran[1] *= gjfa;
|
||||
fran[2] *= gjfa;
|
||||
f(i,0) *= gjfa;
|
||||
f(i,1) *= gjfa;
|
||||
f(i,2) *= gjfa;
|
||||
}
|
||||
|
||||
f(i,0) += fdrag[0] + fran[0];
|
||||
|
@ -576,6 +624,17 @@ FSUM FixLangevinKokkos<DeviceType>::post_force_item(int i) const
|
|||
f(i,2) += fdrag[2] + fran[2];
|
||||
|
||||
if (Tp_TALLY) {
|
||||
if (Tp_GJF){
|
||||
fdrag[0] = gamma1*d_lv(i,0)/gjfsib/gjfsib;
|
||||
fdrag[1] = gamma1*d_lv(i,1)/gjfsib/gjfsib;
|
||||
fdrag[2] = gamma1*d_lv(i,2)/gjfsib/gjfsib;
|
||||
fswap = (2*fran[0]/gjfa - d_franprev(i,0))/gjfsib;
|
||||
fran[0] = fswap;
|
||||
fswap = (2*fran[1]/gjfa - d_franprev(i,1))/gjfsib;
|
||||
fran[1] = fswap;
|
||||
fswap = (2*fran[2]/gjfa - d_franprev(i,2))/gjfsib;
|
||||
fran[2] = fswap;
|
||||
}
|
||||
d_flangevin(i,0) = fdrag[0] + fran[0];
|
||||
d_flangevin(i,1) = fdrag[1] + fran[1];
|
||||
d_flangevin(i,2) = fdrag[2] + fran[2];
|
||||
|
@ -719,9 +778,10 @@ double FixLangevinKokkos<DeviceType>::compute_energy_item(int i) const
|
|||
template<class DeviceType>
|
||||
void FixLangevinKokkos<DeviceType>::end_of_step()
|
||||
{
|
||||
if (!tallyflag) return;
|
||||
if (!tallyflag && !gjfflag) return;
|
||||
|
||||
v = atomKK->k_v.template view<DeviceType>();
|
||||
f = atomKK->k_f.template view<DeviceType>();
|
||||
mask = atomKK->k_mask.template view<DeviceType>();
|
||||
|
||||
atomKK->sync(execution_space,V_MASK | MASK_MASK);
|
||||
|
@ -733,9 +793,81 @@ void FixLangevinKokkos<DeviceType>::end_of_step()
|
|||
FixLangevinKokkosTallyEnergyFunctor<DeviceType> tally_functor(this);
|
||||
Kokkos::parallel_reduce(nlocal,tally_functor,energy_onestep);
|
||||
|
||||
if (gjfflag){
|
||||
if (rmass.data()) {
|
||||
FixLangevinKokkosEndOfStepFunctor<DeviceType,1> functor(this);
|
||||
Kokkos::parallel_for(nlocal,functor);
|
||||
} else {
|
||||
mass = atomKK->k_mass.view<DeviceType>();
|
||||
FixLangevinKokkosEndOfStepFunctor<DeviceType,0> functor(this);
|
||||
Kokkos::parallel_for(nlocal,functor);
|
||||
}
|
||||
}
|
||||
|
||||
energy += energy_onestep*update->dt;
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void FixLangevinKokkos<DeviceType>::end_of_step_item(int i) const {
|
||||
double tmp[3];
|
||||
if (mask[i] & groupbit) {
|
||||
const double dtfm = force->ftm2v * 0.5 * dt / mass[type[i]];
|
||||
tmp[0] = v(i,0);
|
||||
tmp[1] = v(i,1);
|
||||
tmp[2] = v(i,2);
|
||||
if (!osflag){
|
||||
v(i,0) = d_lv(i,0);
|
||||
v(i,1) = d_lv(i,1);
|
||||
v(i,2) = d_lv(i,2);
|
||||
} else {
|
||||
v(i,0) = 0.5 * gjfsib * gjfsib * (v(i,0) + dtfm * f(i,0) / gjfa) +
|
||||
dtfm * 0.5 * (gjfsib * d_flangevin(i,0) - d_franprev(i,0)) +
|
||||
(gjfsib * gjfa * 0.5 + dt * 0.25 / t_period / gjfsib) * d_lv(i,0);
|
||||
v(i,1) = 0.5 * gjfsib * gjfsib * (v(i,1) + dtfm * f(i,1) / gjfa) +
|
||||
dtfm * 0.5 * (gjfsib * d_flangevin(i,0) - d_franprev(i,1)) +
|
||||
(gjfsib * gjfa * 0.5 + dt * 0.25 / t_period / gjfsib) * d_lv(i,1);
|
||||
v(i,2) = 0.5 * gjfsib * gjfsib * (v(i,2) + dtfm * f(i,2) / gjfa) +
|
||||
dtfm * 0.5 * (gjfsib * d_flangevin(i,0) - d_franprev(i,2)) +
|
||||
(gjfsib * gjfa * 0.5 + dt * 0.25 / t_period / gjfsib) * d_lv(i,2);
|
||||
}
|
||||
d_lv(i,0) = tmp[0];
|
||||
d_lv(i,1) = tmp[1];
|
||||
d_lv(i,2) = tmp[2];
|
||||
}
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void FixLangevinKokkos<DeviceType>::end_of_step_rmass_item(int i) const
|
||||
{
|
||||
double tmp[3];
|
||||
if (mask[i] & groupbit) {
|
||||
const double dtfm = force->ftm2v * 0.5 * dt / rmass[i];
|
||||
tmp[0] = v(i,0);
|
||||
tmp[1] = v(i,1);
|
||||
tmp[2] = v(i,2);
|
||||
if (!osflag){
|
||||
v(i,0) = d_lv(i,0);
|
||||
v(i,1) = d_lv(i,1);
|
||||
v(i,2) = d_lv(i,2);
|
||||
} else {
|
||||
v(i,0) = 0.5 * gjfsib * gjfsib * (v(i,0) + dtfm * f(i,0) / gjfa) +
|
||||
dtfm * 0.5 * (gjfsib * d_flangevin(i,0) - d_franprev(i,0)) +
|
||||
(gjfsib * gjfa * 0.5 + dt * 0.25 / t_period / gjfsib) * d_lv(i,0);
|
||||
v(i,1) = 0.5 * gjfsib * gjfsib * (v(i,1) + dtfm * f(i,1) / gjfa) +
|
||||
dtfm * 0.5 * (gjfsib * d_flangevin(i,1) - d_franprev(i,1)) +
|
||||
(gjfsib * gjfa * 0.5 + dt * 0.25 / t_period / gjfsib) * d_lv(i,1);
|
||||
v(i,2) = 0.5 * gjfsib * gjfsib * (v(i,2) + dtfm * f(i,2) / gjfa) +
|
||||
dtfm * 0.5 * (gjfsib * d_flangevin(i,2) - d_franprev(i,2)) +
|
||||
(gjfsib * gjfa * 0.5 + dt * 0.25 / t_period / gjfsib) * d_lv(i,2);
|
||||
}
|
||||
d_lv(i,0) = tmp[0];
|
||||
d_lv(i,1) = tmp[1];
|
||||
d_lv(i,2) = tmp[2];
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
copy values within local atom-based array
|
||||
------------------------------------------------------------------------- */
|
||||
|
@ -743,10 +875,15 @@ void FixLangevinKokkos<DeviceType>::end_of_step()
|
|||
template<class DeviceType>
|
||||
void FixLangevinKokkos<DeviceType>::copy_arrays(int i, int j, int delflag)
|
||||
{
|
||||
for (int m = 0; m < nvalues; m++)
|
||||
h_franprev(j,m) = h_franprev(i,m);
|
||||
h_franprev(j,0) = h_franprev(i,0);
|
||||
h_franprev(j,1) = h_franprev(i,1);
|
||||
h_franprev(j,2) = h_franprev(i,2);
|
||||
h_lv(j,0) = h_lv(i,0);
|
||||
h_lv(j,1) = h_lv(i,1);
|
||||
h_lv(j,2) = h_lv(i,2);
|
||||
|
||||
k_franprev.template modify<LMPHostType>();
|
||||
k_lv.template modify<LMPHostType>();
|
||||
|
||||
}
|
||||
|
||||
|
@ -765,6 +902,7 @@ void FixLangevinKokkos<DeviceType>::cleanup_copy()
|
|||
tforce = NULL;
|
||||
gjfflag = 0;
|
||||
franprev = NULL;
|
||||
lv = NULL;
|
||||
id = style = NULL;
|
||||
vatom = NULL;
|
||||
}
|
||||
|
|
|
@ -56,6 +56,9 @@ namespace LAMMPS_NS {
|
|||
template<class DeviceType>
|
||||
class FixLangevinKokkos;
|
||||
|
||||
template <class DeviceType>
|
||||
class FixLangevinKokkosInitialIntegrateFunctor;
|
||||
|
||||
template<class DeviceType,int Tp_TSTYLEATOM, int Tp_GJF, int Tp_TALLY,
|
||||
int Tp_BIAS, int Tp_RMASS, int Tp_ZERO>
|
||||
class FixLangevinKokkosPostForceFunctor;
|
||||
|
@ -72,6 +75,7 @@ namespace LAMMPS_NS {
|
|||
|
||||
void cleanup_copy();
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
void post_force(int);
|
||||
void reset_dt();
|
||||
void grow_arrays(int);
|
||||
|
@ -79,6 +83,12 @@ namespace LAMMPS_NS {
|
|||
double compute_scalar();
|
||||
void end_of_step();
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void initial_integrate_item(int) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void initial_integrate_rmass_item(int) const;
|
||||
|
||||
template<int Tp_TSTYLEATOM, int Tp_GJF, int Tp_TALLY,
|
||||
int Tp_BIAS, int Tp_RMASS, int Tp_ZERO>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
|
@ -90,14 +100,25 @@ namespace LAMMPS_NS {
|
|||
KOKKOS_INLINE_FUNCTION
|
||||
double compute_energy_item(int) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void end_of_step_item(int) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void end_of_step_rmass_item(int) const;
|
||||
|
||||
private:
|
||||
class CommKokkos *commKK;
|
||||
|
||||
typename ArrayTypes<DeviceType>::t_float_1d rmass;
|
||||
typename ArrayTypes<DeviceType>::t_float_1d mass;
|
||||
typename ArrayTypes<DeviceType>::tdual_double_2d k_franprev;
|
||||
typename ArrayTypes<DeviceType>::t_double_2d d_franprev;
|
||||
HAT::t_double_2d h_franprev;
|
||||
|
||||
typename ArrayTypes<DeviceType>::tdual_double_2d k_lv;
|
||||
typename ArrayTypes<DeviceType>::t_double_2d d_lv;
|
||||
HAT::t_double_2d h_lv;
|
||||
|
||||
typename ArrayTypes<DeviceType>::tdual_double_2d k_flangevin;
|
||||
typename ArrayTypes<DeviceType>::t_double_2d d_flangevin;
|
||||
HAT::t_double_2d h_flangevin;
|
||||
|
@ -130,6 +151,21 @@ namespace LAMMPS_NS {
|
|||
|
||||
};
|
||||
|
||||
template <class DeviceType>
|
||||
struct FixLangevinKokkosInitialIntegrateFunctor {
|
||||
typedef DeviceType device_type ;
|
||||
FixLangevinKokkos<DeviceType> c;
|
||||
|
||||
FixLangevinKokkosInitialIntegrateFunctor(FixLangevinKokkos<DeviceType>* c_ptr):
|
||||
c(*c_ptr) {c.cleanup_copy();};
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator()(const int i) const {
|
||||
c.initial_integrate_item(i);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <class DeviceType,int Tp_TSTYLEATOM, int Tp_GJF, int Tp_TALLY,
|
||||
int Tp_BIAS, int Tp_RMASS, int Tp_ZERO>
|
||||
struct FixLangevinKokkosPostForceFunctor {
|
||||
|
@ -207,6 +243,21 @@ namespace LAMMPS_NS {
|
|||
update += source;
|
||||
}
|
||||
};
|
||||
|
||||
template <class DeviceType, int RMass>
|
||||
struct FixLangevinKokkosEndOfStepFunctor {
|
||||
typedef DeviceType device_type ;
|
||||
FixLangevinKokkos<DeviceType> c;
|
||||
|
||||
FixLangevinKokkosEndOfStepFunctor(FixLangevinKokkos<DeviceType>* c_ptr):
|
||||
c(*c_ptr) {c.cleanup_copy();}
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator()(const int i) const {
|
||||
if (RMass) c.end_of_step_rmass_item(i);
|
||||
else c.end_of_step_item(i);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -231,4 +282,12 @@ E: Fix langevin variable returned negative temperature
|
|||
|
||||
Self-explanatory.
|
||||
|
||||
E: Fix langevin gjf with tbias is not yet implemented with kokkos
|
||||
|
||||
This option is not yet available.
|
||||
|
||||
W: Fix langevin gjf using random gaussians is not implemented with kokkos
|
||||
|
||||
This will most likely cause errors in kinetic fluctuations.
|
||||
|
||||
*/
|
||||
|
|
|
@ -39,6 +39,7 @@ struct TagPairSNAPPreUi{};
|
|||
struct TagPairSNAPComputeUi{};
|
||||
struct TagPairSNAPComputeZi{};
|
||||
struct TagPairSNAPComputeBi{};
|
||||
struct TagPairSNAPZeroYi{};
|
||||
struct TagPairSNAPComputeYi{};
|
||||
struct TagPairSNAPComputeDuidrj{};
|
||||
struct TagPairSNAPComputeDeidrj{};
|
||||
|
@ -73,19 +74,22 @@ public:
|
|||
void operator() (TagPairSNAPComputeNeigh,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeNeigh>::member_type& team) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator() (TagPairSNAPPreUi,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPPreUi>::member_type& team) const;
|
||||
void operator() (TagPairSNAPPreUi,const int& ii) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator() (TagPairSNAPComputeUi,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeUi>::member_type& team) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator() (TagPairSNAPComputeZi,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeZi>::member_type& team) const;
|
||||
void operator() (TagPairSNAPComputeZi,const int& ii) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator() (TagPairSNAPComputeBi,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeBi>::member_type& team) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator() (TagPairSNAPComputeYi,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeYi>::member_type& team) const;
|
||||
void operator() (TagPairSNAPZeroYi,const int& ii) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator() (TagPairSNAPComputeYi,const int& ii) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator() (TagPairSNAPComputeDuidrj,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeDuidrj>::member_type& team) const;
|
||||
|
|
|
@ -184,22 +184,12 @@ void PairSNAPKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
|||
Kokkos::parallel_reduce("PairSNAPKokkos::find_max_neighs",inum, FindMaxNumNeighs<DeviceType>(k_list), Kokkos::Experimental::Max<int>(max_neighs));
|
||||
|
||||
int vector_length = 1;
|
||||
int ui_vector_length = 1;
|
||||
int team_size = 1;
|
||||
int yi_team_size = 1;
|
||||
int team_size_max = Kokkos::TeamPolicy<DeviceType>::team_size_max(*this);
|
||||
#ifdef KOKKOS_ENABLE_CUDA
|
||||
team_size = 32;//max_neighs;
|
||||
if (team_size*vector_length > team_size_max)
|
||||
team_size = team_size_max/vector_length;
|
||||
|
||||
yi_team_size = 256;
|
||||
if (yi_team_size*vector_length > team_size_max)
|
||||
yi_team_size = team_size_max/vector_length;
|
||||
|
||||
ui_vector_length = 8;
|
||||
if (team_size*ui_vector_length > team_size_max)
|
||||
team_size = team_size_max/ui_vector_length;
|
||||
#endif
|
||||
|
||||
if (beta_max < inum) {
|
||||
|
@ -227,17 +217,21 @@ void PairSNAPKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
|||
Kokkos::parallel_for("ComputeNeigh",policy_neigh,*this);
|
||||
|
||||
//PreUi
|
||||
typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPPreUi> policy_preui(chunk_size,team_size,vector_length);
|
||||
typename Kokkos::RangePolicy<DeviceType, TagPairSNAPPreUi> policy_preui(0,chunk_size);
|
||||
Kokkos::parallel_for("PreUi",policy_preui,*this);
|
||||
|
||||
//ComputeUi
|
||||
typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeUi> policy_ui(((inum+team_size-1)/team_size)*max_neighs,team_size,ui_vector_length);
|
||||
typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeUi> policy_ui(((inum+team_size-1)/team_size)*max_neighs,team_size,vector_length);
|
||||
Kokkos::parallel_for("ComputeUi",policy_ui,*this);
|
||||
|
||||
//Ulisttot transpose
|
||||
snaKK.transpose_ulisttot();
|
||||
|
||||
//Compute bispectrum
|
||||
if (quadraticflag || eflag) {
|
||||
//ComputeZi
|
||||
typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeZi> policy_zi(chunk_size,team_size,vector_length);
|
||||
int idxz_max = snaKK.idxz_max;
|
||||
typename Kokkos::RangePolicy<DeviceType, TagPairSNAPComputeZi> policy_zi(0,chunk_size*idxz_max);
|
||||
Kokkos::parallel_for("ComputeZi",policy_zi,*this);
|
||||
|
||||
//ComputeBi
|
||||
|
@ -250,7 +244,12 @@ void PairSNAPKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
|||
Kokkos::parallel_for("ComputeBeta",policy_beta,*this);
|
||||
|
||||
//ComputeYi
|
||||
typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeYi> policy_yi(chunk_size,yi_team_size,vector_length);
|
||||
typename Kokkos::RangePolicy<DeviceType, TagPairSNAPZeroYi> policy_zero_yi(0,chunk_size);
|
||||
Kokkos::parallel_for("ZeroYi",policy_zero_yi,*this);
|
||||
|
||||
//ComputeYi
|
||||
int idxz_max = snaKK.idxz_max;
|
||||
typename Kokkos::RangePolicy<DeviceType, TagPairSNAPComputeYi> policy_yi(0,chunk_size*idxz_max);
|
||||
Kokkos::parallel_for("ComputeYi",policy_yi,*this);
|
||||
|
||||
//ComputeDuidrj
|
||||
|
@ -504,10 +503,9 @@ void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAPComputeNeigh,const typen
|
|||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAPPreUi,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPPreUi>::member_type& team) const {
|
||||
int ii = team.league_rank();
|
||||
void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAPPreUi,const int& ii) const {
|
||||
SNAKokkos<DeviceType> my_sna = snaKK;
|
||||
my_sna.pre_ui(team,ii);
|
||||
my_sna.pre_ui(ii);
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
|
@ -529,18 +527,23 @@ void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAPComputeUi,const typename
|
|||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAPComputeYi,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeYi>::member_type& team) const {
|
||||
int ii = team.league_rank();
|
||||
void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAPZeroYi,const int& ii) const {
|
||||
SNAKokkos<DeviceType> my_sna = snaKK;
|
||||
my_sna.compute_yi(team,ii,d_beta);
|
||||
my_sna.zero_yi(ii);
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAPComputeZi,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeZi>::member_type& team) const {
|
||||
int ii = team.league_rank();
|
||||
void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAPComputeYi,const int& ii) const {
|
||||
SNAKokkos<DeviceType> my_sna = snaKK;
|
||||
my_sna.compute_zi(team,ii);
|
||||
my_sna.compute_yi(ii,d_beta);
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAPComputeZi,const int& ii) const {
|
||||
SNAKokkos<DeviceType> my_sna = snaKK;
|
||||
my_sna.compute_zi(ii);
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
|
|
|
@ -26,15 +26,28 @@
|
|||
namespace LAMMPS_NS {
|
||||
|
||||
typedef double SNAreal;
|
||||
typedef struct { SNAreal re, im; } SNAcomplex;
|
||||
|
||||
struct SNAKK_ZINDICES {
|
||||
int j1, j2, j, ma1min, ma2max, mb1min, mb2max, na, nb, jju;
|
||||
//typedef struct { SNAreal re, im; } SNAcomplex;
|
||||
struct alignas(2*sizeof(SNAreal)) SNAcomplex{
|
||||
SNAreal re, im;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
SNAcomplex() : re(0),im(0)
|
||||
{}
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
SNAcomplex(SNAreal real_in, SNAreal imag_in)
|
||||
:re(real_in),im(imag_in)
|
||||
{}
|
||||
};
|
||||
|
||||
struct SNAKK_BINDICES {
|
||||
int j1, j2, j;
|
||||
};
|
||||
//struct SNAKK_ZINDICES {
|
||||
// int j1, j2, j, ma1min, ma2max, mb1min, mb2max, na, nb, jju;
|
||||
//};
|
||||
//
|
||||
//struct SNAKK_BINDICES {
|
||||
// int j1, j2, j;
|
||||
//};
|
||||
|
||||
template<class DeviceType>
|
||||
class SNAKokkos {
|
||||
|
@ -53,12 +66,32 @@ public:
|
|||
typedef Kokkos::View<SNAcomplex*, DeviceType> t_sna_1c;
|
||||
typedef Kokkos::View<SNAcomplex*, DeviceType, Kokkos::MemoryTraits<Kokkos::Atomic> > t_sna_1c_atomic;
|
||||
typedef Kokkos::View<SNAcomplex**, DeviceType> t_sna_2c;
|
||||
typedef Kokkos::View<SNAcomplex**, Kokkos::LayoutRight, DeviceType> t_sna_2c_cpu;
|
||||
typedef Kokkos::View<SNAcomplex**, Kokkos::LayoutRight, DeviceType> t_sna_2c_lr;
|
||||
typedef Kokkos::View<SNAcomplex***, DeviceType> t_sna_3c;
|
||||
typedef Kokkos::View<SNAcomplex***[3], DeviceType> t_sna_4c;
|
||||
typedef Kokkos::View<SNAcomplex**[3], DeviceType> t_sna_3c3;
|
||||
typedef Kokkos::View<SNAcomplex*****, DeviceType> t_sna_5c;
|
||||
|
||||
// Helper class to get ulisttot_r
|
||||
|
||||
template<typename DeviceLayout, typename T1, typename T2>
|
||||
class UlisttotHelper {
|
||||
public:
|
||||
inline
|
||||
static void transpose(T1 &ulisttot_lr, const T2 &ulisttot) {
|
||||
Kokkos::deep_copy(ulisttot_lr,ulisttot);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
class UlisttotHelper<Kokkos::LayoutRight,T1,T2> {
|
||||
public:
|
||||
inline
|
||||
static void transpose(T1 &ulisttot_lr, const T2 &ulisttot) {
|
||||
ulisttot_lr = ulisttot;
|
||||
}
|
||||
};
|
||||
|
||||
inline
|
||||
SNAKokkos() {};
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
|
@ -80,17 +113,22 @@ inline
|
|||
|
||||
int ncoeff;
|
||||
|
||||
inline
|
||||
void transpose_ulisttot();
|
||||
|
||||
// functions for bispectrum coefficients
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void pre_ui(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int); // ForceSNAP
|
||||
void pre_ui(const int&); // ForceSNAP
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void compute_ui(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int, int); // ForceSNAP
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void compute_ui_orig(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int, int); // ForceSNAP
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void compute_zi(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int); // ForceSNAP
|
||||
void compute_zi(const int&); // ForceSNAP
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void compute_yi(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int,
|
||||
void zero_yi(const int&);
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void compute_yi(int,
|
||||
const Kokkos::View<F_FLOAT**, DeviceType> &beta); // ForceSNAP
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void compute_bi(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int); // ForceSNAP
|
||||
|
@ -129,23 +167,25 @@ inline
|
|||
int twojmax, diagonalstyle;
|
||||
|
||||
t_sna_2d blist;
|
||||
t_sna_2c_cpu ulisttot;
|
||||
t_sna_2c ulisttot;
|
||||
t_sna_2c_lr ulisttot_lr;
|
||||
t_sna_2c zlist;
|
||||
|
||||
t_sna_3c ulist;
|
||||
t_sna_2c ylist;
|
||||
t_sna_2c_lr ylist;
|
||||
|
||||
// derivatives of data
|
||||
t_sna_4c dulist;
|
||||
|
||||
int idxcg_max, idxu_max, idxz_max, idxb_max;
|
||||
|
||||
private:
|
||||
double rmin0, rfac0;
|
||||
|
||||
//use indexlist instead of loops, constructor generates these
|
||||
// Same across all SNAKokkos
|
||||
Kokkos::View<SNAKK_ZINDICES*, DeviceType> idxz;
|
||||
Kokkos::View<SNAKK_BINDICES*, DeviceType> idxb;
|
||||
int idxcg_max, idxu_max, idxz_max, idxb_max;
|
||||
Kokkos::View<int*[10], DeviceType> idxz;
|
||||
Kokkos::View<int*[3], DeviceType> idxb;
|
||||
Kokkos::View<int***, DeviceType> idxcg_block;
|
||||
Kokkos::View<int*, DeviceType> idxu_block;
|
||||
Kokkos::View<int***, DeviceType> idxz_block;
|
||||
|
@ -173,9 +213,9 @@ inline
|
|||
inline
|
||||
void init_rootpqarray(); // init()
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void zero_uarraytot(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int); // compute_ui
|
||||
void zero_uarraytot(const int&); // compute_ui
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void addself_uarraytot(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int, double); // compute_ui
|
||||
void addself_uarraytot(const int&, const double&); // compute_ui
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void add_uarraytot(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int, int, double, double, double); // compute_ui
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ void SNAKokkos<DeviceType>::build_indexlist()
|
|||
if (j >= j1) idxb_count++;
|
||||
|
||||
idxb_max = idxb_count;
|
||||
idxb = Kokkos::View<SNAKK_BINDICES*, DeviceType>("SNAKokkos::idxb",idxb_max);
|
||||
idxb = Kokkos::View<int*[3], DeviceType>("SNAKokkos::idxb",idxb_max);
|
||||
auto h_idxb = Kokkos::create_mirror_view(idxb);
|
||||
|
||||
idxb_count = 0;
|
||||
|
@ -125,9 +125,9 @@ void SNAKokkos<DeviceType>::build_indexlist()
|
|||
for(int j2 = 0; j2 <= j1; j2++)
|
||||
for(int j = j1 - j2; j <= MIN(twojmax, j1 + j2); j += 2)
|
||||
if (j >= j1) {
|
||||
h_idxb[idxb_count].j1 = j1;
|
||||
h_idxb[idxb_count].j2 = j2;
|
||||
h_idxb[idxb_count].j = j;
|
||||
h_idxb(idxb_count,0) = j1;
|
||||
h_idxb(idxb_count,1) = j2;
|
||||
h_idxb(idxb_count,2) = j;
|
||||
idxb_count++;
|
||||
}
|
||||
Kokkos::deep_copy(idxb,h_idxb);
|
||||
|
@ -160,7 +160,7 @@ void SNAKokkos<DeviceType>::build_indexlist()
|
|||
idxz_count++;
|
||||
|
||||
idxz_max = idxz_count;
|
||||
idxz = Kokkos::View<SNAKK_ZINDICES*, DeviceType>("SNAKokkos::idxz",idxz_max);
|
||||
idxz = Kokkos::View<int*[10], DeviceType>("SNAKokkos::idxz",idxz_max);
|
||||
auto h_idxz = Kokkos::create_mirror_view(idxz);
|
||||
|
||||
idxz_block = Kokkos::View<int***, DeviceType>("SNAKokkos::idxz_block", jdim,jdim,jdim);
|
||||
|
@ -178,20 +178,20 @@ void SNAKokkos<DeviceType>::build_indexlist()
|
|||
|
||||
for (int mb = 0; 2*mb <= j; mb++)
|
||||
for (int ma = 0; ma <= j; ma++) {
|
||||
h_idxz[idxz_count].j1 = j1;
|
||||
h_idxz[idxz_count].j2 = j2;
|
||||
h_idxz[idxz_count].j = j;
|
||||
h_idxz[idxz_count].ma1min = MAX(0, (2 * ma - j - j2 + j1) / 2);
|
||||
h_idxz[idxz_count].ma2max = (2 * ma - j - (2 * h_idxz[idxz_count].ma1min - j1) + j2) / 2;
|
||||
h_idxz[idxz_count].na = MIN(j1, (2 * ma - j + j2 + j1) / 2) - h_idxz[idxz_count].ma1min + 1;
|
||||
h_idxz[idxz_count].mb1min = MAX(0, (2 * mb - j - j2 + j1) / 2);
|
||||
h_idxz[idxz_count].mb2max = (2 * mb - j - (2 * h_idxz[idxz_count].mb1min - j1) + j2) / 2;
|
||||
h_idxz[idxz_count].nb = MIN(j1, (2 * mb - j + j2 + j1) / 2) - h_idxz[idxz_count].mb1min + 1;
|
||||
h_idxz(idxz_count,0) = j1;
|
||||
h_idxz(idxz_count,1) = j2;
|
||||
h_idxz(idxz_count,2) = j;
|
||||
h_idxz(idxz_count,3) = MAX(0, (2 * ma - j - j2 + j1) / 2);
|
||||
h_idxz(idxz_count,4) = (2 * ma - j - (2 * h_idxz(idxz_count,3) - j1) + j2) / 2;
|
||||
h_idxz(idxz_count,5) = MAX(0, (2 * mb - j - j2 + j1) / 2);
|
||||
h_idxz(idxz_count,6) = (2 * mb - j - (2 * h_idxz(idxz_count,5) - j1) + j2) / 2;
|
||||
h_idxz(idxz_count,7) = MIN(j1, (2 * ma - j + j2 + j1) / 2) - h_idxz(idxz_count,3) + 1;
|
||||
h_idxz(idxz_count,8) = MIN(j1, (2 * mb - j + j2 + j1) / 2) - h_idxz(idxz_count,5) + 1;
|
||||
|
||||
// apply to z(j1,j2,j,ma,mb) to unique element of y(j)
|
||||
|
||||
const int jju = h_idxu_block[j] + (j+1)*mb + ma;
|
||||
h_idxz[idxz_count].jju = jju;
|
||||
h_idxz(idxz_count,9) = jju;
|
||||
|
||||
idxz_count++;
|
||||
}
|
||||
|
@ -225,11 +225,13 @@ void SNAKokkos<DeviceType>::grow_rij(int newnatom, int newnmax)
|
|||
dedr = t_sna_3d("sna:dedr",natom,nmax,3);
|
||||
|
||||
blist = t_sna_2d("sna:blist",natom,idxb_max);
|
||||
ulisttot = t_sna_2c_cpu("sna:ulisttot",natom,idxu_max);
|
||||
ulisttot = t_sna_2c("sna:ulisttot",natom,idxu_max);
|
||||
if (!Kokkos::Impl::is_same<typename DeviceType::array_layout,Kokkos::LayoutRight>::value)
|
||||
ulisttot_lr = t_sna_2c_lr("sna:ulisttot_lr",natom,idxu_max);
|
||||
zlist = t_sna_2c("sna:zlist",natom,idxz_max);
|
||||
|
||||
ulist = t_sna_3c("sna:ulist",natom,nmax,idxu_max);
|
||||
ylist = t_sna_2c("sna:ylist",natom,idxu_max);
|
||||
ylist = t_sna_2c_lr("sna:ylist",natom,idxu_max);
|
||||
|
||||
dulist = t_sna_4c("sna:dulist",natom,nmax,idxu_max);
|
||||
}
|
||||
|
@ -240,15 +242,15 @@ void SNAKokkos<DeviceType>::grow_rij(int newnatom, int newnmax)
|
|||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void SNAKokkos<DeviceType>::pre_ui(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int iatom)
|
||||
void SNAKokkos<DeviceType>::pre_ui(const int& iatom)
|
||||
{
|
||||
if(team.team_rank() == 0) {
|
||||
zero_uarraytot(team,iatom);
|
||||
//if(team.team_rank() == 0) {
|
||||
zero_uarraytot(iatom);
|
||||
//Kokkos::single(Kokkos::PerThread(team), [&] (){
|
||||
addself_uarraytot(team,iatom,wself);
|
||||
addself_uarraytot(iatom,wself);
|
||||
//});
|
||||
}
|
||||
team.team_barrier();
|
||||
//}
|
||||
//team.team_barrier();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -278,50 +280,7 @@ void SNAKokkos<DeviceType>::compute_ui(const typename Kokkos::TeamPolicy<DeviceT
|
|||
z0 = r / tan(theta0);
|
||||
|
||||
compute_uarray(team, iatom, jnbor, x, y, z, z0, r);
|
||||
//Kokkos::single(Kokkos::PerThread(team), [&] (){
|
||||
add_uarraytot(team, iatom, jnbor, r, wj(iatom,jnbor), rcutij(iatom,jnbor));
|
||||
//});
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void SNAKokkos<DeviceType>::compute_ui_orig(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int iatom, int jnum)
|
||||
{
|
||||
double rsq, r, x, y, z, z0, theta0;
|
||||
|
||||
// utot(j,ma,mb) = 0 for all j,ma,ma
|
||||
// utot(j,ma,ma) = 1 for all j,ma
|
||||
// for j in neighbors of i:
|
||||
// compute r0 = (x,y,z,z0)
|
||||
// utot(j,ma,mb) += u(r0;j,ma,mb) for all j,ma,mb
|
||||
|
||||
if(team.team_rank() == 0) {
|
||||
zero_uarraytot(team,iatom);
|
||||
//Kokkos::single(Kokkos::PerThread(team), [&] (){
|
||||
addself_uarraytot(team,iatom,wself);
|
||||
//});
|
||||
}
|
||||
team.team_barrier();
|
||||
|
||||
Kokkos::parallel_for(Kokkos::TeamThreadRange(team,jnum),
|
||||
[&] (const int& j) {
|
||||
//for(int j = 0; j < jnum; j++) {
|
||||
x = rij(iatom,j,0);
|
||||
y = rij(iatom,j,1);
|
||||
z = rij(iatom,j,2);
|
||||
rsq = x * x + y * y + z * z;
|
||||
r = sqrt(rsq);
|
||||
|
||||
theta0 = (r - rmin0) * rfac0 * MY_PI / (rcutij(iatom,j) - rmin0);
|
||||
// theta0 = (r - rmin0) * rscale0;
|
||||
z0 = r / tan(theta0);
|
||||
|
||||
compute_uarray(team, iatom, j, x, y, z, z0, r);
|
||||
//Kokkos::single(Kokkos::PerThread(team), [&] (){
|
||||
add_uarraytot(team, iatom, j, r, wj(iatom,j), rcutij(iatom,j));
|
||||
//});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -330,54 +289,52 @@ void SNAKokkos<DeviceType>::compute_ui_orig(const typename Kokkos::TeamPolicy<De
|
|||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void SNAKokkos<DeviceType>::compute_zi(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int iatom)
|
||||
void SNAKokkos<DeviceType>::compute_zi(const int& iter)
|
||||
{
|
||||
Kokkos::parallel_for(Kokkos::TeamThreadRange(team,idxz_max),
|
||||
[&] (const int& jjz) {
|
||||
//for(int jjz = 0; jjz < idxz_max; jjz++) {
|
||||
const int j1 = idxz[jjz].j1;
|
||||
const int j2 = idxz[jjz].j2;
|
||||
const int j = idxz[jjz].j;
|
||||
const int ma1min = idxz[jjz].ma1min;
|
||||
const int ma2max = idxz[jjz].ma2max;
|
||||
const int na = idxz[jjz].na;
|
||||
const int mb1min = idxz[jjz].mb1min;
|
||||
const int mb2max = idxz[jjz].mb2max;
|
||||
const int nb = idxz[jjz].nb;
|
||||
const int iatom = iter / idxz_max;
|
||||
const int jjz = iter % idxz_max;
|
||||
|
||||
const double* cgblock = cglist.data() + idxcg_block(j1,j2,j);
|
||||
const int j1 = idxz(jjz,0);
|
||||
const int j2 = idxz(jjz,1);
|
||||
const int j = idxz(jjz,2);
|
||||
const int ma1min = idxz(jjz,3);
|
||||
const int ma2max = idxz(jjz,4);
|
||||
const int mb1min = idxz(jjz,5);
|
||||
const int mb2max = idxz(jjz,6);
|
||||
const int na = idxz(jjz,7);
|
||||
const int nb = idxz(jjz,8);
|
||||
|
||||
zlist(iatom,jjz).re = 0.0;
|
||||
zlist(iatom,jjz).im = 0.0;
|
||||
const double* cgblock = cglist.data() + idxcg_block(j1,j2,j);
|
||||
|
||||
int jju1 = idxu_block[j1] + (j1+1)*mb1min;
|
||||
int jju2 = idxu_block[j2] + (j2+1)*mb2max;
|
||||
int icgb = mb1min*(j2+1) + mb2max;
|
||||
for(int ib = 0; ib < nb; ib++) {
|
||||
zlist(iatom,jjz).re = 0.0;
|
||||
zlist(iatom,jjz).im = 0.0;
|
||||
|
||||
double suma1_r = 0.0;
|
||||
double suma1_i = 0.0;
|
||||
int jju1 = idxu_block[j1] + (j1+1)*mb1min;
|
||||
int jju2 = idxu_block[j2] + (j2+1)*mb2max;
|
||||
int icgb = mb1min*(j2+1) + mb2max;
|
||||
for(int ib = 0; ib < nb; ib++) {
|
||||
|
||||
int ma1 = ma1min;
|
||||
int ma2 = ma2max;
|
||||
int icga = ma1min*(j2+1) + ma2max;
|
||||
for(int ia = 0; ia < na; ia++) {
|
||||
suma1_r += cgblock[icga] * (ulisttot(iatom,jju1+ma1).re * ulisttot(iatom,jju2+ma2).re - ulisttot(iatom,jju1+ma1).im * ulisttot(iatom,jju2+ma2).im);
|
||||
suma1_i += cgblock[icga] * (ulisttot(iatom,jju1+ma1).re * ulisttot(iatom,jju2+ma2).im + ulisttot(iatom,jju1+ma1).im * ulisttot(iatom,jju2+ma2).re);
|
||||
ma1++;
|
||||
ma2--;
|
||||
icga += j2;
|
||||
} // end loop over ia
|
||||
double suma1_r = 0.0;
|
||||
double suma1_i = 0.0;
|
||||
|
||||
zlist(iatom,jjz).re += cgblock[icgb] * suma1_r;
|
||||
zlist(iatom,jjz).im += cgblock[icgb] * suma1_i;
|
||||
int ma1 = ma1min;
|
||||
int ma2 = ma2max;
|
||||
int icga = ma1min*(j2+1) + ma2max;
|
||||
for(int ia = 0; ia < na; ia++) {
|
||||
suma1_r += cgblock[icga] * (ulisttot(iatom,jju1+ma1).re * ulisttot(iatom,jju2+ma2).re - ulisttot(iatom,jju1+ma1).im * ulisttot(iatom,jju2+ma2).im);
|
||||
suma1_i += cgblock[icga] * (ulisttot(iatom,jju1+ma1).re * ulisttot(iatom,jju2+ma2).im + ulisttot(iatom,jju1+ma1).im * ulisttot(iatom,jju2+ma2).re);
|
||||
ma1++;
|
||||
ma2--;
|
||||
icga += j2;
|
||||
} // end loop over ia
|
||||
|
||||
jju1 += j1+1;
|
||||
jju2 -= j2+1;
|
||||
icgb += j2;
|
||||
} // end loop over ib
|
||||
zlist(iatom,jjz).re += cgblock[icgb] * suma1_r;
|
||||
zlist(iatom,jjz).im += cgblock[icgb] * suma1_i;
|
||||
|
||||
}); // end loop over jjz
|
||||
jju1 += j1+1;
|
||||
jju2 -= j2+1;
|
||||
icgb += j2;
|
||||
} // end loop over ib
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -386,102 +343,94 @@ void SNAKokkos<DeviceType>::compute_zi(const typename Kokkos::TeamPolicy<DeviceT
|
|||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void SNAKokkos<DeviceType>::compute_yi(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int iatom,
|
||||
void SNAKokkos<DeviceType>::zero_yi(const int& iatom)
|
||||
{
|
||||
for (int j = 0; j < idxu_max; j++)
|
||||
ylist(iatom,j) = {0.0,0.0};
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
compute Yi from Ui without storing Zi, looping over zlist indices
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void SNAKokkos<DeviceType>::compute_yi(int iter,
|
||||
const Kokkos::View<F_FLOAT**, DeviceType> &beta)
|
||||
{
|
||||
double betaj;
|
||||
const int ii = iatom;
|
||||
const int iatom = iter / idxz_max;
|
||||
const int jjz = iter % idxz_max;
|
||||
|
||||
{
|
||||
Kokkos::parallel_for(Kokkos::TeamThreadRange(team,ylist.extent(1)),
|
||||
[&] (const int& i) {
|
||||
ylist(iatom,i).re = 0.0;
|
||||
ylist(iatom,i).im = 0.0;
|
||||
});
|
||||
}
|
||||
const int j1 = idxz(jjz,0);
|
||||
const int j2 = idxz(jjz,1);
|
||||
const int j = idxz(jjz,2);
|
||||
const int ma1min = idxz(jjz,3);
|
||||
const int ma2max = idxz(jjz,4);
|
||||
const int mb1min = idxz(jjz,5);
|
||||
const int mb2max = idxz(jjz,6);
|
||||
const int na = idxz(jjz,7);
|
||||
const int nb = idxz(jjz,8);
|
||||
const int jju = idxz(jjz,9);
|
||||
|
||||
//int flopsum = 0;
|
||||
const double* cgblock = cglist.data() + idxcg_block(j1,j2,j);
|
||||
//int mb = (2 * (mb1min+mb2max) - j1 - j2 + j) / 2;
|
||||
//int ma = (2 * (ma1min+ma2max) - j1 - j2 + j) / 2;
|
||||
|
||||
Kokkos::parallel_for(Kokkos::TeamThreadRange(team,idxz_max),
|
||||
[&] (const int& jjz) {
|
||||
//for(int jjz = 0; jjz < idxz_max; jjz++) {
|
||||
const int j1 = idxz[jjz].j1;
|
||||
const int j2 = idxz[jjz].j2;
|
||||
const int j = idxz[jjz].j;
|
||||
const int ma1min = idxz[jjz].ma1min;
|
||||
const int ma2max = idxz[jjz].ma2max;
|
||||
const int na = idxz[jjz].na;
|
||||
const int mb1min = idxz[jjz].mb1min;
|
||||
const int mb2max = idxz[jjz].mb2max;
|
||||
const int nb = idxz[jjz].nb;
|
||||
double ztmp_r = 0.0;
|
||||
double ztmp_i = 0.0;
|
||||
|
||||
const double* cgblock = cglist.data() + idxcg_block(j1,j2,j);
|
||||
//int mb = (2 * (mb1min+mb2max) - j1 - j2 + j) / 2;
|
||||
//int ma = (2 * (ma1min+ma2max) - j1 - j2 + j) / 2;
|
||||
int jju1 = idxu_block[j1] + (j1+1)*mb1min;
|
||||
int jju2 = idxu_block[j2] + (j2+1)*mb2max;
|
||||
int icgb = mb1min*(j2+1) + mb2max;
|
||||
for(int ib = 0; ib < nb; ib++) {
|
||||
|
||||
double ztmp_r = 0.0;
|
||||
double ztmp_i = 0.0;
|
||||
double suma1_r = 0.0;
|
||||
double suma1_i = 0.0;
|
||||
|
||||
int jju1 = idxu_block[j1] + (j1+1)*mb1min;
|
||||
int jju2 = idxu_block[j2] + (j2+1)*mb2max;
|
||||
int icgb = mb1min*(j2+1) + mb2max;
|
||||
for(int ib = 0; ib < nb; ib++) {
|
||||
int ma1 = ma1min;
|
||||
int ma2 = ma2max;
|
||||
int icga = ma1min*(j2+1) + ma2max;
|
||||
|
||||
double suma1_r = 0.0;
|
||||
double suma1_i = 0.0;
|
||||
for(int ia = 0; ia < na; ia++) {
|
||||
suma1_r += cgblock[icga] * (ulisttot_lr(iatom,jju1+ma1).re * ulisttot_lr(iatom,jju2+ma2).re - ulisttot_lr(iatom,jju1+ma1).im * ulisttot_lr(iatom,jju2+ma2).im);
|
||||
suma1_i += cgblock[icga] * (ulisttot_lr(iatom,jju1+ma1).re * ulisttot_lr(iatom,jju2+ma2).im + ulisttot_lr(iatom,jju1+ma1).im * ulisttot_lr(iatom,jju2+ma2).re);
|
||||
ma1++;
|
||||
ma2--;
|
||||
icga += j2;
|
||||
} // end loop over ia
|
||||
|
||||
int ma1 = ma1min;
|
||||
int ma2 = ma2max;
|
||||
int icga = ma1min*(j2+1) + ma2max;
|
||||
ztmp_r += cgblock[icgb] * suma1_r;
|
||||
ztmp_i += cgblock[icgb] * suma1_i;
|
||||
jju1 += j1+1;
|
||||
jju2 -= j2+1;
|
||||
icgb += j2;
|
||||
} // end loop over ib
|
||||
|
||||
for(int ia = 0; ia < na; ia++) {
|
||||
suma1_r += cgblock[icga] * (ulisttot(iatom,jju1+ma1).re * ulisttot(iatom,jju2+ma2).re - ulisttot(iatom,jju1+ma1).im * ulisttot(iatom,jju2+ma2).im);
|
||||
suma1_i += cgblock[icga] * (ulisttot(iatom,jju1+ma1).re * ulisttot(iatom,jju2+ma2).im + ulisttot(iatom,jju1+ma1).im * ulisttot(iatom,jju2+ma2).re);
|
||||
//flopsum += 10;
|
||||
ma1++;
|
||||
ma2--;
|
||||
icga += j2;
|
||||
} // end loop over ia
|
||||
|
||||
ztmp_r += cgblock[icgb] * suma1_r;
|
||||
ztmp_i += cgblock[icgb] * suma1_i;
|
||||
jju1 += j1+1;
|
||||
jju2 -= j2+1;
|
||||
icgb += j2;
|
||||
} // end loop over ib
|
||||
|
||||
// apply to z(j1,j2,j,ma,mb) to unique element of y(j)
|
||||
// find right y_list[jju] and beta(ii,jjb) entries
|
||||
// multiply and divide by j+1 factors
|
||||
// account for multiplicity of 1, 2, or 3
|
||||
|
||||
const int jju = idxz[jjz].jju;
|
||||
// apply to z(j1,j2,j,ma,mb) to unique element of y(j)
|
||||
// find right y_list[jju] and beta(iatom,jjb) entries
|
||||
// multiply and divide by j+1 factors
|
||||
// account for multiplicity of 1, 2, or 3
|
||||
|
||||
// pick out right beta value
|
||||
|
||||
if (j >= j1) {
|
||||
const int jjb = idxb_block(j1,j2,j);
|
||||
if (j1 == j) {
|
||||
if (j2 == j) betaj = 3*beta(ii,jjb);
|
||||
else betaj = 2*beta(ii,jjb);
|
||||
} else betaj = beta(ii,jjb);
|
||||
} else if (j >= j2) {
|
||||
const int jjb = idxb_block(j,j2,j1);
|
||||
if (j2 == j) betaj = 2*beta(ii,jjb)*(j1+1)/(j+1.0);
|
||||
else betaj = beta(ii,jjb)*(j1+1)/(j+1.0);
|
||||
} else {
|
||||
const int jjb = idxb_block(j2,j,j1);
|
||||
betaj = beta(ii,jjb)*(j1+1)/(j+1.0);
|
||||
}
|
||||
if (j >= j1) {
|
||||
const int jjb = idxb_block(j1,j2,j);
|
||||
if (j1 == j) {
|
||||
if (j2 == j) betaj = 3*beta(iatom,jjb);
|
||||
else betaj = 2*beta(iatom,jjb);
|
||||
} else betaj = beta(iatom,jjb);
|
||||
} else if (j >= j2) {
|
||||
const int jjb = idxb_block(j,j2,j1);
|
||||
if (j2 == j) betaj = 2*beta(iatom,jjb)*(j1+1)/(j+1.0);
|
||||
else betaj = beta(iatom,jjb)*(j1+1)/(j+1.0);
|
||||
} else {
|
||||
const int jjb = idxb_block(j2,j,j1);
|
||||
betaj = beta(iatom,jjb)*(j1+1)/(j+1.0);
|
||||
}
|
||||
|
||||
Kokkos::single(Kokkos::PerThread(team), [&] () {
|
||||
Kokkos::atomic_add(&(ylist(iatom,jju).re), betaj*ztmp_r);
|
||||
Kokkos::atomic_add(&(ylist(iatom,jju).im), betaj*ztmp_i);
|
||||
});
|
||||
|
||||
}); // end loop over jjz
|
||||
|
||||
//printf("sum %i\n",flopsum);
|
||||
Kokkos::atomic_add(&(ylist(iatom,jju).re), betaj*ztmp_r);
|
||||
Kokkos::atomic_add(&(ylist(iatom,jju).im), betaj*ztmp_i);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -556,9 +505,9 @@ void SNAKokkos<DeviceType>::compute_bi(const typename Kokkos::TeamPolicy<DeviceT
|
|||
Kokkos::parallel_for(Kokkos::TeamThreadRange(team,idxb_max),
|
||||
[&] (const int& jjb) {
|
||||
//for(int jjb = 0; jjb < idxb_max; jjb++) {
|
||||
const int j1 = idxb[jjb].j1;
|
||||
const int j2 = idxb[jjb].j2;
|
||||
const int j = idxb[jjb].j;
|
||||
const int j1 = idxb(jjb,0);
|
||||
const int j2 = idxb(jjb,1);
|
||||
const int j = idxb(jjb,2);
|
||||
|
||||
int jjz = idxz_block(j1,j2,j);
|
||||
int jju = idxu_block[j];
|
||||
|
@ -648,14 +597,16 @@ void SNAKokkos<DeviceType>::compute_duidrj(const typename Kokkos::TeamPolicy<Dev
|
|||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void SNAKokkos<DeviceType>::zero_uarraytot(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int iatom)
|
||||
void SNAKokkos<DeviceType>::zero_uarraytot(const int& iatom)
|
||||
{
|
||||
{
|
||||
Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,ulisttot.extent(1)),
|
||||
[&] (const int& i) {
|
||||
//Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,ulisttot.extent(1)),
|
||||
// [&] (const int& i) {
|
||||
for (int i = 0; i < ulisttot.extent(1); i++) {
|
||||
ulisttot(iatom,i).re = 0.0;
|
||||
ulisttot(iatom,i).im = 0.0;
|
||||
});
|
||||
}
|
||||
//});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,18 +614,18 @@ void SNAKokkos<DeviceType>::zero_uarraytot(const typename Kokkos::TeamPolicy<Dev
|
|||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void SNAKokkos<DeviceType>::addself_uarraytot(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int iatom, double wself_in)
|
||||
void SNAKokkos<DeviceType>::addself_uarraytot(const int& iatom, const double& wself_in)
|
||||
{
|
||||
Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,twojmax+1),
|
||||
[&] (const int& j) {
|
||||
//for (int j = 0; j <= twojmax; j++)
|
||||
//Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,twojmax+1),
|
||||
// [&] (const int& j) {
|
||||
for (int j = 0; j <= twojmax; j++) {
|
||||
int jju = idxu_block[j];
|
||||
for (int ma = 0; ma <= j; ma++) {
|
||||
ulisttot(iatom,jju).re = wself_in;
|
||||
ulisttot(iatom,jju).im = 0.0;
|
||||
jju += j+2;
|
||||
}
|
||||
});
|
||||
}//});
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -786,6 +737,12 @@ void SNAKokkos<DeviceType>::compute_uarray(const typename Kokkos::TeamPolicy<Dev
|
|||
}
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
void SNAKokkos<DeviceType>::transpose_ulisttot()
|
||||
{
|
||||
UlisttotHelper<typename DeviceType::array_layout,decltype(ulisttot_lr),decltype(ulisttot)>::transpose(ulisttot_lr,ulisttot);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
compute derivatives of Wigner U-functions for one neighbor
|
||||
see comments in compute_uarray()
|
||||
|
@ -1318,6 +1275,8 @@ double SNAKokkos<DeviceType>::memory_usage()
|
|||
|
||||
bytes += natom * idxu_max * sizeof(double) * 2; // ulist
|
||||
bytes += natom * idxu_max * sizeof(double) * 2; // ulisttot
|
||||
if (!Kokkos::Impl::is_same<typename DeviceType::array_layout,Kokkos::LayoutRight>::value)
|
||||
bytes += natom * idxu_max * sizeof(double) * 2; // ulisttot_lr
|
||||
bytes += natom * idxu_max * 3 * sizeof(double) * 2; // dulist
|
||||
|
||||
bytes += natom * idxz_max * sizeof(double) * 2; // zlist
|
||||
|
@ -1329,8 +1288,8 @@ double SNAKokkos<DeviceType>::memory_usage()
|
|||
bytes += jdim * jdim * jdim * sizeof(int); // idxz_block
|
||||
bytes += jdim * jdim * jdim * sizeof(int); // idxb_block
|
||||
|
||||
bytes += idxz_max * sizeof(SNAKK_ZINDICES); // idxz
|
||||
bytes += idxb_max * sizeof(SNAKK_BINDICES); // idxb
|
||||
bytes += idxz_max * 10 * sizeof(int); // idxz
|
||||
bytes += idxb_max * 3 * sizeof(int); // idxb
|
||||
|
||||
bytes += jdim * sizeof(double); // bzero
|
||||
|
||||
|
|
|
@ -61,6 +61,10 @@ PairBOP::PairBOP(LAMMPS *lmp) : Pair(lmp)
|
|||
manybody_flag = 1;
|
||||
ghostneigh = 1;
|
||||
|
||||
BOP_index = NULL;
|
||||
BOP_index3 = NULL;
|
||||
BOP_total = NULL;
|
||||
BOP_total3 = NULL;
|
||||
map = NULL;
|
||||
pi_a = NULL;
|
||||
pro_delta = NULL;
|
||||
|
@ -102,6 +106,8 @@ PairBOP::PairBOP(LAMMPS *lmp) : Pair(lmp)
|
|||
rij = NULL;
|
||||
neigh_index = NULL;
|
||||
neigh_index3 = NULL;
|
||||
neigh_flag = NULL;
|
||||
neigh_flag3 = NULL;
|
||||
cosAng = NULL;
|
||||
betaS = NULL;
|
||||
dBetaS = NULL;
|
||||
|
@ -5798,6 +5804,12 @@ void PairBOP::memory_theta_destroy()
|
|||
memory->destroy(neigh_flag3);
|
||||
memory->destroy(neigh_index);
|
||||
memory->destroy(neigh_index3);
|
||||
itypeSigBk = NULL;
|
||||
itypePiBk = NULL;
|
||||
neigh_flag = NULL;
|
||||
neigh_flag3 = NULL;
|
||||
neigh_index = NULL;
|
||||
neigh_index3 = NULL;
|
||||
if(otfly==0) {
|
||||
memory->destroy(cosAng);
|
||||
memory->destroy(dcAng);
|
||||
|
|
|
@ -91,12 +91,17 @@ FixNVESpin::FixNVESpin(LAMMPS *lmp, int narg, char **arg) :
|
|||
|
||||
// defining lattice_flag
|
||||
|
||||
// changing the lattice option, from (yes,no) -> (moving,frozen)
|
||||
// for now, (yes,no) still works (to avoid user's confusions).
|
||||
|
||||
int iarg = 3;
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"lattice") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix/NVE/spin command");
|
||||
if (strcmp(arg[iarg+1],"no") == 0) lattice_flag = 0;
|
||||
else if (strcmp(arg[iarg+1],"frozen") == 0) lattice_flag = 0;
|
||||
else if (strcmp(arg[iarg+1],"yes") == 0) lattice_flag = 1;
|
||||
else if (strcmp(arg[iarg+1],"moving") == 0) lattice_flag = 1;
|
||||
else error->all(FLERR,"Illegal fix/NVE/spin command");
|
||||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal fix/NVE/spin command");
|
||||
|
|
|
@ -52,7 +52,7 @@ friend class PairSpin;
|
|||
|
||||
double dtv, dtf, dts; // velocity, force, and spin timesteps
|
||||
|
||||
int nlocal_max; // max value of nlocal (for lists size)
|
||||
int nlocal_max; // max value of nlocal (for size of lists)
|
||||
|
||||
int pair_spin_flag; // magnetic pair flags
|
||||
int long_spin_flag; // magnetic long-range flag
|
||||
|
|
|
@ -41,15 +41,15 @@ using namespace MathConst;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MinSpin::MinSpin(LAMMPS *lmp) : Min(lmp) {}
|
||||
MinSpin::MinSpin(LAMMPS *lmp) : Min(lmp) {
|
||||
alpha_damp = 1.0;
|
||||
discrete_factor = 10.0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpin::init()
|
||||
{
|
||||
alpha_damp = 1.0;
|
||||
discrete_factor = 10.0;
|
||||
|
||||
Min::init();
|
||||
|
||||
dts = dt = update->dt;
|
||||
|
@ -77,12 +77,12 @@ void MinSpin::setup_style()
|
|||
int MinSpin::modify_param(int narg, char **arg)
|
||||
{
|
||||
if (strcmp(arg[0],"alpha_damp") == 0) {
|
||||
if (narg < 2) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (narg < 2) error->all(FLERR,"Illegal min_modify command");
|
||||
alpha_damp = force->numeric(FLERR,arg[1]);
|
||||
return 2;
|
||||
}
|
||||
if (strcmp(arg[0],"discrete_factor") == 0) {
|
||||
if (narg < 2) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (narg < 2) error->all(FLERR,"Illegal min_modify command");
|
||||
discrete_factor = force->numeric(FLERR,arg[1]);
|
||||
return 2;
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ void MinSpin::reset_vectors()
|
|||
int MinSpin::iterate(int maxiter)
|
||||
{
|
||||
bigint ntimestep;
|
||||
double fmdotfm;
|
||||
double fmdotfm,fmsq;
|
||||
int flag,flagall;
|
||||
|
||||
for (int iter = 0; iter < maxiter; iter++) {
|
||||
|
@ -130,7 +130,7 @@ int MinSpin::iterate(int maxiter)
|
|||
// optimize timestep accross processes / replicas
|
||||
// need a force calculation for timestep optimization
|
||||
|
||||
energy_force(0);
|
||||
if (iter == 0) energy_force(0);
|
||||
dts = evaluate_dt();
|
||||
|
||||
// apply damped precessional dynamics to the spins
|
||||
|
@ -163,8 +163,13 @@ int MinSpin::iterate(int maxiter)
|
|||
// magnetic torque tolerance criterion
|
||||
// sync across replicas if running multi-replica minimization
|
||||
|
||||
fmdotfm = fmsq = 0.0;
|
||||
if (update->ftol > 0.0) {
|
||||
fmdotfm = fmnorm_sqr();
|
||||
if (normstyle == MAX) fmsq = max_torque(); // max torque norm
|
||||
else if (normstyle == INF) fmsq = inf_torque(); // inf torque norm
|
||||
else if (normstyle == TWO) fmsq = total_torque(); // Euclidean torque 2-norm
|
||||
else error->all(FLERR,"Illegal min_modify command");
|
||||
fmdotfm = fmsq*fmsq;
|
||||
if (update->multireplica == 0) {
|
||||
if (fmdotfm < update->ftol*update->ftol) return FTOL;
|
||||
} else {
|
||||
|
@ -242,7 +247,7 @@ void MinSpin::advance_spins(double dts)
|
|||
double **sp = atom->sp;
|
||||
double **fm = atom->fm;
|
||||
double tdampx,tdampy,tdampz;
|
||||
double msq,scale,fm2,energy,dts2;
|
||||
double fm2,energy,dts2;
|
||||
double cp[3],g[3];
|
||||
|
||||
dts2 = dts*dts;
|
||||
|
@ -288,37 +293,3 @@ void MinSpin::advance_spins(double dts)
|
|||
// because no need for simplecticity
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
compute and return ||mag. torque||_2^2
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double MinSpin::fmnorm_sqr()
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
double tx,ty,tz;
|
||||
double **sp = atom->sp;
|
||||
double **fm = atom->fm;
|
||||
|
||||
// calc. magnetic torques
|
||||
|
||||
double local_norm2_sqr = 0.0;
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
tx = (fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]);
|
||||
ty = (fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]);
|
||||
tz = (fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]);
|
||||
|
||||
local_norm2_sqr += tx*tx + ty*ty + tz*tz;
|
||||
}
|
||||
|
||||
// no extra atom calc. for spins
|
||||
|
||||
if (nextra_atom)
|
||||
error->all(FLERR,"extra atom option not available yet");
|
||||
|
||||
double norm2_sqr = 0.0;
|
||||
MPI_Allreduce(&local_norm2_sqr,&norm2_sqr,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
|
||||
return norm2_sqr;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ class MinSpin : public Min {
|
|||
int iterate(int);
|
||||
double evaluate_dt();
|
||||
void advance_spins(double);
|
||||
double fmnorm_sqr();
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -0,0 +1,649 @@
|
|||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Contributing authors: Aleksei Ivanov (University of Iceland)
|
||||
Julien Tranchida (SNL)
|
||||
|
||||
Please cite the related publication:
|
||||
Ivanov, A. V., Uzdin, V. M., & Jónsson, H. (2019). Fast and Robust
|
||||
Algorithm for the Minimisation of the Energy of Spin Systems. arXiv
|
||||
preprint arXiv:1904.02669.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "min_spin_cg.h"
|
||||
#include "universe.h"
|
||||
#include "atom.h"
|
||||
#include "citeme.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "update.h"
|
||||
#include "output.h"
|
||||
#include "timer.h"
|
||||
#include "error.h"
|
||||
#include "memory.h"
|
||||
#include "modify.h"
|
||||
#include "math_special.h"
|
||||
#include "math_const.h"
|
||||
#include "universe.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
static const char cite_minstyle_spin_cg[] =
|
||||
"min_style spin/cg command:\n\n"
|
||||
"@article{ivanov2019fast,\n"
|
||||
"title={Fast and Robust Algorithm for the Minimisation of the Energy of "
|
||||
"Spin Systems},\n"
|
||||
"author={Ivanov, A. V and Uzdin, V. M. and J{\'o}nsson, H.},\n"
|
||||
"journal={arXiv preprint arXiv:1904.02669},\n"
|
||||
"year={2019}\n"
|
||||
"}\n\n";
|
||||
|
||||
// EPS_ENERGY = minimum normalization for energy tolerance
|
||||
|
||||
#define EPS_ENERGY 1.0e-8
|
||||
|
||||
#define DELAYSTEP 5
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MinSpinCG::MinSpinCG(LAMMPS *lmp) :
|
||||
Min(lmp), g_old(NULL), g_cur(NULL), p_s(NULL), sp_copy(NULL)
|
||||
{
|
||||
if (lmp->citeme) lmp->citeme->add(cite_minstyle_spin_cg);
|
||||
nlocal_max = 0;
|
||||
|
||||
// nreplica = number of partitions
|
||||
// ireplica = which world I am in universe
|
||||
|
||||
nreplica = universe->nworlds;
|
||||
ireplica = universe->iworld;
|
||||
use_line_search = 0; // no line search as default option for CG
|
||||
|
||||
discrete_factor = 10.0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MinSpinCG::~MinSpinCG()
|
||||
{
|
||||
memory->destroy(g_old);
|
||||
memory->destroy(g_cur);
|
||||
memory->destroy(p_s);
|
||||
if (use_line_search)
|
||||
memory->destroy(sp_copy);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinCG::init()
|
||||
{
|
||||
local_iter = 0;
|
||||
der_e_cur = 0.0;
|
||||
der_e_pr = 0.0;
|
||||
|
||||
Min::init();
|
||||
|
||||
// warning if line_search combined to gneb
|
||||
|
||||
if ((nreplica >= 1) && (linestyle != 4) && (comm->me == 0))
|
||||
error->warning(FLERR,"Line search incompatible gneb");
|
||||
|
||||
// set back use_line_search to 0 if more than one replica
|
||||
|
||||
if (linestyle == 3 && nreplica == 1){
|
||||
use_line_search = 1;
|
||||
}
|
||||
else{
|
||||
use_line_search = 0;
|
||||
}
|
||||
|
||||
dts = dt = update->dt;
|
||||
last_negative = update->ntimestep;
|
||||
|
||||
// allocate tables
|
||||
|
||||
nlocal_max = atom->nlocal;
|
||||
memory->grow(g_old,3*nlocal_max,"min/spin/cg:g_old");
|
||||
memory->grow(g_cur,3*nlocal_max,"min/spin/cg:g_cur");
|
||||
memory->grow(p_s,3*nlocal_max,"min/spin/cg:p_s");
|
||||
if (use_line_search)
|
||||
memory->grow(sp_copy,nlocal_max,3,"min/spin/cg:sp_copy");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinCG::setup_style()
|
||||
{
|
||||
double **v = atom->v;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
// check if the atom/spin style is defined
|
||||
|
||||
if (!atom->sp_flag)
|
||||
error->all(FLERR,"min spin/cg requires atom/spin style");
|
||||
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
v[i][0] = v[i][1] = v[i][2] = 0.0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int MinSpinCG::modify_param(int narg, char **arg)
|
||||
{
|
||||
if (strcmp(arg[0],"discrete_factor") == 0) {
|
||||
if (narg < 2) error->all(FLERR,"Illegal fix_modify command");
|
||||
discrete_factor = force->numeric(FLERR,arg[1]);
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set current vector lengths and pointers
|
||||
called after atoms have migrated
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinCG::reset_vectors()
|
||||
{
|
||||
// atomic dof
|
||||
|
||||
// size sp is 4N vector
|
||||
nvec = 4 * atom->nlocal;
|
||||
if (nvec) spvec = atom->sp[0];
|
||||
|
||||
nvec = 3 * atom->nlocal;
|
||||
if (nvec) fmvec = atom->fm[0];
|
||||
|
||||
if (nvec) xvec = atom->x[0];
|
||||
if (nvec) fvec = atom->f[0];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
minimization via orthogonal spin optimisation
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int MinSpinCG::iterate(int maxiter)
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
bigint ntimestep;
|
||||
double fmdotfm,fmsq;
|
||||
int flag, flagall;
|
||||
double **sp = atom->sp;
|
||||
double der_e_cur_tmp = 0.0;
|
||||
|
||||
if (nlocal_max < nlocal) {
|
||||
local_iter = 0;
|
||||
nlocal_max = nlocal;
|
||||
memory->grow(g_old,3*nlocal_max,"min/spin/cg:g_old");
|
||||
memory->grow(g_cur,3*nlocal_max,"min/spin/cg:g_cur");
|
||||
memory->grow(p_s,3*nlocal_max,"min/spin/cg:p_s");
|
||||
if (use_line_search)
|
||||
memory->grow(sp_copy,nlocal_max,3,"min/spin/cg:sp_copy");
|
||||
}
|
||||
|
||||
for (int iter = 0; iter < maxiter; iter++) {
|
||||
|
||||
if (timer->check_timeout(niter))
|
||||
return TIMEOUT;
|
||||
|
||||
ntimestep = ++update->ntimestep;
|
||||
niter++;
|
||||
|
||||
// optimize timestep accross processes / replicas
|
||||
// need a force calculation for timestep optimization
|
||||
|
||||
if (use_line_search) {
|
||||
|
||||
// here we need to do line search
|
||||
if (local_iter == 0){
|
||||
calc_gradient();
|
||||
}
|
||||
|
||||
calc_search_direction();
|
||||
der_e_cur = 0.0;
|
||||
for (int i = 0; i < 3 * nlocal; i++)
|
||||
der_e_cur += g_cur[i] * p_s[i];
|
||||
MPI_Allreduce(&der_e_cur,&der_e_cur_tmp,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
der_e_cur = der_e_cur_tmp;
|
||||
if (update->multireplica == 1) {
|
||||
MPI_Allreduce(&der_e_cur_tmp,&der_e_cur,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
}
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
for (int j = 0; j < 3; j++)
|
||||
sp_copy[i][j] = sp[i][j];
|
||||
|
||||
eprevious = ecurrent;
|
||||
der_e_pr = der_e_cur;
|
||||
calc_and_make_step(0.0, 1.0, 0);
|
||||
}
|
||||
else{
|
||||
|
||||
// here we don't do line search
|
||||
// if gneb calc., nreplica > 1
|
||||
// then calculate gradients and advance spins
|
||||
// of intermediate replicas only
|
||||
calc_gradient();
|
||||
calc_search_direction();
|
||||
advance_spins();
|
||||
neval++;
|
||||
eprevious = ecurrent;
|
||||
ecurrent = energy_force(0);
|
||||
}
|
||||
|
||||
// energy tolerance criterion
|
||||
// only check after DELAYSTEP elapsed since velocties reset to 0
|
||||
// sync across replicas if running multi-replica minimization
|
||||
|
||||
if (update->etol > 0.0 && ntimestep-last_negative > DELAYSTEP) {
|
||||
if (update->multireplica == 0) {
|
||||
if (fabs(ecurrent-eprevious) <
|
||||
update->etol * 0.5*(fabs(ecurrent) + fabs(eprevious) + EPS_ENERGY))
|
||||
return ETOL;
|
||||
} else {
|
||||
if (fabs(ecurrent-eprevious) <
|
||||
update->etol * 0.5*(fabs(ecurrent) + fabs(eprevious) + EPS_ENERGY))
|
||||
flag = 0;
|
||||
else flag = 1;
|
||||
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,universe->uworld);
|
||||
if (flagall == 0) return ETOL;
|
||||
}
|
||||
}
|
||||
|
||||
// magnetic torque tolerance criterion
|
||||
// sync across replicas if running multi-replica minimization
|
||||
|
||||
fmdotfm = fmsq = 0.0;
|
||||
if (update->ftol > 0.0) {
|
||||
if (normstyle == MAX) fmsq = max_torque(); // max torque norm
|
||||
else if (normstyle == INF) fmsq = inf_torque(); // inf torque norm
|
||||
else if (normstyle == TWO) fmsq = total_torque(); // Euclidean torque 2-norm
|
||||
else error->all(FLERR,"Illegal min_modify command");
|
||||
fmdotfm = fmsq*fmsq;
|
||||
if (update->multireplica == 0) {
|
||||
if (fmdotfm < update->ftol*update->ftol) return FTOL;
|
||||
} else {
|
||||
if (fmdotfm < update->ftol*update->ftol) flag = 0;
|
||||
else flag = 1;
|
||||
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,universe->uworld);
|
||||
if (flagall == 0) return FTOL;
|
||||
}
|
||||
}
|
||||
|
||||
// output for thermo, dump, restart files
|
||||
|
||||
if (output->next == ntimestep) {
|
||||
timer->stamp();
|
||||
output->write(ntimestep);
|
||||
timer->stamp(Timer::OUTPUT);
|
||||
}
|
||||
}
|
||||
|
||||
return MAXITER;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
calculate gradients
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinCG::calc_gradient()
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
double **sp = atom->sp;
|
||||
double **fm = atom->fm;
|
||||
double hbar = force->hplanck/MY_2PI;
|
||||
double factor;
|
||||
|
||||
if (use_line_search)
|
||||
factor = hbar;
|
||||
else factor = evaluate_dt();
|
||||
|
||||
// loop on all spins on proc.
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
g_cur[3 * i + 0] = (fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]) * factor;
|
||||
g_cur[3 * i + 1] = -(fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]) * factor;
|
||||
g_cur[3 * i + 2] = (fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]) * factor;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
search direction:
|
||||
The Fletcher-Reeves conj. grad. method
|
||||
See Jorge Nocedal and Stephen J. Wright 'Numerical
|
||||
Optimization' Second Edition, 2006 (p. 121)
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinCG::calc_search_direction()
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
double g2old = 0.0;
|
||||
double g2 = 0.0;
|
||||
double beta = 0.0;
|
||||
|
||||
double g2_global = 0.0;
|
||||
double g2old_global = 0.0;
|
||||
|
||||
double factor = 1.0;
|
||||
|
||||
// for multiple replica do not move end points
|
||||
if (nreplica > 1)
|
||||
if (ireplica == 0 || ireplica == nreplica - 1)
|
||||
factor = 0.0;
|
||||
|
||||
|
||||
if (local_iter == 0 || local_iter % 5 == 0){ // steepest descent direction
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
p_s[i] = -g_cur[i] * factor;
|
||||
g_old[i] = g_cur[i] * factor;
|
||||
}
|
||||
} else { // conjugate direction
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
g2old += g_old[i] * g_old[i];
|
||||
g2 += g_cur[i] * g_cur[i];
|
||||
}
|
||||
|
||||
// now we need to collect/broadcast beta on this replica
|
||||
// need to check what is beta for GNEB
|
||||
|
||||
MPI_Allreduce(&g2,&g2_global,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
MPI_Allreduce(&g2old,&g2old_global,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
|
||||
// Sum over all replicas. Good for GNEB.
|
||||
|
||||
if (nreplica > 1) {
|
||||
g2 = g2_global * factor;
|
||||
g2old = g2old_global * factor;
|
||||
MPI_Allreduce(&g2,&g2_global,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
MPI_Allreduce(&g2old,&g2old_global,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
}
|
||||
if (fabs(g2_global) < 1.0e-60) beta = 0.0;
|
||||
else beta = g2_global / g2old_global;
|
||||
|
||||
// calculate conjugate direction
|
||||
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
p_s[i] = (beta * p_s[i] - g_cur[i]) * factor;
|
||||
g_old[i] = g_cur[i] * factor;
|
||||
}
|
||||
}
|
||||
|
||||
local_iter++;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
rotation of spins along the search direction
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinCG::advance_spins()
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
double **sp = atom->sp;
|
||||
double rot_mat[9]; // exponential of matrix made of search direction
|
||||
double s_new[3];
|
||||
|
||||
// loop on all spins on proc.
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
rodrigues_rotation(p_s + 3 * i, rot_mat);
|
||||
|
||||
// rotate spins
|
||||
|
||||
vm3(rot_mat, sp[i], s_new);
|
||||
for (int j = 0; j < 3; j++) sp[i][j] = s_new[j];
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
calculate 3x3 matrix exponential using Rodrigues' formula
|
||||
(R. Murray, Z. Li, and S. Shankar Sastry,
|
||||
A Mathematical Introduction to
|
||||
Robotic Manipulation (1994), p. 28 and 30).
|
||||
|
||||
upp_tr - vector x, y, z so that one calculate
|
||||
U = exp(A) with A= [[0, x, y],
|
||||
[-x, 0, z],
|
||||
[-y, -z, 0]]
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinCG::rodrigues_rotation(const double *upp_tr, double *out)
|
||||
{
|
||||
double theta,A,B,D,x,y,z;
|
||||
double s1,s2,s3,a1,a2,a3;
|
||||
|
||||
if (fabs(upp_tr[0]) < 1.0e-40 &&
|
||||
fabs(upp_tr[1]) < 1.0e-40 &&
|
||||
fabs(upp_tr[2]) < 1.0e-40){
|
||||
|
||||
// if upp_tr is zero, return unity matrix
|
||||
|
||||
for(int k = 0; k < 3; k++){
|
||||
for(int m = 0; m < 3; m++){
|
||||
if (m == k) out[3 * k + m] = 1.0;
|
||||
else out[3 * k + m] = 0.0;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
theta = sqrt(upp_tr[0] * upp_tr[0] +
|
||||
upp_tr[1] * upp_tr[1] +
|
||||
upp_tr[2] * upp_tr[2]);
|
||||
|
||||
A = cos(theta);
|
||||
B = sin(theta);
|
||||
D = 1.0 - A;
|
||||
x = upp_tr[0]/theta;
|
||||
y = upp_tr[1]/theta;
|
||||
z = upp_tr[2]/theta;
|
||||
|
||||
// diagonal elements of U
|
||||
|
||||
out[0] = A + z * z * D;
|
||||
out[4] = A + y * y * D;
|
||||
out[8] = A + x * x * D;
|
||||
|
||||
// off diagonal of U
|
||||
|
||||
s1 = -y * z *D;
|
||||
s2 = x * z * D;
|
||||
s3 = -x * y * D;
|
||||
|
||||
a1 = x * B;
|
||||
a2 = y * B;
|
||||
a3 = z * B;
|
||||
|
||||
out[1] = s1 + a1;
|
||||
out[3] = s1 - a1;
|
||||
out[2] = s2 + a2;
|
||||
out[6] = s2 - a2;
|
||||
out[5] = s3 + a3;
|
||||
out[7] = s3 - a3;
|
||||
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
out = vector^T x m,
|
||||
m -- 3x3 matrix , v -- 3-d vector
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinCG::vm3(const double *m, const double *v, double *out)
|
||||
{
|
||||
for(int i = 0; i < 3; i++){
|
||||
out[i] = 0.0;
|
||||
for(int j = 0; j < 3; j++) out[i] += *(m + 3 * j + i) * v[j];
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
advance spins
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinCG::make_step(double c, double *energy_and_der)
|
||||
{
|
||||
double p_scaled[3];
|
||||
int nlocal = atom->nlocal;
|
||||
double rot_mat[9]; // exponential of matrix made of search direction
|
||||
double s_new[3];
|
||||
double **sp = atom->sp;
|
||||
double der_e_cur_tmp = 0.0;
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
|
||||
// scale the search direction
|
||||
|
||||
for (int j = 0; j < 3; j++) p_scaled[j] = c * p_s[3 * i + j];
|
||||
|
||||
// calculate rotation matrix
|
||||
|
||||
rodrigues_rotation(p_scaled, rot_mat);
|
||||
|
||||
// rotate spins
|
||||
|
||||
vm3(rot_mat, sp[i], s_new);
|
||||
for (int j = 0; j < 3; j++) sp[i][j] = s_new[j];
|
||||
}
|
||||
|
||||
ecurrent = energy_force(0);
|
||||
calc_gradient();
|
||||
neval++;
|
||||
der_e_cur = 0.0;
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
der_e_cur += g_cur[i] * p_s[i];
|
||||
}
|
||||
MPI_Allreduce(&der_e_cur,&der_e_cur_tmp,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
der_e_cur = der_e_cur_tmp;
|
||||
if (update->multireplica == 1) {
|
||||
MPI_Allreduce(&der_e_cur_tmp,&der_e_cur,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
}
|
||||
|
||||
energy_and_der[0] = ecurrent;
|
||||
energy_and_der[1] = der_e_cur;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Calculate step length which satisfies approximate Wolfe conditions
|
||||
using the cubic interpolation
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int MinSpinCG::calc_and_make_step(double a, double b, int index)
|
||||
{
|
||||
double e_and_d[2] = {0.0,0.0};
|
||||
double alpha,c1,c2,c3;
|
||||
double **sp = atom->sp;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
make_step(b,e_and_d);
|
||||
ecurrent = e_and_d[0];
|
||||
der_e_cur = e_and_d[1];
|
||||
index++;
|
||||
|
||||
if (adescent(eprevious,e_and_d[0]) || index == 5){
|
||||
MPI_Bcast(&b,1,MPI_DOUBLE,0,world);
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
p_s[i] = b * p_s[i];
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
double r,f0,f1,df0,df1;
|
||||
r = b - a;
|
||||
f0 = eprevious;
|
||||
f1 = ecurrent;
|
||||
df0 = der_e_pr;
|
||||
df1 = der_e_cur;
|
||||
|
||||
c1 = -2.0*(f1-f0)/(r*r*r)+(df1+df0)/(r*r);
|
||||
c2 = 3.0*(f1-f0)/(r*r)-(df1+2.0*df0)/(r);
|
||||
c3 = df0;
|
||||
|
||||
// f(x) = c1 x^3 + c2 x^2 + c3 x^1 + c4
|
||||
// has minimum at alpha below. We do not check boundaries.
|
||||
|
||||
alpha = (-c2 + sqrt(c2*c2 - 3.0*c1*c3))/(3.0*c1);
|
||||
MPI_Bcast(&alpha,1,MPI_DOUBLE,0,world);
|
||||
|
||||
if (alpha < 0.0) alpha = r/2.0;
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
for (int j = 0; j < 3; j++) sp[i][j] = sp_copy[i][j];
|
||||
}
|
||||
calc_and_make_step(0.0, alpha, index);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Approximate descent
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int MinSpinCG::adescent(double phi_0, double phi_j){
|
||||
|
||||
double eps = 1.0e-6;
|
||||
|
||||
if (phi_j<=phi_0+eps*fabs(phi_0))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
evaluate max timestep
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
double MinSpinCG::evaluate_dt()
|
||||
{
|
||||
double dtmax;
|
||||
double fmsq;
|
||||
double fmaxsqone,fmaxsqloc,fmaxsqall;
|
||||
int nlocal = atom->nlocal;
|
||||
double **fm = atom->fm;
|
||||
|
||||
// finding max fm on this proc.
|
||||
|
||||
fmsq = fmaxsqone = fmaxsqloc = fmaxsqall = 0.0;
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2];
|
||||
fmaxsqone = MAX(fmaxsqone,fmsq);
|
||||
}
|
||||
|
||||
// finding max fm on this replica
|
||||
|
||||
fmaxsqloc = fmaxsqone;
|
||||
MPI_Allreduce(&fmaxsqone,&fmaxsqloc,1,MPI_DOUBLE,MPI_MAX,world);
|
||||
|
||||
// finding max fm over all replicas, if necessary
|
||||
// this communicator would be invalid for multiprocess replicas
|
||||
|
||||
fmaxsqall = fmaxsqloc;
|
||||
if (update->multireplica == 1) {
|
||||
fmaxsqall = fmaxsqloc;
|
||||
MPI_Allreduce(&fmaxsqloc,&fmaxsqall,1,MPI_DOUBLE,MPI_MAX,universe->uworld);
|
||||
}
|
||||
|
||||
if (fmaxsqall == 0.0)
|
||||
error->all(FLERR,"Incorrect fmaxsqall calculation");
|
||||
|
||||
// define max timestep by dividing by the
|
||||
// inverse of max frequency by discrete_factor
|
||||
|
||||
dtmax = MY_2PI/(discrete_factor*sqrt(fmaxsqall));
|
||||
|
||||
return dtmax;
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef MINIMIZE_CLASS
|
||||
|
||||
MinimizeStyle(spin/cg, MinSpinCG)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_MIN_SPIN_CG_H
|
||||
#define LMP_MIN_SPIN_CG_H
|
||||
|
||||
#include "min.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class MinSpinCG: public Min {
|
||||
public:
|
||||
MinSpinCG(class LAMMPS *);
|
||||
virtual ~MinSpinCG();
|
||||
void init();
|
||||
void setup_style();
|
||||
void reset_vectors();
|
||||
int modify_param(int, char **);
|
||||
int iterate(int);
|
||||
|
||||
private:
|
||||
int local_iter; // for neb
|
||||
int nlocal_max; // max value of nlocal (for size of lists)
|
||||
int use_line_search; // use line search or not.
|
||||
int ireplica,nreplica; // for neb
|
||||
double dt; // global timestep
|
||||
double dts; // spin timestep
|
||||
double discrete_factor; // factor for spin timestep evaluation
|
||||
double der_e_cur; // current derivative along search dir.
|
||||
double der_e_pr; // previous derivative along search dir.
|
||||
double *spvec; // variables for atomic dof, as 1d vector
|
||||
double *fmvec; // variables for atomic dof, as 1d vector
|
||||
double *g_old; // gradient vector at previous step
|
||||
double *g_cur; // current gradient vector
|
||||
double *p_s; // search direction vector
|
||||
double **sp_copy; // copy of the spins
|
||||
|
||||
void advance_spins();
|
||||
void calc_gradient();
|
||||
void calc_search_direction();
|
||||
void vm3(const double *, const double *, double *);
|
||||
void rodrigues_rotation(const double *, double *);
|
||||
void make_step(double, double *);
|
||||
int calc_and_make_step(double, double, int);
|
||||
int adescent(double, double);
|
||||
double evaluate_dt();
|
||||
double maximum_rotation(double *);
|
||||
|
||||
bigint last_negative;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -0,0 +1,754 @@
|
|||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Contributing authors: Aleksei Ivanov (University of Iceland)
|
||||
Julien Tranchida (SNL)
|
||||
|
||||
Please cite the related publication:
|
||||
Ivanov, A. V., Uzdin, V. M., & Jónsson, H. (2019). Fast and Robust
|
||||
Algorithm for the Minimisation of the Energy of Spin Systems. arXiv
|
||||
preprint arXiv:1904.02669.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "min_spin_lbfgs.h"
|
||||
#include "atom.h"
|
||||
#include "citeme.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "update.h"
|
||||
#include "output.h"
|
||||
#include "timer.h"
|
||||
#include "error.h"
|
||||
#include "memory.h"
|
||||
#include "modify.h"
|
||||
#include "math_special.h"
|
||||
#include "math_const.h"
|
||||
#include "universe.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
static const char cite_minstyle_spin_lbfgs[] =
|
||||
"min_style spin/lbfgs command:\n\n"
|
||||
"@article{ivanov2019fast,\n"
|
||||
"title={Fast and Robust Algorithm for the Minimisation of the Energy of "
|
||||
"Spin Systems},\n"
|
||||
"author={Ivanov, A. V and Uzdin, V. M. and J{\'o}nsson, H.},\n"
|
||||
"journal={arXiv preprint arXiv:1904.02669},\n"
|
||||
"year={2019}\n"
|
||||
"}\n\n";
|
||||
|
||||
// EPS_ENERGY = minimum normalization for energy tolerance
|
||||
|
||||
#define EPS_ENERGY 1.0e-8
|
||||
|
||||
#define DELAYSTEP 5
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MinSpinLBFGS::MinSpinLBFGS(LAMMPS *lmp) :
|
||||
Min(lmp), g_old(NULL), g_cur(NULL), p_s(NULL), rho(NULL), ds(NULL), dy(NULL), sp_copy(NULL)
|
||||
{
|
||||
if (lmp->citeme) lmp->citeme->add(cite_minstyle_spin_lbfgs);
|
||||
nlocal_max = 0;
|
||||
|
||||
// nreplica = number of partitions
|
||||
// ireplica = which world I am in universe
|
||||
|
||||
nreplica = universe->nworlds;
|
||||
ireplica = universe->iworld;
|
||||
use_line_search = 0; // no line search as default option for LBFGS
|
||||
|
||||
maxepsrot = MY_2PI / (100.0);
|
||||
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MinSpinLBFGS::~MinSpinLBFGS()
|
||||
{
|
||||
memory->destroy(g_old);
|
||||
memory->destroy(g_cur);
|
||||
memory->destroy(p_s);
|
||||
memory->destroy(ds);
|
||||
memory->destroy(dy);
|
||||
memory->destroy(rho);
|
||||
if (use_line_search)
|
||||
memory->destroy(sp_copy);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinLBFGS::init()
|
||||
{
|
||||
num_mem = 3;
|
||||
local_iter = 0;
|
||||
der_e_cur = 0.0;
|
||||
der_e_pr = 0.0;
|
||||
|
||||
Min::init();
|
||||
|
||||
// warning if line_search combined to gneb
|
||||
|
||||
if ((nreplica >= 1) && (linestyle != 4) && (comm->me == 0))
|
||||
error->warning(FLERR,"Line search incompatible gneb");
|
||||
|
||||
// set back use_line_search to 0 if more than one replica
|
||||
|
||||
if (linestyle == 3 && nreplica == 1){
|
||||
use_line_search = 1;
|
||||
}
|
||||
else{
|
||||
use_line_search = 0;
|
||||
}
|
||||
|
||||
last_negative = update->ntimestep;
|
||||
|
||||
// allocate tables
|
||||
|
||||
nlocal_max = atom->nlocal;
|
||||
memory->grow(g_old,3*nlocal_max,"min/spin/lbfgs:g_old");
|
||||
memory->grow(g_cur,3*nlocal_max,"min/spin/lbfgs:g_cur");
|
||||
memory->grow(p_s,3*nlocal_max,"min/spin/lbfgs:p_s");
|
||||
memory->grow(rho,num_mem,"min/spin/lbfgs:rho");
|
||||
memory->grow(ds,num_mem,3*nlocal_max,"min/spin/lbfgs:ds");
|
||||
memory->grow(dy,num_mem,3*nlocal_max,"min/spin/lbfgs:dy");
|
||||
if (use_line_search)
|
||||
memory->grow(sp_copy,nlocal_max,3,"min/spin/lbfgs:sp_copy");
|
||||
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinLBFGS::setup_style()
|
||||
{
|
||||
double **v = atom->v;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
// check if the atom/spin style is defined
|
||||
|
||||
if (!atom->sp_flag)
|
||||
error->all(FLERR,"min spin/lbfgs requires atom/spin style");
|
||||
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
v[i][0] = v[i][1] = v[i][2] = 0.0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int MinSpinLBFGS::modify_param(int narg, char **arg)
|
||||
{
|
||||
if (strcmp(arg[0],"discrete_factor") == 0) {
|
||||
if (narg < 2) error->all(FLERR,"Illegal min_modify command");
|
||||
double discrete_factor;
|
||||
discrete_factor = force->numeric(FLERR,arg[1]);
|
||||
maxepsrot = MY_2PI / (10 * discrete_factor);
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set current vector lengths and pointers
|
||||
called after atoms have migrated
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinLBFGS::reset_vectors()
|
||||
{
|
||||
// atomic dof
|
||||
|
||||
// size sp is 4N vector
|
||||
nvec = 4 * atom->nlocal;
|
||||
if (nvec) spvec = atom->sp[0];
|
||||
|
||||
nvec = 3 * atom->nlocal;
|
||||
if (nvec) fmvec = atom->fm[0];
|
||||
|
||||
if (nvec) xvec = atom->x[0];
|
||||
if (nvec) fvec = atom->f[0];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
minimization via damped spin dynamics
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int MinSpinLBFGS::iterate(int maxiter)
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
bigint ntimestep;
|
||||
double fmdotfm,fmsq;
|
||||
int flag, flagall;
|
||||
double **sp = atom->sp;
|
||||
double der_e_cur_tmp = 0.0;
|
||||
|
||||
if (nlocal_max < nlocal) {
|
||||
nlocal_max = nlocal;
|
||||
local_iter = 0;
|
||||
memory->grow(g_old,3*nlocal_max,"min/spin/lbfgs:g_old");
|
||||
memory->grow(g_cur,3*nlocal_max,"min/spin/lbfgs:g_cur");
|
||||
memory->grow(p_s,3*nlocal_max,"min/spin/lbfgs:p_s");
|
||||
memory->grow(rho,num_mem,"min/spin/lbfgs:rho");
|
||||
memory->grow(ds,num_mem,3*nlocal_max,"min/spin/lbfgs:ds");
|
||||
memory->grow(dy,num_mem,3*nlocal_max,"min/spin/lbfgs:dy");
|
||||
if (use_line_search)
|
||||
memory->grow(sp_copy,nlocal_max,3,"min/spin/lbfgs:sp_copy");
|
||||
}
|
||||
|
||||
for (int iter = 0; iter < maxiter; iter++) {
|
||||
|
||||
if (timer->check_timeout(niter))
|
||||
return TIMEOUT;
|
||||
|
||||
ntimestep = ++update->ntimestep;
|
||||
niter++;
|
||||
|
||||
// optimize timestep accross processes / replicas
|
||||
// need a force calculation for timestep optimization
|
||||
|
||||
if (use_line_search) {
|
||||
|
||||
// here we need to do line search
|
||||
if (local_iter == 0){
|
||||
eprevious = ecurrent;
|
||||
ecurrent = energy_force(0);
|
||||
calc_gradient();
|
||||
}
|
||||
|
||||
calc_search_direction();
|
||||
der_e_cur = 0.0;
|
||||
for (int i = 0; i < 3 * nlocal; i++)
|
||||
der_e_cur += g_cur[i] * p_s[i];
|
||||
MPI_Allreduce(&der_e_cur,&der_e_cur_tmp,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
der_e_cur = der_e_cur_tmp;
|
||||
if (update->multireplica == 1) {
|
||||
MPI_Allreduce(&der_e_cur_tmp,&der_e_cur,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
}
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
for (int j = 0; j < 3; j++)
|
||||
sp_copy[i][j] = sp[i][j];
|
||||
|
||||
eprevious = ecurrent;
|
||||
der_e_pr = der_e_cur;
|
||||
calc_and_make_step(0.0, 1.0, 0);
|
||||
}
|
||||
else{
|
||||
|
||||
// here we don't do line search
|
||||
// but use cutoff rotation angle
|
||||
// if gneb calc., nreplica > 1
|
||||
// then calculate gradients and advance spins
|
||||
// of intermediate replicas only
|
||||
eprevious = ecurrent;
|
||||
ecurrent = energy_force(0);
|
||||
calc_gradient();
|
||||
calc_search_direction();
|
||||
advance_spins();
|
||||
neval++;
|
||||
}
|
||||
|
||||
// energy tolerance criterion
|
||||
// only check after DELAYSTEP elapsed since velocties reset to 0
|
||||
// sync across replicas if running multi-replica minimization
|
||||
|
||||
if (update->etol > 0.0 && ntimestep-last_negative > DELAYSTEP) {
|
||||
if (update->multireplica == 0) {
|
||||
if (fabs(ecurrent-eprevious) <
|
||||
update->etol * 0.5*(fabs(ecurrent) + fabs(eprevious) + EPS_ENERGY))
|
||||
return ETOL;
|
||||
} else {
|
||||
if (fabs(ecurrent-eprevious) <
|
||||
update->etol * 0.5*(fabs(ecurrent) + fabs(eprevious) + EPS_ENERGY))
|
||||
flag = 0;
|
||||
else flag = 1;
|
||||
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,universe->uworld);
|
||||
if (flagall == 0) return ETOL;
|
||||
}
|
||||
}
|
||||
|
||||
// magnetic torque tolerance criterion
|
||||
// sync across replicas if running multi-replica minimization
|
||||
|
||||
fmdotfm = fmsq = 0.0;
|
||||
if (update->ftol > 0.0) {
|
||||
if (normstyle == MAX) fmsq = max_torque(); // max torque norm
|
||||
else if (normstyle == INF) fmsq = inf_torque(); // inf torque norm
|
||||
else if (normstyle == TWO) fmsq = total_torque(); // Euclidean torque 2-norm
|
||||
else error->all(FLERR,"Illegal min_modify command");
|
||||
fmdotfm = fmsq*fmsq;
|
||||
if (update->multireplica == 0) {
|
||||
if (fmdotfm < update->ftol*update->ftol) return FTOL;
|
||||
} else {
|
||||
if (fmdotfm < update->ftol*update->ftol) flag = 0;
|
||||
else flag = 1;
|
||||
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,universe->uworld);
|
||||
if (flagall == 0) return FTOL;
|
||||
}
|
||||
}
|
||||
|
||||
// output for thermo, dump, restart files
|
||||
|
||||
if (output->next == ntimestep) {
|
||||
timer->stamp();
|
||||
output->write(ntimestep);
|
||||
timer->stamp(Timer::OUTPUT);
|
||||
}
|
||||
}
|
||||
|
||||
return MAXITER;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
calculate gradients
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinLBFGS::calc_gradient()
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
double **sp = atom->sp;
|
||||
double **fm = atom->fm;
|
||||
double hbar = force->hplanck/MY_2PI;
|
||||
|
||||
// loop on all spins on proc.
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
g_cur[3 * i + 0] = (fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]) * hbar;
|
||||
g_cur[3 * i + 1] = -(fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]) * hbar;
|
||||
g_cur[3 * i + 2] = (fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]) * hbar;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
search direction:
|
||||
Limited-memory BFGS.
|
||||
See Jorge Nocedal and Stephen J. Wright 'Numerical
|
||||
Optimization' Second Edition, 2006 (p. 177)
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinLBFGS::calc_search_direction()
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
double dyds = 0.0;
|
||||
double sq = 0.0;
|
||||
double yy = 0.0;
|
||||
double yr = 0.0;
|
||||
double beta = 0.0;
|
||||
|
||||
double dyds_global = 0.0;
|
||||
double sq_global = 0.0;
|
||||
double yy_global = 0.0;
|
||||
double yr_global = 0.0;
|
||||
|
||||
int m_index = local_iter % num_mem; // memory index
|
||||
int c_ind = 0;
|
||||
double *q;
|
||||
double *alpha;
|
||||
|
||||
double factor;
|
||||
double scaling = 1.0;
|
||||
|
||||
// for multiple replica do not move end points
|
||||
if (nreplica > 1) {
|
||||
if (ireplica == 0 || ireplica == nreplica - 1) {
|
||||
factor = 0.0;
|
||||
}
|
||||
else factor = 1.0;
|
||||
}else{
|
||||
factor = 1.0;
|
||||
}
|
||||
|
||||
if (local_iter == 0){ // steepest descent direction
|
||||
|
||||
//if no line search then calculate maximum rotation
|
||||
if (use_line_search == 0)
|
||||
scaling = maximum_rotation(g_cur);
|
||||
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
p_s[i] = -g_cur[i] * factor * scaling;;
|
||||
g_old[i] = g_cur[i] * factor;
|
||||
for (int k = 0; k < num_mem; k++){
|
||||
ds[k][i] = 0.0;
|
||||
dy[k][i] = 0.0;
|
||||
}
|
||||
}
|
||||
for (int k = 0; k < num_mem; k++)
|
||||
rho[k] = 0.0;
|
||||
|
||||
} else {
|
||||
dyds = 0.0;
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
ds[m_index][i] = p_s[i];
|
||||
dy[m_index][i] = g_cur[i] - g_old[i];
|
||||
dyds += ds[m_index][i] * dy[m_index][i];
|
||||
}
|
||||
MPI_Allreduce(&dyds, &dyds_global, 1, MPI_DOUBLE, MPI_SUM, world);
|
||||
|
||||
if (nreplica > 1) {
|
||||
dyds_global *= factor;
|
||||
dyds = dyds_global;
|
||||
MPI_Allreduce(&dyds, &dyds_global, 1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
}
|
||||
|
||||
if (fabs(dyds_global) > 1.0e-60) rho[m_index] = 1.0 / dyds_global;
|
||||
else rho[m_index] = 1.0e60;
|
||||
|
||||
if (rho[m_index] < 0.0){
|
||||
local_iter = 0;
|
||||
return calc_search_direction();
|
||||
}
|
||||
q = (double *) calloc(3*nlocal, sizeof(double));
|
||||
alpha = (double *) calloc(num_mem, sizeof(double));
|
||||
// set the q vector
|
||||
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
q[i] = g_cur[i];
|
||||
}
|
||||
|
||||
// loop over last m indecies
|
||||
for(int k = num_mem - 1; k > -1; k--) {
|
||||
// this loop should run from the newest memory to the oldest one.
|
||||
|
||||
c_ind = (k + m_index + 1) % num_mem;
|
||||
|
||||
// dot product between dg and q
|
||||
|
||||
sq = 0.0;
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
sq += ds[c_ind][i] * q[i];
|
||||
}
|
||||
MPI_Allreduce(&sq,&sq_global,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
if (nreplica > 1) {
|
||||
sq_global *= factor;
|
||||
sq = sq_global;
|
||||
MPI_Allreduce(&sq,&sq_global,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
}
|
||||
|
||||
// update alpha
|
||||
|
||||
alpha[c_ind] = rho[c_ind] * sq_global;
|
||||
|
||||
// update q
|
||||
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
q[i] -= alpha[c_ind] * dy[c_ind][i];
|
||||
}
|
||||
}
|
||||
|
||||
// dot product between dg with itself
|
||||
yy = 0.0;
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
yy += dy[m_index][i] * dy[m_index][i];
|
||||
}
|
||||
MPI_Allreduce(&yy,&yy_global,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
if (nreplica > 1) {
|
||||
yy_global *= factor;
|
||||
yy = yy_global;
|
||||
MPI_Allreduce(&yy,&yy_global,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
}
|
||||
|
||||
// calculate now search direction
|
||||
|
||||
double devis = rho[m_index] * yy_global;
|
||||
|
||||
if (fabs(devis) > 1.0e-60) {
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
p_s[i] = factor * q[i] / devis;
|
||||
}
|
||||
}else{
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
p_s[i] = factor * q[i] * 1.0e60;
|
||||
}
|
||||
}
|
||||
|
||||
for (int k = 0; k < num_mem; k++){
|
||||
// this loop should run from the oldest memory to the newest one.
|
||||
|
||||
if (local_iter < num_mem) c_ind = k;
|
||||
else c_ind = (k + m_index + 1) % num_mem;
|
||||
|
||||
// dot product between p and da
|
||||
yr = 0.0;
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
yr += dy[c_ind][i] * p_s[i];
|
||||
}
|
||||
|
||||
MPI_Allreduce(&yr,&yr_global,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
if (nreplica > 1) {
|
||||
yr_global *= factor;
|
||||
yr = yr_global;
|
||||
MPI_Allreduce(&yr,&yr_global,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
}
|
||||
|
||||
beta = rho[c_ind] * yr_global;
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
p_s[i] += ds[c_ind][i] * (alpha[c_ind] - beta);
|
||||
}
|
||||
}
|
||||
if (use_line_search == 0)
|
||||
scaling = maximum_rotation(p_s);
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
p_s[i] = - factor * p_s[i] * scaling;
|
||||
g_old[i] = g_cur[i] * factor;
|
||||
}
|
||||
free(q);
|
||||
free(alpha);
|
||||
}
|
||||
local_iter++;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
rotation of spins along the search direction
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinLBFGS::advance_spins()
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
double **sp = atom->sp;
|
||||
double rot_mat[9]; // exponential of matrix made of search direction
|
||||
double s_new[3];
|
||||
|
||||
// loop on all spins on proc.
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
rodrigues_rotation(p_s + 3 * i, rot_mat);
|
||||
|
||||
// rotate spins
|
||||
|
||||
vm3(rot_mat, sp[i], s_new);
|
||||
for (int j = 0; j < 3; j++) sp[i][j] = s_new[j];
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
calculate 3x3 matrix exponential using Rodrigues' formula
|
||||
(R. Murray, Z. Li, and S. Shankar Sastry,
|
||||
A Mathematical Introduction to
|
||||
Robotic Manipulation (1994), p. 28 and 30).
|
||||
|
||||
upp_tr - vector x, y, z so that one calculate
|
||||
U = exp(A) with A= [[0, x, y],
|
||||
[-x, 0, z],
|
||||
[-y, -z, 0]]
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinLBFGS::rodrigues_rotation(const double *upp_tr, double *out)
|
||||
{
|
||||
double theta,A,B,D,x,y,z;
|
||||
double s1,s2,s3,a1,a2,a3;
|
||||
|
||||
if (fabs(upp_tr[0]) < 1.0e-40 &&
|
||||
fabs(upp_tr[1]) < 1.0e-40 &&
|
||||
fabs(upp_tr[2]) < 1.0e-40){
|
||||
|
||||
// if upp_tr is zero, return unity matrix
|
||||
for(int k = 0; k < 3; k++){
|
||||
for(int m = 0; m < 3; m++){
|
||||
if (m == k) out[3 * k + m] = 1.0;
|
||||
else out[3 * k + m] = 0.0;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
theta = sqrt(upp_tr[0] * upp_tr[0] +
|
||||
upp_tr[1] * upp_tr[1] +
|
||||
upp_tr[2] * upp_tr[2]);
|
||||
|
||||
A = cos(theta);
|
||||
B = sin(theta);
|
||||
D = 1 - A;
|
||||
x = upp_tr[0]/theta;
|
||||
y = upp_tr[1]/theta;
|
||||
z = upp_tr[2]/theta;
|
||||
|
||||
// diagonal elements of U
|
||||
|
||||
out[0] = A + z * z * D;
|
||||
out[4] = A + y * y * D;
|
||||
out[8] = A + x * x * D;
|
||||
|
||||
// off diagonal of U
|
||||
|
||||
s1 = -y * z *D;
|
||||
s2 = x * z * D;
|
||||
s3 = -x * y * D;
|
||||
|
||||
a1 = x * B;
|
||||
a2 = y * B;
|
||||
a3 = z * B;
|
||||
|
||||
out[1] = s1 + a1;
|
||||
out[3] = s1 - a1;
|
||||
out[2] = s2 + a2;
|
||||
out[6] = s2 - a2;
|
||||
out[5] = s3 + a3;
|
||||
out[7] = s3 - a3;
|
||||
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
out = vector^T x m,
|
||||
m -- 3x3 matrix , v -- 3-d vector
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void MinSpinLBFGS::vm3(const double *m, const double *v, double *out)
|
||||
{
|
||||
for(int i = 0; i < 3; i++){
|
||||
out[i] = 0.0;
|
||||
for(int j = 0; j < 3; j++)
|
||||
out[i] += *(m + 3 * j + i) * v[j];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MinSpinLBFGS::make_step(double c, double *energy_and_der)
|
||||
{
|
||||
double p_scaled[3];
|
||||
int nlocal = atom->nlocal;
|
||||
double rot_mat[9]; // exponential of matrix made of search direction
|
||||
double s_new[3];
|
||||
double **sp = atom->sp;
|
||||
double der_e_cur_tmp = 0.0;
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
|
||||
// scale the search direction
|
||||
|
||||
for (int j = 0; j < 3; j++) p_scaled[j] = c * p_s[3 * i + j];
|
||||
|
||||
// calculate rotation matrix
|
||||
|
||||
rodrigues_rotation(p_scaled, rot_mat);
|
||||
|
||||
// rotate spins
|
||||
|
||||
vm3(rot_mat, sp[i], s_new);
|
||||
for (int j = 0; j < 3; j++) sp[i][j] = s_new[j];
|
||||
}
|
||||
|
||||
ecurrent = energy_force(0);
|
||||
calc_gradient();
|
||||
neval++;
|
||||
der_e_cur = 0.0;
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
der_e_cur += g_cur[i] * p_s[i];
|
||||
}
|
||||
MPI_Allreduce(&der_e_cur,&der_e_cur_tmp, 1, MPI_DOUBLE, MPI_SUM, world);
|
||||
der_e_cur = der_e_cur_tmp;
|
||||
if (update->multireplica == 1) {
|
||||
MPI_Allreduce(&der_e_cur_tmp,&der_e_cur,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
}
|
||||
|
||||
energy_and_der[0] = ecurrent;
|
||||
energy_and_der[1] = der_e_cur;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Calculate step length which satisfies approximate Wolfe conditions
|
||||
using the cubic interpolation
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int MinSpinLBFGS::calc_and_make_step(double a, double b, int index)
|
||||
{
|
||||
double e_and_d[2] = {0.0,0.0};
|
||||
double alpha,c1,c2,c3;
|
||||
double **sp = atom->sp;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
make_step(b,e_and_d);
|
||||
ecurrent = e_and_d[0];
|
||||
der_e_cur = e_and_d[1];
|
||||
index++;
|
||||
|
||||
if (adescent(eprevious,e_and_d[0]) || index == 5){
|
||||
MPI_Bcast(&b,1,MPI_DOUBLE,0,world);
|
||||
for (int i = 0; i < 3 * nlocal; i++) {
|
||||
p_s[i] = b * p_s[i];
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else{
|
||||
double r,f0,f1,df0,df1;
|
||||
r = b - a;
|
||||
f0 = eprevious;
|
||||
f1 = ecurrent;
|
||||
df0 = der_e_pr;
|
||||
df1 = der_e_cur;
|
||||
|
||||
c1 = -2.0*(f1-f0)/(r*r*r)+(df1+df0)/(r*r);
|
||||
c2 = 3.0*(f1-f0)/(r*r)-(df1+2.0*df0)/(r);
|
||||
c3 = df0;
|
||||
|
||||
// f(x) = c1 x^3 + c2 x^2 + c3 x^1 + c4
|
||||
// has minimum at alpha below. We do not check boundaries.
|
||||
|
||||
alpha = (-c2 + sqrt(c2*c2 - 3.0*c1*c3))/(3.0*c1);
|
||||
MPI_Bcast(&alpha,1,MPI_DOUBLE,0,world);
|
||||
|
||||
if (alpha < 0.0) alpha = r/2.0;
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
for (int j = 0; j < 3; j++) sp[i][j] = sp_copy[i][j];
|
||||
}
|
||||
calc_and_make_step(0.0, alpha, index);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Approximate descent
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int MinSpinLBFGS::adescent(double phi_0, double phi_j){
|
||||
|
||||
double eps = 1.0e-6;
|
||||
|
||||
if (phi_j<=phi_0+eps*fabs(phi_0))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
double MinSpinLBFGS::maximum_rotation(double *p)
|
||||
{
|
||||
double norm2,norm2_global,scaling,alpha;
|
||||
int nlocal = atom->nlocal;
|
||||
int ntotal = 0;
|
||||
|
||||
norm2 = 0.0;
|
||||
for (int i = 0; i < 3 * nlocal; i++) norm2 += p[i] * p[i];
|
||||
|
||||
MPI_Allreduce(&norm2,&norm2_global,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
if (nreplica > 1) {
|
||||
norm2 = norm2_global;
|
||||
MPI_Allreduce(&norm2,&norm2_global,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
|
||||
}
|
||||
MPI_Allreduce(&nlocal,&ntotal,1,MPI_INT,MPI_SUM,world);
|
||||
if (nreplica > 1) {
|
||||
nlocal = ntotal;
|
||||
MPI_Allreduce(&nlocal,&ntotal,1,MPI_INT,MPI_SUM,universe->uworld);
|
||||
}
|
||||
|
||||
scaling = (maxepsrot * sqrt((double) ntotal / norm2_global));
|
||||
|
||||
if (scaling < 1.0) alpha = scaling;
|
||||
else alpha = 1.0;
|
||||
|
||||
return alpha;
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef MINIMIZE_CLASS
|
||||
|
||||
MinimizeStyle(spin/lbfgs, MinSpinLBFGS)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_MIN_SPIN_LBFGS_H
|
||||
#define LMP_MIN_SPIN_LBFGS_H
|
||||
|
||||
#include "min.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class MinSpinLBFGS: public Min {
|
||||
public:
|
||||
MinSpinLBFGS(class LAMMPS *);
|
||||
virtual ~MinSpinLBFGS();
|
||||
void init();
|
||||
void setup_style();
|
||||
int modify_param(int, char **);
|
||||
void reset_vectors();
|
||||
int iterate(int);
|
||||
|
||||
private:
|
||||
int local_iter; // for neb
|
||||
int use_line_search; // use line search or not.
|
||||
int nlocal_max; // max value of nlocal (for size of lists)
|
||||
int ireplica,nreplica; // for neb
|
||||
double der_e_cur; // current derivative along search dir.
|
||||
double der_e_pr; // previous derivative along search dir.
|
||||
double maxepsrot;
|
||||
double *spvec; // variables for atomic dof, as 1d vector
|
||||
double *fmvec; // variables for atomic dof, as 1d vector
|
||||
double *g_old; // gradient vector at previous step
|
||||
double *g_cur; // current gradient vector
|
||||
double *p_s; // search direction vector
|
||||
|
||||
void advance_spins();
|
||||
void calc_gradient();
|
||||
void calc_search_direction();
|
||||
void vm3(const double *, const double *, double *);
|
||||
void rodrigues_rotation(const double *, double *);
|
||||
void make_step(double, double *);
|
||||
int calc_and_make_step(double, double, int);
|
||||
int adescent(double, double);
|
||||
double maximum_rotation(double *);
|
||||
|
||||
double *rho; // estimation of curvature
|
||||
double **ds; // change in rotation matrix between two iterations, da
|
||||
double **dy; // change in gradients between two iterations, dg
|
||||
double **sp_copy; // copy of the spins
|
||||
int num_mem; // number of stored steps
|
||||
bigint last_negative;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -43,6 +43,8 @@
|
|||
#include "timer.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "math_const.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
@ -186,8 +188,8 @@ void NEBSpin::run()
|
|||
|
||||
if (update->minimize->searchflag)
|
||||
error->all(FLERR,"NEBSpin requires damped dynamics minimizer");
|
||||
if (strcmp(update->minimize_style,"spin") != 0)
|
||||
error->all(FLERR,"NEBSpin requires spin minimizer");
|
||||
if (!utils::strmatch(update->minimize_style,"^spin"))
|
||||
error->all(FLERR,"NEBSpin requires a spin minimizer");
|
||||
|
||||
// setup regular NEBSpin minimization
|
||||
|
||||
|
@ -243,6 +245,8 @@ void NEBSpin::run()
|
|||
timer->init();
|
||||
timer->barrier_start();
|
||||
|
||||
// if(ireplica != 0 && ireplica != nreplica -1)
|
||||
|
||||
while (update->minimize->niter < n1steps) {
|
||||
update->minimize->run(nevery);
|
||||
print_status();
|
||||
|
@ -639,7 +643,7 @@ int NEBSpin::initial_rotation(double *spi, double *sploc, double fraction)
|
|||
kcrossy = kz*spix - kx*spiz;
|
||||
kcrossz = kx*spiy - ky*spix;
|
||||
|
||||
kdots = kx*spix + ky*spiz + kz*spiz;
|
||||
kdots = kx*spix + ky*spiy + kz*spiz;
|
||||
|
||||
omega = acos(sidotsf);
|
||||
omega *= fraction;
|
||||
|
|
|
@ -323,7 +323,7 @@ void PairSpinDipoleCut::compute(int eflag, int vflag)
|
|||
void PairSpinDipoleCut::compute_single_pair(int ii, double fmi[3])
|
||||
{
|
||||
int j,jnum,itype,jtype,ntypes;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
int *jlist,*numneigh,**firstneigh;
|
||||
double rsq,rinv,r2inv,r3inv,local_cut2;
|
||||
double xi[3],rij[3],eij[3],spi[4],spj[4];
|
||||
|
||||
|
|
|
@ -354,10 +354,9 @@ void PairSpinDipoleLong::compute(int eflag, int vflag)
|
|||
|
||||
void PairSpinDipoleLong::compute_single_pair(int ii, double fmi[3])
|
||||
{
|
||||
//int i,j,jj,jnum,itype,jtype;
|
||||
int j,jj,jnum,itype,jtype,ntypes;
|
||||
int k,locflag;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
int *jlist,*numneigh,**firstneigh;
|
||||
double r,rinv,r2inv,rsq,grij,expm2,t,erfc;
|
||||
double local_cut2,pre1,pre2,pre3;
|
||||
double bij[4],xi[3],rij[3],eij[3],spi[4],spj[4];
|
||||
|
@ -367,7 +366,6 @@ void PairSpinDipoleLong::compute_single_pair(int ii, double fmi[3])
|
|||
double **sp = atom->sp;
|
||||
double **fm_long = atom->fm_long;
|
||||
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
|
@ -405,7 +403,6 @@ void PairSpinDipoleLong::compute_single_pair(int ii, double fmi[3])
|
|||
// computation of the exchange interaction
|
||||
// loop over neighbors of atom i
|
||||
|
||||
//i = ilist[ii];
|
||||
xi[0] = x[ii][0];
|
||||
xi[1] = x[ii][1];
|
||||
xi[2] = x[ii][2];
|
||||
|
|
|
@ -313,7 +313,7 @@ void PairSpinDmi::compute(int eflag, int vflag)
|
|||
|
||||
if (eflag) {
|
||||
evdwl -= (spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]);
|
||||
evdwl *= hbar;
|
||||
evdwl *= 0.5*hbar;
|
||||
} else evdwl = 0.0;
|
||||
|
||||
if (evflag) ev_tally_xyz(i,j,nlocal,newton_pair,
|
||||
|
@ -427,9 +427,9 @@ void PairSpinDmi::compute_dmi(int i, int j, double eij[3], double fmi[3], double
|
|||
dmiy = eij[2]*v_dmx[itype][jtype] - eij[0]*v_dmz[itype][jtype];
|
||||
dmiz = eij[0]*v_dmy[itype][jtype] - eij[1]*v_dmx[itype][jtype];
|
||||
|
||||
fmi[0] -= (dmiy*spj[2] - dmiz*spj[1]);
|
||||
fmi[1] -= (dmiz*spj[0] - dmix*spj[2]);
|
||||
fmi[2] -= (dmix*spj[1] - dmiy*spj[0]);
|
||||
fmi[0] -= 2.0*(dmiy*spj[2] - dmiz*spj[1]);
|
||||
fmi[1] -= 2.0*(dmiz*spj[0] - dmix*spj[2]);
|
||||
fmi[2] -= 2.0*(dmix*spj[1] - dmiy*spj[0]);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -296,7 +296,7 @@ void PairSpinExchange::compute(int eflag, int vflag)
|
|||
|
||||
if (eflag) {
|
||||
evdwl -= (spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]);
|
||||
evdwl *= hbar;
|
||||
evdwl *= 0.5*hbar;
|
||||
} else evdwl = 0.0;
|
||||
|
||||
if (evflag) ev_tally_xyz(i,j,nlocal,newton_pair,
|
||||
|
@ -405,9 +405,9 @@ void PairSpinExchange::compute_exchange(int i, int j, double rsq, double fmi[3],
|
|||
Jex *= (1.0-J2[itype][jtype]*ra);
|
||||
Jex *= exp(-ra);
|
||||
|
||||
fmi[0] += Jex*spj[0];
|
||||
fmi[1] += Jex*spj[1];
|
||||
fmi[2] += Jex*spj[2];
|
||||
fmi[0] += 2.0*Jex*spj[0];
|
||||
fmi[1] += 2.0*Jex*spj[1];
|
||||
fmi[2] += 2.0*Jex*spj[2];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -504,7 +504,7 @@ void PairSpinExchange::read_restart(FILE *fp)
|
|||
fread(&J1_mag[i][j],sizeof(double),1,fp);
|
||||
fread(&J1_mech[i][j],sizeof(double),1,fp);
|
||||
fread(&J2[i][j],sizeof(double),1,fp);
|
||||
fread(&J2[i][j],sizeof(double),1,fp);
|
||||
fread(&J3[i][j],sizeof(double),1,fp);
|
||||
fread(&cut_spin_exchange[i][j],sizeof(double),1,fp);
|
||||
}
|
||||
MPI_Bcast(&J1_mag[i][j],1,MPI_DOUBLE,0,world);
|
||||
|
|
|
@ -643,10 +643,8 @@ void PairSpinNeel::allocate()
|
|||
memory->create(q3,n+1,n+1,"pair/spin/soc/neel:q3");
|
||||
|
||||
memory->create(cutsq,n+1,n+1,"pair/spin/soc/neel:cutsq");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
@ -694,11 +692,11 @@ void PairSpinNeel::read_restart(FILE *fp)
|
|||
fread(&g1[i][j],sizeof(double),1,fp);
|
||||
fread(&g1_mech[i][j],sizeof(double),1,fp);
|
||||
fread(&g2[i][j],sizeof(double),1,fp);
|
||||
fread(&g2[i][j],sizeof(double),1,fp);
|
||||
fread(&g3[i][j],sizeof(double),1,fp);
|
||||
fread(&q1[i][j],sizeof(double),1,fp);
|
||||
fread(&q1_mech[i][j],sizeof(double),1,fp);
|
||||
fread(&q2[i][j],sizeof(double),1,fp);
|
||||
fread(&q2[i][j],sizeof(double),1,fp);
|
||||
fread(&q3[i][j],sizeof(double),1,fp);
|
||||
fread(&cut_spin_neel[i][j],sizeof(double),1,fp);
|
||||
}
|
||||
MPI_Bcast(&g1[i][j],1,MPI_DOUBLE,0,world);
|
||||
|
|
|
@ -42,3 +42,5 @@ action fix_phonon.cpp fft3d_wrap.h
|
|||
action fix_phonon.h fft3d_wrap.h
|
||||
action dynamical_matrix.cpp
|
||||
action dynamical_matrix.h
|
||||
action third_order.cpp
|
||||
action third_order.h
|
||||
|
|