LATTE package doc update and some small code changes
This commit is contained in:
@ -96,6 +96,7 @@ Package, Description, Doc page, Example, Library
|
|||||||
"KIM"_#KIM, OpenKIM wrapper, "pair_style kim"_pair_kim.html, kim, ext
|
"KIM"_#KIM, OpenKIM wrapper, "pair_style kim"_pair_kim.html, kim, ext
|
||||||
"KOKKOS"_#KOKKOS, Kokkos-enabled styles, "Section 5.3.3"_accelerate_kokkos.html, "Benchmarks"_http://lammps.sandia.gov/bench.html, -
|
"KOKKOS"_#KOKKOS, Kokkos-enabled styles, "Section 5.3.3"_accelerate_kokkos.html, "Benchmarks"_http://lammps.sandia.gov/bench.html, -
|
||||||
"KSPACE"_#KSPACE, long-range Coulombic solvers, "kspace_style"_kspace_style.html, peptide, -
|
"KSPACE"_#KSPACE, long-range Coulombic solvers, "kspace_style"_kspace_style.html, peptide, -
|
||||||
|
"LATTE"_#LATTE, quantum DFTB forces via LATTE, "fix latte"_fix_latte.html, latte, ext
|
||||||
"MANYBODY"_#MANYBODY, many-body potentials, "pair_style tersoff"_pair_tersoff.html, shear, -
|
"MANYBODY"_#MANYBODY, many-body potentials, "pair_style tersoff"_pair_tersoff.html, shear, -
|
||||||
"MC"_#MC, Monte Carlo options, "fix gcmc"_fix_gcmc.html, -, -
|
"MC"_#MC, Monte Carlo options, "fix gcmc"_fix_gcmc.html, -, -
|
||||||
"MEAM"_#MEAM, modified EAM potential, "pair_style meam"_pair_meam.html, meam, int
|
"MEAM"_#MEAM, modified EAM potential, "pair_style meam"_pair_meam.html, meam, int
|
||||||
@ -695,6 +696,65 @@ bench/in.rhodo :ul
|
|||||||
|
|
||||||
:line
|
:line
|
||||||
|
|
||||||
|
LATTE package :link(LATTE),h4
|
||||||
|
|
||||||
|
[Contents:]
|
||||||
|
|
||||||
|
A fix command which wraps the LATTE DFTB code, so that molecular
|
||||||
|
dynamics can be run with LAMMPS using density-functional tight-binding
|
||||||
|
quantum forces calculated by LATTE.
|
||||||
|
|
||||||
|
More information on LATTE can be found at this web site:
|
||||||
|
"https://github.com/lanl/LATTE"_#latte_home. A brief technical
|
||||||
|
description is given with the "fix latte"_fix_latte.html command.
|
||||||
|
|
||||||
|
:link(latte_home,https://github.com/lanl/LATTE)
|
||||||
|
|
||||||
|
[Authors:] Christian Negre (LANL) and Steve Plimpton (Sandia). LATTE
|
||||||
|
itself is developed at Los Alamos National Laboratory by Marc
|
||||||
|
Cawkwell, Anders Niklasson, and Christian Negre.
|
||||||
|
|
||||||
|
[Install or un-install:]
|
||||||
|
|
||||||
|
Before building LAMMPS with this package, you must first download and
|
||||||
|
build the LATTE library. You can do this manually if you prefer;
|
||||||
|
follow the instructions in lib/latte/README. You can also do it in
|
||||||
|
one step from the lammps/src dir, using a command like these, which
|
||||||
|
simply invokes the lib/latte/Install.py script with the specified
|
||||||
|
args:
|
||||||
|
|
||||||
|
make lib-latte # print help message
|
||||||
|
make lib-latte args="-b" # download and build in lib/latte/LATTE-master
|
||||||
|
make lib-latte args="-p $HOME/latte" # use existing LATTE installation in $HOME/latte
|
||||||
|
make lib-latte args="-b -m gfortran" # download and build in lib/latte and
|
||||||
|
# copy Makefile.lammps.gfortran to Makefile.lammps
|
||||||
|
|
||||||
|
Note that 3 symbolic (soft) links, "includelink" and "liblink" and
|
||||||
|
"filelink", are created in lib/latte to point into the LATTE home dir.
|
||||||
|
When LAMMPS builds in src it will use these links. You should
|
||||||
|
also check that the Makefile.lammps file you create is apporpriate
|
||||||
|
for the compiler you use on your system to build LATTE.
|
||||||
|
|
||||||
|
You can then install/un-install the package and build LAMMPS in the
|
||||||
|
usual manner:
|
||||||
|
|
||||||
|
make yes-latte
|
||||||
|
make machine :pre
|
||||||
|
|
||||||
|
make no-latte
|
||||||
|
make machine :pre
|
||||||
|
|
||||||
|
[Supporting info:]
|
||||||
|
|
||||||
|
src/LATTE: filenames -> commands
|
||||||
|
src/LATTE/README
|
||||||
|
lib/latte/README
|
||||||
|
"fix latte"_fix_latte.html
|
||||||
|
examples/latte
|
||||||
|
"LAMMPS-LATTE tutorial"_https://github.com/lanl/LATTE/wiki/Using-LATTE-through-LAMMPS :ul
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
MANYBODY package :link(MANYBODY),h4
|
MANYBODY package :link(MANYBODY),h4
|
||||||
|
|
||||||
[Contents:]
|
[Contents:]
|
||||||
|
|||||||
200
doc/src/fix_latte.txt
Normal file
200
doc/src/fix_latte.txt
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||||
|
|
||||||
|
:link(lws,http://lammps.sandia.gov)
|
||||||
|
:link(ld,Manual.html)
|
||||||
|
:link(lc,Section_commands.html#comm)
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
|
fix latte command :h3
|
||||||
|
|
||||||
|
[Syntax:]
|
||||||
|
|
||||||
|
fix ID group-ID latte peID :pre
|
||||||
|
|
||||||
|
ID, group-ID are documented in "fix"_fix.html command
|
||||||
|
latte = style name of this fix command
|
||||||
|
peID = NULL or ID of compute used to calculate per-atom energy :ul
|
||||||
|
|
||||||
|
[Examples:]
|
||||||
|
|
||||||
|
fix dftb all latte NULL :pre
|
||||||
|
|
||||||
|
[Description:]
|
||||||
|
|
||||||
|
This fix style is a wrapper on the self-consistent charge transfer
|
||||||
|
density functional based tight binding (DFTB) code LATTE. If you
|
||||||
|
download and build LATTE, it can be called as a library by LAMMPS via
|
||||||
|
this fix to run dynamics or perform energy minimization using DFTB
|
||||||
|
forces and energies computed by LATTE.
|
||||||
|
|
||||||
|
LATTE is principally developed and supported by Marc Cawkwell and
|
||||||
|
co-workers at Los Alamos National Laboratory (LANL). See the full
|
||||||
|
list of contributors in the src/LATTE/README file.
|
||||||
|
|
||||||
|
To use this fix, the LATTE program needs to be compiled as a library
|
||||||
|
and linked with LAMMPS. LATTE can be downloaded (or cloned) from
|
||||||
|
"https://github.com/lanl/LATTE"_https://github.com/lanl/LATTE.
|
||||||
|
Instructions on how to download and build LATTE on your system can be
|
||||||
|
found in the lib/latte/README. Note that you can also use the "make
|
||||||
|
lib-latte" command from the LAMMPS src directory to automate this
|
||||||
|
process.
|
||||||
|
|
||||||
|
Once LAMMPS is built with the LATTE package, you can run the example
|
||||||
|
input scripts for molecular dynamics or energy minimization that are
|
||||||
|
found in examples/latte.
|
||||||
|
|
||||||
|
A step-by-step tutorial can be follwed at: "LAMMPS-LATTE
|
||||||
|
tutorial"_https://github.com/lanl/LATTE/wiki/Using-LATTE-through-LAMMPS
|
||||||
|
|
||||||
|
The {peID} argument is not yet supported by fix latte, so it must be
|
||||||
|
specified as NULL. Eventually it will be used to enable LAMMPS to
|
||||||
|
calculate a Coulomb potential as an alternative to LATTE performing
|
||||||
|
the calculation.
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
|
LATTE is a code for performing self-consistent charge transfer
|
||||||
|
tight-binding (SC-TB) calculations of total energies and the forces
|
||||||
|
acting on atoms in molecules and solids. This tight-binding method is
|
||||||
|
becoming more and more popular and widely used in chemistry,
|
||||||
|
biochemistry, material science, etc.
|
||||||
|
|
||||||
|
The SC-TB formalism is derived from an expansion of the Kohn-Sham
|
||||||
|
density functional to second order in charge fluctuations about a
|
||||||
|
reference charge of overlapping atom-centered densities and bond
|
||||||
|
integrals are parameterized using a Slater-Koster tight-binding
|
||||||
|
approach. This procedure, which usually is referred to as the DFTB
|
||||||
|
method has been described in detail by ("Elstner"_#Elstner) and
|
||||||
|
("Finnis"_#Finnis) and coworkers.
|
||||||
|
|
||||||
|
The work of the LATTE developers follows that of Elstner closely with
|
||||||
|
respect to the physical model. However, the development of LATTE is
|
||||||
|
geared principally toward large-scale, long duration, microcanonical
|
||||||
|
quantum-based Born-Oppenheimer molecular dynamics (QMD) simulations.
|
||||||
|
One of the main bottlenecks of an electronic structure calculation is
|
||||||
|
the solution of the generalized eigenvalue problem which scales with
|
||||||
|
the cube of the system size O(N^3).
|
||||||
|
|
||||||
|
The Theoretical and Computer sciences divisions at Los Alamos National
|
||||||
|
Laboratory have accumulated large experience addressing this issue by
|
||||||
|
calculating the density matrix directly instead of using
|
||||||
|
diagonalization. We typically use a recursive sparse Fermi-operator
|
||||||
|
expansion using second-order spectral projection functions
|
||||||
|
(SP2-algorithm), which was introduced by Niklasson in 2002
|
||||||
|
("Niklasson2002"_#Niklasson2002), ("Rubensson"_#Rubensson),
|
||||||
|
("Mniszewski"_#Mniszewski). When the matrices involved in the
|
||||||
|
recursive expansion are sufficiently sparse, the calculation of the
|
||||||
|
density matrix scales linearly as a function of the system size O(N).
|
||||||
|
|
||||||
|
Another important feature is the extended Lagrangian framework for
|
||||||
|
Born-Oppenheimer molecular dynamics (XL-BOMD)
|
||||||
|
("Niklasson2008"_#Niklasson2008) ("Niklasson2014"_#Niklasson2014),
|
||||||
|
("Niklasson2017"_#Niklasson2017) that allows for a drastic reduction
|
||||||
|
or even a complete removal of the iterative self-consistent field
|
||||||
|
optimization. Often only a single density matrix calculation per
|
||||||
|
molecular dynamics time step is required, yet total energy stability
|
||||||
|
is well maintained. The SP2 and XL-BOMD techniques enables stable
|
||||||
|
linear scaling MD simulations with a very small computational
|
||||||
|
overhead. This opens a number of opportunities in many different
|
||||||
|
areas of chemistry and materials science, as we now can simulate
|
||||||
|
larger system sizes and longer time scales
|
||||||
|
("Cawkwell2012"_#Cawkwell2012), ("Negre2016"_#Negre2016).
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
|
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||||
|
|
||||||
|
No information about this fix is written to "binary restart
|
||||||
|
files"_restart.html.
|
||||||
|
|
||||||
|
The "fix_modify"_fix_modify.html {energy} option is supported by this
|
||||||
|
fix to add the potential energy computed by LATTE to the system's
|
||||||
|
potential energy as part of "thermodynamic output"_thermo_style.html.
|
||||||
|
|
||||||
|
This fix computes a global scalar which can be accessed by various
|
||||||
|
"output commands"_Section_howto.html#howto_15. The scalar is the
|
||||||
|
potential energy discussed above. The scalar value calculated by this
|
||||||
|
fix is "extensive".
|
||||||
|
|
||||||
|
No parameter of this fix can be used with the {start/stop} keywords of
|
||||||
|
the "run"_run.html command.
|
||||||
|
|
||||||
|
The DFTB forces computed by LATTE via this fix are imposed during an
|
||||||
|
energy minimization, invoked by the "minimize"_minimize.html command.
|
||||||
|
|
||||||
|
NOTE: If you want the potential energy associated with the DFTB
|
||||||
|
forces to be included in the total potential energy of the system (the
|
||||||
|
quantity being minimized), you MUST enable the
|
||||||
|
"fix_modify"_fix_modify.html {energy} option for this fix.
|
||||||
|
|
||||||
|
[Restrictions:]
|
||||||
|
|
||||||
|
This fix is part of the LATTE package. It is only enabled if LAMMPS
|
||||||
|
was built with that package. See the "Making
|
||||||
|
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||||
|
|
||||||
|
You must use metal units, as set by the "units"_units command to use
|
||||||
|
this fix.
|
||||||
|
|
||||||
|
Currently, LAMMPS must be run in serial or as a single MPI task, to
|
||||||
|
use this fix. This is typically not a bottleneck, since LATTE will be
|
||||||
|
doing 99% or more of the work to compute quantum-accurate forces.
|
||||||
|
|
||||||
|
NOTE: NEB calculations can be done using this fix using multiple
|
||||||
|
replicas and running LAMMPS in parallel. However, each replica must
|
||||||
|
be run on a single MPI task. For details, see the "neb"_neb.html
|
||||||
|
command and -partition command-line explained in "Section
|
||||||
|
2.6"_Section_start.html#start_6 of the manual.
|
||||||
|
|
||||||
|
[Related commands:] none
|
||||||
|
|
||||||
|
[Default:] none
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
|
:link(Elstner)
|
||||||
|
[(Elstner)] M. Elstner, D. Poresag, G. Jungnickel, J. Elsner,
|
||||||
|
M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58,
|
||||||
|
7260 (1998).
|
||||||
|
|
||||||
|
:link(Elstner1)
|
||||||
|
[(Elstner)] M. Elstner, D. Poresag, G. Jungnickel, J. Elsner,
|
||||||
|
M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58,
|
||||||
|
7260 (1998).
|
||||||
|
|
||||||
|
:link(Finnis)
|
||||||
|
[(Finnis)] M. W. Finnis, A. T. Paxton, M. Methfessel, and M. van
|
||||||
|
Schilfgarde, Phys. Rev. Lett., 81, 5149 (1998).
|
||||||
|
|
||||||
|
:link(Mniszewski)
|
||||||
|
[(Mniszewski)] S. M. Mniszewski, M. J. Cawkwell, M. E. Wall,
|
||||||
|
J. Mohd-Yusof, N. Bock, T. C. Germann, and A. M. N. Niklasson,
|
||||||
|
J. Chem. Theory Comput., 11, 4644 (2015).
|
||||||
|
|
||||||
|
:link(Niklasson2002)
|
||||||
|
[(Niklasson2002)] A. M. N. Niklasson, Phys. Rev. B, 66, 155115 (2002).
|
||||||
|
|
||||||
|
:link(Rubensson)
|
||||||
|
[(Rubensson)] E. H. Rubensson, A. M. N. Niklasson, SIAM
|
||||||
|
J. Sci. Comput. 36 (2), 147-170, (2014).
|
||||||
|
|
||||||
|
:link(Niklasson2008)
|
||||||
|
[(Niklasson2008)] A. M. N. Niklasson, Phys. Rev. Lett., 100, 123004
|
||||||
|
(2008).
|
||||||
|
|
||||||
|
:link(Niklasson2014)
|
||||||
|
[(Niklasson2014)] A. M. N. Niklasson and M. Cawkwell, J. Chem. Phys.,
|
||||||
|
141, 164123, (2014).
|
||||||
|
|
||||||
|
:link(Niklasson2014)
|
||||||
|
[(Niklasson2017)] A. M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017).
|
||||||
|
|
||||||
|
:link(Niklasson2012)
|
||||||
|
[(Niklasson2017)] A. M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86
|
||||||
|
(17), 174308 (2012).
|
||||||
|
|
||||||
|
:link(Negre2016)
|
||||||
|
[(Negre2016)] C. F. A. Negre, S. M. Mniszewski, M. J. Cawkwell,
|
||||||
|
N. Bock, M. E. Wall, and A. M. N. Niklasson, J. Chem. Theory Comp.,
|
||||||
|
12, 3063 (2016).
|
||||||
@ -79,6 +79,7 @@ granregion: use of fix wall/region/gran as boundary on granular particles
|
|||||||
hugoniostat: Hugoniostat shock dynamics
|
hugoniostat: Hugoniostat shock dynamics
|
||||||
indent: spherical indenter into a 2d solid
|
indent: spherical indenter into a 2d solid
|
||||||
kim: use of potentials in Knowledge Base for Interatomic Models (KIM)
|
kim: use of potentials in Knowledge Base for Interatomic Models (KIM)
|
||||||
|
latte: use of LATTE density-functional tight-binding quantum code
|
||||||
meam: MEAM test for SiC and shear (same as shear examples)
|
meam: MEAM test for SiC and shear (same as shear examples)
|
||||||
melt: rapid melt of 3d LJ system
|
melt: rapid melt of 3d LJ system
|
||||||
micelle: self-assembly of small lipid-like molecules into 2d bilayers
|
micelle: self-assembly of small lipid-like molecules into 2d bilayers
|
||||||
|
|||||||
@ -1,63 +0,0 @@
|
|||||||
LAMMPS Description
|
|
||||||
|
|
||||||
45 atoms
|
|
||||||
|
|
||||||
3 atom types
|
|
||||||
|
|
||||||
0.0000000000000000 18.917000000000002 xlo xhi
|
|
||||||
0.0000000000000000 17.350999999999999 ylo yhi
|
|
||||||
0.0000000000000000 15.472000000000000 zlo zhi
|
|
||||||
|
|
||||||
Masses
|
|
||||||
|
|
||||||
1 15.994915008544922
|
|
||||||
2 12.000000000000000
|
|
||||||
3 1.0078250169754028
|
|
||||||
|
|
||||||
Atoms
|
|
||||||
|
|
||||||
1 1 1 0.0 11.47359 7.39174 7.26456
|
|
||||||
2 1 2 0.0 12.66159 8.24474 7.53356
|
|
||||||
3 1 3 0.0 13.49759 7.72474 7.00656
|
|
||||||
4 1 2 0.0 12.92859 8.18374 9.02956
|
|
||||||
5 1 1 0.0 13.69659 9.10274 10.46556
|
|
||||||
6 1 2 0.0 12.83959 10.10474 6.64056
|
|
||||||
7 1 3 0.0 13.24359 10.33074 7.58456
|
|
||||||
8 1 1 0.0 13.17359 9.67874 5.60956
|
|
||||||
9 1 2 0.0 11.20559 10.26374 6.86456
|
|
||||||
10 1 3 0.0 11.22159 11.15674 6.18156
|
|
||||||
11 1 1 0.0 10.78559 10.69674 8.19156
|
|
||||||
12 1 2 0.0 10.23459 9.20474 6.34356
|
|
||||||
13 1 3 0.0 9.23359 9.62574 6.11656
|
|
||||||
14 1 1 0.0 10.73959 8.65074 5.08856
|
|
||||||
15 1 2 0.0 10.18759 8.08774 7.38056
|
|
||||||
16 1 3 0.0 10.03259 8.49174 8.42656
|
|
||||||
17 1 1 0.0 9.22959 7.03374 7.08156
|
|
||||||
18 1 2 0.0 7.79359 7.27874 7.34356
|
|
||||||
19 1 1 0.0 7.44259 8.64274 6.96956
|
|
||||||
20 1 2 0.0 7.01059 9.43674 8.13856
|
|
||||||
21 1 3 0.0 5.95059 9.74974 7.96256
|
|
||||||
22 1 2 0.0 7.08359 8.51474 9.35656
|
|
||||||
23 1 3 0.0 8.19359 8.08474 9.80956
|
|
||||||
24 1 1 0.0 5.86059 8.56174 10.14056
|
|
||||||
25 1 2 0.0 7.34259 7.10674 8.80356
|
|
||||||
26 1 3 0.0 6.37259 6.54074 8.80556
|
|
||||||
27 1 1 0.0 8.32159 6.38474 9.58156
|
|
||||||
28 1 2 0.0 7.89859 10.67174 8.17156
|
|
||||||
29 1 1 0.0 6.06859 12.11474 7.59256
|
|
||||||
30 1 2 0.0 7.47359 7.05174 5.99256
|
|
||||||
31 1 1 0.0 5.66359 6.54374 6.50656
|
|
||||||
32 1 3 0.0 12.00659 8.11374 9.61556
|
|
||||||
33 1 3 0.0 13.35859 7.21774 9.30856
|
|
||||||
34 1 3 0.0 13.67759 8.46774 11.22956
|
|
||||||
35 1 3 0.0 12.44459 9.34474 5.00556
|
|
||||||
36 1 3 0.0 11.54859 11.18274 8.59756
|
|
||||||
37 1 3 0.0 11.00959 7.71574 5.30056
|
|
||||||
38 1 3 0.0 5.09459 8.45474 9.52056
|
|
||||||
39 1 3 0.0 7.92859 6.23074 10.47756
|
|
||||||
40 1 3 0.0 8.53259 10.62974 7.23156
|
|
||||||
41 1 3 0.0 8.58159 10.63874 9.05856
|
|
||||||
42 1 3 0.0 6.42359 13.37374 7.86056
|
|
||||||
43 1 3 0.0 7.58559 6.90074 4.62256
|
|
||||||
44 1 3 0.0 7.35159 5.27974 6.61456
|
|
||||||
45 1 3 0.0 5.22759 6.18974 5.69256
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
# simple water model with LATTE
|
# simple sucrose model with LATTE
|
||||||
|
|
||||||
units metal
|
units metal
|
||||||
atom_style full
|
atom_style full
|
||||||
@ -34,10 +34,7 @@ fix_modify 2 energy yes
|
|||||||
|
|
||||||
thermo_style custom step temp pe etotal
|
thermo_style custom step temp pe etotal
|
||||||
|
|
||||||
# minimization
|
# dynamics
|
||||||
|
|
||||||
thermo 1
|
thermo 10
|
||||||
min_style cg
|
run 100
|
||||||
min_modify dmax 0.1
|
|
||||||
min_modify line quadratic
|
|
||||||
minimize 1.0e-6 1.0e-6 10000 10000
|
|
||||||
103
examples/latte/log.19Sep17.latte.water.g++.1
Normal file
103
examples/latte/log.19Sep17.latte.water.g++.1
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
LAMMPS (1 Sep 2017)
|
||||||
|
# simple water model with LATTE
|
||||||
|
|
||||||
|
units metal
|
||||||
|
atom_style full
|
||||||
|
atom_modify sort 0 0.0 # turn off sorting of the coordinates
|
||||||
|
|
||||||
|
read_data data.water
|
||||||
|
orthogonal box = (0 0 0) to (6.267 6.267 6.267)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
24 atoms
|
||||||
|
0 = max # of 1-2 neighbors
|
||||||
|
0 = max # of 1-3 neighbors
|
||||||
|
0 = max # of 1-4 neighbors
|
||||||
|
1 = max # of special neighbors
|
||||||
|
|
||||||
|
# replicate system if requested
|
||||||
|
|
||||||
|
variable x index 1
|
||||||
|
variable y index 1
|
||||||
|
variable z index 1
|
||||||
|
|
||||||
|
variable nrep equal v_x*v_y*v_z
|
||||||
|
if "${nrep} > 1" then "replicate $x $y $z"
|
||||||
|
|
||||||
|
# initialize system
|
||||||
|
|
||||||
|
velocity all create 0.0 87287 loop geom
|
||||||
|
|
||||||
|
pair_style zero 1.0
|
||||||
|
pair_coeff * *
|
||||||
|
|
||||||
|
neighbor 1.0 bin
|
||||||
|
neigh_modify every 1 delay 0 check yes
|
||||||
|
|
||||||
|
timestep 0.00025
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
fix 2 all latte NULL
|
||||||
|
fix_modify 2 energy yes
|
||||||
|
|
||||||
|
thermo_style custom step temp pe etotal
|
||||||
|
|
||||||
|
# dynamics
|
||||||
|
|
||||||
|
thermo 10
|
||||||
|
run 100
|
||||||
|
Neighbor list info ...
|
||||||
|
update every 1 steps, delay 0 steps, check yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 2
|
||||||
|
ghost atom cutoff = 2
|
||||||
|
binsize = 1, bins = 7 7 7
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair zero, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/3d/newton
|
||||||
|
bin: standard
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 5.629 | 5.629 | 5.629 Mbytes
|
||||||
|
Step Temp PotEng TotEng
|
||||||
|
0 0 -104.95614 -104.95614
|
||||||
|
10 336.52666 -105.96051 -104.96003
|
||||||
|
20 529.0718 -106.53045 -104.95753
|
||||||
|
30 753.644 -107.1999 -104.95933
|
||||||
|
40 716.6802 -107.08846 -104.95778
|
||||||
|
50 824.07015 -107.40848 -104.95853
|
||||||
|
60 933.56423 -107.7349 -104.95943
|
||||||
|
70 851.19238 -107.48781 -104.95723
|
||||||
|
80 999.79172 -107.93156 -104.9592
|
||||||
|
90 998.78401 -107.92573 -104.95637
|
||||||
|
100 1281.4625 -108.76963 -104.95987
|
||||||
|
Loop time of 5.47034 on 1 procs for 100 steps with 24 atoms
|
||||||
|
|
||||||
|
Performance: 0.395 ns/day, 60.782 hours/ns, 18.280 timesteps/s
|
||||||
|
886.7% CPU use with 1 MPI tasks x no OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 1.5259e-05 | 1.5259e-05 | 1.5259e-05 | 0.0 | 0.00
|
||||||
|
Bond | 1.1921e-05 | 1.1921e-05 | 1.1921e-05 | 0.0 | 0.00
|
||||||
|
Neigh | 4.1008e-05 | 4.1008e-05 | 4.1008e-05 | 0.0 | 0.00
|
||||||
|
Comm | 0.00016189 | 0.00016189 | 0.00016189 | 0.0 | 0.00
|
||||||
|
Output | 0.000108 | 0.000108 | 0.000108 | 0.0 | 0.00
|
||||||
|
Modify | 5.4697 | 5.4697 | 5.4697 | 0.0 | 99.99
|
||||||
|
Other | | 0.0002732 | | | 0.00
|
||||||
|
|
||||||
|
Nlocal: 24 ave 24 max 24 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 77 ave 77 max 77 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 31 ave 31 max 31 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 31
|
||||||
|
Ave neighs/atom = 1.29167
|
||||||
|
Ave special neighs/atom = 0
|
||||||
|
Neighbor list builds = 2
|
||||||
|
Dangerous builds = 0
|
||||||
|
Total wall time: 0:00:05
|
||||||
1102
examples/latte/log.19Sep17.latte.water.min.g++.1
Normal file
1102
examples/latte/log.19Sep17.latte.water.min.g++.1
Normal file
File diff suppressed because it is too large
Load Diff
178
lib/latte/Install.py
Normal file
178
lib/latte/Install.py
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
# Install.py tool to download, unpack, build, and link to the LATTE library
|
||||||
|
# used to automate the steps described in the README file in this dir
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
import sys,os,re,subprocess
|
||||||
|
|
||||||
|
# help message
|
||||||
|
|
||||||
|
help = """
|
||||||
|
Syntax from src dir: make lib-latte args="-b"
|
||||||
|
make lib-latte args="-p /usr/local/latte"
|
||||||
|
make lib-latte args="-m gfortran"
|
||||||
|
Syntax from lib dir: python Install.py -b
|
||||||
|
python Install.py -p /usr/local/latte
|
||||||
|
python Install.py -m gfortran
|
||||||
|
|
||||||
|
specify one or more options, order does not matter
|
||||||
|
|
||||||
|
-b = download and build the LATTE library
|
||||||
|
-p = specify folder of existing LATTE installation
|
||||||
|
-m = copy Makefile.lammps.suffix to Makefile.lammps
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
make lib-latte args="-b -m gfortran" # download/build in lib/latte
|
||||||
|
make lib-latte args="-p $HOME/latte" # use existing LATTE installation
|
||||||
|
"""
|
||||||
|
|
||||||
|
# settings
|
||||||
|
|
||||||
|
url = "https://github.com/lanl/LATTE/archive/master.tar.gz"
|
||||||
|
|
||||||
|
# print error message or help
|
||||||
|
|
||||||
|
def error(str=None):
|
||||||
|
if not str: print(help)
|
||||||
|
else: print("ERROR",str)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
# expand to full path name
|
||||||
|
# process leading '~' or relative path
|
||||||
|
|
||||||
|
def fullpath(path):
|
||||||
|
return os.path.abspath(os.path.expanduser(path))
|
||||||
|
|
||||||
|
def which(program):
|
||||||
|
def is_exe(fpath):
|
||||||
|
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
|
||||||
|
|
||||||
|
fpath, fname = os.path.split(program)
|
||||||
|
if fpath:
|
||||||
|
if is_exe(program):
|
||||||
|
return program
|
||||||
|
else:
|
||||||
|
for path in os.environ["PATH"].split(os.pathsep):
|
||||||
|
path = path.strip('"')
|
||||||
|
exe_file = os.path.join(path, program)
|
||||||
|
if is_exe(exe_file):
|
||||||
|
return exe_file
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
def geturl(url,fname):
|
||||||
|
success = False
|
||||||
|
|
||||||
|
if which('curl') != None:
|
||||||
|
cmd = 'curl -L -o "%s" %s' % (fname,url)
|
||||||
|
print(cmd)
|
||||||
|
try:
|
||||||
|
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
|
||||||
|
success = True
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print("Calling curl failed with: %s" % e.output.decode('UTF-8'))
|
||||||
|
|
||||||
|
if not success and which('wget') != None:
|
||||||
|
cmd = 'wget -O "%s" %s' % (fname,url)
|
||||||
|
print(cmd)
|
||||||
|
try:
|
||||||
|
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
|
||||||
|
success = True
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print("Calling wget failed with: %s" % e.output.decode('UTF-8'))
|
||||||
|
|
||||||
|
if not success:
|
||||||
|
error("Failed to download source code with 'curl' or 'wget'")
|
||||||
|
return
|
||||||
|
|
||||||
|
# parse args
|
||||||
|
|
||||||
|
args = sys.argv[1:]
|
||||||
|
nargs = len(args)
|
||||||
|
if nargs == 0: error()
|
||||||
|
|
||||||
|
homepath = "."
|
||||||
|
homedir = "LATTE-master"
|
||||||
|
|
||||||
|
buildflag = False
|
||||||
|
pathflag = False
|
||||||
|
suffixflag = False
|
||||||
|
linkflag = True
|
||||||
|
|
||||||
|
iarg = 0
|
||||||
|
while iarg < nargs:
|
||||||
|
if args[iarg] == "-p":
|
||||||
|
if iarg+2 > nargs: error()
|
||||||
|
lattedir = fullpath(args[iarg+1])
|
||||||
|
pathflag = True
|
||||||
|
iarg += 2
|
||||||
|
elif args[iarg] == "-b":
|
||||||
|
buildflag = True
|
||||||
|
iarg += 1
|
||||||
|
elif args[iarg] == "-m":
|
||||||
|
if iarg+2 > nargs: error()
|
||||||
|
suffix = args[iarg+1]
|
||||||
|
print("SUFF",suffix)
|
||||||
|
suffixflag = True
|
||||||
|
iarg += 2
|
||||||
|
else: error()
|
||||||
|
|
||||||
|
if (buildflag and pathflag):
|
||||||
|
error("Cannot use -b and -p flag at the same time")
|
||||||
|
|
||||||
|
if buildflag:
|
||||||
|
lattepath = fullpath(homepath)
|
||||||
|
lattedir = "%s/%s" % (lattepath,homedir)
|
||||||
|
|
||||||
|
if pathflag:
|
||||||
|
if not os.path.isdir(lattedir): error("LATTE path does not exist")
|
||||||
|
|
||||||
|
# download and unpack LATTE tarball
|
||||||
|
|
||||||
|
if buildflag:
|
||||||
|
print("Downloading LATTE ...")
|
||||||
|
geturl(url,"master.tar.gz")
|
||||||
|
|
||||||
|
print("Unpacking LATTE zipfile ...")
|
||||||
|
if os.path.exists(lattedir):
|
||||||
|
cmd = 'rm -rf "%s"' % lattedir
|
||||||
|
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
|
||||||
|
cmd = 'cd "%s"; tar zxvf master.tar.gz' % lattepath
|
||||||
|
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
|
||||||
|
os.remove("%s/master.tar.gz" % lattepath)
|
||||||
|
|
||||||
|
# build LATTE
|
||||||
|
|
||||||
|
if buildflag:
|
||||||
|
print("Building LATTE ...")
|
||||||
|
cmd = 'cd "%s"; make' % lattedir
|
||||||
|
txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
|
||||||
|
print(txt.decode('UTF-8'))
|
||||||
|
|
||||||
|
# create 3 links in lib/latte to LATTE dirs
|
||||||
|
# do this -b or -p is set
|
||||||
|
|
||||||
|
if buildflag or pathflag:
|
||||||
|
print("Creating links to LATTE files")
|
||||||
|
if os.path.isfile("includelink") or os.path.islink("includelink"):
|
||||||
|
os.remove("includelink")
|
||||||
|
if os.path.isfile("liblink") or os.path.islink("liblink"):
|
||||||
|
os.remove("liblink")
|
||||||
|
if os.path.isfile("filelink") or os.path.islink("filelink"):
|
||||||
|
os.remove("filelink")
|
||||||
|
cmd = 'ln -s "%s/src" includelink' % lattedir
|
||||||
|
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
|
||||||
|
cmd = 'ln -s "%s" liblink' % lattedir
|
||||||
|
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
|
||||||
|
cmd = 'ln -s "%s/src/latte_c_bind.o" filelink' % lattedir
|
||||||
|
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
|
||||||
|
|
||||||
|
# copy Makefile.lammps.suffix to Makefile.lammps
|
||||||
|
|
||||||
|
if suffixflag:
|
||||||
|
print("Creating Makefile.lammps")
|
||||||
|
if os.path.exists("Makefile.lammps.%s" % suffix):
|
||||||
|
cmd = 'cp Makefile.lammps.%s Makefile.lammps' % suffix
|
||||||
|
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
|
||||||
@ -1,27 +1,7 @@
|
|||||||
# Settings that the LAMMPS build will import when this package is installed
|
# Settings that the LAMMPS build will import when this package library is used
|
||||||
# Change all the flags and paths accordingly
|
|
||||||
# If using PROGRESS/BML set PROGRESS to ON
|
|
||||||
# For more information about these libraries see:
|
|
||||||
# BML: https://github.com/lanl/bml
|
|
||||||
# PROGRESS: https://github.com/losalamos/qmd-progress
|
|
||||||
# METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download
|
|
||||||
|
|
||||||
latte_PATH = ${HOME}/LATTE
|
|
||||||
progress_PATH = ${HOME}/qmd-progress
|
|
||||||
bml_PATH = ${HOME}/bml
|
|
||||||
metis_PATH = ${HOME}/Programs/metis-5.1.0
|
|
||||||
|
|
||||||
latte_SYSINC = -I${latte_PATH}/src -I${bml_PATH}/install/include -I${progress_PATH}/install/include
|
|
||||||
|
|
||||||
#latte_SYSLIB = -fopenmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a -lgfortran \
|
|
||||||
# -lm -Wl,--no-as-needed -L${MKLROOT}/lib/intel64 -lmkl_lapack95_lp64 -lmkl_gf_lp64 \
|
|
||||||
# -lmkl_gnu_thread -lmkl_core -lmkl_gnu_thread -lmkl_core -ldl -lpthread -lm
|
|
||||||
|
|
||||||
latte_SYSLIB = -fopenmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a -lgfortran \
|
|
||||||
-llapack -lblas
|
|
||||||
|
|
||||||
# Uncomment the following line to use PROGRESS/BML and metis.
|
|
||||||
#latte_SYSLIB += -L${progress_PATH}/install/lib -lprogress -L${bml_PATH}/install/lib -lbml
|
|
||||||
#latte_SYSLIB += -L${metis_PATH}/install -lmetis
|
|
||||||
|
|
||||||
|
# GNU Fortran settings
|
||||||
|
|
||||||
|
latte_SYSINC =
|
||||||
|
latte_SYSLIB = ../../lib/latte/filelink -llatte -lgfortran -llapack -lblas
|
||||||
|
latte_SYSPATH = -fopenmp
|
||||||
|
|||||||
@ -1,27 +0,0 @@
|
|||||||
# Settings that the LAMMPS build will import when this package is installed
|
|
||||||
# Change all the flags and paths accordingly
|
|
||||||
# If using PROGRESS/BML set PROGRESS to ON
|
|
||||||
# For more information about these libraries see:
|
|
||||||
# BML: https://github.com/lanl/bml
|
|
||||||
# PROGRESS: https://github.com/losalamos/qmd-progress
|
|
||||||
# METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download
|
|
||||||
|
|
||||||
latte_PATH = ${HOME}/LATTE_dev
|
|
||||||
progress_PATH = ${HOME}/qmd-progress
|
|
||||||
bml_PATH = ${HOME}/bml
|
|
||||||
metis_PATH = ${HOME}/Programs/metis-5.1.0
|
|
||||||
|
|
||||||
latte_SYSINC = -I${latte_PATH}/src -I${bml_PATH}/install/include -I${progress_PATH}/install/include
|
|
||||||
|
|
||||||
#latte_SYSLIB = -fopenmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a -lgfortran \
|
|
||||||
# -lm -Wl,--no-as-needed -L${MKLROOT}/lib/intel64 -lmkl_lapack95_lp64 -lmkl_gf_lp64 \
|
|
||||||
# -lmkl_gnu_thread -lmkl_core -lmkl_gnu_thread -lmkl_core -ldl -lpthread -lm
|
|
||||||
|
|
||||||
latte_SYSLIB = -fopenmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a -lgfortran \
|
|
||||||
-llapack -lblas
|
|
||||||
|
|
||||||
# Uncomment the following line to use PROGRESS/BML and metis.
|
|
||||||
latte_SYSLIB += -L${progress_PATH}/install/lib -lprogress -L${bml_PATH}/install/lib -lbml
|
|
||||||
#latte_SYSLIB += -L${metis_PATH}/install -lmetis
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,29 +1,12 @@
|
|||||||
# Settings that the LAMMPS build will import when this package is installed
|
# Settings that the LAMMPS build will import when this package library is used
|
||||||
# Change all the flags and paths accordingly
|
|
||||||
# If using PROGRESS/BML set PROGRESS to ON
|
|
||||||
# For more information about these libraries see:
|
|
||||||
# BML: https://github.com/lanl/bml
|
|
||||||
# PROGRESS: https://github.com/losalamos/qmd-progress
|
|
||||||
# METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download
|
|
||||||
|
|
||||||
latte_PATH = ${HOME}/LATTE
|
# Intel ifort settings
|
||||||
progress_PATH = ${HOME}/qmd-progress
|
|
||||||
bml_PATH = ${HOME}/bml
|
|
||||||
metis_PATH = ${HOME}/Programs/metis-5.1.0
|
|
||||||
|
|
||||||
latte_SYSINC = -I${latte_PATH}/src -I${bml_PATH}/install/include -I${progress_PATH}/install/include
|
latte_SYSINC =
|
||||||
latte_SYSLIB = -openmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a \
|
latte_SYSLIB = ../../lib/latte/filelink \
|
||||||
-lifcore -lsvml -lompstub -limf -L${MKLROOT}/lib/intel64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 \
|
-llatte -lifcore -lsvml -lompstub -limf -lmkl_intel_lp64 \
|
||||||
-lmkl_intel_thread -lmkl_core -lmkl_intel_thread -lpthread -openmp -O0 \
|
-lmkl_intel_thread -lmkl_core -lmkl_intel_thread -lpthread \
|
||||||
|
-openmp -O0
|
||||||
|
latte_SYSPATH = -openmp -L${MKLROOT}/lib/intel64 -lmkl_lapack95_lp64 \
|
||||||
|
-L/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64
|
||||||
|
|
||||||
# Alternative linking line
|
|
||||||
#latte_SYSLIB = -qopenmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a \
|
|
||||||
# -L${MKLROOT}/lib/intel64 -lifcore -lsvml -lifport -mkl=parallel -lpthread -qopenmp -O0 \
|
|
||||||
|
|
||||||
# Uncomment the following line to use PROGRESS/BML
|
|
||||||
#latte_SYSLIB += -L${progress_PATH}/install/lib -lprogress -L${bml_PATH}/install/lib -lbml -L${metis_PATH}/install -lmetis
|
|
||||||
# Uncomment the following line to use PROGRESS/BML
|
|
||||||
latte_SYSLIB += -L${progress_PATH}/install/lib -lprogress -L${bml_PATH}/install/lib -lbml -L${metis_PATH}/install -lmetis
|
|
||||||
|
|
||||||
|
|
||||||
latte_SYSPATH = -L/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64
|
|
||||||
|
|||||||
@ -1,43 +1,55 @@
|
|||||||
This directory contains build settings for the LATTE library which
|
This directory contains links to the LATTE library which is required
|
||||||
is required to use the LATTE package and its fix latte command in a
|
to use the LATTE package and its fix latte command in a LAMMPS input
|
||||||
LAMMPS input script.
|
script.
|
||||||
|
|
||||||
Information about the LATTE DFTB code can be found at:
|
Information about the LATTE DFTB code can be found at:
|
||||||
https://github.com/losalamos/LATTE
|
https://github.com/lanl/LATTE
|
||||||
|
|
||||||
The LATTE development effort is led by Marc Cawkwell and
|
The LATTE development effort is led by Marc Cawkwell and
|
||||||
Anders Niklasson at Los Alamos National Laboratory.
|
Anders Niklasson at Los Alamos National Laboratory.
|
||||||
|
|
||||||
To download, build, and install LATTE as a library on your system,
|
You can type "make lib-latte" from the src directory to see help on
|
||||||
follow these steps:
|
how to download and build this library via make commands, or you can
|
||||||
|
do the same thing by typing "python Install.py" from within this
|
||||||
- Download or clone the LATTE source code from:
|
directory, or you can do it manually by following the instructions
|
||||||
https://github.com/losalamos/LATTE.
|
below.
|
||||||
|
|
||||||
- Modify the makefile.CHOICES according to your system architecture
|
-----------------
|
||||||
and compilers.
|
|
||||||
|
|
||||||
- Set the MAKELIB flag to ON in makefile.CHOICES and finally, build the
|
|
||||||
code with the make command.
|
|
||||||
|
|
||||||
Note that if you unpack and build LATTE in this directory and you
|
Instructions:
|
||||||
download a new LAMMPS tarball, the files you have added here will be
|
|
||||||
lost. So you likely want to build it somewhere else. The recommended
|
|
||||||
place is the home directory.
|
|
||||||
|
|
||||||
To build LAMMPS with the LATTE library you should follow the following
|
1. Download or clone the LATTE source code from
|
||||||
instructions:
|
https://github.com/lanl/LATTE. If you download a zipfile
|
||||||
|
or tarball, unpack the tarball either in this /lib/latte
|
||||||
|
directory or somewhere else on your system.
|
||||||
|
|
||||||
- copy makefile.lammps.* to makefile.lammps in the /lammps/lib/latte directory.
|
2. Modify the makefile.CHOICES according to your system architecture
|
||||||
|
and compilers. Check that the MAKELIB flag is ON in makefile.CHOICES
|
||||||
|
and finally, build the code via the make command
|
||||||
|
% make
|
||||||
|
|
||||||
- Change the path, flags and compilers on the makefile.lammps according
|
3. Create three soft links in this dir (lib/latte)
|
||||||
to your compilers, architecture and the LATTE location.
|
E.g if you built LATTE in this dir:
|
||||||
|
% ln -s ./LATTE-master/src includelink
|
||||||
|
% ln -s ./LATTE-master liblink
|
||||||
|
% ln -s ./LATTE-master/src/latte_c_bind.o filelink
|
||||||
|
|
||||||
- Finally, you should execute the following commands:
|
4. Choose a Makefile.lammps.* file appropriate for your compiler
|
||||||
$ cd lammps/src
|
(GNU gfortran or Intel ifort) and copy it to Makefile.lammps.
|
||||||
$ make yes-latte
|
Note that you may need to edit Makefile.lammps for paths
|
||||||
$ make g++ (or whatever target you wish)
|
and compiler options appropriate to your system.
|
||||||
|
|
||||||
Note that the Makefile.lammps file in this directory is required to
|
-----------------
|
||||||
allow the LAMMPS build to find the necessary LATTE files. You should
|
|
||||||
not normally need to edit this file.
|
When these steps are complete you can build LAMMPS
|
||||||
|
with the LATTE package installed:
|
||||||
|
|
||||||
|
% cd lammps/src
|
||||||
|
% make yes-latte
|
||||||
|
% make g++ (or whatever target you wish)
|
||||||
|
|
||||||
|
Note that if you download and unpack a new LAMMPS tarball, the
|
||||||
|
"includelink" and "liblink" and "filelink" files will be lost and you
|
||||||
|
will need to re-create them (step 3). If you built LATTE in this
|
||||||
|
directory (as opposed to somewhere else on your system), you will also
|
||||||
|
need to repeat steps 1,2,4.
|
||||||
|
|||||||
@ -38,8 +38,8 @@ if (test $1 = 1) then
|
|||||||
|
|
||||||
if (test -e ../Makefile.package) then
|
if (test -e ../Makefile.package) then
|
||||||
sed -i -e 's/[^ \t]*latte[^ \t]* //' ../Makefile.package
|
sed -i -e 's/[^ \t]*latte[^ \t]* //' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_INC =[ \t]*|&-I../../lib/latte |' ../Makefile.package
|
sed -i -e 's|^PKG_INC =[ \t]*|&-I../../lib/latte/includelink |' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_PATH =[ \t]*|&-L../../lib/latte |' ../Makefile.package
|
sed -i -e 's|^PKG_PATH =[ \t]*|&-L../../lib/latte/liblink |' ../Makefile.package
|
||||||
#sed -i -e 's|^PKG_LIB =[ \t]*|&-llatte |' ../Makefile.package
|
#sed -i -e 's|^PKG_LIB =[ \t]*|&-llatte |' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(latte_SYSINC) |' ../Makefile.package
|
sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(latte_SYSINC) |' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_SYSLIB =[ \t]*|&$(latte_SYSLIB) |' ../Makefile.package
|
sed -i -e 's|^PKG_SYSLIB =[ \t]*|&$(latte_SYSLIB) |' ../Makefile.package
|
||||||
|
|||||||
@ -1,28 +1,23 @@
|
|||||||
This package provides a fix latte command which is a wrapper on the
|
This package provides a fix latte command which is a wrapper on the
|
||||||
LATTE DFTB code, so that molecular dynamics can be run with LAMMPS
|
LATTE DFTB code, so that molecular dynamics can be run with LAMMPS
|
||||||
using density-functional tight-binding quantum forces calculated by
|
using density-functional tight-binding quantum forces calculated by
|
||||||
LATTE. More information on LATTE can be found at "web site". Its
|
LATTE. More information on LATTE can be found at this web site:
|
||||||
authors are Anders Niklasson, etc at LANL.
|
https://github.com/lanl/LATTE. Its authors are Marc Cawkwell and
|
||||||
|
Anders Niklasson and Christian Negre from Los Alamos National
|
||||||
|
Laboratory (LANL). A brief technical description of LATTE is given
|
||||||
|
on the fix_latte doc page.
|
||||||
|
|
||||||
Using this package requires the LATTE code to be downloaded and built
|
Using this package requires the LATTE code to first be downloaded and
|
||||||
as a library on your system. The library can be downloaded and built
|
built as a library on your system. This can be done in lib/latte or
|
||||||
in lib/latte or elsewhere on your system, which must be done before
|
elsewhere on your system. Details of the download and build process
|
||||||
building LAMMPS with this package. Details of the download, build, and
|
for LATTE are given in the lib/latte/README file and it can also be
|
||||||
install process for LATTE are given in the lib/latte/README file, and
|
done via the make lib-latte command from the LAMMPS src directory.
|
||||||
scripts are provided to help automate the process.
|
|
||||||
|
|
||||||
Also see the LAMMPS manual for general information on building LAMMPS
|
|
||||||
with external libraries. The settings in the Makefile.lammps file in
|
|
||||||
lib/latte must be correct for LAMMPS to build correctly with this
|
|
||||||
package installed. However, the default settings should be correct in
|
|
||||||
most cases and the Makefile.lammps file usually will not need to be
|
|
||||||
changed.
|
|
||||||
|
|
||||||
Once you have successfully built LAMMPS with this package and the
|
Once you have successfully built LAMMPS with this package and the
|
||||||
LATTE library you can test it using an input file from the examples
|
LATTE library you can test it using an input file from the examples
|
||||||
dir:
|
latte dir, e.g.
|
||||||
|
|
||||||
./lmp_serial < lammps/examples/latte/in.latte
|
lmp_serial < lammps/examples/latte/in.latte.water
|
||||||
|
|
||||||
This pair style was written in collaboration with the LATTE
|
This pair style was written in collaboration with the LATTE
|
||||||
developers.
|
developers.
|
||||||
|
|||||||
@ -11,19 +11,9 @@
|
|||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
// NOTES on possible future issues:
|
/* ----------------------------------------------------------------------
|
||||||
// LATTE compute and return 6-value virial tensor
|
Contributing author: Christian Negre (LANL)
|
||||||
// can LATTE compute per-atom energy and per-atom virial
|
------------------------------------------------------------------------- */
|
||||||
// for minimize, what about charge DOFs
|
|
||||||
// implement charge DOF integration
|
|
||||||
// pass neighbor list to LATTE: half or full
|
|
||||||
// will we ever auto-adjust the timestep in reset_dt()
|
|
||||||
// could pass an input file to LATTE, specified in LAMMPS input script
|
|
||||||
// what units options can LAMMPS be using
|
|
||||||
// should LATTE take triclinic box from LAMMPS
|
|
||||||
// does Coulomb potential = pe[i]/q[i], is it 0 when q = 0
|
|
||||||
// how will this work for serial/parallel LAMMPS with serial/parallel LATTE
|
|
||||||
// INPORTANT NOTE: ADD checks for metal units !!!!!!!!!!!!!
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -58,11 +48,14 @@ extern "C" {
|
|||||||
FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) :
|
FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) :
|
||||||
Fix(lmp, narg, arg)
|
Fix(lmp, narg, arg)
|
||||||
{
|
{
|
||||||
if (narg != 4) error->all(FLERR,"Illegal fix latte command");
|
if (strcmp(update->unit_style,"metal") != 0)
|
||||||
|
error->all(FLERR,"Must use units metal with fix latte command");
|
||||||
|
|
||||||
if (comm->nprocs != 1)
|
if (comm->nprocs != 1)
|
||||||
error->all(FLERR,"Fix latte currently runs only in serial");
|
error->all(FLERR,"Fix latte currently runs only in serial");
|
||||||
|
|
||||||
|
if (narg != 4) error->all(FLERR,"Illegal fix latte command");
|
||||||
|
|
||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
@ -76,6 +69,8 @@ FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
if (strcmp(arg[3],"NULL") != 0) {
|
if (strcmp(arg[3],"NULL") != 0) {
|
||||||
coulomb = 1;
|
coulomb = 1;
|
||||||
|
error->all(FLERR,"Fix latte does not yet support a LAMMPS calculation "
|
||||||
|
"of a Coulomb potential");
|
||||||
|
|
||||||
int n = strlen(arg[3]) + 1;
|
int n = strlen(arg[3]) + 1;
|
||||||
id_pe = new char[n];
|
id_pe = new char[n];
|
||||||
@ -130,7 +125,7 @@ void FixLatte::init()
|
|||||||
|
|
||||||
if (coulomb) {
|
if (coulomb) {
|
||||||
if (atom->q_flag == 0 || force->pair == NULL || force->kspace == NULL)
|
if (atom->q_flag == 0 || force->pair == NULL || force->kspace == NULL)
|
||||||
error->all(FLERR,"Fix latte cannot compute Coulombic potential");
|
error->all(FLERR,"Fix latte cannot compute Coulomb potential");
|
||||||
|
|
||||||
int ipe = modify->find_compute(id_pe);
|
int ipe = modify->find_compute(id_pe);
|
||||||
if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID");
|
if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID");
|
||||||
@ -201,6 +196,13 @@ void FixLatte::min_setup(int vflag)
|
|||||||
post_force(vflag);
|
post_force(vflag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void FixLatte::setup_pre_reverse(int eflag, int vflag)
|
||||||
|
{
|
||||||
|
pre_reverse(eflag,vflag);
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
integrate electronic degrees of freedom
|
integrate electronic degrees of freedom
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
@ -222,7 +224,6 @@ void FixLatte::post_force(int vflag)
|
|||||||
{
|
{
|
||||||
int eflag = eflag_caller;
|
int eflag = eflag_caller;
|
||||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||||
// else evflag = 0;
|
|
||||||
else evflag = eflag_global = vflag_global = eflag_atom = vflag_atom = 0;
|
else evflag = eflag_global = vflag_global = eflag_atom = vflag_atom = 0;
|
||||||
|
|
||||||
// compute Coulombic potential = pe[i]/q[i]
|
// compute Coulombic potential = pe[i]/q[i]
|
||||||
|
|||||||
@ -33,6 +33,7 @@ class FixLatte : public Fix {
|
|||||||
void init_list(int, class NeighList *);
|
void init_list(int, class NeighList *);
|
||||||
void setup(int);
|
void setup(int);
|
||||||
void min_setup(int);
|
void min_setup(int);
|
||||||
|
void setup_pre_reverse(int, int);
|
||||||
void initial_integrate(int);
|
void initial_integrate(int);
|
||||||
void pre_reverse(int, int);
|
void pre_reverse(int, int);
|
||||||
void post_force(int);
|
void post_force(int);
|
||||||
|
|||||||
@ -1,171 +0,0 @@
|
|||||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
||||||
|
|
||||||
:link(lws,http://lammps.sandia.gov)
|
|
||||||
:link(ld,Manual.html)
|
|
||||||
:link(lc,Section_commands.html#comm)
|
|
||||||
|
|
||||||
:line
|
|
||||||
|
|
||||||
fix latte command :h3
|
|
||||||
|
|
||||||
[Syntax:]
|
|
||||||
|
|
||||||
fix ID group-ID latte peID :pre
|
|
||||||
|
|
||||||
ID, group-ID are documented in "fix"_fix.html command
|
|
||||||
latte = style name of this fix command
|
|
||||||
peID = NULL or ID of compute used to calculate per-atom energy :ul
|
|
||||||
|
|
||||||
[Examples:]
|
|
||||||
|
|
||||||
fix dftb all latte NULL :pre
|
|
||||||
|
|
||||||
[Description:]
|
|
||||||
|
|
||||||
This fix style is a wrapper on the self-consistent charge transfer density functional
|
|
||||||
based tight binding (DFTB) code LATTE. If you download and build LATTE, it can be called
|
|
||||||
as a library by LAMMPS via this fix to run dynamics or perform energy
|
|
||||||
minimization using DFTB forces and energies computed by LATTE.
|
|
||||||
|
|
||||||
LATTE is principally developed and supported by M.J. Cawkwell
|
|
||||||
and co-workers at Los Alamos National Laboratories (LANL).
|
|
||||||
See the full list of contributors in the /LATTE/README.md file.
|
|
||||||
|
|
||||||
The LATTE program needs to be compiled as a library and linked with LAMMPS.
|
|
||||||
LATTE can be downloaded at
|
|
||||||
"https://github.com/lanl/LATTE"_https://github.com/lanl/LATTE.
|
|
||||||
and instructions on how to build LATTE on your system and be found
|
|
||||||
in the lib/latte/README file.
|
|
||||||
|
|
||||||
Once LAMMPS is build with the LATTE package, you can run the example input
|
|
||||||
scripts for molecular dynamics or geometry optimization that are found in examples/latte.
|
|
||||||
|
|
||||||
NOTE: LATTE is a code for performing self-consistent charge transfer
|
|
||||||
tight-binding (SC-TB) calculations of total energies and the forces acting
|
|
||||||
on atoms in molecules and solids. This tight-binding method is becoming more
|
|
||||||
and more popular and widely used in chemistry, biochemistry, material science,
|
|
||||||
etc. The SC-TB formalism is derived from an expansion of the Kohn-Sham
|
|
||||||
density functional to second order in charge fluctuations about a reference charge of
|
|
||||||
overlapping atom-centered densities and bond integrals are parameterized using
|
|
||||||
a Slater-Koster tight-binding approach. This procedure, which usually is referred
|
|
||||||
to as the DFTB method has been described in detail by ("Elstner"_#Elstner) and ("Finnis"_#Finnis)
|
|
||||||
and coworkers. Our work follows
|
|
||||||
that of Elstner closely with respect to the physical model. However, the development of
|
|
||||||
LATTE is geared principally toward large-scale, long duration, microcanonical quantum-based
|
|
||||||
Born-Oppenheimer molecular dynamics (QMD) simulations.
|
|
||||||
One of the main bottlenecks of an electronic structure calculation is the solution
|
|
||||||
of the generalized eigenvalue problem which scales with the cube of the
|
|
||||||
system size O(N^3). The Theoretical and Computer sciences divisions at
|
|
||||||
Los Alamos National Laboratory have accumulated a large experience
|
|
||||||
addressing this issue by calculating the density matrix directly instead
|
|
||||||
of using diagonalization. We typically use a recursive sparse Fermi-operator expansion
|
|
||||||
using second-order spectral projection functions (SP2-algorithm), which was introduced
|
|
||||||
by Niklasson in 2002 ("Niklasson2002"_#Niklasson2002), ("Rubensson"_#Rubensson),
|
|
||||||
("Mniszewski"_#Mniszewski).
|
|
||||||
When the matrices involved in the recursive expansion are
|
|
||||||
sufficiently sparse, the calculation of the density matrix scales linearly as a function of the
|
|
||||||
system size O(N). Another important feature is the extended Lagrangian framework
|
|
||||||
for Born-Oppenheimer molecular dynamics (XL-BOMD) ("Niklasson2008"_#Niklasson2008)
|
|
||||||
("Niklasson2014"_#Niklasson2014), ("Niklasson2017"_#Niklasson2017)
|
|
||||||
that allows for a drastic reduction or even a complete removal of the
|
|
||||||
iterative self-consistent field optimization. Often only a single density matrix
|
|
||||||
calculation per molecular dynamics time step is required, yet total energy stability is well maintained.
|
|
||||||
The SP2 and XL-BOMD techniques enables stable linear scaling MD simulations with a very
|
|
||||||
small computational overhead. This opens a number of opportunities in many different
|
|
||||||
areas of chemistry and materials science, as we now can simulate larger system
|
|
||||||
sizes and longer time scales ("Cawkwell2012"_#Cawkwell2012), ("Negre2016"_#Negre2016).
|
|
||||||
|
|
||||||
The {peID} argument is not yet supported by fix latte, so it must be
|
|
||||||
specified as NULL. Eventually it will be used to enable LAMMPS to
|
|
||||||
calculate a Coulomb potential as an alternative to LATTE performing
|
|
||||||
the calculation.
|
|
||||||
|
|
||||||
A step-by-step tutorial can be follwed at: "LAMMPS-LATTE tutorial"_https://github.com/lanl/LATTE/wiki/Using-LATTE-through-LAMMPS
|
|
||||||
|
|
||||||
|
|
||||||
:line
|
|
||||||
|
|
||||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
|
||||||
|
|
||||||
No information about this fix is written to "binary restart
|
|
||||||
files"_restart.html.
|
|
||||||
|
|
||||||
The "fix_modify"_fix_modify.html {energy} option is supported by this
|
|
||||||
fix to add the potential energy computed by LATTE to the system's
|
|
||||||
potential energy as part of "thermodynamic output"_thermo_style.html.
|
|
||||||
|
|
||||||
This fix computes a global scalar which can be accessed by various
|
|
||||||
"output commands"_Section_howto.html#howto_15. The scalar is the
|
|
||||||
potential energy discussed above. The scalar value calculated by this
|
|
||||||
fix is "extensive".
|
|
||||||
|
|
||||||
No parameter of this fix can be used with the {start/stop} keywords of
|
|
||||||
the "run"_run.html command.
|
|
||||||
|
|
||||||
The DFTB forces computed by LATTE via this fix are imposed during an
|
|
||||||
energy minimization, invoked by the "minimize"_minimize.html command.
|
|
||||||
|
|
||||||
NOTE: If you want the potential energy associated with the DFTB
|
|
||||||
forces to be included in the total potential energy of the system (the
|
|
||||||
quantity being minimized), you MUST enable the
|
|
||||||
"fix_modify"_fix_modify.html {energy} option for this fix.
|
|
||||||
|
|
||||||
[Restrictions:]
|
|
||||||
|
|
||||||
This fix is part of the LATTE package. It is only enabled if LAMMPS
|
|
||||||
was built with that package. See the "Making
|
|
||||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
|
||||||
|
|
||||||
Currently, LAMMPS must be run in serial or as a single MPI task, to use
|
|
||||||
this fix. This is typically not a bottleneck, since LATTE will be
|
|
||||||
doing 99% or more of the work to compute quantum-accurate forces.
|
|
||||||
|
|
||||||
NOTE: NEB calculations can be done using this fix. To do this LATTE will
|
|
||||||
still be compiled serial but LAMMPS will be compiled with mpi.
|
|
||||||
|
|
||||||
You must use metal units, as set by the "units"_units command to use
|
|
||||||
this fix.
|
|
||||||
|
|
||||||
[Related commands:] none
|
|
||||||
|
|
||||||
[Default:] none
|
|
||||||
|
|
||||||
:line
|
|
||||||
|
|
||||||
:link(Elstner)
|
|
||||||
[(Elstner)] M. Elstner, D. Poresag, G. Jungnickel, J. Elsner, M. Haugk, T. Frauenheim,
|
|
||||||
S. Suhai, and G. Seifert, Phys. Rev. B, 58, 7260 (1998).
|
|
||||||
|
|
||||||
:link(Elstner1)
|
|
||||||
[(Elstner)] M. Elstner, D. Poresag, G. Jungnickel, J. Elsner, M. Haugk, T. Frauenheim,
|
|
||||||
S. Suhai, and G. Seifert, Phys. Rev. B, 58, 7260 (1998).
|
|
||||||
|
|
||||||
:link(Finnis)
|
|
||||||
[(Finnis)] M. W. Finnis, A. T. Paxton, M. Methfessel, and M. van Schilfgarde,
|
|
||||||
Phys. Rev. Lett., 81, 5149 (1998).
|
|
||||||
|
|
||||||
:link(Mniszewski)
|
|
||||||
[(Mniszewski)] S. M. Mniszewski, M. J. Cawkwell, M. E. Wall, J. Mohd-Yusof, N. Bock, T. C.
|
|
||||||
Germann, and A. M. N. Niklasson, J. Chem. Theory Comput., 11, 4644 (2015).
|
|
||||||
|
|
||||||
:link(Niklasson2002)
|
|
||||||
[(Niklasson2002)] A. M. N. Niklasson, Phys. Rev. B, 66, 155115 (2002).
|
|
||||||
|
|
||||||
:link(Rubensson)
|
|
||||||
[(Rubensson)] E. H. Rubensson, A. M. N. Niklasson, SIAM J. Sci. Comput. 36 (2), 147-170, (2014).
|
|
||||||
|
|
||||||
:link(Niklasson2008)
|
|
||||||
[(Niklasson2008)] A. M. N. Niklasson, Phys. Rev. Lett., 100, 123004 (2008).
|
|
||||||
|
|
||||||
:link(Niklasson2014)
|
|
||||||
[(Niklasson2014)] A. M. N. Niklasson and M. Cawkwell, J. Chem. Phys., 141, 164123, (2014).
|
|
||||||
|
|
||||||
:link(Niklasson2014)
|
|
||||||
[(Niklasson2017)] A. M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017).
|
|
||||||
|
|
||||||
:link(Niklasson2012)
|
|
||||||
[(Niklasson2017)] A. M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86 (17), 174308 (2012).
|
|
||||||
|
|
||||||
:link(Negre2016)
|
|
||||||
[(Negre2016)] C. F. A. Negre, S. M. Mniszewski, M. J. Cawkwell, N. Bock, M. E. Wall,
|
|
||||||
and A. M. N. Niklasson, J. Chem. Theory Comp., 12, 3063 (2016).
|
|
||||||
Reference in New Issue
Block a user