From 6f23f6535ce0768ff623b3b84b9dc99ea1dc4f2a Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 9 Nov 2016 13:48:11 -0700 Subject: [PATCH 01/53] initial dummy version of fix_latte.cpp --- lib/latte/Makefile.lammps.gfortran | 5 + lib/latte/Makefile.lammps.ifort | 5 + lib/latte/README | 33 ++++ src/LATTE/Install.sh | 67 +++++++ src/LATTE/README | 28 +++ src/LATTE/fix_latte.cpp | 283 +++++++++++++++++++++++++++++ src/LATTE/fix_latte.h | 63 +++++++ src/Makefile | 6 +- 8 files changed, 487 insertions(+), 3 deletions(-) create mode 100644 lib/latte/Makefile.lammps.gfortran create mode 100644 lib/latte/Makefile.lammps.ifort create mode 100644 lib/latte/README create mode 100644 src/LATTE/Install.sh create mode 100644 src/LATTE/README create mode 100644 src/LATTE/fix_latte.cpp create mode 100644 src/LATTE/fix_latte.h diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran new file mode 100644 index 0000000000..0ad5b1ad01 --- /dev/null +++ b/lib/latte/Makefile.lammps.gfortran @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package is installed + +latte_SYSINC = +latte_SYSLIB = -lgfortran +latte_SYSPATH = diff --git a/lib/latte/Makefile.lammps.ifort b/lib/latte/Makefile.lammps.ifort new file mode 100644 index 0000000000..22b976ddc6 --- /dev/null +++ b/lib/latte/Makefile.lammps.ifort @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package library is used + +latte_SYSINC = +latte_SYSLIB = -lifcore -lsvml -lompstub -limf +latte_SYSPATH = -L/opt/intel/fce/10.0.023/lib diff --git a/lib/latte/README b/lib/latte/README new file mode 100644 index 0000000000..423f47ac52 --- /dev/null +++ b/lib/latte/README @@ -0,0 +1,33 @@ +This directory contains build settings for the LATTE library which +is required to use the LATTE package and its fix latte command in a +LAMMPS input script. + +Information about the LATTE DFTB code can be found at ... The LATTE +developement effort is led by Anders Niklasson, etc at LANLS. + +To download, build, and install LATTE as a library on your system, +follow these steps. We are working on scripts that will automate this +process. + +Go to this web site: https://??? and download a current tarball. The +tarball you download is "latte-??.tgz", which can be unpacked in this +directory or wherever you wish: + +tar xvfz latte*tgz + +Note that if you unpack and build LATTE in this directory, when you +download a new LAMMPS tarball, the files you have added here will be +lost. So you likely want to build it somewhere else. + +Build instructions for LATTE library ... + +When you have successully built the LATTE library, you can build +LAMMPS with the LATTE package installed: + +$ cd lammps/src +$ make yes-latte +$ make g++ (or whatever target you wish) + +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. diff --git a/src/LATTE/Install.sh b/src/LATTE/Install.sh new file mode 100644 index 0000000000..2fb34096c8 --- /dev/null +++ b/src/LATTE/Install.sh @@ -0,0 +1,67 @@ +# Install/unInstall package files in LAMMPS +# mode = 0/1/2 for uninstall/install/update + +mode=$1 + +# enforce using portable C locale +LC_ALL=C +export LC_ALL + +# arg1 = file, arg2 = file it depends on + +action () { + if (test $mode = 0) then + rm -f ../$1 + elif (! cmp -s $1 ../$1) then + if (test -z "$2" || test -e ../$2) then + cp $1 .. + if (test $mode = 2) then + echo " updating src/$1" + fi + fi + elif (test -n "$2") then + if (test ! -e ../$2) then + rm -f ../$1 + fi + fi +} + +# all package files with no dependencies + +for file in *.cpp *.h; do + action $file +done + +# edit 2 Makefile.package files to include/exclude package info + +if (test $1 = 1) then + + if (test -e ../Makefile.package) then + 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_PATH =[ \t]*|&-L../../lib/latte |' ../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_SYSLIB =[ \t]*|&$(latte_SYSLIB) |' ../Makefile.package + sed -i -e 's|^PKG_SYSPATH =[ \t]*|&$(latte_SYSPATH) |' ../Makefile.package + fi + + if (test -e ../Makefile.package.settings) then + sed -i -e '/^include.*latte.*$/d' ../Makefile.package.settings + # multiline form needed for BSD sed on Macs + sed -i -e '4 i \ +include ..\/..\/lib\/latte\/Makefile.lammps +' ../Makefile.package.settings + fi + +elif (test $1 = 0) then + + if (test -e ../Makefile.package) then + sed -i -e 's/[^ \t]*latte[^ \t]* //' ../Makefile.package + fi + + if (test -e ../Makefile.package.settings) then + sed -i -e '/^include.*latte.*$/d' ../Makefile.package.settings + fi + +fi diff --git a/src/LATTE/README b/src/LATTE/README new file mode 100644 index 0000000000..e82480c865 --- /dev/null +++ b/src/LATTE/README @@ -0,0 +1,28 @@ +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 +using density-functional tight-binding quantum forces calculated by +LATTE. More information on LATTE can be found at "web site". Its +authors are Anders Niklasson, etc at LANL. + +Using this package requires the LATTE code to be downloaded and built +as a library on your system. The library can be downloaded and built +in lib/latte or elsewhere on your system, which must be done before +building LAMMPS with this package. Details of the download, build, and +install process for LATTE are given in the lib/latte/README file, and +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 +LATTE library you can test it using an input file from the examples +dir: + +./lmp_serial < lammps/examples/latte/in.latte + +This pair style was written in collaboration with the LATTE +developers. diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp new file mode 100644 index 0000000000..1ff45a869e --- /dev/null +++ b/src/LATTE/fix_latte.cpp @@ -0,0 +1,283 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +#include +#include +#include "fix_latte.h" +#include "atom.h" +#include "force.h" +#include "update.h" +#include "neighbor.h" +#include "neigh_request.h" +#include "neigh_list.h" +#include "modify.h" +#include "compute.h" +#include "comm.h" +#include "error.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +#define INVOKED_PERATOM 8 + +/* ---------------------------------------------------------------------- */ + +FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + if (narg != 4) error->all(FLERR,"Illegal fix latte command"); + + // store pe/atom ID used for input of Coulomb potential to LATTE + // insure it is valid for these computations + + int n = strlen(arg[3]) + 1; + id_pe = new char[n]; + strcpy(id_pe,arg[3]); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + if (modify->compute[ipe]->peatomflag == 0) + error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); + + // initialize LATTE with LAMMPS info about box, atoms, atom types, etc ? + // may need to be done in init() ?? + + // any per-atom quantities to allocate/initialize for LAMMPS? + // i.e. quantities carried with atoms across timesteps ?? +} + +/* ---------------------------------------------------------------------- */ + +FixLatte::~FixLatte() +{ + delete [] id_pe; +} + +/* ---------------------------------------------------------------------- */ + +int FixLatte::setmask() +{ + int mask = 0; + mask |= INITIAL_INTEGRATE; + mask |= FINAL_INTEGRATE; + mask |= POST_FORCE; + mask |= MIN_POST_FORCE; + mask |= THERMO_ENERGY; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::init() +{ + // error checks + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + c_pe = modify->compute[ipe]; + + // warn if any integrate fix comes after this one + // is it actually necessary for q(n) update to come after x,v update ?? + + int after = 0; + int flag = 0; + for (int i = 0; i < modify->nfix; i++) { + if (strcmp(id,modify->fix[i]->id) == 0) after = 1; + else if ((modify->fmask[i] & INITIAL_INTEGRATE) && after) flag = 1; + } + if (flag && comm->me == 0) + error->warning(FLERR,"Fix latte should come after all other " + "integration fixes"); + + // need a full neighbor list + // perpetual list, built whenever re-neighboring occurs + + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->pair = 0; + neighbor->requests[irequest]->fix = 1; + neighbor->requests[irequest]->half = 0; + neighbor->requests[irequest]->full = 1; + + // integrator timesteps + + dtv = update->dt; + dtf = 0.5 * update->dt * force->ftm2v; + + // any more LATTE initialization to do ? +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::init_list(int id, NeighList *ptr) +{ + list = ptr; +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::min_setup(int vflag) +{ + // for minimize, what about charge DOFs ?? + + post_force(vflag); +} + +/* ---------------------------------------------------------------------- + integrate electronic degrees of freedom +------------------------------------------------------------------------- */ + +void FixLatte::initial_integrate(int vflag) +{ + // what do I do here for q(n) update? + // is it the same variable as LAMMPS q, I think so + // is it an Euler update or VV update ?? + + /* + double dtfm; + + // update v and x of atoms in group + + double **x = atom->x; + double **v = atom->v; + double **f = atom->f; + double *mass = atom->mass; + int *type = atom->type; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + dtfm = dtf / mass[type[i]]; + v[i][0] += dtfm * f[i][0]; + v[i][1] += dtfm * f[i][1]; + v[i][2] += dtfm * f[i][2]; + x[i][0] += dtv * v[i][0]; + x[i][1] += dtv * v[i][1]; + x[i][2] += dtv * v[i][2]; + } + */ +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::post_force(int vflag) +{ + // what should cutoffs be for passing neighlist info to LATTE ?? + // do cutoffs include many self image atoms for tiny periodic system ?? + + int i,j,ii,jj,inum,jnum; + int *ilist,*jlist,*numneigh,**firstneigh; + + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + // enforce a different cutoff than pair style? + // what are optimal cutoffs for pair/Kspace for tiny system? + // operations on I/J pairs if necessary + } + } + + // invoke compute pe/atom + // wrap with clear/add and trigger pe/atom calculation every step + // Coulomb potential should just be pe[i]/q[i] ?? + + modify->clearstep_compute(); + + if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { + c_pe->compute_peratom(); + c_pe->invoked_flag |= INVOKED_PERATOM; + } + + double *pe = c_pe->vector_atom; + + modify->addstep_compute(update->ntimestep+1); + + // construct H0,S,Z + // setup full Hamiltonian H(R,n) + // calculate density matrix D and charge q(n) + // calculate DFTB forces via LATTE = F(R,H0,S,Z,D,q,n) + // how to pass neighbor list and Coulomb potential to LATTE ?? + + // HERE is where main call to LATTE goes to get forces + + // simply add the returned forces to atom->f + // how to request/get global or per-atom energy back from LATTE ?? + // how to request/get global or per-atom virial back from LATTE ?? +} + +/* ---------------------------------------------------------------------- + integrate electronic degrees of freedom +------------------------------------------------------------------------- */ + +void FixLatte::final_integrate() +{ + // possibly nothing to do here if Euler step of q(n) ?? + + /* + double dtfm; + + // update v of atoms in group + + double **v = atom->v; + double **f = atom->f; + double *mass = atom->mass; + int *type = atom->type; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + dtfm = dtf / mass[type[i]]; + v[i][0] += dtfm * f[i][0]; + v[i][1] += dtfm * f[i][1]; + v[i][2] += dtfm * f[i][2]; + } + */ +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::reset_dt() +{ + // will we ever auto-adjust the timestep ?? + + dtv = update->dt; + dtf = 0.5 * update->dt * force->ftm2v; +} + +/* ---------------------------------------------------------------------- */ + +double FixLatte::compute_scalar() +{ + // return DFTB global energy + return 0.0; +} + diff --git a/src/LATTE/fix_latte.h b/src/LATTE/fix_latte.h new file mode 100644 index 0000000000..ebd738315d --- /dev/null +++ b/src/LATTE/fix_latte.h @@ -0,0 +1,63 @@ +/* -*- 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 FIX_CLASS + +FixStyle(latte,FixLatte) + +#else + +#ifndef LMP_FIX_LATTE_H +#define LMP_FIX_LATTE_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixLatte : public Fix { + public: + FixLatte(class LAMMPS *, int, char **); + virtual ~FixLatte(); + int setmask(); + void init(); + void init_list(int, class NeighList *); + void setup(int); + void min_setup(int); + void initial_integrate(int); + void post_force(int); + void final_integrate(); + void reset_dt(); + double compute_scalar(); + + protected: + double dtv,dtf; + char *id_pe; + + class NeighList *list; + class Compute *c_pe; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +*/ diff --git a/src/Makefile b/src/Makefile index a5d0a326a4..9b64c395e9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -44,8 +44,8 @@ endif # Package variables PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ - granular kim \ - kokkos kspace manybody mc meam misc molecule mpiio opt peri poems \ + granular kim kokkos kspace latte manybody mc meam misc \ + molecule mpiio opt peri poems \ python qeq reax replica rigid shock snap srd voronoi PACKUSER = user-atc user-awpmd user-cg-cmm user-colvars \ @@ -55,7 +55,7 @@ PACKUSER = user-atc user-awpmd user-cg-cmm user-colvars \ user-quip user-reaxc user-smd user-smtbq user-sph user-tally \ user-vtk -PACKLIB = compress gpu kim kokkos meam mpiio poems python reax voronoi \ +PACKLIB = compress gpu kim kokkos latte meam mpiio poems python reax voronoi \ user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \ user-nc-dump user-qmmm user-quip user-smd user-vtk From f3d6ecf07be360fb9c711ddd1b709fb66d46c3ac Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Mon, 14 Nov 2016 07:58:47 -0700 Subject: [PATCH 02/53] changes for lattelib --- lib/latte/Makefile.lammps.gfortran | 23 ++++++++++++++++++++--- src/LATTE/fix_latte.cpp | 17 ++++++++++++++--- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 0ad5b1ad01..76913c6e5b 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -1,5 +1,22 @@ # 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/qmmd/bml +# PROGRESS: https://github.com/losalamos/qmd-progress +# METIS: + +latte_PATH = ${HOME}/exaalt/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}/liblatte/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 + +# 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_SYSINC = -latte_SYSLIB = -lgfortran -latte_SYSPATH = diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 1ff45a869e..d15ee59872 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -28,6 +28,10 @@ using namespace LAMMPS_NS; using namespace FixConst; + extern "C" { + void latte(int*, double*, int*, double*); + } + #define INVOKED_PERATOM 8 /* ---------------------------------------------------------------------- */ @@ -35,7 +39,7 @@ using namespace FixConst; FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { - if (narg != 4) error->all(FLERR,"Illegal fix latte command"); + if (narg != 5) error->all(FLERR,"Illegal fix latte command"); // store pe/atom ID used for input of Coulomb potential to LATTE // insure it is valid for these computations @@ -49,6 +53,8 @@ FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : if (modify->compute[ipe]->peatomflag == 0) error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); +// latte(arg[4]); + // initialize LATTE with LAMMPS info about box, atoms, atom types, etc ? // may need to be done in init() ?? @@ -183,7 +189,7 @@ void FixLatte::post_force(int vflag) // what should cutoffs be for passing neighlist info to LATTE ?? // do cutoffs include many self image atoms for tiny periodic system ?? - int i,j,ii,jj,inum,jnum; +/* int i,j,ii,jj,inum,jnum; int *ilist,*jlist,*numneigh,**firstneigh; inum = list->inum; @@ -218,7 +224,11 @@ void FixLatte::post_force(int vflag) double *pe = c_pe->vector_atom; modify->addstep_compute(update->ntimestep+1); - +*/ + int natoms = (int) atom->natoms; + latte(&natoms,&atom->x[0][0],atom->type,&atom->f[0][0]); +// latte(&natoms,&atom->x[0][0],atom->type); + // construct H0,S,Z // setup full Hamiltonian H(R,n) // calculate density matrix D and charge q(n) @@ -281,3 +291,4 @@ double FixLatte::compute_scalar() return 0.0; } + From f040f15218d286ed74281206dff4160a732e0f75 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Mon, 14 Nov 2016 16:11:12 -0700 Subject: [PATCH 03/53] changes in latte makefile for lattelib and README --- lib/latte/Makefile.lammps.gfortran | 4 +-- lib/latte/README | 44 ++++++++++++++++++------------ 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 76913c6e5b..37003db31d 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -4,7 +4,7 @@ # For more information about these libraries see: # BML: https://github.com/qmmd/bml # PROGRESS: https://github.com/losalamos/qmd-progress -# METIS: +# METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download latte_PATH = ${HOME}/exaalt/LATTE progress_PATH = ${HOME}/qmd-progress @@ -12,7 +12,7 @@ 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}/liblatte/latte_c_bind.o ${latte_PATH}/liblatte.a -lgfortran \ +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 diff --git a/lib/latte/README b/lib/latte/README index 423f47ac52..3acd85095a 100644 --- a/lib/latte/README +++ b/lib/latte/README @@ -2,31 +2,41 @@ This directory contains build settings for the LATTE library which is required to use the LATTE package and its fix latte command in a LAMMPS input script. -Information about the LATTE DFTB code can be found at ... The LATTE -developement effort is led by Anders Niklasson, etc at LANLS. +Information about the LATTE DFTB code can be found at: +https://github.com/losalamos/LATTE + +The LATTE development effort is led by Marc Cawkwell and +Anders Niklasson at Los Alamos National Laboratory. To download, build, and install LATTE as a library on your system, -follow these steps. We are working on scripts that will automate this -process. +follow these steps: + +- Download or clone the LATTE source code from: + https://github.com/losalamos/LATTE. -Go to this web site: https://??? and download a current tarball. The -tarball you download is "latte-??.tgz", which can be unpacked in this -directory or wherever you wish: +- 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. -tar xvfz latte*tgz - -Note that if you unpack and build LATTE in this directory, when you +Note that if you unpack and build LATTE in this directory, if you download a new LAMMPS tarball, the files you have added here will be -lost. So you likely want to build it somewhere else. +lost. So you likely want to build it somewhere else. The recommended +place is the home directory. -Build instructions for LATTE library ... +To build LAMMPS with the LATTE library you should follow the following +instructions: -When you have successully built the LATTE library, you can build -LAMMPS with the LATTE package installed: +- makefile.lammps.* to makefile.lammps in the /lammps/lib/latte directory. -$ cd lammps/src -$ make yes-latte -$ make g++ (or whatever target you wish) +- Change the path, flags and compilers on the makefile.lammps according + to your compilers, architecture and the LATTE location. + +- Finally, you should execute the following commands: + $ cd lammps/src + $ make yes-latte + $ make g++ (or whatever target you wish) Note that the Makefile.lammps file in this directory is required to allow the LAMMPS build to find the necessary LATTE files. You should From fe99fc287d2f310d0bb6fc5d9e113671919283ed Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Mon, 28 Nov 2016 15:29:37 -0700 Subject: [PATCH 04/53] changes in fix_latte --- lib/latte/Makefile.lammps.ifort | 25 +++++++++++++++++++++---- src/LATTE/fix_latte.cpp | 17 ++++++++++++++--- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/lib/latte/Makefile.lammps.ifort b/lib/latte/Makefile.lammps.ifort index 22b976ddc6..40637013f5 100644 --- a/lib/latte/Makefile.lammps.ifort +++ b/lib/latte/Makefile.lammps.ifort @@ -1,5 +1,22 @@ -# Settings that the LAMMPS build will import when this package library is used +# 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/qmmd/bml +# PROGRESS: https://github.com/losalamos/qmd-progress +# METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download -latte_SYSINC = -latte_SYSLIB = -lifcore -lsvml -lompstub -limf -latte_SYSPATH = -L/opt/intel/fce/10.0.023/lib +latte_PATH = ${HOME}/exaalt/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 = -openmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a \ + -lifcore -lsvml -lompstub -limf -L${MKLROOT}/lib/intel64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 \ + -lmkl_intel_thread -lmkl_core -lmkl_intel_thread -lpthread -openmp -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 + + +latte_SYSPATH = -L/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64 diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index d15ee59872..60c9d5f4c2 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -18,6 +18,7 @@ #include "force.h" #include "update.h" #include "neighbor.h" +#include "domain.h" #include "neigh_request.h" #include "neigh_list.h" #include "modify.h" @@ -29,9 +30,9 @@ using namespace LAMMPS_NS; using namespace FixConst; extern "C" { - void latte(int*, double*, int*, double*); + void latte(int*, double*, int*, int*, double*, double*, double*, double*); } - + #define INVOKED_PERATOM 8 /* ---------------------------------------------------------------------- */ @@ -226,7 +227,17 @@ void FixLatte::post_force(int vflag) modify->addstep_compute(update->ntimestep+1); */ int natoms = (int) atom->natoms; - latte(&natoms,&atom->x[0][0],atom->type,&atom->f[0][0]); +// int* n1types -> (int) atom->ntypes; +// domain->boxlo; +// domain->boxhi; +// domain->boylo; +// domain->boyhi; +// domain->bozlo; +// domain->bozhi; +// double* lo = &domain->boxlo; + + latte(&natoms,&atom->x[0][0],atom->type,&atom->ntypes,&atom->mass[1], \ + &domain->boxlo[0],&domain->boxhi[0], &atom->f[0][0]); // latte(&natoms,&atom->x[0][0],atom->type); // construct H0,S,Z From 45b85b1686e42a8fc00471e896bbe2b67895b238 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 1 Dec 2016 14:50:11 -0700 Subject: [PATCH 05/53] updated version of fix latte from SJP --- src/LATTE/fix_latte.cpp | 330 ++++++++++++++++++++++------------------ src/LATTE/fix_latte.h | 10 +- 2 files changed, 187 insertions(+), 153 deletions(-) diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 60c9d5f4c2..c6269f4c21 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -11,27 +11,42 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +// NOTES on possible future issues: +// LATTE compute and return 6-value virial tensor +// 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 + #include #include #include "fix_latte.h" #include "atom.h" -#include "force.h" +#include "comm.h" #include "update.h" #include "neighbor.h" #include "domain.h" +#include "force.h" #include "neigh_request.h" #include "neigh_list.h" #include "modify.h" #include "compute.h" -#include "comm.h" +#include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace FixConst; - extern "C" { - void latte(int*, double*, int*, int*, double*, double*, double*, double*); - } +extern "C" { + void latte(int *, int *, double *, int *, int *, + double *, double *, double *, double *, double *); +} #define INVOKED_PERATOM 8 @@ -40,27 +55,42 @@ using namespace FixConst; FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { - if (narg != 5) error->all(FLERR,"Illegal fix latte command"); + if (narg != 4) error->all(FLERR,"Illegal fix latte command"); - // store pe/atom ID used for input of Coulomb potential to LATTE - // insure it is valid for these computations + if (comm->nprocs != 1) + error->all(FLERR,"Fix latte currently runs only in serial"); - int n = strlen(arg[3]) + 1; - id_pe = new char[n]; - strcpy(id_pe,arg[3]); + scalar_flag = 1; + global_freq = 1; + extscalar = 1; + virial_flag = 1; - int ipe = modify->find_compute(id_pe); - if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); - if (modify->compute[ipe]->peatomflag == 0) - error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); + // store ID of compute pe/atom used to generate Coulomb potential for LATTE + // NULL means LATTE will compute Coulombic potential -// latte(arg[4]); + coulomb = 0; + id_pe = NULL; - // initialize LATTE with LAMMPS info about box, atoms, atom types, etc ? - // may need to be done in init() ?? + if (strcmp(arg[3],"NULL") != 0) { + coulomb = 1; - // any per-atom quantities to allocate/initialize for LAMMPS? - // i.e. quantities carried with atoms across timesteps ?? + int n = strlen(arg[3]) + 1; + id_pe = new char[n]; + strcpy(id_pe,arg[3]); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + if (modify->compute[ipe]->peatomflag == 0) + error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); + } + + // initializations + + nmax = 0; + qpotential = NULL; + flatte = NULL; + + latte_energy = 0.0; } /* ---------------------------------------------------------------------- */ @@ -68,6 +98,8 @@ FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : FixLatte::~FixLatte() { delete [] id_pe; + memory->destroy(qpotential); + memory->destroy(flatte); } /* ---------------------------------------------------------------------- */ @@ -75,8 +107,9 @@ FixLatte::~FixLatte() int FixLatte::setmask() { int mask = 0; - mask |= INITIAL_INTEGRATE; - mask |= FINAL_INTEGRATE; + //mask |= INITIAL_INTEGRATE; + //mask |= FINAL_INTEGRATE; + mask |= PRE_REVERSE; mask |= POST_FORCE; mask |= MIN_POST_FORCE; mask |= THERMO_ENERGY; @@ -89,10 +122,34 @@ void FixLatte::init() { // error checks - int ipe = modify->find_compute(id_pe); - if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); - c_pe = modify->compute[ipe]; + if (domain->dimension == 2) + error->all(FLERR,"Fix latte requires 3d problem"); + if (coulomb) { + if (atom->q_flag == 0 || force->pair == NULL || force->kspace == NULL) + error->all(FLERR,"Fix latte cannot compute Coulombic potential"); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + c_pe = modify->compute[ipe]; + } + + // must be fully periodic or fully non-periodic + + if (domain->nonperiodic == 0) pbcflag = 1; + else if (!domain->xperiodic && !domain->yperiodic && !domain->zperiodic) + pbcflag = 0; + else error->all(FLERR,"Fix latte requires 3d simulation"); + + // create qpotential & flatte if needed + // for now, assume nlocal will never change + + if (coulomb && qpotential == NULL) { + memory->create(qpotential,atom->nlocal,"latte:qpotential"); + memory->create(flatte,atom->nlocal,3,"latte:flatte"); + } + + /* // warn if any integrate fix comes after this one // is it actually necessary for q(n) update to come after x,v update ?? @@ -105,8 +162,11 @@ void FixLatte::init() if (flag && comm->me == 0) error->warning(FLERR,"Fix latte should come after all other " "integration fixes"); + */ + /* // need a full neighbor list + // could we use a half list? // perpetual list, built whenever re-neighboring occurs int irequest = neighbor->request(this,instance_me); @@ -114,20 +174,14 @@ void FixLatte::init() neighbor->requests[irequest]->fix = 1; neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; - - // integrator timesteps - - dtv = update->dt; - dtf = 0.5 * update->dt * force->ftm2v; - - // any more LATTE initialization to do ? + */ } /* ---------------------------------------------------------------------- */ void FixLatte::init_list(int id, NeighList *ptr) { - list = ptr; + // list = ptr; } /* ---------------------------------------------------------------------- */ @@ -141,8 +195,6 @@ void FixLatte::setup(int vflag) void FixLatte::min_setup(int vflag) { - // for minimize, what about charge DOFs ?? - post_force(vflag); } @@ -150,156 +202,130 @@ void FixLatte::min_setup(int vflag) integrate electronic degrees of freedom ------------------------------------------------------------------------- */ -void FixLatte::initial_integrate(int vflag) +void FixLatte::initial_integrate(int vflag) {} + +/* ---------------------------------------------------------------------- + store eflag, so can use it in post_force to tally per-atom energies +------------------------------------------------------------------------- */ + +void FixLatte::pre_reverse(int eflag, int vflag) { - // what do I do here for q(n) update? - // is it the same variable as LAMMPS q, I think so - // is it an Euler update or VV update ?? - - /* - double dtfm; - - // update v and x of atoms in group - - double **x = atom->x; - double **v = atom->v; - double **f = atom->f; - double *mass = atom->mass; - int *type = atom->type; - int *mask = atom->mask; - int nlocal = atom->nlocal; - if (igroup == atom->firstgroup) nlocal = atom->nfirst; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - dtfm = dtf / mass[type[i]]; - v[i][0] += dtfm * f[i][0]; - v[i][1] += dtfm * f[i][1]; - v[i][2] += dtfm * f[i][2]; - x[i][0] += dtv * v[i][0]; - x[i][1] += dtv * v[i][1]; - x[i][2] += dtv * v[i][2]; - } - */ + eflag_caller = eflag; } /* ---------------------------------------------------------------------- */ void FixLatte::post_force(int vflag) { - // what should cutoffs be for passing neighlist info to LATTE ?? - // do cutoffs include many self image atoms for tiny periodic system ?? - -/* int i,j,ii,jj,inum,jnum; - int *ilist,*jlist,*numneigh,**firstneigh; - - inum = list->inum; - ilist = list->ilist; - numneigh = list->numneigh; - firstneigh = list->firstneigh; - - for (ii = 0; ii < inum; ii++) { - i = ilist[ii]; - jlist = firstneigh[i]; - jnum = numneigh[i]; - for (jj = 0; jj < jnum; jj++) { - j = jlist[jj]; - j &= NEIGHMASK; - // enforce a different cutoff than pair style? - // what are optimal cutoffs for pair/Kspace for tiny system? - // operations on I/J pairs if necessary - } - } + int eflag = eflag_caller; + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = 0; + // compute Coulombic potential = pe[i]/q[i] // invoke compute pe/atom // wrap with clear/add and trigger pe/atom calculation every step - // Coulomb potential should just be pe[i]/q[i] ?? - modify->clearstep_compute(); + if (coulomb) { + modify->clearstep_compute(); - if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { - c_pe->compute_peratom(); - c_pe->invoked_flag |= INVOKED_PERATOM; + if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { + c_pe->compute_peratom(); + c_pe->invoked_flag |= INVOKED_PERATOM; + } + + modify->addstep_compute(update->ntimestep+1); + + double *pe = c_pe->vector_atom; + double *q = atom->q; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + if (q[i]) qpotential[i] = pe[i]/q[i]; + else qpotential[i] = 0.0; } - double *pe = c_pe->vector_atom; + // hardwire these unsupported flags for now - modify->addstep_compute(update->ntimestep+1); -*/ - int natoms = (int) atom->natoms; -// int* n1types -> (int) atom->ntypes; -// domain->boxlo; -// domain->boxhi; -// domain->boylo; -// domain->boyhi; -// domain->bozlo; -// domain->bozhi; -// double* lo = &domain->boxlo; - - latte(&natoms,&atom->x[0][0],atom->type,&atom->ntypes,&atom->mass[1], \ - &domain->boxlo[0],&domain->boxhi[0], &atom->f[0][0]); -// latte(&natoms,&atom->x[0][0],atom->type); - - // construct H0,S,Z - // setup full Hamiltonian H(R,n) - // calculate density matrix D and charge q(n) - // calculate DFTB forces via LATTE = F(R,H0,S,Z,D,q,n) - // how to pass neighbor list and Coulomb potential to LATTE ?? + int coulombflag = 0; + pe_peratom = 0; + virial_global = 0; // set via vflag_global at some point + virial_peratom = 0; + neighflag = 0; - // HERE is where main call to LATTE goes to get forces + // set flags used by LATTE - // simply add the returned forces to atom->f - // how to request/get global or per-atom energy back from LATTE ?? - // how to request/get global or per-atom virial back from LATTE ?? + int flags[6]; + + flags[0] = pbcflag; // 1 for fully periodic, 0 for fully non-periodic + flags[1] = coulombflag; // 1 for LAMMPS computes Coulombics, 0 for LATTE + flags[2] = pe_peratom; // 1 to return per-atom energies, 0 for no + flags[3] = virial_global; // 1 to return global virial 0 for no + flags[4] = virial_peratom; // 1 to return per-atom virial, 0 for no + flags[5] = neighflag; // 1 to pass neighbor list to LATTE, 0 for no + + // setup LATTE arguments + + int natoms = atom->nlocal; + double *coords = &atom->x[0][0]; + int *type = atom->type; + int ntypes = atom->ntypes; + double *mass = &atom->mass[1]; + double *boxlo = domain->boxlo; + double *boxhi = domain->boxhi; + + double *forces; + if (coulomb) forces = &flatte[0][0]; + else forces = &atom->f[0][0]; + + // invoke LATTE + + latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, + forces,&latte_energy); + + // sum LATTE forces to LAMMPS (Coulombic) forces + + if (coulomb) { + double **f = atom->f; + int nlocal = atom->nlocal; + for (int i = 0; i < nlocal; i++) { + f[i][0] += flatte[i][0]; + f[i][1] += flatte[i][1]; + f[i][2] += flatte[i][2]; + } + } } /* ---------------------------------------------------------------------- integrate electronic degrees of freedom ------------------------------------------------------------------------- */ -void FixLatte::final_integrate() -{ - // possibly nothing to do here if Euler step of q(n) ?? - - /* - double dtfm; - - // update v of atoms in group - - double **v = atom->v; - double **f = atom->f; - double *mass = atom->mass; - int *type = atom->type; - int *mask = atom->mask; - int nlocal = atom->nlocal; - if (igroup == atom->firstgroup) nlocal = atom->nfirst; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - dtfm = dtf / mass[type[i]]; - v[i][0] += dtfm * f[i][0]; - v[i][1] += dtfm * f[i][1]; - v[i][2] += dtfm * f[i][2]; - } - */ -} +void FixLatte::final_integrate() {} /* ---------------------------------------------------------------------- */ void FixLatte::reset_dt() { - // will we ever auto-adjust the timestep ?? - - dtv = update->dt; - dtf = 0.5 * update->dt * force->ftm2v; + //dtv = update->dt; + //dtf = 0.5 * update->dt * force->ftm2v; } -/* ---------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- + DFTB energy from LATTE +------------------------------------------------------------------------- */ double FixLatte::compute_scalar() { - // return DFTB global energy - return 0.0; + return latte_energy; } +/* ---------------------------------------------------------------------- + memory usage of local arrays +------------------------------------------------------------------------- */ +double FixLatte::memory_usage() +{ + double bytes = 0.0; + if (coulomb) bytes += nmax * sizeof(double); + if (coulomb) bytes += nmax*3 * sizeof(double); + return bytes; +} diff --git a/src/LATTE/fix_latte.h b/src/LATTE/fix_latte.h index ebd738315d..d0f2fdea3e 100644 --- a/src/LATTE/fix_latte.h +++ b/src/LATTE/fix_latte.h @@ -34,14 +34,22 @@ class FixLatte : public Fix { void setup(int); void min_setup(int); void initial_integrate(int); + void pre_reverse(int, int); void post_force(int); void final_integrate(); void reset_dt(); double compute_scalar(); + double memory_usage(); protected: - double dtv,dtf; char *id_pe; + int coulomb,pbcflag,pe_peratom,virial_global,virial_peratom,neighflag; + int eflag_caller; + + int nmax; + double *qpotential; + double **flatte; + double latte_energy; class NeighList *list; class Compute *c_pe; From 5f78c2b6a50f4186d42f444984d7c5321874d262 Mon Sep 17 00:00:00 2001 From: Richard Zamora Date: Thu, 1 Dec 2016 15:14:47 -0700 Subject: [PATCH 06/53] test push --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000000..b089100527 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +The creation of this file is for testing purposes only. From 031d4acde863f27316d90b61abdad3aa367e8895 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 9 Nov 2016 13:48:11 -0700 Subject: [PATCH 07/53] initial dummy version of fix_latte.cpp --- lib/latte/Makefile.lammps.gfortran | 5 + lib/latte/Makefile.lammps.ifort | 5 + lib/latte/README | 33 ++++ src/LATTE/Install.sh | 67 +++++++ src/LATTE/README | 28 +++ src/LATTE/fix_latte.cpp | 283 +++++++++++++++++++++++++++++ src/LATTE/fix_latte.h | 63 +++++++ src/Makefile | 6 +- 8 files changed, 487 insertions(+), 3 deletions(-) create mode 100644 lib/latte/Makefile.lammps.gfortran create mode 100644 lib/latte/Makefile.lammps.ifort create mode 100644 lib/latte/README create mode 100644 src/LATTE/Install.sh create mode 100644 src/LATTE/README create mode 100644 src/LATTE/fix_latte.cpp create mode 100644 src/LATTE/fix_latte.h diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran new file mode 100644 index 0000000000..0ad5b1ad01 --- /dev/null +++ b/lib/latte/Makefile.lammps.gfortran @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package is installed + +latte_SYSINC = +latte_SYSLIB = -lgfortran +latte_SYSPATH = diff --git a/lib/latte/Makefile.lammps.ifort b/lib/latte/Makefile.lammps.ifort new file mode 100644 index 0000000000..22b976ddc6 --- /dev/null +++ b/lib/latte/Makefile.lammps.ifort @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package library is used + +latte_SYSINC = +latte_SYSLIB = -lifcore -lsvml -lompstub -limf +latte_SYSPATH = -L/opt/intel/fce/10.0.023/lib diff --git a/lib/latte/README b/lib/latte/README new file mode 100644 index 0000000000..423f47ac52 --- /dev/null +++ b/lib/latte/README @@ -0,0 +1,33 @@ +This directory contains build settings for the LATTE library which +is required to use the LATTE package and its fix latte command in a +LAMMPS input script. + +Information about the LATTE DFTB code can be found at ... The LATTE +developement effort is led by Anders Niklasson, etc at LANLS. + +To download, build, and install LATTE as a library on your system, +follow these steps. We are working on scripts that will automate this +process. + +Go to this web site: https://??? and download a current tarball. The +tarball you download is "latte-??.tgz", which can be unpacked in this +directory or wherever you wish: + +tar xvfz latte*tgz + +Note that if you unpack and build LATTE in this directory, when you +download a new LAMMPS tarball, the files you have added here will be +lost. So you likely want to build it somewhere else. + +Build instructions for LATTE library ... + +When you have successully built the LATTE library, you can build +LAMMPS with the LATTE package installed: + +$ cd lammps/src +$ make yes-latte +$ make g++ (or whatever target you wish) + +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. diff --git a/src/LATTE/Install.sh b/src/LATTE/Install.sh new file mode 100644 index 0000000000..2fb34096c8 --- /dev/null +++ b/src/LATTE/Install.sh @@ -0,0 +1,67 @@ +# Install/unInstall package files in LAMMPS +# mode = 0/1/2 for uninstall/install/update + +mode=$1 + +# enforce using portable C locale +LC_ALL=C +export LC_ALL + +# arg1 = file, arg2 = file it depends on + +action () { + if (test $mode = 0) then + rm -f ../$1 + elif (! cmp -s $1 ../$1) then + if (test -z "$2" || test -e ../$2) then + cp $1 .. + if (test $mode = 2) then + echo " updating src/$1" + fi + fi + elif (test -n "$2") then + if (test ! -e ../$2) then + rm -f ../$1 + fi + fi +} + +# all package files with no dependencies + +for file in *.cpp *.h; do + action $file +done + +# edit 2 Makefile.package files to include/exclude package info + +if (test $1 = 1) then + + if (test -e ../Makefile.package) then + 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_PATH =[ \t]*|&-L../../lib/latte |' ../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_SYSLIB =[ \t]*|&$(latte_SYSLIB) |' ../Makefile.package + sed -i -e 's|^PKG_SYSPATH =[ \t]*|&$(latte_SYSPATH) |' ../Makefile.package + fi + + if (test -e ../Makefile.package.settings) then + sed -i -e '/^include.*latte.*$/d' ../Makefile.package.settings + # multiline form needed for BSD sed on Macs + sed -i -e '4 i \ +include ..\/..\/lib\/latte\/Makefile.lammps +' ../Makefile.package.settings + fi + +elif (test $1 = 0) then + + if (test -e ../Makefile.package) then + sed -i -e 's/[^ \t]*latte[^ \t]* //' ../Makefile.package + fi + + if (test -e ../Makefile.package.settings) then + sed -i -e '/^include.*latte.*$/d' ../Makefile.package.settings + fi + +fi diff --git a/src/LATTE/README b/src/LATTE/README new file mode 100644 index 0000000000..e82480c865 --- /dev/null +++ b/src/LATTE/README @@ -0,0 +1,28 @@ +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 +using density-functional tight-binding quantum forces calculated by +LATTE. More information on LATTE can be found at "web site". Its +authors are Anders Niklasson, etc at LANL. + +Using this package requires the LATTE code to be downloaded and built +as a library on your system. The library can be downloaded and built +in lib/latte or elsewhere on your system, which must be done before +building LAMMPS with this package. Details of the download, build, and +install process for LATTE are given in the lib/latte/README file, and +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 +LATTE library you can test it using an input file from the examples +dir: + +./lmp_serial < lammps/examples/latte/in.latte + +This pair style was written in collaboration with the LATTE +developers. diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp new file mode 100644 index 0000000000..1ff45a869e --- /dev/null +++ b/src/LATTE/fix_latte.cpp @@ -0,0 +1,283 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +#include +#include +#include "fix_latte.h" +#include "atom.h" +#include "force.h" +#include "update.h" +#include "neighbor.h" +#include "neigh_request.h" +#include "neigh_list.h" +#include "modify.h" +#include "compute.h" +#include "comm.h" +#include "error.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +#define INVOKED_PERATOM 8 + +/* ---------------------------------------------------------------------- */ + +FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + if (narg != 4) error->all(FLERR,"Illegal fix latte command"); + + // store pe/atom ID used for input of Coulomb potential to LATTE + // insure it is valid for these computations + + int n = strlen(arg[3]) + 1; + id_pe = new char[n]; + strcpy(id_pe,arg[3]); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + if (modify->compute[ipe]->peatomflag == 0) + error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); + + // initialize LATTE with LAMMPS info about box, atoms, atom types, etc ? + // may need to be done in init() ?? + + // any per-atom quantities to allocate/initialize for LAMMPS? + // i.e. quantities carried with atoms across timesteps ?? +} + +/* ---------------------------------------------------------------------- */ + +FixLatte::~FixLatte() +{ + delete [] id_pe; +} + +/* ---------------------------------------------------------------------- */ + +int FixLatte::setmask() +{ + int mask = 0; + mask |= INITIAL_INTEGRATE; + mask |= FINAL_INTEGRATE; + mask |= POST_FORCE; + mask |= MIN_POST_FORCE; + mask |= THERMO_ENERGY; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::init() +{ + // error checks + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + c_pe = modify->compute[ipe]; + + // warn if any integrate fix comes after this one + // is it actually necessary for q(n) update to come after x,v update ?? + + int after = 0; + int flag = 0; + for (int i = 0; i < modify->nfix; i++) { + if (strcmp(id,modify->fix[i]->id) == 0) after = 1; + else if ((modify->fmask[i] & INITIAL_INTEGRATE) && after) flag = 1; + } + if (flag && comm->me == 0) + error->warning(FLERR,"Fix latte should come after all other " + "integration fixes"); + + // need a full neighbor list + // perpetual list, built whenever re-neighboring occurs + + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->pair = 0; + neighbor->requests[irequest]->fix = 1; + neighbor->requests[irequest]->half = 0; + neighbor->requests[irequest]->full = 1; + + // integrator timesteps + + dtv = update->dt; + dtf = 0.5 * update->dt * force->ftm2v; + + // any more LATTE initialization to do ? +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::init_list(int id, NeighList *ptr) +{ + list = ptr; +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::min_setup(int vflag) +{ + // for minimize, what about charge DOFs ?? + + post_force(vflag); +} + +/* ---------------------------------------------------------------------- + integrate electronic degrees of freedom +------------------------------------------------------------------------- */ + +void FixLatte::initial_integrate(int vflag) +{ + // what do I do here for q(n) update? + // is it the same variable as LAMMPS q, I think so + // is it an Euler update or VV update ?? + + /* + double dtfm; + + // update v and x of atoms in group + + double **x = atom->x; + double **v = atom->v; + double **f = atom->f; + double *mass = atom->mass; + int *type = atom->type; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + dtfm = dtf / mass[type[i]]; + v[i][0] += dtfm * f[i][0]; + v[i][1] += dtfm * f[i][1]; + v[i][2] += dtfm * f[i][2]; + x[i][0] += dtv * v[i][0]; + x[i][1] += dtv * v[i][1]; + x[i][2] += dtv * v[i][2]; + } + */ +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::post_force(int vflag) +{ + // what should cutoffs be for passing neighlist info to LATTE ?? + // do cutoffs include many self image atoms for tiny periodic system ?? + + int i,j,ii,jj,inum,jnum; + int *ilist,*jlist,*numneigh,**firstneigh; + + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + // enforce a different cutoff than pair style? + // what are optimal cutoffs for pair/Kspace for tiny system? + // operations on I/J pairs if necessary + } + } + + // invoke compute pe/atom + // wrap with clear/add and trigger pe/atom calculation every step + // Coulomb potential should just be pe[i]/q[i] ?? + + modify->clearstep_compute(); + + if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { + c_pe->compute_peratom(); + c_pe->invoked_flag |= INVOKED_PERATOM; + } + + double *pe = c_pe->vector_atom; + + modify->addstep_compute(update->ntimestep+1); + + // construct H0,S,Z + // setup full Hamiltonian H(R,n) + // calculate density matrix D and charge q(n) + // calculate DFTB forces via LATTE = F(R,H0,S,Z,D,q,n) + // how to pass neighbor list and Coulomb potential to LATTE ?? + + // HERE is where main call to LATTE goes to get forces + + // simply add the returned forces to atom->f + // how to request/get global or per-atom energy back from LATTE ?? + // how to request/get global or per-atom virial back from LATTE ?? +} + +/* ---------------------------------------------------------------------- + integrate electronic degrees of freedom +------------------------------------------------------------------------- */ + +void FixLatte::final_integrate() +{ + // possibly nothing to do here if Euler step of q(n) ?? + + /* + double dtfm; + + // update v of atoms in group + + double **v = atom->v; + double **f = atom->f; + double *mass = atom->mass; + int *type = atom->type; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + dtfm = dtf / mass[type[i]]; + v[i][0] += dtfm * f[i][0]; + v[i][1] += dtfm * f[i][1]; + v[i][2] += dtfm * f[i][2]; + } + */ +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::reset_dt() +{ + // will we ever auto-adjust the timestep ?? + + dtv = update->dt; + dtf = 0.5 * update->dt * force->ftm2v; +} + +/* ---------------------------------------------------------------------- */ + +double FixLatte::compute_scalar() +{ + // return DFTB global energy + return 0.0; +} + diff --git a/src/LATTE/fix_latte.h b/src/LATTE/fix_latte.h new file mode 100644 index 0000000000..ebd738315d --- /dev/null +++ b/src/LATTE/fix_latte.h @@ -0,0 +1,63 @@ +/* -*- 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 FIX_CLASS + +FixStyle(latte,FixLatte) + +#else + +#ifndef LMP_FIX_LATTE_H +#define LMP_FIX_LATTE_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixLatte : public Fix { + public: + FixLatte(class LAMMPS *, int, char **); + virtual ~FixLatte(); + int setmask(); + void init(); + void init_list(int, class NeighList *); + void setup(int); + void min_setup(int); + void initial_integrate(int); + void post_force(int); + void final_integrate(); + void reset_dt(); + double compute_scalar(); + + protected: + double dtv,dtf; + char *id_pe; + + class NeighList *list; + class Compute *c_pe; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +*/ diff --git a/src/Makefile b/src/Makefile index a5d0a326a4..9b64c395e9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -44,8 +44,8 @@ endif # Package variables PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ - granular kim \ - kokkos kspace manybody mc meam misc molecule mpiio opt peri poems \ + granular kim kokkos kspace latte manybody mc meam misc \ + molecule mpiio opt peri poems \ python qeq reax replica rigid shock snap srd voronoi PACKUSER = user-atc user-awpmd user-cg-cmm user-colvars \ @@ -55,7 +55,7 @@ PACKUSER = user-atc user-awpmd user-cg-cmm user-colvars \ user-quip user-reaxc user-smd user-smtbq user-sph user-tally \ user-vtk -PACKLIB = compress gpu kim kokkos meam mpiio poems python reax voronoi \ +PACKLIB = compress gpu kim kokkos latte meam mpiio poems python reax voronoi \ user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \ user-nc-dump user-qmmm user-quip user-smd user-vtk From 765fe3cdfe678d9f5e089386f7150ee5a2d0eeed Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Mon, 14 Nov 2016 07:58:47 -0700 Subject: [PATCH 08/53] changes for lattelib --- lib/latte/Makefile.lammps.gfortran | 23 ++++++++++++++++++++--- src/LATTE/fix_latte.cpp | 17 ++++++++++++++--- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 0ad5b1ad01..76913c6e5b 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -1,5 +1,22 @@ # 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/qmmd/bml +# PROGRESS: https://github.com/losalamos/qmd-progress +# METIS: + +latte_PATH = ${HOME}/exaalt/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}/liblatte/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 + +# 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_SYSINC = -latte_SYSLIB = -lgfortran -latte_SYSPATH = diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 1ff45a869e..d15ee59872 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -28,6 +28,10 @@ using namespace LAMMPS_NS; using namespace FixConst; + extern "C" { + void latte(int*, double*, int*, double*); + } + #define INVOKED_PERATOM 8 /* ---------------------------------------------------------------------- */ @@ -35,7 +39,7 @@ using namespace FixConst; FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { - if (narg != 4) error->all(FLERR,"Illegal fix latte command"); + if (narg != 5) error->all(FLERR,"Illegal fix latte command"); // store pe/atom ID used for input of Coulomb potential to LATTE // insure it is valid for these computations @@ -49,6 +53,8 @@ FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : if (modify->compute[ipe]->peatomflag == 0) error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); +// latte(arg[4]); + // initialize LATTE with LAMMPS info about box, atoms, atom types, etc ? // may need to be done in init() ?? @@ -183,7 +189,7 @@ void FixLatte::post_force(int vflag) // what should cutoffs be for passing neighlist info to LATTE ?? // do cutoffs include many self image atoms for tiny periodic system ?? - int i,j,ii,jj,inum,jnum; +/* int i,j,ii,jj,inum,jnum; int *ilist,*jlist,*numneigh,**firstneigh; inum = list->inum; @@ -218,7 +224,11 @@ void FixLatte::post_force(int vflag) double *pe = c_pe->vector_atom; modify->addstep_compute(update->ntimestep+1); - +*/ + int natoms = (int) atom->natoms; + latte(&natoms,&atom->x[0][0],atom->type,&atom->f[0][0]); +// latte(&natoms,&atom->x[0][0],atom->type); + // construct H0,S,Z // setup full Hamiltonian H(R,n) // calculate density matrix D and charge q(n) @@ -281,3 +291,4 @@ double FixLatte::compute_scalar() return 0.0; } + From b912db5c73a155cc1cd1a18d4eab6111b6f908bb Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Mon, 14 Nov 2016 16:11:12 -0700 Subject: [PATCH 09/53] changes in latte makefile for lattelib and README --- lib/latte/Makefile.lammps.gfortran | 4 +-- lib/latte/README | 44 ++++++++++++++++++------------ 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 76913c6e5b..37003db31d 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -4,7 +4,7 @@ # For more information about these libraries see: # BML: https://github.com/qmmd/bml # PROGRESS: https://github.com/losalamos/qmd-progress -# METIS: +# METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download latte_PATH = ${HOME}/exaalt/LATTE progress_PATH = ${HOME}/qmd-progress @@ -12,7 +12,7 @@ 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}/liblatte/latte_c_bind.o ${latte_PATH}/liblatte.a -lgfortran \ +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 diff --git a/lib/latte/README b/lib/latte/README index 423f47ac52..3acd85095a 100644 --- a/lib/latte/README +++ b/lib/latte/README @@ -2,31 +2,41 @@ This directory contains build settings for the LATTE library which is required to use the LATTE package and its fix latte command in a LAMMPS input script. -Information about the LATTE DFTB code can be found at ... The LATTE -developement effort is led by Anders Niklasson, etc at LANLS. +Information about the LATTE DFTB code can be found at: +https://github.com/losalamos/LATTE + +The LATTE development effort is led by Marc Cawkwell and +Anders Niklasson at Los Alamos National Laboratory. To download, build, and install LATTE as a library on your system, -follow these steps. We are working on scripts that will automate this -process. +follow these steps: + +- Download or clone the LATTE source code from: + https://github.com/losalamos/LATTE. -Go to this web site: https://??? and download a current tarball. The -tarball you download is "latte-??.tgz", which can be unpacked in this -directory or wherever you wish: +- 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. -tar xvfz latte*tgz - -Note that if you unpack and build LATTE in this directory, when you +Note that if you unpack and build LATTE in this directory, if you download a new LAMMPS tarball, the files you have added here will be -lost. So you likely want to build it somewhere else. +lost. So you likely want to build it somewhere else. The recommended +place is the home directory. -Build instructions for LATTE library ... +To build LAMMPS with the LATTE library you should follow the following +instructions: -When you have successully built the LATTE library, you can build -LAMMPS with the LATTE package installed: +- makefile.lammps.* to makefile.lammps in the /lammps/lib/latte directory. -$ cd lammps/src -$ make yes-latte -$ make g++ (or whatever target you wish) +- Change the path, flags and compilers on the makefile.lammps according + to your compilers, architecture and the LATTE location. + +- Finally, you should execute the following commands: + $ cd lammps/src + $ make yes-latte + $ make g++ (or whatever target you wish) Note that the Makefile.lammps file in this directory is required to allow the LAMMPS build to find the necessary LATTE files. You should From d43bd57a40d956157ce6e49bb43a86b4d1866cae Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Mon, 28 Nov 2016 15:29:37 -0700 Subject: [PATCH 10/53] changes in fix_latte --- lib/latte/Makefile.lammps.ifort | 25 +++++++++++++++++++++---- src/LATTE/fix_latte.cpp | 17 ++++++++++++++--- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/lib/latte/Makefile.lammps.ifort b/lib/latte/Makefile.lammps.ifort index 22b976ddc6..40637013f5 100644 --- a/lib/latte/Makefile.lammps.ifort +++ b/lib/latte/Makefile.lammps.ifort @@ -1,5 +1,22 @@ -# Settings that the LAMMPS build will import when this package library is used +# 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/qmmd/bml +# PROGRESS: https://github.com/losalamos/qmd-progress +# METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download -latte_SYSINC = -latte_SYSLIB = -lifcore -lsvml -lompstub -limf -latte_SYSPATH = -L/opt/intel/fce/10.0.023/lib +latte_PATH = ${HOME}/exaalt/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 = -openmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a \ + -lifcore -lsvml -lompstub -limf -L${MKLROOT}/lib/intel64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 \ + -lmkl_intel_thread -lmkl_core -lmkl_intel_thread -lpthread -openmp -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 + + +latte_SYSPATH = -L/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64 diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index d15ee59872..60c9d5f4c2 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -18,6 +18,7 @@ #include "force.h" #include "update.h" #include "neighbor.h" +#include "domain.h" #include "neigh_request.h" #include "neigh_list.h" #include "modify.h" @@ -29,9 +30,9 @@ using namespace LAMMPS_NS; using namespace FixConst; extern "C" { - void latte(int*, double*, int*, double*); + void latte(int*, double*, int*, int*, double*, double*, double*, double*); } - + #define INVOKED_PERATOM 8 /* ---------------------------------------------------------------------- */ @@ -226,7 +227,17 @@ void FixLatte::post_force(int vflag) modify->addstep_compute(update->ntimestep+1); */ int natoms = (int) atom->natoms; - latte(&natoms,&atom->x[0][0],atom->type,&atom->f[0][0]); +// int* n1types -> (int) atom->ntypes; +// domain->boxlo; +// domain->boxhi; +// domain->boylo; +// domain->boyhi; +// domain->bozlo; +// domain->bozhi; +// double* lo = &domain->boxlo; + + latte(&natoms,&atom->x[0][0],atom->type,&atom->ntypes,&atom->mass[1], \ + &domain->boxlo[0],&domain->boxhi[0], &atom->f[0][0]); // latte(&natoms,&atom->x[0][0],atom->type); // construct H0,S,Z From 16b15a636cfc1331780a6e796864110df74428d7 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 1 Dec 2016 14:50:11 -0700 Subject: [PATCH 11/53] updated version of fix latte from SJP --- src/LATTE/fix_latte.cpp | 330 ++++++++++++++++++++++------------------ src/LATTE/fix_latte.h | 10 +- 2 files changed, 187 insertions(+), 153 deletions(-) diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 60c9d5f4c2..c6269f4c21 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -11,27 +11,42 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +// NOTES on possible future issues: +// LATTE compute and return 6-value virial tensor +// 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 + #include #include #include "fix_latte.h" #include "atom.h" -#include "force.h" +#include "comm.h" #include "update.h" #include "neighbor.h" #include "domain.h" +#include "force.h" #include "neigh_request.h" #include "neigh_list.h" #include "modify.h" #include "compute.h" -#include "comm.h" +#include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace FixConst; - extern "C" { - void latte(int*, double*, int*, int*, double*, double*, double*, double*); - } +extern "C" { + void latte(int *, int *, double *, int *, int *, + double *, double *, double *, double *, double *); +} #define INVOKED_PERATOM 8 @@ -40,27 +55,42 @@ using namespace FixConst; FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { - if (narg != 5) error->all(FLERR,"Illegal fix latte command"); + if (narg != 4) error->all(FLERR,"Illegal fix latte command"); - // store pe/atom ID used for input of Coulomb potential to LATTE - // insure it is valid for these computations + if (comm->nprocs != 1) + error->all(FLERR,"Fix latte currently runs only in serial"); - int n = strlen(arg[3]) + 1; - id_pe = new char[n]; - strcpy(id_pe,arg[3]); + scalar_flag = 1; + global_freq = 1; + extscalar = 1; + virial_flag = 1; - int ipe = modify->find_compute(id_pe); - if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); - if (modify->compute[ipe]->peatomflag == 0) - error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); + // store ID of compute pe/atom used to generate Coulomb potential for LATTE + // NULL means LATTE will compute Coulombic potential -// latte(arg[4]); + coulomb = 0; + id_pe = NULL; - // initialize LATTE with LAMMPS info about box, atoms, atom types, etc ? - // may need to be done in init() ?? + if (strcmp(arg[3],"NULL") != 0) { + coulomb = 1; - // any per-atom quantities to allocate/initialize for LAMMPS? - // i.e. quantities carried with atoms across timesteps ?? + int n = strlen(arg[3]) + 1; + id_pe = new char[n]; + strcpy(id_pe,arg[3]); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + if (modify->compute[ipe]->peatomflag == 0) + error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); + } + + // initializations + + nmax = 0; + qpotential = NULL; + flatte = NULL; + + latte_energy = 0.0; } /* ---------------------------------------------------------------------- */ @@ -68,6 +98,8 @@ FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : FixLatte::~FixLatte() { delete [] id_pe; + memory->destroy(qpotential); + memory->destroy(flatte); } /* ---------------------------------------------------------------------- */ @@ -75,8 +107,9 @@ FixLatte::~FixLatte() int FixLatte::setmask() { int mask = 0; - mask |= INITIAL_INTEGRATE; - mask |= FINAL_INTEGRATE; + //mask |= INITIAL_INTEGRATE; + //mask |= FINAL_INTEGRATE; + mask |= PRE_REVERSE; mask |= POST_FORCE; mask |= MIN_POST_FORCE; mask |= THERMO_ENERGY; @@ -89,10 +122,34 @@ void FixLatte::init() { // error checks - int ipe = modify->find_compute(id_pe); - if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); - c_pe = modify->compute[ipe]; + if (domain->dimension == 2) + error->all(FLERR,"Fix latte requires 3d problem"); + if (coulomb) { + if (atom->q_flag == 0 || force->pair == NULL || force->kspace == NULL) + error->all(FLERR,"Fix latte cannot compute Coulombic potential"); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + c_pe = modify->compute[ipe]; + } + + // must be fully periodic or fully non-periodic + + if (domain->nonperiodic == 0) pbcflag = 1; + else if (!domain->xperiodic && !domain->yperiodic && !domain->zperiodic) + pbcflag = 0; + else error->all(FLERR,"Fix latte requires 3d simulation"); + + // create qpotential & flatte if needed + // for now, assume nlocal will never change + + if (coulomb && qpotential == NULL) { + memory->create(qpotential,atom->nlocal,"latte:qpotential"); + memory->create(flatte,atom->nlocal,3,"latte:flatte"); + } + + /* // warn if any integrate fix comes after this one // is it actually necessary for q(n) update to come after x,v update ?? @@ -105,8 +162,11 @@ void FixLatte::init() if (flag && comm->me == 0) error->warning(FLERR,"Fix latte should come after all other " "integration fixes"); + */ + /* // need a full neighbor list + // could we use a half list? // perpetual list, built whenever re-neighboring occurs int irequest = neighbor->request(this,instance_me); @@ -114,20 +174,14 @@ void FixLatte::init() neighbor->requests[irequest]->fix = 1; neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; - - // integrator timesteps - - dtv = update->dt; - dtf = 0.5 * update->dt * force->ftm2v; - - // any more LATTE initialization to do ? + */ } /* ---------------------------------------------------------------------- */ void FixLatte::init_list(int id, NeighList *ptr) { - list = ptr; + // list = ptr; } /* ---------------------------------------------------------------------- */ @@ -141,8 +195,6 @@ void FixLatte::setup(int vflag) void FixLatte::min_setup(int vflag) { - // for minimize, what about charge DOFs ?? - post_force(vflag); } @@ -150,156 +202,130 @@ void FixLatte::min_setup(int vflag) integrate electronic degrees of freedom ------------------------------------------------------------------------- */ -void FixLatte::initial_integrate(int vflag) +void FixLatte::initial_integrate(int vflag) {} + +/* ---------------------------------------------------------------------- + store eflag, so can use it in post_force to tally per-atom energies +------------------------------------------------------------------------- */ + +void FixLatte::pre_reverse(int eflag, int vflag) { - // what do I do here for q(n) update? - // is it the same variable as LAMMPS q, I think so - // is it an Euler update or VV update ?? - - /* - double dtfm; - - // update v and x of atoms in group - - double **x = atom->x; - double **v = atom->v; - double **f = atom->f; - double *mass = atom->mass; - int *type = atom->type; - int *mask = atom->mask; - int nlocal = atom->nlocal; - if (igroup == atom->firstgroup) nlocal = atom->nfirst; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - dtfm = dtf / mass[type[i]]; - v[i][0] += dtfm * f[i][0]; - v[i][1] += dtfm * f[i][1]; - v[i][2] += dtfm * f[i][2]; - x[i][0] += dtv * v[i][0]; - x[i][1] += dtv * v[i][1]; - x[i][2] += dtv * v[i][2]; - } - */ + eflag_caller = eflag; } /* ---------------------------------------------------------------------- */ void FixLatte::post_force(int vflag) { - // what should cutoffs be for passing neighlist info to LATTE ?? - // do cutoffs include many self image atoms for tiny periodic system ?? - -/* int i,j,ii,jj,inum,jnum; - int *ilist,*jlist,*numneigh,**firstneigh; - - inum = list->inum; - ilist = list->ilist; - numneigh = list->numneigh; - firstneigh = list->firstneigh; - - for (ii = 0; ii < inum; ii++) { - i = ilist[ii]; - jlist = firstneigh[i]; - jnum = numneigh[i]; - for (jj = 0; jj < jnum; jj++) { - j = jlist[jj]; - j &= NEIGHMASK; - // enforce a different cutoff than pair style? - // what are optimal cutoffs for pair/Kspace for tiny system? - // operations on I/J pairs if necessary - } - } + int eflag = eflag_caller; + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = 0; + // compute Coulombic potential = pe[i]/q[i] // invoke compute pe/atom // wrap with clear/add and trigger pe/atom calculation every step - // Coulomb potential should just be pe[i]/q[i] ?? - modify->clearstep_compute(); + if (coulomb) { + modify->clearstep_compute(); - if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { - c_pe->compute_peratom(); - c_pe->invoked_flag |= INVOKED_PERATOM; + if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { + c_pe->compute_peratom(); + c_pe->invoked_flag |= INVOKED_PERATOM; + } + + modify->addstep_compute(update->ntimestep+1); + + double *pe = c_pe->vector_atom; + double *q = atom->q; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + if (q[i]) qpotential[i] = pe[i]/q[i]; + else qpotential[i] = 0.0; } - double *pe = c_pe->vector_atom; + // hardwire these unsupported flags for now - modify->addstep_compute(update->ntimestep+1); -*/ - int natoms = (int) atom->natoms; -// int* n1types -> (int) atom->ntypes; -// domain->boxlo; -// domain->boxhi; -// domain->boylo; -// domain->boyhi; -// domain->bozlo; -// domain->bozhi; -// double* lo = &domain->boxlo; - - latte(&natoms,&atom->x[0][0],atom->type,&atom->ntypes,&atom->mass[1], \ - &domain->boxlo[0],&domain->boxhi[0], &atom->f[0][0]); -// latte(&natoms,&atom->x[0][0],atom->type); - - // construct H0,S,Z - // setup full Hamiltonian H(R,n) - // calculate density matrix D and charge q(n) - // calculate DFTB forces via LATTE = F(R,H0,S,Z,D,q,n) - // how to pass neighbor list and Coulomb potential to LATTE ?? + int coulombflag = 0; + pe_peratom = 0; + virial_global = 0; // set via vflag_global at some point + virial_peratom = 0; + neighflag = 0; - // HERE is where main call to LATTE goes to get forces + // set flags used by LATTE - // simply add the returned forces to atom->f - // how to request/get global or per-atom energy back from LATTE ?? - // how to request/get global or per-atom virial back from LATTE ?? + int flags[6]; + + flags[0] = pbcflag; // 1 for fully periodic, 0 for fully non-periodic + flags[1] = coulombflag; // 1 for LAMMPS computes Coulombics, 0 for LATTE + flags[2] = pe_peratom; // 1 to return per-atom energies, 0 for no + flags[3] = virial_global; // 1 to return global virial 0 for no + flags[4] = virial_peratom; // 1 to return per-atom virial, 0 for no + flags[5] = neighflag; // 1 to pass neighbor list to LATTE, 0 for no + + // setup LATTE arguments + + int natoms = atom->nlocal; + double *coords = &atom->x[0][0]; + int *type = atom->type; + int ntypes = atom->ntypes; + double *mass = &atom->mass[1]; + double *boxlo = domain->boxlo; + double *boxhi = domain->boxhi; + + double *forces; + if (coulomb) forces = &flatte[0][0]; + else forces = &atom->f[0][0]; + + // invoke LATTE + + latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, + forces,&latte_energy); + + // sum LATTE forces to LAMMPS (Coulombic) forces + + if (coulomb) { + double **f = atom->f; + int nlocal = atom->nlocal; + for (int i = 0; i < nlocal; i++) { + f[i][0] += flatte[i][0]; + f[i][1] += flatte[i][1]; + f[i][2] += flatte[i][2]; + } + } } /* ---------------------------------------------------------------------- integrate electronic degrees of freedom ------------------------------------------------------------------------- */ -void FixLatte::final_integrate() -{ - // possibly nothing to do here if Euler step of q(n) ?? - - /* - double dtfm; - - // update v of atoms in group - - double **v = atom->v; - double **f = atom->f; - double *mass = atom->mass; - int *type = atom->type; - int *mask = atom->mask; - int nlocal = atom->nlocal; - if (igroup == atom->firstgroup) nlocal = atom->nfirst; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - dtfm = dtf / mass[type[i]]; - v[i][0] += dtfm * f[i][0]; - v[i][1] += dtfm * f[i][1]; - v[i][2] += dtfm * f[i][2]; - } - */ -} +void FixLatte::final_integrate() {} /* ---------------------------------------------------------------------- */ void FixLatte::reset_dt() { - // will we ever auto-adjust the timestep ?? - - dtv = update->dt; - dtf = 0.5 * update->dt * force->ftm2v; + //dtv = update->dt; + //dtf = 0.5 * update->dt * force->ftm2v; } -/* ---------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- + DFTB energy from LATTE +------------------------------------------------------------------------- */ double FixLatte::compute_scalar() { - // return DFTB global energy - return 0.0; + return latte_energy; } +/* ---------------------------------------------------------------------- + memory usage of local arrays +------------------------------------------------------------------------- */ +double FixLatte::memory_usage() +{ + double bytes = 0.0; + if (coulomb) bytes += nmax * sizeof(double); + if (coulomb) bytes += nmax*3 * sizeof(double); + return bytes; +} diff --git a/src/LATTE/fix_latte.h b/src/LATTE/fix_latte.h index ebd738315d..d0f2fdea3e 100644 --- a/src/LATTE/fix_latte.h +++ b/src/LATTE/fix_latte.h @@ -34,14 +34,22 @@ class FixLatte : public Fix { void setup(int); void min_setup(int); void initial_integrate(int); + void pre_reverse(int, int); void post_force(int); void final_integrate(); void reset_dt(); double compute_scalar(); + double memory_usage(); protected: - double dtv,dtf; char *id_pe; + int coulomb,pbcflag,pe_peratom,virial_global,virial_peratom,neighflag; + int eflag_caller; + + int nmax; + double *qpotential; + double **flatte; + double latte_energy; class NeighList *list; class Compute *c_pe; From 544e23f9714f93dd06ebb2f6970e2cdfa37a7162 Mon Sep 17 00:00:00 2001 From: Richard Zamora Date: Thu, 1 Dec 2016 15:14:47 -0700 Subject: [PATCH 12/53] test push --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000000..b089100527 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +The creation of this file is for testing purposes only. From 7eb05b33fb1d0ce909a2265dafa423f68602981c Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 9 Nov 2016 13:48:11 -0700 Subject: [PATCH 13/53] initial dummy version of fix_latte.cpp --- lib/latte/Makefile.lammps.gfortran | 5 + lib/latte/Makefile.lammps.ifort | 5 + lib/latte/README | 33 ++++ src/LATTE/Install.sh | 67 +++++++ src/LATTE/README | 28 +++ src/LATTE/fix_latte.cpp | 283 +++++++++++++++++++++++++++++ src/LATTE/fix_latte.h | 63 +++++++ src/Makefile | 6 +- 8 files changed, 487 insertions(+), 3 deletions(-) create mode 100644 lib/latte/Makefile.lammps.gfortran create mode 100644 lib/latte/Makefile.lammps.ifort create mode 100644 lib/latte/README create mode 100644 src/LATTE/Install.sh create mode 100644 src/LATTE/README create mode 100644 src/LATTE/fix_latte.cpp create mode 100644 src/LATTE/fix_latte.h diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran new file mode 100644 index 0000000000..0ad5b1ad01 --- /dev/null +++ b/lib/latte/Makefile.lammps.gfortran @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package is installed + +latte_SYSINC = +latte_SYSLIB = -lgfortran +latte_SYSPATH = diff --git a/lib/latte/Makefile.lammps.ifort b/lib/latte/Makefile.lammps.ifort new file mode 100644 index 0000000000..22b976ddc6 --- /dev/null +++ b/lib/latte/Makefile.lammps.ifort @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package library is used + +latte_SYSINC = +latte_SYSLIB = -lifcore -lsvml -lompstub -limf +latte_SYSPATH = -L/opt/intel/fce/10.0.023/lib diff --git a/lib/latte/README b/lib/latte/README new file mode 100644 index 0000000000..423f47ac52 --- /dev/null +++ b/lib/latte/README @@ -0,0 +1,33 @@ +This directory contains build settings for the LATTE library which +is required to use the LATTE package and its fix latte command in a +LAMMPS input script. + +Information about the LATTE DFTB code can be found at ... The LATTE +developement effort is led by Anders Niklasson, etc at LANLS. + +To download, build, and install LATTE as a library on your system, +follow these steps. We are working on scripts that will automate this +process. + +Go to this web site: https://??? and download a current tarball. The +tarball you download is "latte-??.tgz", which can be unpacked in this +directory or wherever you wish: + +tar xvfz latte*tgz + +Note that if you unpack and build LATTE in this directory, when you +download a new LAMMPS tarball, the files you have added here will be +lost. So you likely want to build it somewhere else. + +Build instructions for LATTE library ... + +When you have successully built the LATTE library, you can build +LAMMPS with the LATTE package installed: + +$ cd lammps/src +$ make yes-latte +$ make g++ (or whatever target you wish) + +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. diff --git a/src/LATTE/Install.sh b/src/LATTE/Install.sh new file mode 100644 index 0000000000..2fb34096c8 --- /dev/null +++ b/src/LATTE/Install.sh @@ -0,0 +1,67 @@ +# Install/unInstall package files in LAMMPS +# mode = 0/1/2 for uninstall/install/update + +mode=$1 + +# enforce using portable C locale +LC_ALL=C +export LC_ALL + +# arg1 = file, arg2 = file it depends on + +action () { + if (test $mode = 0) then + rm -f ../$1 + elif (! cmp -s $1 ../$1) then + if (test -z "$2" || test -e ../$2) then + cp $1 .. + if (test $mode = 2) then + echo " updating src/$1" + fi + fi + elif (test -n "$2") then + if (test ! -e ../$2) then + rm -f ../$1 + fi + fi +} + +# all package files with no dependencies + +for file in *.cpp *.h; do + action $file +done + +# edit 2 Makefile.package files to include/exclude package info + +if (test $1 = 1) then + + if (test -e ../Makefile.package) then + 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_PATH =[ \t]*|&-L../../lib/latte |' ../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_SYSLIB =[ \t]*|&$(latte_SYSLIB) |' ../Makefile.package + sed -i -e 's|^PKG_SYSPATH =[ \t]*|&$(latte_SYSPATH) |' ../Makefile.package + fi + + if (test -e ../Makefile.package.settings) then + sed -i -e '/^include.*latte.*$/d' ../Makefile.package.settings + # multiline form needed for BSD sed on Macs + sed -i -e '4 i \ +include ..\/..\/lib\/latte\/Makefile.lammps +' ../Makefile.package.settings + fi + +elif (test $1 = 0) then + + if (test -e ../Makefile.package) then + sed -i -e 's/[^ \t]*latte[^ \t]* //' ../Makefile.package + fi + + if (test -e ../Makefile.package.settings) then + sed -i -e '/^include.*latte.*$/d' ../Makefile.package.settings + fi + +fi diff --git a/src/LATTE/README b/src/LATTE/README new file mode 100644 index 0000000000..e82480c865 --- /dev/null +++ b/src/LATTE/README @@ -0,0 +1,28 @@ +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 +using density-functional tight-binding quantum forces calculated by +LATTE. More information on LATTE can be found at "web site". Its +authors are Anders Niklasson, etc at LANL. + +Using this package requires the LATTE code to be downloaded and built +as a library on your system. The library can be downloaded and built +in lib/latte or elsewhere on your system, which must be done before +building LAMMPS with this package. Details of the download, build, and +install process for LATTE are given in the lib/latte/README file, and +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 +LATTE library you can test it using an input file from the examples +dir: + +./lmp_serial < lammps/examples/latte/in.latte + +This pair style was written in collaboration with the LATTE +developers. diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp new file mode 100644 index 0000000000..1ff45a869e --- /dev/null +++ b/src/LATTE/fix_latte.cpp @@ -0,0 +1,283 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +#include +#include +#include "fix_latte.h" +#include "atom.h" +#include "force.h" +#include "update.h" +#include "neighbor.h" +#include "neigh_request.h" +#include "neigh_list.h" +#include "modify.h" +#include "compute.h" +#include "comm.h" +#include "error.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +#define INVOKED_PERATOM 8 + +/* ---------------------------------------------------------------------- */ + +FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + if (narg != 4) error->all(FLERR,"Illegal fix latte command"); + + // store pe/atom ID used for input of Coulomb potential to LATTE + // insure it is valid for these computations + + int n = strlen(arg[3]) + 1; + id_pe = new char[n]; + strcpy(id_pe,arg[3]); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + if (modify->compute[ipe]->peatomflag == 0) + error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); + + // initialize LATTE with LAMMPS info about box, atoms, atom types, etc ? + // may need to be done in init() ?? + + // any per-atom quantities to allocate/initialize for LAMMPS? + // i.e. quantities carried with atoms across timesteps ?? +} + +/* ---------------------------------------------------------------------- */ + +FixLatte::~FixLatte() +{ + delete [] id_pe; +} + +/* ---------------------------------------------------------------------- */ + +int FixLatte::setmask() +{ + int mask = 0; + mask |= INITIAL_INTEGRATE; + mask |= FINAL_INTEGRATE; + mask |= POST_FORCE; + mask |= MIN_POST_FORCE; + mask |= THERMO_ENERGY; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::init() +{ + // error checks + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + c_pe = modify->compute[ipe]; + + // warn if any integrate fix comes after this one + // is it actually necessary for q(n) update to come after x,v update ?? + + int after = 0; + int flag = 0; + for (int i = 0; i < modify->nfix; i++) { + if (strcmp(id,modify->fix[i]->id) == 0) after = 1; + else if ((modify->fmask[i] & INITIAL_INTEGRATE) && after) flag = 1; + } + if (flag && comm->me == 0) + error->warning(FLERR,"Fix latte should come after all other " + "integration fixes"); + + // need a full neighbor list + // perpetual list, built whenever re-neighboring occurs + + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->pair = 0; + neighbor->requests[irequest]->fix = 1; + neighbor->requests[irequest]->half = 0; + neighbor->requests[irequest]->full = 1; + + // integrator timesteps + + dtv = update->dt; + dtf = 0.5 * update->dt * force->ftm2v; + + // any more LATTE initialization to do ? +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::init_list(int id, NeighList *ptr) +{ + list = ptr; +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::min_setup(int vflag) +{ + // for minimize, what about charge DOFs ?? + + post_force(vflag); +} + +/* ---------------------------------------------------------------------- + integrate electronic degrees of freedom +------------------------------------------------------------------------- */ + +void FixLatte::initial_integrate(int vflag) +{ + // what do I do here for q(n) update? + // is it the same variable as LAMMPS q, I think so + // is it an Euler update or VV update ?? + + /* + double dtfm; + + // update v and x of atoms in group + + double **x = atom->x; + double **v = atom->v; + double **f = atom->f; + double *mass = atom->mass; + int *type = atom->type; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + dtfm = dtf / mass[type[i]]; + v[i][0] += dtfm * f[i][0]; + v[i][1] += dtfm * f[i][1]; + v[i][2] += dtfm * f[i][2]; + x[i][0] += dtv * v[i][0]; + x[i][1] += dtv * v[i][1]; + x[i][2] += dtv * v[i][2]; + } + */ +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::post_force(int vflag) +{ + // what should cutoffs be for passing neighlist info to LATTE ?? + // do cutoffs include many self image atoms for tiny periodic system ?? + + int i,j,ii,jj,inum,jnum; + int *ilist,*jlist,*numneigh,**firstneigh; + + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + // enforce a different cutoff than pair style? + // what are optimal cutoffs for pair/Kspace for tiny system? + // operations on I/J pairs if necessary + } + } + + // invoke compute pe/atom + // wrap with clear/add and trigger pe/atom calculation every step + // Coulomb potential should just be pe[i]/q[i] ?? + + modify->clearstep_compute(); + + if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { + c_pe->compute_peratom(); + c_pe->invoked_flag |= INVOKED_PERATOM; + } + + double *pe = c_pe->vector_atom; + + modify->addstep_compute(update->ntimestep+1); + + // construct H0,S,Z + // setup full Hamiltonian H(R,n) + // calculate density matrix D and charge q(n) + // calculate DFTB forces via LATTE = F(R,H0,S,Z,D,q,n) + // how to pass neighbor list and Coulomb potential to LATTE ?? + + // HERE is where main call to LATTE goes to get forces + + // simply add the returned forces to atom->f + // how to request/get global or per-atom energy back from LATTE ?? + // how to request/get global or per-atom virial back from LATTE ?? +} + +/* ---------------------------------------------------------------------- + integrate electronic degrees of freedom +------------------------------------------------------------------------- */ + +void FixLatte::final_integrate() +{ + // possibly nothing to do here if Euler step of q(n) ?? + + /* + double dtfm; + + // update v of atoms in group + + double **v = atom->v; + double **f = atom->f; + double *mass = atom->mass; + int *type = atom->type; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + dtfm = dtf / mass[type[i]]; + v[i][0] += dtfm * f[i][0]; + v[i][1] += dtfm * f[i][1]; + v[i][2] += dtfm * f[i][2]; + } + */ +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::reset_dt() +{ + // will we ever auto-adjust the timestep ?? + + dtv = update->dt; + dtf = 0.5 * update->dt * force->ftm2v; +} + +/* ---------------------------------------------------------------------- */ + +double FixLatte::compute_scalar() +{ + // return DFTB global energy + return 0.0; +} + diff --git a/src/LATTE/fix_latte.h b/src/LATTE/fix_latte.h new file mode 100644 index 0000000000..ebd738315d --- /dev/null +++ b/src/LATTE/fix_latte.h @@ -0,0 +1,63 @@ +/* -*- 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 FIX_CLASS + +FixStyle(latte,FixLatte) + +#else + +#ifndef LMP_FIX_LATTE_H +#define LMP_FIX_LATTE_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixLatte : public Fix { + public: + FixLatte(class LAMMPS *, int, char **); + virtual ~FixLatte(); + int setmask(); + void init(); + void init_list(int, class NeighList *); + void setup(int); + void min_setup(int); + void initial_integrate(int); + void post_force(int); + void final_integrate(); + void reset_dt(); + double compute_scalar(); + + protected: + double dtv,dtf; + char *id_pe; + + class NeighList *list; + class Compute *c_pe; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +*/ diff --git a/src/Makefile b/src/Makefile index a5d0a326a4..9b64c395e9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -44,8 +44,8 @@ endif # Package variables PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ - granular kim \ - kokkos kspace manybody mc meam misc molecule mpiio opt peri poems \ + granular kim kokkos kspace latte manybody mc meam misc \ + molecule mpiio opt peri poems \ python qeq reax replica rigid shock snap srd voronoi PACKUSER = user-atc user-awpmd user-cg-cmm user-colvars \ @@ -55,7 +55,7 @@ PACKUSER = user-atc user-awpmd user-cg-cmm user-colvars \ user-quip user-reaxc user-smd user-smtbq user-sph user-tally \ user-vtk -PACKLIB = compress gpu kim kokkos meam mpiio poems python reax voronoi \ +PACKLIB = compress gpu kim kokkos latte meam mpiio poems python reax voronoi \ user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \ user-nc-dump user-qmmm user-quip user-smd user-vtk From e59552c2ecba489eb1c0a074208d61fb65416098 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Mon, 14 Nov 2016 07:58:47 -0700 Subject: [PATCH 14/53] changes for lattelib --- lib/latte/Makefile.lammps.gfortran | 23 ++++++++++++++++++++--- src/LATTE/fix_latte.cpp | 17 ++++++++++++++--- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 0ad5b1ad01..76913c6e5b 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -1,5 +1,22 @@ # 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/qmmd/bml +# PROGRESS: https://github.com/losalamos/qmd-progress +# METIS: + +latte_PATH = ${HOME}/exaalt/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}/liblatte/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 + +# 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_SYSINC = -latte_SYSLIB = -lgfortran -latte_SYSPATH = diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 1ff45a869e..d15ee59872 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -28,6 +28,10 @@ using namespace LAMMPS_NS; using namespace FixConst; + extern "C" { + void latte(int*, double*, int*, double*); + } + #define INVOKED_PERATOM 8 /* ---------------------------------------------------------------------- */ @@ -35,7 +39,7 @@ using namespace FixConst; FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { - if (narg != 4) error->all(FLERR,"Illegal fix latte command"); + if (narg != 5) error->all(FLERR,"Illegal fix latte command"); // store pe/atom ID used for input of Coulomb potential to LATTE // insure it is valid for these computations @@ -49,6 +53,8 @@ FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : if (modify->compute[ipe]->peatomflag == 0) error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); +// latte(arg[4]); + // initialize LATTE with LAMMPS info about box, atoms, atom types, etc ? // may need to be done in init() ?? @@ -183,7 +189,7 @@ void FixLatte::post_force(int vflag) // what should cutoffs be for passing neighlist info to LATTE ?? // do cutoffs include many self image atoms for tiny periodic system ?? - int i,j,ii,jj,inum,jnum; +/* int i,j,ii,jj,inum,jnum; int *ilist,*jlist,*numneigh,**firstneigh; inum = list->inum; @@ -218,7 +224,11 @@ void FixLatte::post_force(int vflag) double *pe = c_pe->vector_atom; modify->addstep_compute(update->ntimestep+1); - +*/ + int natoms = (int) atom->natoms; + latte(&natoms,&atom->x[0][0],atom->type,&atom->f[0][0]); +// latte(&natoms,&atom->x[0][0],atom->type); + // construct H0,S,Z // setup full Hamiltonian H(R,n) // calculate density matrix D and charge q(n) @@ -281,3 +291,4 @@ double FixLatte::compute_scalar() return 0.0; } + From ef8d50733883c8f8c8d2014f016a2f2dbc7abc55 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Mon, 14 Nov 2016 16:11:12 -0700 Subject: [PATCH 15/53] changes in latte makefile for lattelib and README --- lib/latte/Makefile.lammps.gfortran | 4 +-- lib/latte/README | 44 ++++++++++++++++++------------ 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 76913c6e5b..37003db31d 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -4,7 +4,7 @@ # For more information about these libraries see: # BML: https://github.com/qmmd/bml # PROGRESS: https://github.com/losalamos/qmd-progress -# METIS: +# METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download latte_PATH = ${HOME}/exaalt/LATTE progress_PATH = ${HOME}/qmd-progress @@ -12,7 +12,7 @@ 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}/liblatte/latte_c_bind.o ${latte_PATH}/liblatte.a -lgfortran \ +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 diff --git a/lib/latte/README b/lib/latte/README index 423f47ac52..3acd85095a 100644 --- a/lib/latte/README +++ b/lib/latte/README @@ -2,31 +2,41 @@ This directory contains build settings for the LATTE library which is required to use the LATTE package and its fix latte command in a LAMMPS input script. -Information about the LATTE DFTB code can be found at ... The LATTE -developement effort is led by Anders Niklasson, etc at LANLS. +Information about the LATTE DFTB code can be found at: +https://github.com/losalamos/LATTE + +The LATTE development effort is led by Marc Cawkwell and +Anders Niklasson at Los Alamos National Laboratory. To download, build, and install LATTE as a library on your system, -follow these steps. We are working on scripts that will automate this -process. +follow these steps: + +- Download or clone the LATTE source code from: + https://github.com/losalamos/LATTE. -Go to this web site: https://??? and download a current tarball. The -tarball you download is "latte-??.tgz", which can be unpacked in this -directory or wherever you wish: +- 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. -tar xvfz latte*tgz - -Note that if you unpack and build LATTE in this directory, when you +Note that if you unpack and build LATTE in this directory, if you download a new LAMMPS tarball, the files you have added here will be -lost. So you likely want to build it somewhere else. +lost. So you likely want to build it somewhere else. The recommended +place is the home directory. -Build instructions for LATTE library ... +To build LAMMPS with the LATTE library you should follow the following +instructions: -When you have successully built the LATTE library, you can build -LAMMPS with the LATTE package installed: +- makefile.lammps.* to makefile.lammps in the /lammps/lib/latte directory. -$ cd lammps/src -$ make yes-latte -$ make g++ (or whatever target you wish) +- Change the path, flags and compilers on the makefile.lammps according + to your compilers, architecture and the LATTE location. + +- Finally, you should execute the following commands: + $ cd lammps/src + $ make yes-latte + $ make g++ (or whatever target you wish) Note that the Makefile.lammps file in this directory is required to allow the LAMMPS build to find the necessary LATTE files. You should From f209c8c129fee44f494a9e91042b245964e66865 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Mon, 28 Nov 2016 15:29:37 -0700 Subject: [PATCH 16/53] changes in fix_latte --- lib/latte/Makefile.lammps.ifort | 25 +++++++++++++++++++++---- src/LATTE/fix_latte.cpp | 17 ++++++++++++++--- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/lib/latte/Makefile.lammps.ifort b/lib/latte/Makefile.lammps.ifort index 22b976ddc6..40637013f5 100644 --- a/lib/latte/Makefile.lammps.ifort +++ b/lib/latte/Makefile.lammps.ifort @@ -1,5 +1,22 @@ -# Settings that the LAMMPS build will import when this package library is used +# 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/qmmd/bml +# PROGRESS: https://github.com/losalamos/qmd-progress +# METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download -latte_SYSINC = -latte_SYSLIB = -lifcore -lsvml -lompstub -limf -latte_SYSPATH = -L/opt/intel/fce/10.0.023/lib +latte_PATH = ${HOME}/exaalt/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 = -openmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a \ + -lifcore -lsvml -lompstub -limf -L${MKLROOT}/lib/intel64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 \ + -lmkl_intel_thread -lmkl_core -lmkl_intel_thread -lpthread -openmp -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 + + +latte_SYSPATH = -L/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64 diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index d15ee59872..60c9d5f4c2 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -18,6 +18,7 @@ #include "force.h" #include "update.h" #include "neighbor.h" +#include "domain.h" #include "neigh_request.h" #include "neigh_list.h" #include "modify.h" @@ -29,9 +30,9 @@ using namespace LAMMPS_NS; using namespace FixConst; extern "C" { - void latte(int*, double*, int*, double*); + void latte(int*, double*, int*, int*, double*, double*, double*, double*); } - + #define INVOKED_PERATOM 8 /* ---------------------------------------------------------------------- */ @@ -226,7 +227,17 @@ void FixLatte::post_force(int vflag) modify->addstep_compute(update->ntimestep+1); */ int natoms = (int) atom->natoms; - latte(&natoms,&atom->x[0][0],atom->type,&atom->f[0][0]); +// int* n1types -> (int) atom->ntypes; +// domain->boxlo; +// domain->boxhi; +// domain->boylo; +// domain->boyhi; +// domain->bozlo; +// domain->bozhi; +// double* lo = &domain->boxlo; + + latte(&natoms,&atom->x[0][0],atom->type,&atom->ntypes,&atom->mass[1], \ + &domain->boxlo[0],&domain->boxhi[0], &atom->f[0][0]); // latte(&natoms,&atom->x[0][0],atom->type); // construct H0,S,Z From 07d9f9d66e19ca17a824e309f123272a26f9d3ad Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 1 Dec 2016 14:50:11 -0700 Subject: [PATCH 17/53] updated version of fix latte from SJP --- src/LATTE/fix_latte.cpp | 330 ++++++++++++++++++++++------------------ src/LATTE/fix_latte.h | 10 +- 2 files changed, 187 insertions(+), 153 deletions(-) diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 60c9d5f4c2..c6269f4c21 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -11,27 +11,42 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +// NOTES on possible future issues: +// LATTE compute and return 6-value virial tensor +// 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 + #include #include #include "fix_latte.h" #include "atom.h" -#include "force.h" +#include "comm.h" #include "update.h" #include "neighbor.h" #include "domain.h" +#include "force.h" #include "neigh_request.h" #include "neigh_list.h" #include "modify.h" #include "compute.h" -#include "comm.h" +#include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace FixConst; - extern "C" { - void latte(int*, double*, int*, int*, double*, double*, double*, double*); - } +extern "C" { + void latte(int *, int *, double *, int *, int *, + double *, double *, double *, double *, double *); +} #define INVOKED_PERATOM 8 @@ -40,27 +55,42 @@ using namespace FixConst; FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { - if (narg != 5) error->all(FLERR,"Illegal fix latte command"); + if (narg != 4) error->all(FLERR,"Illegal fix latte command"); - // store pe/atom ID used for input of Coulomb potential to LATTE - // insure it is valid for these computations + if (comm->nprocs != 1) + error->all(FLERR,"Fix latte currently runs only in serial"); - int n = strlen(arg[3]) + 1; - id_pe = new char[n]; - strcpy(id_pe,arg[3]); + scalar_flag = 1; + global_freq = 1; + extscalar = 1; + virial_flag = 1; - int ipe = modify->find_compute(id_pe); - if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); - if (modify->compute[ipe]->peatomflag == 0) - error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); + // store ID of compute pe/atom used to generate Coulomb potential for LATTE + // NULL means LATTE will compute Coulombic potential -// latte(arg[4]); + coulomb = 0; + id_pe = NULL; - // initialize LATTE with LAMMPS info about box, atoms, atom types, etc ? - // may need to be done in init() ?? + if (strcmp(arg[3],"NULL") != 0) { + coulomb = 1; - // any per-atom quantities to allocate/initialize for LAMMPS? - // i.e. quantities carried with atoms across timesteps ?? + int n = strlen(arg[3]) + 1; + id_pe = new char[n]; + strcpy(id_pe,arg[3]); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + if (modify->compute[ipe]->peatomflag == 0) + error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); + } + + // initializations + + nmax = 0; + qpotential = NULL; + flatte = NULL; + + latte_energy = 0.0; } /* ---------------------------------------------------------------------- */ @@ -68,6 +98,8 @@ FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : FixLatte::~FixLatte() { delete [] id_pe; + memory->destroy(qpotential); + memory->destroy(flatte); } /* ---------------------------------------------------------------------- */ @@ -75,8 +107,9 @@ FixLatte::~FixLatte() int FixLatte::setmask() { int mask = 0; - mask |= INITIAL_INTEGRATE; - mask |= FINAL_INTEGRATE; + //mask |= INITIAL_INTEGRATE; + //mask |= FINAL_INTEGRATE; + mask |= PRE_REVERSE; mask |= POST_FORCE; mask |= MIN_POST_FORCE; mask |= THERMO_ENERGY; @@ -89,10 +122,34 @@ void FixLatte::init() { // error checks - int ipe = modify->find_compute(id_pe); - if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); - c_pe = modify->compute[ipe]; + if (domain->dimension == 2) + error->all(FLERR,"Fix latte requires 3d problem"); + if (coulomb) { + if (atom->q_flag == 0 || force->pair == NULL || force->kspace == NULL) + error->all(FLERR,"Fix latte cannot compute Coulombic potential"); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + c_pe = modify->compute[ipe]; + } + + // must be fully periodic or fully non-periodic + + if (domain->nonperiodic == 0) pbcflag = 1; + else if (!domain->xperiodic && !domain->yperiodic && !domain->zperiodic) + pbcflag = 0; + else error->all(FLERR,"Fix latte requires 3d simulation"); + + // create qpotential & flatte if needed + // for now, assume nlocal will never change + + if (coulomb && qpotential == NULL) { + memory->create(qpotential,atom->nlocal,"latte:qpotential"); + memory->create(flatte,atom->nlocal,3,"latte:flatte"); + } + + /* // warn if any integrate fix comes after this one // is it actually necessary for q(n) update to come after x,v update ?? @@ -105,8 +162,11 @@ void FixLatte::init() if (flag && comm->me == 0) error->warning(FLERR,"Fix latte should come after all other " "integration fixes"); + */ + /* // need a full neighbor list + // could we use a half list? // perpetual list, built whenever re-neighboring occurs int irequest = neighbor->request(this,instance_me); @@ -114,20 +174,14 @@ void FixLatte::init() neighbor->requests[irequest]->fix = 1; neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; - - // integrator timesteps - - dtv = update->dt; - dtf = 0.5 * update->dt * force->ftm2v; - - // any more LATTE initialization to do ? + */ } /* ---------------------------------------------------------------------- */ void FixLatte::init_list(int id, NeighList *ptr) { - list = ptr; + // list = ptr; } /* ---------------------------------------------------------------------- */ @@ -141,8 +195,6 @@ void FixLatte::setup(int vflag) void FixLatte::min_setup(int vflag) { - // for minimize, what about charge DOFs ?? - post_force(vflag); } @@ -150,156 +202,130 @@ void FixLatte::min_setup(int vflag) integrate electronic degrees of freedom ------------------------------------------------------------------------- */ -void FixLatte::initial_integrate(int vflag) +void FixLatte::initial_integrate(int vflag) {} + +/* ---------------------------------------------------------------------- + store eflag, so can use it in post_force to tally per-atom energies +------------------------------------------------------------------------- */ + +void FixLatte::pre_reverse(int eflag, int vflag) { - // what do I do here for q(n) update? - // is it the same variable as LAMMPS q, I think so - // is it an Euler update or VV update ?? - - /* - double dtfm; - - // update v and x of atoms in group - - double **x = atom->x; - double **v = atom->v; - double **f = atom->f; - double *mass = atom->mass; - int *type = atom->type; - int *mask = atom->mask; - int nlocal = atom->nlocal; - if (igroup == atom->firstgroup) nlocal = atom->nfirst; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - dtfm = dtf / mass[type[i]]; - v[i][0] += dtfm * f[i][0]; - v[i][1] += dtfm * f[i][1]; - v[i][2] += dtfm * f[i][2]; - x[i][0] += dtv * v[i][0]; - x[i][1] += dtv * v[i][1]; - x[i][2] += dtv * v[i][2]; - } - */ + eflag_caller = eflag; } /* ---------------------------------------------------------------------- */ void FixLatte::post_force(int vflag) { - // what should cutoffs be for passing neighlist info to LATTE ?? - // do cutoffs include many self image atoms for tiny periodic system ?? - -/* int i,j,ii,jj,inum,jnum; - int *ilist,*jlist,*numneigh,**firstneigh; - - inum = list->inum; - ilist = list->ilist; - numneigh = list->numneigh; - firstneigh = list->firstneigh; - - for (ii = 0; ii < inum; ii++) { - i = ilist[ii]; - jlist = firstneigh[i]; - jnum = numneigh[i]; - for (jj = 0; jj < jnum; jj++) { - j = jlist[jj]; - j &= NEIGHMASK; - // enforce a different cutoff than pair style? - // what are optimal cutoffs for pair/Kspace for tiny system? - // operations on I/J pairs if necessary - } - } + int eflag = eflag_caller; + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = 0; + // compute Coulombic potential = pe[i]/q[i] // invoke compute pe/atom // wrap with clear/add and trigger pe/atom calculation every step - // Coulomb potential should just be pe[i]/q[i] ?? - modify->clearstep_compute(); + if (coulomb) { + modify->clearstep_compute(); - if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { - c_pe->compute_peratom(); - c_pe->invoked_flag |= INVOKED_PERATOM; + if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { + c_pe->compute_peratom(); + c_pe->invoked_flag |= INVOKED_PERATOM; + } + + modify->addstep_compute(update->ntimestep+1); + + double *pe = c_pe->vector_atom; + double *q = atom->q; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + if (q[i]) qpotential[i] = pe[i]/q[i]; + else qpotential[i] = 0.0; } - double *pe = c_pe->vector_atom; + // hardwire these unsupported flags for now - modify->addstep_compute(update->ntimestep+1); -*/ - int natoms = (int) atom->natoms; -// int* n1types -> (int) atom->ntypes; -// domain->boxlo; -// domain->boxhi; -// domain->boylo; -// domain->boyhi; -// domain->bozlo; -// domain->bozhi; -// double* lo = &domain->boxlo; - - latte(&natoms,&atom->x[0][0],atom->type,&atom->ntypes,&atom->mass[1], \ - &domain->boxlo[0],&domain->boxhi[0], &atom->f[0][0]); -// latte(&natoms,&atom->x[0][0],atom->type); - - // construct H0,S,Z - // setup full Hamiltonian H(R,n) - // calculate density matrix D and charge q(n) - // calculate DFTB forces via LATTE = F(R,H0,S,Z,D,q,n) - // how to pass neighbor list and Coulomb potential to LATTE ?? + int coulombflag = 0; + pe_peratom = 0; + virial_global = 0; // set via vflag_global at some point + virial_peratom = 0; + neighflag = 0; - // HERE is where main call to LATTE goes to get forces + // set flags used by LATTE - // simply add the returned forces to atom->f - // how to request/get global or per-atom energy back from LATTE ?? - // how to request/get global or per-atom virial back from LATTE ?? + int flags[6]; + + flags[0] = pbcflag; // 1 for fully periodic, 0 for fully non-periodic + flags[1] = coulombflag; // 1 for LAMMPS computes Coulombics, 0 for LATTE + flags[2] = pe_peratom; // 1 to return per-atom energies, 0 for no + flags[3] = virial_global; // 1 to return global virial 0 for no + flags[4] = virial_peratom; // 1 to return per-atom virial, 0 for no + flags[5] = neighflag; // 1 to pass neighbor list to LATTE, 0 for no + + // setup LATTE arguments + + int natoms = atom->nlocal; + double *coords = &atom->x[0][0]; + int *type = atom->type; + int ntypes = atom->ntypes; + double *mass = &atom->mass[1]; + double *boxlo = domain->boxlo; + double *boxhi = domain->boxhi; + + double *forces; + if (coulomb) forces = &flatte[0][0]; + else forces = &atom->f[0][0]; + + // invoke LATTE + + latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, + forces,&latte_energy); + + // sum LATTE forces to LAMMPS (Coulombic) forces + + if (coulomb) { + double **f = atom->f; + int nlocal = atom->nlocal; + for (int i = 0; i < nlocal; i++) { + f[i][0] += flatte[i][0]; + f[i][1] += flatte[i][1]; + f[i][2] += flatte[i][2]; + } + } } /* ---------------------------------------------------------------------- integrate electronic degrees of freedom ------------------------------------------------------------------------- */ -void FixLatte::final_integrate() -{ - // possibly nothing to do here if Euler step of q(n) ?? - - /* - double dtfm; - - // update v of atoms in group - - double **v = atom->v; - double **f = atom->f; - double *mass = atom->mass; - int *type = atom->type; - int *mask = atom->mask; - int nlocal = atom->nlocal; - if (igroup == atom->firstgroup) nlocal = atom->nfirst; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - dtfm = dtf / mass[type[i]]; - v[i][0] += dtfm * f[i][0]; - v[i][1] += dtfm * f[i][1]; - v[i][2] += dtfm * f[i][2]; - } - */ -} +void FixLatte::final_integrate() {} /* ---------------------------------------------------------------------- */ void FixLatte::reset_dt() { - // will we ever auto-adjust the timestep ?? - - dtv = update->dt; - dtf = 0.5 * update->dt * force->ftm2v; + //dtv = update->dt; + //dtf = 0.5 * update->dt * force->ftm2v; } -/* ---------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- + DFTB energy from LATTE +------------------------------------------------------------------------- */ double FixLatte::compute_scalar() { - // return DFTB global energy - return 0.0; + return latte_energy; } +/* ---------------------------------------------------------------------- + memory usage of local arrays +------------------------------------------------------------------------- */ +double FixLatte::memory_usage() +{ + double bytes = 0.0; + if (coulomb) bytes += nmax * sizeof(double); + if (coulomb) bytes += nmax*3 * sizeof(double); + return bytes; +} diff --git a/src/LATTE/fix_latte.h b/src/LATTE/fix_latte.h index ebd738315d..d0f2fdea3e 100644 --- a/src/LATTE/fix_latte.h +++ b/src/LATTE/fix_latte.h @@ -34,14 +34,22 @@ class FixLatte : public Fix { void setup(int); void min_setup(int); void initial_integrate(int); + void pre_reverse(int, int); void post_force(int); void final_integrate(); void reset_dt(); double compute_scalar(); + double memory_usage(); protected: - double dtv,dtf; char *id_pe; + int coulomb,pbcflag,pe_peratom,virial_global,virial_peratom,neighflag; + int eflag_caller; + + int nmax; + double *qpotential; + double **flatte; + double latte_energy; class NeighList *list; class Compute *c_pe; From ee4d1b340b7c45ec8de2e819379b04ca03dab01f Mon Sep 17 00:00:00 2001 From: Richard Zamora Date: Thu, 1 Dec 2016 15:14:47 -0700 Subject: [PATCH 18/53] test push --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000000..b089100527 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +The creation of this file is for testing purposes only. From a58f7631c09609bb4ab51dd1bfdabccb98c4b353 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Thu, 15 Dec 2016 10:57:02 -0700 Subject: [PATCH 19/53] fix_latte unpdated --- src/LATTE/fix_latte.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index c6269f4c21..19a1e78603 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -45,7 +45,7 @@ using namespace FixConst; extern "C" { void latte(int *, int *, double *, int *, int *, - double *, double *, double *, double *, double *); + double *, double *, double *, double *, int*, double *, double *, double *); } #define INVOKED_PERATOM 8 @@ -278,9 +278,11 @@ void FixLatte::post_force(int vflag) else forces = &atom->f[0][0]; // invoke LATTE + + int maxiter = -1; latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, - forces,&latte_energy); + forces,&maxiter, &latte_energy, &atom->v[0][0],&update->dt); // sum LATTE forces to LAMMPS (Coulombic) forces From 967cdd947ef93ef6c5d63432fa865ee96e10f20d Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Thu, 5 Jan 2017 15:37:01 -0700 Subject: [PATCH 20/53] cleanup --- lib/latte/Makefile.lammps.gfortran | 5 +- src/fix_latte.cpp | 338 +++++++++++++++++++++++++++++ 2 files changed, 342 insertions(+), 1 deletion(-) create mode 100644 src/fix_latte.cpp diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 37003db31d..876cfd5772 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -6,7 +6,7 @@ # PROGRESS: https://github.com/losalamos/qmd-progress # METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download -latte_PATH = ${HOME}/exaalt/LATTE +latte_PATH = ${HOME}/exaalt/LATTE_dev progress_PATH = ${HOME}/qmd-progress bml_PATH = ${HOME}/bml metis_PATH = ${HOME}/Programs/metis-5.1.0 @@ -16,6 +16,9 @@ latte_SYSLIB = -fopenmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte -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 latte_SYSLIB += -L${progress_PATH}/install/lib -lprogress -L${bml_PATH}/install/lib -lbml -L${metis_PATH}/install -lmetis diff --git a/src/fix_latte.cpp b/src/fix_latte.cpp new file mode 100644 index 0000000000..d7bf6eaccf --- /dev/null +++ b/src/fix_latte.cpp @@ -0,0 +1,338 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +// NOTES on possible future issues: +// LATTE compute and return 6-value virial tensor +// 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 + +#include +#include +#include "fix_latte.h" +#include "atom.h" +#include "comm.h" +#include "update.h" +#include "neighbor.h" +#include "domain.h" +#include "force.h" +#include "neigh_request.h" +#include "neigh_list.h" +#include "modify.h" +#include "compute.h" +#include "memory.h" +#include "error.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +extern "C" { + void latte(int *, int *, double *, int *, int *, + double *, double *, double *, double *, int*, double *, double *, double*); +} + +#define INVOKED_PERATOM 8 + +/* ---------------------------------------------------------------------- */ + +FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + if (narg != 4) error->all(FLERR,"Illegal fix latte command"); + + if (comm->nprocs != 1) + error->all(FLERR,"Fix latte currently runs only in serial"); + + scalar_flag = 1; + global_freq = 1; + extscalar = 1; + virial_flag = 1; + + // store ID of compute pe/atom used to generate Coulomb potential for LATTE + // NULL means LATTE will compute Coulombic potential + + coulomb = 0; + id_pe = NULL; + + if (strcmp(arg[3],"NULL") != 0) { + coulomb = 1; + + int n = strlen(arg[3]) + 1; + id_pe = new char[n]; + strcpy(id_pe,arg[3]); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + if (modify->compute[ipe]->peatomflag == 0) + error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); + } + + // initializations + + nmax = 0; + qpotential = NULL; + flatte = NULL; + + latte_energy = 0.0; +} + +/* ---------------------------------------------------------------------- */ + +FixLatte::~FixLatte() +{ + delete [] id_pe; + memory->destroy(qpotential); + memory->destroy(flatte); +} + +/* ---------------------------------------------------------------------- */ + +int FixLatte::setmask() +{ + int mask = 0; + //mask |= INITIAL_INTEGRATE; + //mask |= FINAL_INTEGRATE; + mask |= PRE_REVERSE; + mask |= POST_FORCE; + mask |= MIN_POST_FORCE; + mask |= THERMO_ENERGY; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::init() +{ + // error checks + + if (domain->dimension == 2) + error->all(FLERR,"Fix latte requires 3d problem"); + + if (coulomb) { + if (atom->q_flag == 0 || force->pair == NULL || force->kspace == NULL) + error->all(FLERR,"Fix latte cannot compute Coulombic potential"); + + int ipe = modify->find_compute(id_pe); + if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); + c_pe = modify->compute[ipe]; + } + + // must be fully periodic or fully non-periodic + + if (domain->nonperiodic == 0) pbcflag = 1; + else if (!domain->xperiodic && !domain->yperiodic && !domain->zperiodic) + pbcflag = 0; + else error->all(FLERR,"Fix latte requires 3d simulation"); + + // create qpotential & flatte if needed + // for now, assume nlocal will never change + + if (coulomb && qpotential == NULL) { + memory->create(qpotential,atom->nlocal,"latte:qpotential"); + memory->create(flatte,atom->nlocal,3,"latte:flatte"); + } + + /* + // warn if any integrate fix comes after this one + // is it actually necessary for q(n) update to come after x,v update ?? + + int after = 0; + int flag = 0; + for (int i = 0; i < modify->nfix; i++) { + if (strcmp(id,modify->fix[i]->id) == 0) after = 1; + else if ((modify->fmask[i] & INITIAL_INTEGRATE) && after) flag = 1; + } + if (flag && comm->me == 0) + error->warning(FLERR,"Fix latte should come after all other " + "integration fixes"); + */ + + /* + // need a full neighbor list + // could we use a half list? + // perpetual list, built whenever re-neighboring occurs + + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->pair = 0; + neighbor->requests[irequest]->fix = 1; + neighbor->requests[irequest]->half = 0; + neighbor->requests[irequest]->full = 1; + */ +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::init_list(int id, NeighList *ptr) +{ + // list = ptr; +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::min_setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- + integrate electronic degrees of freedom +------------------------------------------------------------------------- */ + +void FixLatte::initial_integrate(int vflag) {} + +/* ---------------------------------------------------------------------- + store eflag, so can use it in post_force to tally per-atom energies +------------------------------------------------------------------------- */ + +void FixLatte::pre_reverse(int eflag, int vflag) +{ + eflag_caller = eflag; +} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::post_force(int vflag) +{ + int eflag = eflag_caller; + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = 0; + + // compute Coulombic potential = pe[i]/q[i] + // invoke compute pe/atom + // wrap with clear/add and trigger pe/atom calculation every step + + if (coulomb) { + modify->clearstep_compute(); + + if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { + c_pe->compute_peratom(); + c_pe->invoked_flag |= INVOKED_PERATOM; + } + + modify->addstep_compute(update->ntimestep+1); + + double *pe = c_pe->vector_atom; + double *q = atom->q; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + if (q[i]) qpotential[i] = pe[i]/q[i]; + else qpotential[i] = 0.0; + } + + // hardwire these unsupported flags for now + + int coulombflag = 0; + pe_peratom = 0; + virial_global = 0; // set via vflag_global at some point + virial_peratom = 0; + neighflag = 0; + + // set flags used by LATTE + + int flags[6]; + + flags[0] = pbcflag; // 1 for fully periodic, 0 for fully non-periodic + flags[1] = coulombflag; // 1 for LAMMPS computes Coulombics, 0 for LATTE + flags[2] = pe_peratom; // 1 to return per-atom energies, 0 for no + flags[3] = virial_global; // 1 to return global virial 0 for no + flags[4] = virial_peratom; // 1 to return per-atom virial, 0 for no + flags[5] = neighflag; // 1 to pass neighbor list to LATTE, 0 for no + + // setup LATTE arguments + + int natoms = atom->nlocal; + double *coords = &atom->x[0][0]; + int *type = atom->type; + int ntypes = atom->ntypes; + double *mass = &atom->mass[1]; + double *boxlo = domain->boxlo; + double *boxhi = domain->boxhi; + + double *forces; + if (coulomb) forces = &flatte[0][0]; + else forces = &atom->f[0][0]; + + // invoke LATTE + + int maxiter = -1; + double *dt_latte = &update->dt; + double dt_latte_ang = *dt_latte * 1000.0; // Units of DT must be in Angstroms + +// latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, +// forces,&maxiter, &latte_energy, &atom->v[0][0],&update->dt); + + latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, + forces,&maxiter, &latte_energy, &atom->v[0][0], &dt_latte_ang); + + // sum LATTE forces to LAMMPS (Coulombic) forces + + if (coulomb) { + double **f = atom->f; + int nlocal = atom->nlocal; + for (int i = 0; i < nlocal; i++) { + f[i][0] += flatte[i][0]; + f[i][1] += flatte[i][1]; + f[i][2] += flatte[i][2]; + } + } +} + +/* ---------------------------------------------------------------------- + integrate electronic degrees of freedom +------------------------------------------------------------------------- */ + +void FixLatte::final_integrate() {} + +/* ---------------------------------------------------------------------- */ + +void FixLatte::reset_dt() +{ + //dtv = update->dt; + //dtf = 0.5 * update->dt * force->ftm2v; +} + +/* ---------------------------------------------------------------------- + DFTB energy from LATTE +------------------------------------------------------------------------- */ + +double FixLatte::compute_scalar() +{ + return latte_energy; +} + +/* ---------------------------------------------------------------------- + memory usage of local arrays +------------------------------------------------------------------------- */ + +double FixLatte::memory_usage() +{ + double bytes = 0.0; + if (coulomb) bytes += nmax * sizeof(double); + if (coulomb) bytes += nmax*3 * sizeof(double); + return bytes; +} From 1f6cfb1b317973ae4e7f403090f85b055b6b442e Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Tue, 10 Jan 2017 10:56:31 -0700 Subject: [PATCH 21/53] Makefile.lammps.gfortran changed --- lib/latte/Makefile.lammps.gfortran | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 876cfd5772..f7cfb59d76 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -6,15 +6,16 @@ # PROGRESS: https://github.com/losalamos/qmd-progress # METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download -latte_PATH = ${HOME}/exaalt/LATTE_dev +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 \ +# -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 From f51ddf8450a0e043a1352eb0042b485a85a61a13 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Thu, 12 Jan 2017 13:50:02 -0700 Subject: [PATCH 22/53] Makefile.lammps.gfortran --- lib/latte/Makefile.lammps.gfortran | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index f7cfb59d76..5ec06ed1ad 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -6,7 +6,7 @@ # PROGRESS: https://github.com/losalamos/qmd-progress # METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download -latte_PATH = ${HOME}/latte_dev +latte_PATH = ${HOME}/LATTE_dev progress_PATH = ${HOME}/qmd-progress bml_PATH = ${HOME}/bml metis_PATH = ${HOME}/Programs/metis-5.1.0 From 6bd17be454d2b50e80a02f8941dd035dab29f43c Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Thu, 12 Jan 2017 16:58:27 -0700 Subject: [PATCH 23/53] Makefile.lammps.gfortran --- lib/latte/Makefile.lammps.gfortran | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 5ec06ed1ad..36ead90b41 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -20,7 +20,8 @@ latte_SYSINC = -I${latte_PATH}/src -I${bml_PATH}/install/include -I${progress_P 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 +# Uncomment the following line to use PROGRESS/BML and metis. latte_SYSLIB += -L${progress_PATH}/install/lib -lprogress -L${bml_PATH}/install/lib -lbml -L${metis_PATH}/install -lmetis +#latte_SYSLIB += -L${metis_PATH}/install -lmetis From aaa7dca21bfadba2cc04c42450e09af50f58b61c Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Thu, 12 Jan 2017 17:13:02 -0700 Subject: [PATCH 24/53] Makefile.lammps.gfortran --- lib/latte/Makefile.lammps.gfortran | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 36ead90b41..b2876f9777 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -21,7 +21,7 @@ latte_SYSLIB = -fopenmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte -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 -L${metis_PATH}/install -lmetis +latte_SYSLIB += -L${progress_PATH}/install/lib -lprogress -L${bml_PATH}/install/lib -lbml #latte_SYSLIB += -L${metis_PATH}/install -lmetis From 6d47cf350c52a5922e5656f038c4d99dfa40bb19 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Thu, 19 Jan 2017 15:42:09 -0700 Subject: [PATCH 25/53] Makefile for latte_dev --- lib/latte/Makefile.lammps.gfortran | 2 +- lib/latte/Makefile.lammps.gfortran.dev | 27 ++++++++++++++++++++++++++ lib/latte/Makefile.lammps.ifort | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 lib/latte/Makefile.lammps.gfortran.dev diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index b2876f9777..310ba74454 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -6,7 +6,7 @@ # PROGRESS: https://github.com/losalamos/qmd-progress # METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download -latte_PATH = ${HOME}/LATTE_dev +latte_PATH = ${HOME}/LATTE progress_PATH = ${HOME}/qmd-progress bml_PATH = ${HOME}/bml metis_PATH = ${HOME}/Programs/metis-5.1.0 diff --git a/lib/latte/Makefile.lammps.gfortran.dev b/lib/latte/Makefile.lammps.gfortran.dev new file mode 100644 index 0000000000..b2876f9777 --- /dev/null +++ b/lib/latte/Makefile.lammps.gfortran.dev @@ -0,0 +1,27 @@ +# 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/qmmd/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 + + diff --git a/lib/latte/Makefile.lammps.ifort b/lib/latte/Makefile.lammps.ifort index 40637013f5..1d5c55b2fc 100644 --- a/lib/latte/Makefile.lammps.ifort +++ b/lib/latte/Makefile.lammps.ifort @@ -6,7 +6,7 @@ # PROGRESS: https://github.com/losalamos/qmd-progress # METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download -latte_PATH = ${HOME}/exaalt/LATTE +latte_PATH = ${HOME}/LATTE progress_PATH = ${HOME}/qmd-progress bml_PATH = ${HOME}/bml metis_PATH = ${HOME}/Programs/metis-5.1.0 From 2dcbc805ba62ec2045f6a581ccc9beb115ef1a1f Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Thu, 23 Feb 2017 18:20:02 -0700 Subject: [PATCH 26/53] min latte partially fixed --- examples/latte/data.sucrose_non_opt.lmp | 63 +++++++++++++++++++++++++ examples/latte/data.water | 41 ++++++++++++++++ examples/latte/in.latte.sucrose.min | 42 +++++++++++++++++ examples/latte/in.latte.water | 40 ++++++++++++++++ examples/latte/in.latte.water.min | 41 ++++++++++++++++ lib/latte/README | 4 +- src/LATTE/fix_latte.cpp | 12 ++++- src/LATTE/fix_latte.h | 1 + 8 files changed, 240 insertions(+), 4 deletions(-) create mode 100644 examples/latte/data.sucrose_non_opt.lmp create mode 100644 examples/latte/data.water create mode 100644 examples/latte/in.latte.sucrose.min create mode 100644 examples/latte/in.latte.water create mode 100644 examples/latte/in.latte.water.min diff --git a/examples/latte/data.sucrose_non_opt.lmp b/examples/latte/data.sucrose_non_opt.lmp new file mode 100644 index 0000000000..a96a19eddb --- /dev/null +++ b/examples/latte/data.sucrose_non_opt.lmp @@ -0,0 +1,63 @@ + 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 diff --git a/examples/latte/data.water b/examples/latte/data.water new file mode 100644 index 0000000000..1a1e4d9e0b --- /dev/null +++ b/examples/latte/data.water @@ -0,0 +1,41 @@ + LAMMPS Description + + 24 atoms + + 2 atom types + + 0.0000000000000000 6.2670000000000003 xlo xhi + 0.0000000000000000 6.2670000000000003 ylo yhi + 0.0000000000000000 6.2670000000000003 zlo zhi + + Masses + + 1 15.994915008544922 + 2 1.0078250169754028 + + Atoms + + 1 1 1 0.0 3.08800 3.70000 3.12400 + 2 1 2 0.0 4.05800 3.70000 3.12400 + 3 1 2 0.0 2.76400 3.13200 3.84100 + 4 1 1 0.0 2.47000 0.39000 1.36000 + 5 1 2 0.0 1.54000 0.37000 1.73000 + 6 1 2 0.0 2.48000 0.00000 0.44000 + 7 1 1 0.0 1.99300 0.41700 5.25000 + 8 1 2 0.0 2.39300 1.32700 5.16000 + 9 1 2 0.0 0.99300 0.49700 5.31000 + 10 1 1 0.0 2.05300 6.09700 3.48000 + 11 1 2 0.0 2.12300 5.20700 3.02000 + 12 1 2 0.0 1.11300 0.17000 3.40000 + 13 1 1 0.0 4.90000 5.37700 2.14000 + 14 1 2 0.0 5.51000 6.17700 2.18000 + 15 1 2 0.0 3.95000 5.68700 2.21000 + 16 1 1 0.0 0.92000 3.82700 0.56000 + 17 1 2 0.0 0.00000 3.54700 0.27000 + 18 1 2 0.0 1.23000 4.59700 0.00000 + 19 1 1 0.0 0.89000 2.03700 3.41000 + 20 1 2 0.0 0.72000 2.86700 2.87000 + 21 1 2 0.0 1.79000 1.66700 3.19000 + 22 1 1 0.0 4.45000 4.61700 5.43000 + 23 1 2 0.0 4.75000 3.89700 4.81000 + 24 1 2 0.0 4.06000 4.21700 6.26000 diff --git a/examples/latte/in.latte.sucrose.min b/examples/latte/in.latte.sucrose.min new file mode 100644 index 0000000000..dc0879861a --- /dev/null +++ b/examples/latte/in.latte.sucrose.min @@ -0,0 +1,42 @@ +# 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 +read_data data.sucrose_non_opt.lmp + +# 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 + +# minimization + +thermo 1 +min_style cg +minimize 1.0e-9 1.0e-9 1000 1000 diff --git a/examples/latte/in.latte.water b/examples/latte/in.latte.water new file mode 100644 index 0000000000..1ab9fcaafe --- /dev/null +++ b/examples/latte/in.latte.water @@ -0,0 +1,40 @@ +# 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 + +# 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 diff --git a/examples/latte/in.latte.water.min b/examples/latte/in.latte.water.min new file mode 100644 index 0000000000..5bf261547a --- /dev/null +++ b/examples/latte/in.latte.water.min @@ -0,0 +1,41 @@ +# 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 + +# 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 + +# minimization + +thermo 1 +min_style fire +minimize 1.0e-9 1.0e-9 1000 1000 diff --git a/lib/latte/README b/lib/latte/README index 3acd85095a..4166d03166 100644 --- a/lib/latte/README +++ b/lib/latte/README @@ -20,7 +20,7 @@ follow these steps: - 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, if you +Note that if you unpack and build LATTE in this directory and you 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. @@ -28,7 +28,7 @@ place is the home directory. To build LAMMPS with the LATTE library you should follow the following instructions: -- makefile.lammps.* to makefile.lammps in the /lammps/lib/latte directory. +- copy makefile.lammps.* to makefile.lammps in the /lammps/lib/latte directory. - Change the path, flags and compilers on the makefile.lammps according to your compilers, architecture and the LATTE location. diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 19a1e78603..ba9804de0d 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -45,7 +45,8 @@ using namespace FixConst; extern "C" { void latte(int *, int *, double *, int *, int *, - double *, double *, double *, double *, int*, double *, double *, double *); + double *, double *, double *, double *, int*, + double *, double *, double *); } #define INVOKED_PERATOM 8 @@ -282,7 +283,7 @@ void FixLatte::post_force(int vflag) int maxiter = -1; latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, - forces,&maxiter, &latte_energy, &atom->v[0][0],&update->dt); + forces,&maxiter,&latte_energy,&atom->v[0][0],&update->dt); // sum LATTE forces to LAMMPS (Coulombic) forces @@ -297,6 +298,13 @@ void FixLatte::post_force(int vflag) } } +/* ---------------------------------------------------------------------- */ + +void FixLatte::min_post_force(int vflag) +{ + post_force(vflag); +} + /* ---------------------------------------------------------------------- integrate electronic degrees of freedom ------------------------------------------------------------------------- */ diff --git a/src/LATTE/fix_latte.h b/src/LATTE/fix_latte.h index d0f2fdea3e..d6b75d52f4 100644 --- a/src/LATTE/fix_latte.h +++ b/src/LATTE/fix_latte.h @@ -36,6 +36,7 @@ class FixLatte : public Fix { void initial_integrate(int); void pre_reverse(int, int); void post_force(int); + void min_post_force(int); void final_integrate(); void reset_dt(); double compute_scalar(); From 9736fb3be84597101c53d31d2c4ace5bff058b98 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Tue, 28 Feb 2017 10:40:46 -0700 Subject: [PATCH 27/53] added sucrose latte min example --- examples/latte/in.latte.sucrose.min | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/latte/in.latte.sucrose.min b/examples/latte/in.latte.sucrose.min index dc0879861a..9513af9ac6 100644 --- a/examples/latte/in.latte.sucrose.min +++ b/examples/latte/in.latte.sucrose.min @@ -4,7 +4,6 @@ units metal atom_style full atom_modify sort 0 0.0 # turn off sorting of the coordinates -#read_data data.water read_data data.sucrose_non_opt.lmp # replicate system if requested @@ -39,4 +38,6 @@ thermo_style custom step temp pe etotal thermo 1 min_style cg -minimize 1.0e-9 1.0e-9 1000 1000 +min_modify dmax 0.1 +min_modify line quadratic +minimize 1.0e-6 1.0e-6 10000 10000 From 78a8f75a8f3155c37dd18a0929317b49de9a9a68 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Wed, 1 Mar 2017 09:53:50 -0700 Subject: [PATCH 28/53] params added --- examples/latte/TBparam/bondints.nonortho | 36 ++++++++++++++++++++++++ examples/latte/TBparam/electrons.dat | 7 +++++ examples/latte/TBparam/ppots.nonortho | 12 ++++++++ 3 files changed, 55 insertions(+) create mode 100644 examples/latte/TBparam/bondints.nonortho create mode 100644 examples/latte/TBparam/electrons.dat create mode 100644 examples/latte/TBparam/ppots.nonortho diff --git a/examples/latte/TBparam/bondints.nonortho b/examples/latte/TBparam/bondints.nonortho new file mode 100644 index 0000000000..8c1eee76b5 --- /dev/null +++ b/examples/latte/TBparam/bondints.nonortho @@ -0,0 +1,36 @@ +Noints= 34 +Element1 Element2 Kind H0 B1 B2 B3 B4 B5 R1 Rcut H0 B1 B2 B3 B4 B5 R1 Rcut +N O sss -11.430028 -2.257346 -1.152844 0.000000 0.000000 1.200000 3.500000 4.000000 0.340064 -1.703613 -0.622348 0.036738 -0.040158 1.200000 3.500000 4.000000 +N O sps 11.597479 -1.382001 -0.765170 0.000000 0.000000 1.200000 3.500000 4.000000 -0.370946 -1.040947 -0.931097 0.252441 -0.115450 1.200000 3.500000 4.000000 +O N sps 12.143744 -0.822913 -0.676127 0.000000 0.000000 1.200000 3.500000 4.000000 -0.420014 -1.107918 -0.905594 0.188424 -0.088365 1.200000 3.500000 4.000000 +N O pps 9.465191 -1.082032 -0.769214 0.000000 0.000000 1.200000 3.500000 4.000000 -0.314073 0.499050 -2.914288 2.067657 -0.738439 1.200000 3.500000 4.000000 +N O ppp -4.676789 -2.171480 -0.288002 0.000000 0.000000 1.200000 3.500000 4.000000 0.223937 -1.991867 -0.537630 -0.081270 -0.004130 1.200000 3.500000 4.000000 +C O sss -14.369472 -2.077439 -0.875471 0.000000 0.000000 1.200000 3.500000 4.000000 0.375339 -1.547372 -0.642492 0.020614 -0.026699 1.200000 3.500000 4.000000 +C O sps 9.576296 -1.156217 -0.494803 0.000000 0.000000 1.200000 3.500000 4.000000 -0.373027 -0.776043 -1.019920 0.257539 -0.102838 1.200000 3.500000 4.000000 +O C sps 14.037374 -1.192632 -0.654572 0.000000 0.000000 1.200000 3.500000 4.000000 -0.458068 -1.035067 -0.937868 0.190562 -0.077841 1.200000 3.500000 4.000000 +C O pps 9.331152 -0.718120 -0.822100 0.000000 0.000000 1.200000 3.500000 4.000000 -0.322293 0.795473 -3.476601 2.589965 -0.897800 1.200000 3.500000 4.000000 +C O ppp -5.334367 -2.263939 -0.204910 0.000000 0.000000 1.200000 3.500000 4.000000 0.244570 -1.922717 -0.573671 -0.057280 -0.004108 1.200000 3.500000 4.000000 +C N sss -7.010061 -1.730597 -0.575559 0.000000 0.000000 1.500000 3.500000 4.000000 0.263438 -1.754525 -0.584215 -0.007801 -0.021729 1.500000 3.500000 4.000000 +C N sps 7.543283 -1.293768 -0.624363 0.000000 0.000000 1.500000 3.500000 4.000000 -0.326609 -1.197485 -0.807786 0.134891 -0.084373 1.500000 3.500000 4.000000 +N C sps 9.090970 -1.494255 -0.616711 0.000000 0.000000 1.500000 3.500000 4.000000 -0.337943 -1.335442 -0.769693 0.119373 -0.079493 1.500000 3.500000 4.000000 +C N pps 6.892240 -0.931920 -0.769164 0.000000 0.000000 1.500000 3.500000 4.000000 -0.350240 -0.467439 -1.849316 1.854403 -0.988471 1.500000 3.500000 4.000000 +C N ppp -2.903346 -2.149349 -0.253006 0.000000 0.000000 1.500000 3.500000 4.000000 0.158424 -2.114409 -0.582346 -0.051076 -0.006183 1.500000 3.500000 4.000000 +C C sss -9.404207 -1.363297 -0.507128 0.000000 0.000000 1.400000 3.500000 4.000000 0.346977 -1.519820 -0.570812 -0.013518 -0.015829 1.400000 3.500000 4.000000 +C C sps 8.662429 -1.047410 -0.661999 0.000000 0.000000 1.400000 3.500000 4.000000 -0.400467 -0.984048 -0.853949 0.157178 -0.073381 1.400000 3.500000 4.000000 +C C pps 6.811512 -0.552299 -0.776890 0.000000 0.000000 1.400000 3.500000 4.000000 -0.382417 0.102889 -2.786680 2.646356 -1.134320 1.400000 3.500000 4.000000 +C C ppp -3.550127 -1.925572 -0.132715 0.000000 0.000000 1.400000 3.500000 4.000000 0.214357 -1.948923 -0.578323 -0.034356 -0.007257 1.400000 3.500000 4.000000 +H C sss -9.072577 -1.393093 -0.430611 0.000000 0.000000 1.100000 3.500000 4.000000 0.416003 -1.459596 -0.654874 0.009140 -0.012658 1.100000 3.500000 4.000000 +H C sps 8.176008 -0.985177 -0.427403 0.000000 0.000000 1.100000 3.500000 4.000000 -0.495695 -0.901626 -1.007214 0.189808 -0.057087 1.100000 3.500000 4.000000 +H H sss -9.340000 -1.145903 -0.391777 0.000000 0.000000 0.750000 3.500000 4.000000 0.575007 -1.391261 -0.778831 0.080209 -0.017759 0.750000 3.500000 4.000000 +O O sss -12.737687 -1.851608 -0.666621 0.000000 0.000000 1.200000 3.500000 4.000000 0.296445 -1.911896 -0.663451 0.038054 -0.046608 1.200000 3.500000 4.000000 +O O sps 13.683050 -1.684554 -0.468349 0.000000 0.000000 1.200000 3.500000 4.000000 -0.362143 -1.285274 -0.939591 0.204641 -0.106438 1.200000 3.500000 4.000000 +O O pps 9.460772 -1.211748 -0.581016 0.000000 0.000000 1.200000 3.500000 4.000000 -0.312044 0.121814 -2.519352 1.681266 -0.644566 1.200000 3.500000 4.000000 +O O ppp -4.494595 -2.709223 -0.284124 0.000000 0.000000 1.200000 3.500000 4.000000 0.193010 -2.168462 -0.580629 -0.105104 0.004891 1.200000 3.500000 4.000000 +H O sss -12.230931 -1.808632 -0.421164 0.000000 0.000000 1.000000 3.500000 4.000000 0.404725 -1.702546 -0.707938 0.074904 -0.039922 1.000000 3.500000 4.000000 +H O sps 9.466088 -1.321262 -0.386336 0.000000 0.000000 1.000000 3.500000 4.000000 -0.447660 -0.952979 -1.163537 0.400616 -0.156965 1.000000 3.500000 4.000000 +N N sss -7.710330 -2.365312 -0.525527 0.000000 0.000000 1.500000 3.500000 4.000000 0.231654 -1.879002 -0.572765 -0.004579 -0.031106 1.500000 3.500000 4.000000 +N N sps 8.222314 -1.612118 -0.690081 0.000000 0.000000 1.500000 3.500000 4.000000 -0.305271 -1.385158 -0.751032 0.114531 -0.090839 1.500000 3.500000 4.000000 +N N pps 7.178570 -1.176467 -0.571049 0.000000 0.000000 1.500000 3.500000 4.000000 -0.324668 -0.547805 -1.638658 1.495168 -0.827868 1.500000 3.500000 4.000000 +N N ppp -2.829344 -2.408049 -0.387709 0.000000 0.000000 1.500000 3.500000 4.000000 0.142909 -2.162036 -0.571942 -0.071640 -0.004682 1.500000 3.500000 4.000000 +H N sss -12.095890 -1.519057 -0.277247 0.000000 0.000000 1.000000 3.500000 4.000000 0.446693 -1.500463 -0.657448 0.065741 -0.037004 1.000000 3.500000 4.000000 +H N sps 9.851338 -1.231616 -0.370836 0.000000 0.000000 1.000000 3.500000 4.000000 -0.501530 -0.785734 -1.123232 0.394878 -0.148501 1.000000 3.500000 4.000000 diff --git a/examples/latte/TBparam/electrons.dat b/examples/latte/TBparam/electrons.dat new file mode 100644 index 0000000000..c38fd23ce2 --- /dev/null +++ b/examples/latte/TBparam/electrons.dat @@ -0,0 +1,7 @@ +Noelem= 5 +Element basis Numel Es Ep Ed Ef Mass HubbardU Wss Wpp Wdd Wff +N sp 5.0 -18.58 -7.09 0.0 0.0 14.0067 15.93 0.0 -0.6950 0.0 0.0 +O sp 6.0 -23.96 -9.02 0.0 0.0 15.9994 12.15 0.0 -0.7577 0.0 0.0 +H s 1.0 -6.35 0.0 0.0 0.0 1.0079 12.85 -1.7937 0.0 0.0 0.0 +C sp 4.0 -13.75 -5.28 0.0 0.0 12.01 10.0 0.0 -0.621 0.0 0.0 +Ti sd 4.0 -5.5 0.0 -3.0 0.0 47.867 10.0 0.0 0.0 0.0 0.0 \ No newline at end of file diff --git a/examples/latte/TBparam/ppots.nonortho b/examples/latte/TBparam/ppots.nonortho new file mode 100644 index 0000000000..1b9b66c0a1 --- /dev/null +++ b/examples/latte/TBparam/ppots.nonortho @@ -0,0 +1,12 @@ +Nopps= 10 +Ele1 Ele2 A0 A1 A2 A3 A4 A5 A6 C R1 Rcut +N O 13.182426 20.050322 -46.806321 38.206953 -12.319656 0.000000 0.000000 0.000000 1.600000 1.700000 +C N 88.953762 10.294988 -27.706877 22.101434 -6.836438 0.000000 0.000000 0.000000 1.600000 1.700000 +C O 0.944093 30.116337 -59.608215 45.107654 -13.178839 0.000000 0.000000 0.000000 1.600000 1.700000 +C H 104.889589 3.971095 -23.823043 26.408093 -11.317522 0.000000 0.000000 0.000000 1.200000 1.300000 +C C 3.962931 24.467772 -51.156024 39.031644 -11.342979 0.000000 0.000000 0.000000 1.600000 1.700000 +H H 38.512100 3.887860 -37.769100 57.083500 -34.512200 0.000000 0.000000 0.000000 0.900000 1.000000 +N N 43.228899 15.004605 -36.621777 29.234888 -8.912743 0.000000 0.000000 0.000000 1.600000 1.700000 +N H 0.625470 28.081241 -63.414297 53.286361 -17.352234 0.000000 0.000000 0.000000 1.300000 1.400000 +O O 10.999870 19.303033 -45.747853 37.946431 -11.935755 0.000000 0.000000 0.000000 1.500000 1.600000 +O H 0.481176 33.175383 -81.158683 74.935408 -26.792315 0.000000 0.000000 0.000000 1.200000 1.300000 From 1025c25548f146c320f5ab0126dd918462b6c4bb Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Wed, 1 Mar 2017 09:55:33 -0700 Subject: [PATCH 29/53] latte.in added --- examples/latte/latte.in | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 examples/latte/latte.in diff --git a/examples/latte/latte.in b/examples/latte/latte.in new file mode 100644 index 0000000000..0f834d4023 --- /dev/null +++ b/examples/latte/latte.in @@ -0,0 +1,39 @@ +LATTE INPUT FILE +================ +#This input file resumes the content of MDcontroller and TBparam/control.in +#The parser will only read it if it's present inside the running folder. +#In case this file is not present Latte will read the two files as original. +#The order of the kewords is not important in this file. +#To get a full description of these keywords please see: +## https://github.com/lanl/LATTE/blob/master/Manual/LATTE_manual.pdf + +#General controls +CONTROL{ + xControl= 1 + BASISTYPE= NONORTHO + COORDSFILE= "./coords.dat" + KBT= 0.0 + ENTROPYKIND= 1 + PPOTON= 1 + SPINON= 0 SPINTOL= 1.0e-4 + ELECTRO= 1 ELECMETH= 0 ELEC_QTOL= 1.0e-8 + MAXSCF= 450 + BREAKTOL= 1.0E-6 MINSP2ITER= 22 SP2CONV= REL + FULLQCONV= 0 QITER= 3 + QMIX= 0.25 SPINMIX= 0.25 MDMIX= 0.25 + SPARSEON= 1 THRESHOLDON= 1 NUMTHRESH= 1.0e-6 FILLINSTOP= 100 BLKSZ= 4 + MSPARSE= 1500 + RELAX= 0 RELAXTYPE= SD MAXITER= 100000 RLXFTOL= 0.0000001 + SKIN= 1.0 + CHARGE= 0 + XBO= 1 + XBODISON= 1 + XBODISORDER= 5 + KON= 0 +} + +#Controls for QMD (if using lammps MAXITER must be set to -1) +MDCONTROL{ + MAXITER= -1 +} + From 48ed963fd2f495a90f0deaa28d43f4289a3bde9e Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Wed, 1 Mar 2017 12:05:00 -0700 Subject: [PATCH 30/53] latte in added --- examples/latte/latte.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/latte/latte.in b/examples/latte/latte.in index 0f834d4023..0790317a5d 100644 --- a/examples/latte/latte.in +++ b/examples/latte/latte.in @@ -19,7 +19,7 @@ CONTROL{ ELECTRO= 1 ELECMETH= 0 ELEC_QTOL= 1.0e-8 MAXSCF= 450 BREAKTOL= 1.0E-6 MINSP2ITER= 22 SP2CONV= REL - FULLQCONV= 0 QITER= 3 + FULLQCONV= 1 QITER= 3 QMIX= 0.25 SPINMIX= 0.25 MDMIX= 0.25 SPARSEON= 1 THRESHOLDON= 1 NUMTHRESH= 1.0e-6 FILLINSTOP= 100 BLKSZ= 4 MSPARSE= 1500 From 5c6b0cc85c5e6e57a7ccedfda1db39f030ed0a42 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Wed, 1 Mar 2017 16:34:20 -0700 Subject: [PATCH 31/53] removed fix_latte from src folder --- src/fix_latte.cpp | 338 ---------------------------------------------- 1 file changed, 338 deletions(-) delete mode 100644 src/fix_latte.cpp diff --git a/src/fix_latte.cpp b/src/fix_latte.cpp deleted file mode 100644 index d7bf6eaccf..0000000000 --- a/src/fix_latte.cpp +++ /dev/null @@ -1,338 +0,0 @@ -/* ---------------------------------------------------------------------- - 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. -------------------------------------------------------------------------- */ - -// NOTES on possible future issues: -// LATTE compute and return 6-value virial tensor -// 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 - -#include -#include -#include "fix_latte.h" -#include "atom.h" -#include "comm.h" -#include "update.h" -#include "neighbor.h" -#include "domain.h" -#include "force.h" -#include "neigh_request.h" -#include "neigh_list.h" -#include "modify.h" -#include "compute.h" -#include "memory.h" -#include "error.h" - -using namespace LAMMPS_NS; -using namespace FixConst; - -extern "C" { - void latte(int *, int *, double *, int *, int *, - double *, double *, double *, double *, int*, double *, double *, double*); -} - -#define INVOKED_PERATOM 8 - -/* ---------------------------------------------------------------------- */ - -FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) -{ - if (narg != 4) error->all(FLERR,"Illegal fix latte command"); - - if (comm->nprocs != 1) - error->all(FLERR,"Fix latte currently runs only in serial"); - - scalar_flag = 1; - global_freq = 1; - extscalar = 1; - virial_flag = 1; - - // store ID of compute pe/atom used to generate Coulomb potential for LATTE - // NULL means LATTE will compute Coulombic potential - - coulomb = 0; - id_pe = NULL; - - if (strcmp(arg[3],"NULL") != 0) { - coulomb = 1; - - int n = strlen(arg[3]) + 1; - id_pe = new char[n]; - strcpy(id_pe,arg[3]); - - int ipe = modify->find_compute(id_pe); - if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); - if (modify->compute[ipe]->peatomflag == 0) - error->all(FLERR,"Fix latte compute ID does not compute pe/atom"); - } - - // initializations - - nmax = 0; - qpotential = NULL; - flatte = NULL; - - latte_energy = 0.0; -} - -/* ---------------------------------------------------------------------- */ - -FixLatte::~FixLatte() -{ - delete [] id_pe; - memory->destroy(qpotential); - memory->destroy(flatte); -} - -/* ---------------------------------------------------------------------- */ - -int FixLatte::setmask() -{ - int mask = 0; - //mask |= INITIAL_INTEGRATE; - //mask |= FINAL_INTEGRATE; - mask |= PRE_REVERSE; - mask |= POST_FORCE; - mask |= MIN_POST_FORCE; - mask |= THERMO_ENERGY; - return mask; -} - -/* ---------------------------------------------------------------------- */ - -void FixLatte::init() -{ - // error checks - - if (domain->dimension == 2) - error->all(FLERR,"Fix latte requires 3d problem"); - - if (coulomb) { - if (atom->q_flag == 0 || force->pair == NULL || force->kspace == NULL) - error->all(FLERR,"Fix latte cannot compute Coulombic potential"); - - int ipe = modify->find_compute(id_pe); - if (ipe < 0) error->all(FLERR,"Could not find fix latte compute ID"); - c_pe = modify->compute[ipe]; - } - - // must be fully periodic or fully non-periodic - - if (domain->nonperiodic == 0) pbcflag = 1; - else if (!domain->xperiodic && !domain->yperiodic && !domain->zperiodic) - pbcflag = 0; - else error->all(FLERR,"Fix latte requires 3d simulation"); - - // create qpotential & flatte if needed - // for now, assume nlocal will never change - - if (coulomb && qpotential == NULL) { - memory->create(qpotential,atom->nlocal,"latte:qpotential"); - memory->create(flatte,atom->nlocal,3,"latte:flatte"); - } - - /* - // warn if any integrate fix comes after this one - // is it actually necessary for q(n) update to come after x,v update ?? - - int after = 0; - int flag = 0; - for (int i = 0; i < modify->nfix; i++) { - if (strcmp(id,modify->fix[i]->id) == 0) after = 1; - else if ((modify->fmask[i] & INITIAL_INTEGRATE) && after) flag = 1; - } - if (flag && comm->me == 0) - error->warning(FLERR,"Fix latte should come after all other " - "integration fixes"); - */ - - /* - // need a full neighbor list - // could we use a half list? - // perpetual list, built whenever re-neighboring occurs - - int irequest = neighbor->request(this,instance_me); - neighbor->requests[irequest]->pair = 0; - neighbor->requests[irequest]->fix = 1; - neighbor->requests[irequest]->half = 0; - neighbor->requests[irequest]->full = 1; - */ -} - -/* ---------------------------------------------------------------------- */ - -void FixLatte::init_list(int id, NeighList *ptr) -{ - // list = ptr; -} - -/* ---------------------------------------------------------------------- */ - -void FixLatte::setup(int vflag) -{ - post_force(vflag); -} - -/* ---------------------------------------------------------------------- */ - -void FixLatte::min_setup(int vflag) -{ - post_force(vflag); -} - -/* ---------------------------------------------------------------------- - integrate electronic degrees of freedom -------------------------------------------------------------------------- */ - -void FixLatte::initial_integrate(int vflag) {} - -/* ---------------------------------------------------------------------- - store eflag, so can use it in post_force to tally per-atom energies -------------------------------------------------------------------------- */ - -void FixLatte::pre_reverse(int eflag, int vflag) -{ - eflag_caller = eflag; -} - -/* ---------------------------------------------------------------------- */ - -void FixLatte::post_force(int vflag) -{ - int eflag = eflag_caller; - if (eflag || vflag) ev_setup(eflag,vflag); - else evflag = 0; - - // compute Coulombic potential = pe[i]/q[i] - // invoke compute pe/atom - // wrap with clear/add and trigger pe/atom calculation every step - - if (coulomb) { - modify->clearstep_compute(); - - if (!(c_pe->invoked_flag & INVOKED_PERATOM)) { - c_pe->compute_peratom(); - c_pe->invoked_flag |= INVOKED_PERATOM; - } - - modify->addstep_compute(update->ntimestep+1); - - double *pe = c_pe->vector_atom; - double *q = atom->q; - int nlocal = atom->nlocal; - - for (int i = 0; i < nlocal; i++) - if (q[i]) qpotential[i] = pe[i]/q[i]; - else qpotential[i] = 0.0; - } - - // hardwire these unsupported flags for now - - int coulombflag = 0; - pe_peratom = 0; - virial_global = 0; // set via vflag_global at some point - virial_peratom = 0; - neighflag = 0; - - // set flags used by LATTE - - int flags[6]; - - flags[0] = pbcflag; // 1 for fully periodic, 0 for fully non-periodic - flags[1] = coulombflag; // 1 for LAMMPS computes Coulombics, 0 for LATTE - flags[2] = pe_peratom; // 1 to return per-atom energies, 0 for no - flags[3] = virial_global; // 1 to return global virial 0 for no - flags[4] = virial_peratom; // 1 to return per-atom virial, 0 for no - flags[5] = neighflag; // 1 to pass neighbor list to LATTE, 0 for no - - // setup LATTE arguments - - int natoms = atom->nlocal; - double *coords = &atom->x[0][0]; - int *type = atom->type; - int ntypes = atom->ntypes; - double *mass = &atom->mass[1]; - double *boxlo = domain->boxlo; - double *boxhi = domain->boxhi; - - double *forces; - if (coulomb) forces = &flatte[0][0]; - else forces = &atom->f[0][0]; - - // invoke LATTE - - int maxiter = -1; - double *dt_latte = &update->dt; - double dt_latte_ang = *dt_latte * 1000.0; // Units of DT must be in Angstroms - -// latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, -// forces,&maxiter, &latte_energy, &atom->v[0][0],&update->dt); - - latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, - forces,&maxiter, &latte_energy, &atom->v[0][0], &dt_latte_ang); - - // sum LATTE forces to LAMMPS (Coulombic) forces - - if (coulomb) { - double **f = atom->f; - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - f[i][0] += flatte[i][0]; - f[i][1] += flatte[i][1]; - f[i][2] += flatte[i][2]; - } - } -} - -/* ---------------------------------------------------------------------- - integrate electronic degrees of freedom -------------------------------------------------------------------------- */ - -void FixLatte::final_integrate() {} - -/* ---------------------------------------------------------------------- */ - -void FixLatte::reset_dt() -{ - //dtv = update->dt; - //dtf = 0.5 * update->dt * force->ftm2v; -} - -/* ---------------------------------------------------------------------- - DFTB energy from LATTE -------------------------------------------------------------------------- */ - -double FixLatte::compute_scalar() -{ - return latte_energy; -} - -/* ---------------------------------------------------------------------- - memory usage of local arrays -------------------------------------------------------------------------- */ - -double FixLatte::memory_usage() -{ - double bytes = 0.0; - if (coulomb) bytes += nmax * sizeof(double); - if (coulomb) bytes += nmax*3 * sizeof(double); - return bytes; -} From 3298c379821d4e8f8ce81baa45037dbc35dd7daf Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Thu, 9 Mar 2017 14:30:21 -0700 Subject: [PATCH 32/53] Makefile.lammps.gfortran for latte --- lib/latte/Makefile.lammps.gfortran | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 310ba74454..fa6a44869f 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -21,7 +21,7 @@ latte_SYSLIB = -fopenmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte -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${progress_PATH}/install/lib -lprogress -L${bml_PATH}/install/lib -lbml #latte_SYSLIB += -L${metis_PATH}/install -lmetis From 7ed500e8291bbbe39e38f083734ab86180648e89 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Tue, 21 Mar 2017 17:09:42 -0600 Subject: [PATCH 33/53] added virial --- src/LATTE/fix_latte.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index ba9804de0d..43fba416e7 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -23,6 +23,7 @@ // 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 +// NOTE: ADD checks for metal units !!!!!!!!!!!!! #include #include @@ -44,11 +45,11 @@ using namespace LAMMPS_NS; using namespace FixConst; extern "C" { - void latte(int *, int *, double *, int *, int *, - double *, double *, double *, double *, int*, - double *, double *, double *); + void latte(int *, int *, double *, int *, int *, + double *, double *, double *, double *, int*, + double *, double *, double *, double * ); } - + #define INVOKED_PERATOM 8 /* ---------------------------------------------------------------------- */ @@ -123,7 +124,7 @@ void FixLatte::init() { // error checks - if (domain->dimension == 2) + if (domain->dimension == 2) error->all(FLERR,"Fix latte requires 3d problem"); if (coulomb) { @@ -220,7 +221,8 @@ void FixLatte::post_force(int vflag) { int eflag = eflag_caller; if (eflag || vflag) ev_setup(eflag,vflag); - else evflag = 0; + // else evflag = 0; + else evflag = eflag_global = vflag_global = eflag_atom = vflag_atom = 0; // compute Coulombic potential = pe[i]/q[i] // invoke compute pe/atom @@ -248,9 +250,9 @@ void FixLatte::post_force(int vflag) // hardwire these unsupported flags for now int coulombflag = 0; - pe_peratom = 0; - virial_global = 0; // set via vflag_global at some point - virial_peratom = 0; + // pe_peratom = 0; + // virial_global = 1; // set via vflag_global at some point + // virial_peratom = 0; neighflag = 0; // set flags used by LATTE @@ -259,9 +261,9 @@ void FixLatte::post_force(int vflag) flags[0] = pbcflag; // 1 for fully periodic, 0 for fully non-periodic flags[1] = coulombflag; // 1 for LAMMPS computes Coulombics, 0 for LATTE - flags[2] = pe_peratom; // 1 to return per-atom energies, 0 for no - flags[3] = virial_global; // 1 to return global virial 0 for no - flags[4] = virial_peratom; // 1 to return per-atom virial, 0 for no + flags[2] = eflag_atom; //pe_peratom; // 1 to return per-atom energies, 0 for no + flags[3] = vflag_global; //virial_global; // 1 to return global virial 0 for no + flags[4] = vflag_atom; //virial_peratom; // 1 to return per-atom virial, 0 for no flags[5] = neighflag; // 1 to pass neighbor list to LATTE, 0 for no // setup LATTE arguments @@ -278,12 +280,10 @@ void FixLatte::post_force(int vflag) if (coulomb) forces = &flatte[0][0]; else forces = &atom->f[0][0]; - // invoke LATTE - int maxiter = -1; latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, - forces,&maxiter,&latte_energy,&atom->v[0][0],&update->dt); + forces,&maxiter,&latte_energy,&atom->v[0][0],&update->dt,virial); // sum LATTE forces to LAMMPS (Coulombic) forces From f7bdf128eaa361b021312c0ff94b48a450e4f1b1 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Wed, 22 Mar 2017 09:35:47 -0600 Subject: [PATCH 34/53] cleaned fix latte --- src/LATTE/fix_latte.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 43fba416e7..77a186adb9 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -23,7 +23,7 @@ // 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 -// NOTE: ADD checks for metal units !!!!!!!!!!!!! +// INPORTANT NOTE: ADD checks for metal units !!!!!!!!!!!!! #include #include @@ -261,9 +261,9 @@ void FixLatte::post_force(int vflag) flags[0] = pbcflag; // 1 for fully periodic, 0 for fully non-periodic flags[1] = coulombflag; // 1 for LAMMPS computes Coulombics, 0 for LATTE - flags[2] = eflag_atom; //pe_peratom; // 1 to return per-atom energies, 0 for no - flags[3] = vflag_global; //virial_global; // 1 to return global virial 0 for no - flags[4] = vflag_atom; //virial_peratom; // 1 to return per-atom virial, 0 for no + flags[2] = eflag_atom; // 1 to return per-atom energies, 0 for no + flags[3] = vflag_global; // 1 to return global virial 0 for no + flags[4] = vflag_atom; // 1 to return per-atom virial, 0 for no flags[5] = neighflag; // 1 to pass neighbor list to LATTE, 0 for no // setup LATTE arguments From 756c8995641e37a84b8407c585f948c6f233147b Mon Sep 17 00:00:00 2001 From: Richard Zamora Date: Thu, 23 Mar 2017 10:01:21 -0600 Subject: [PATCH 35/53] testing simple ci --- .gitlab-ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..d5cb18c6e8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,32 @@ +image: ubuntu:latest + +before_script: + +# Install Linux Packages: +- apt-get update +- hostname +- pwd +- export HOME=/builds/exaalt/ +- env +#- apt-get --yes --force-yes install gfortran libblas-dev liblapack-dev +#- apt-get --yes --force-yes install cmake python gcc cmake-data g++ git wget +#- apt-get --yes --force-yes install pkg-config python-numpy python3-numpy libopenmpi-dev +# +## Build LATTE: +#- cd /builds/exaalt/exaalt/LATTE/ +#- cp ./makefiles/makefile.CHOICES.gfort.lapack.lmp makefile.CHOICES +#- make +# +## Build LAMMPS: +#- cd /builds/exaalt/exaalt/lammps/lib/latte/ +#- cp Makefile.lammps.gfortran Makefile.lammps +#- cd /builds/exaalt/exaalt/lammps/src/ +#- make yes-latte +#- make yes-molecule +#- make serial +# +#script: +# +## Test LAMMPS-LATTE Example: +#- cd /builds/exaalt/exaalt/lammps/examples/latte/ +#- ../../src/lmp_serial -in in.latte.water From 8d793d4223150166213dfab308c341e11cedecce Mon Sep 17 00:00:00 2001 From: Richard Zamora Date: Thu, 23 Mar 2017 10:03:24 -0600 Subject: [PATCH 36/53] testing simple ci, attempt 2 --- .gitlab-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5cb18c6e8..97281e60eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,14 @@ image: ubuntu:latest -before_script: +#before_script: +script: # Install Linux Packages: -- apt-get update -- hostname -- pwd -- export HOME=/builds/exaalt/ -- env + - apt-get update + - hostname + - pwd + - export HOME=/builds/exaalt/ + - env #- apt-get --yes --force-yes install gfortran libblas-dev liblapack-dev #- apt-get --yes --force-yes install cmake python gcc cmake-data g++ git wget #- apt-get --yes --force-yes install pkg-config python-numpy python3-numpy libopenmpi-dev From e5987628577f95992a6437aca2ceea1d6a9cebf2 Mon Sep 17 00:00:00 2001 From: Richard Zamora Date: Thu, 23 Mar 2017 10:04:03 -0600 Subject: [PATCH 37/53] testing simple ci, attempt 3 --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97281e60eb..189880eae3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,12 +3,13 @@ image: ubuntu:latest #before_script: script: -# Install Linux Packages: + # Install Linux Packages: - apt-get update - hostname - pwd - export HOME=/builds/exaalt/ - env + #- apt-get --yes --force-yes install gfortran libblas-dev liblapack-dev #- apt-get --yes --force-yes install cmake python gcc cmake-data g++ git wget #- apt-get --yes --force-yes install pkg-config python-numpy python3-numpy libopenmpi-dev From 969325bf441453ac12a2931b0f47d4aa6ea9f89f Mon Sep 17 00:00:00 2001 From: Richard Zamora Date: Thu, 23 Mar 2017 10:08:09 -0600 Subject: [PATCH 38/53] testing simple ci, attempt 4 --- .gitlab-ci.yml | 39 ++++++++------------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 189880eae3..f44ffb6a70 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,34 +1,11 @@ image: ubuntu:latest -#before_script: -script: +test: + script: + # Install Linux Packages: + - apt-get update + - hostname + - pwd + - export HOME=/builds/exaalt/ + - env - # Install Linux Packages: - - apt-get update - - hostname - - pwd - - export HOME=/builds/exaalt/ - - env - -#- apt-get --yes --force-yes install gfortran libblas-dev liblapack-dev -#- apt-get --yes --force-yes install cmake python gcc cmake-data g++ git wget -#- apt-get --yes --force-yes install pkg-config python-numpy python3-numpy libopenmpi-dev -# -## Build LATTE: -#- cd /builds/exaalt/exaalt/LATTE/ -#- cp ./makefiles/makefile.CHOICES.gfort.lapack.lmp makefile.CHOICES -#- make -# -## Build LAMMPS: -#- cd /builds/exaalt/exaalt/lammps/lib/latte/ -#- cp Makefile.lammps.gfortran Makefile.lammps -#- cd /builds/exaalt/exaalt/lammps/src/ -#- make yes-latte -#- make yes-molecule -#- make serial -# -#script: -# -## Test LAMMPS-LATTE Example: -#- cd /builds/exaalt/exaalt/lammps/examples/latte/ -#- ../../src/lmp_serial -in in.latte.water From df95b2c566e8b50e67d7cbebdb92cbb9f8c6c419 Mon Sep 17 00:00:00 2001 From: Richard Zamora Date: Thu, 23 Mar 2017 22:27:42 -0600 Subject: [PATCH 39/53] testing simple ci, more complex #1 --- .gitlab-ci.yml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f44ffb6a70..67ad4ac722 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,11 +1,36 @@ image: ubuntu:latest test: - script: + + before_script: + # Install Linux Packages: - apt-get update - hostname - - pwd - export HOME=/builds/exaalt/ - env + - apt-get --yes --force-yes install gfortran libblas-dev liblapack-dev + - apt-get --yes --force-yes install cmake python gcc cmake-data g++ git wget + - apt-get --yes --force-yes install pkg-config python-numpy python3-numpy libopenmpi-dev + + # Build LATTE: + - cd /builds/exaalt/ + - git clone https://github.com/lanl/LATTE.git + - cd LATTE + - cp ./makefiles/makefile.CHOICES.gfort.lapack.lmp makefile.CHOICES + - make + + # Build LAMMPS: + - cd /builds/exaalt/lammps/lib/latte/ + - cp Makefile.lammps.gfortran Makefile.lammps + - cd /builds/exaalt/lammps/src/ + - make yes-latte + - make yes-molecule + - make serial + + script: + + # Test LAMMPS-LATTE Example: + - cd /builds/exaalt/lammps/examples/latte/ + - ../../src/lmp_serial -in in.latte.water From 98713680ec1bd3adf1573bb0374cab87e9de31a0 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Wed, 17 May 2017 11:36:31 -0600 Subject: [PATCH 40/53] added alternative linking line for intel mkl --- lib/latte/Makefile.lammps.ifort | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/latte/Makefile.lammps.ifort b/lib/latte/Makefile.lammps.ifort index 1d5c55b2fc..af622dfbd2 100644 --- a/lib/latte/Makefile.lammps.ifort +++ b/lib/latte/Makefile.lammps.ifort @@ -15,6 +15,13 @@ latte_SYSINC = -I${latte_PATH}/src -I${bml_PATH}/install/include -I${progress_P latte_SYSLIB = -openmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a \ -lifcore -lsvml -lompstub -limf -L${MKLROOT}/lib/intel64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 \ -lmkl_intel_thread -lmkl_core -lmkl_intel_thread -lpthread -openmp -O0 \ + +# 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 From 60faca2896eeecb50350d318f8237c7f54b26141 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Fri, 14 Jul 2017 10:05:38 -0600 Subject: [PATCH 41/53] added tilt factors --- src/LATTE/fix_latte.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 77a186adb9..a35318bc3a 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -46,7 +46,8 @@ using namespace FixConst; extern "C" { void latte(int *, int *, double *, int *, int *, - double *, double *, double *, double *, int*, + double *, double *, double *, double *, + double *, double *, double *, int*, double *, double *, double *, double * ); } @@ -281,8 +282,9 @@ void FixLatte::post_force(int vflag) else forces = &atom->f[0][0]; int maxiter = -1; - - latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi, + + latte(flags,&natoms,coords,type,&ntypes,mass,boxlo,boxhi,&domain->xy, + &domain->xz,&domain->yz, forces,&maxiter,&latte_energy,&atom->v[0][0],&update->dt,virial); // sum LATTE forces to LAMMPS (Coulombic) forces From fce633aa5f4de7b55801a55578c907579d254bca Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 8 Sep 2017 11:33:49 -0600 Subject: [PATCH 42/53] cmake: tweaks for EXAALT superbuild, add latte_fix --- cmake/CMakeLists.txt | 17 +++++++++++------ cmake/Modules/FindLATTE.cmake | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 cmake/Modules/FindLATTE.cmake diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 76c28fcb72..2dabfb788d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -6,8 +6,8 @@ cmake_minimum_required(VERSION 3.1) project(lammps) set(SOVERSION 0) -set(LAMMPS_SOURCE_DIR ${CMAKE_SOURCE_DIR}/../src) -set(LAMMPS_LIB_SOURCE_DIR ${CMAKE_SOURCE_DIR}/../lib) +set(LAMMPS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src) +set(LAMMPS_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib) set(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib) #To not conflict with old Makefile build system, we build everything here @@ -16,7 +16,7 @@ file(GLOB LMP_SOURCES ${LAMMPS_SOURCE_DIR}/main.cpp) list(REMOVE_ITEM LIB_SOURCES ${LMP_SOURCES}) # Cmake modules/macros are in a subdirectory to keep this file cleaner -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/Modules) +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules) if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS) #release comes with -O3 by default @@ -85,7 +85,7 @@ option(ENABLE_ALL "Build all default packages" OFF) set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GRANULAR KSPACE MANYBODY MC MEAM MISC MOLECULE PERI QEQ REAX REPLICA RIGID SHOCK SNAP SRD) -set(OTHER_PACKAGES KIM PYTHON MSCG MPIIO VORONOI POEMS +set(OTHER_PACKAGES KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE USER-ATC USER-AWPMD USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC @@ -182,7 +182,7 @@ if(ENABLE_PYTHON) -c "import distutils.sysconfig as cg; print(cg.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}'))" OUTPUT_VARIABLE PYTHON_INSTDIR OUTPUT_STRIP_TRAILING_WHITESPACE) endif() - install(FILES ${CMAKE_SOURCE_DIR}/../python/lammps.py DESTINATION ${PYTHON_INSTDIR}) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../python/lammps.py DESTINATION ${PYTHON_INSTDIR}) if(NOT BUILD_SHARED_LIBS) message(FATAL_ERROR "Python package need lammps to be build shared, use -DBUILD_SHARED_LIBS=ON") endif() @@ -221,6 +221,11 @@ if(ENABLE_VORONOI) list(APPEND LAMMPS_LINK_LIBS ${VORO_LIBRARIES}) endif() +if(ENABLE_LATTE) + find_package(LATTE REQUIRED) + list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES}) +endif() + if(ENABLE_USER-MOLFILE) list(APPEND LAMMPS_LINK_LIBS ${CMAKE_DL_LIBS}) endif() @@ -477,7 +482,7 @@ if(ENABLE_GPU) get_property(GPU_SOURCES GLOBAL PROPERTY GPU_SOURCES) file(GLOB GPU_LIB_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/gpu/*.cpp) - file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/*.cu ${CMAKE_SOURCE_DIR}/gpu/*.cu) + file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/*.cu) file(GLOB_RECURSE GPU_NOT_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu) list(REMOVE_ITEM GPU_LIB_CU ${GPU_NOT_LIB_CU}) include_directories(${GPU_SOURCES_DIR} ${LAMMPS_LIB_SOURCE_DIR}/gpu ${LAMMPS_LIB_BINARY_DIR}/gpu) diff --git a/cmake/Modules/FindLATTE.cmake b/cmake/Modules/FindLATTE.cmake new file mode 100644 index 0000000000..686c67940f --- /dev/null +++ b/cmake/Modules/FindLATTE.cmake @@ -0,0 +1,18 @@ +# - Find latte +# Find the native LATTE libraries. +# +# LATTE_LIBRARIES - List of libraries when using fftw3. +# LATTE_FOUND - True if fftw3 found. +# + +find_library(LATTE_LIBRARY NAMES latte) + +set(LATTE_LIBRARIES ${LATTE_LIBRARY}) + +include(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set LATTE_FOUND to TRUE +# if all listed variables are TRUE + +find_package_handle_standard_args(LATTE DEFAULT_MSG LATTE_LIBRARY) + +mark_as_advanced(LATTE_LIBRARY) From b861ea342e46374999de5695bd93f465dfd16f1a Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 8 Sep 2017 11:54:32 -0600 Subject: [PATCH 43/53] cmake: fix LATTE linkage --- cmake/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 2dabfb788d..6d35db75a8 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -120,7 +120,7 @@ endif() ###################################################### # packages with special compiler needs or external libs ###################################################### -if(ENABLE_REAX OR ENABLE_MEAM OR ENABLE_USER-QUIP OR ENABLE_USER-QMMM) +if(ENABLE_REAX OR ENABLE_MEAM OR ENABLE_USER-QUIP OR ENABLE_USER-QMMM OR ENABLE_LATTE) enable_language(Fortran) endif() @@ -223,7 +223,7 @@ endif() if(ENABLE_LATTE) find_package(LATTE REQUIRED) - list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES}) + list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) endif() if(ENABLE_USER-MOLFILE) From d84825fd7ff42409064344ae767cc9f6928e2f41 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 13 Sep 2017 14:37:24 -0600 Subject: [PATCH 44/53] remove useless files --- .gitlab-ci.yml | 36 ------------------------------------ test.txt | 1 - 2 files changed, 37 deletions(-) delete mode 100644 .gitlab-ci.yml delete mode 100644 test.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 67ad4ac722..0000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,36 +0,0 @@ -image: ubuntu:latest - -test: - - before_script: - - # Install Linux Packages: - - apt-get update - - hostname - - export HOME=/builds/exaalt/ - - env - - apt-get --yes --force-yes install gfortran libblas-dev liblapack-dev - - apt-get --yes --force-yes install cmake python gcc cmake-data g++ git wget - - apt-get --yes --force-yes install pkg-config python-numpy python3-numpy libopenmpi-dev - - # Build LATTE: - - cd /builds/exaalt/ - - git clone https://github.com/lanl/LATTE.git - - cd LATTE - - cp ./makefiles/makefile.CHOICES.gfort.lapack.lmp makefile.CHOICES - - make - - # Build LAMMPS: - - cd /builds/exaalt/lammps/lib/latte/ - - cp Makefile.lammps.gfortran Makefile.lammps - - cd /builds/exaalt/lammps/src/ - - make yes-latte - - make yes-molecule - - make serial - - script: - - # Test LAMMPS-LATTE Example: - - cd /builds/exaalt/lammps/examples/latte/ - - ../../src/lmp_serial -in in.latte.water - diff --git a/test.txt b/test.txt deleted file mode 100644 index b089100527..0000000000 --- a/test.txt +++ /dev/null @@ -1 +0,0 @@ -The creation of this file is for testing purposes only. From 66f59f9ec0b7472f9a32a93b47b2e293880d94b2 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 13 Sep 2017 15:51:03 -0600 Subject: [PATCH 45/53] FindLATTE.cmake: fixed a typo --- cmake/Modules/FindLATTE.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/FindLATTE.cmake b/cmake/Modules/FindLATTE.cmake index 686c67940f..74d5173bf0 100644 --- a/cmake/Modules/FindLATTE.cmake +++ b/cmake/Modules/FindLATTE.cmake @@ -1,8 +1,8 @@ # - Find latte # Find the native LATTE libraries. # -# LATTE_LIBRARIES - List of libraries when using fftw3. -# LATTE_FOUND - True if fftw3 found. +# LATTE_LIBRARIES - List of libraries when using latte. +# LATTE_FOUND - True if latte found. # find_library(LATTE_LIBRARY NAMES latte) From 39daf3c6f68f8b7055dce3608a77a1623ea60b06 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Fri, 15 Sep 2017 17:40:34 -0600 Subject: [PATCH 46/53] added fix_latte.txt --- src/fix_latte.txt | 171 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 src/fix_latte.txt diff --git a/src/fix_latte.txt b/src/fix_latte.txt new file mode 100644 index 0000000000..4c9d0f9f95 --- /dev/null +++ b/src/fix_latte.txt @@ -0,0 +1,171 @@ +"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). From 02665e45a4005a7a4846ad3dfc2cd77532d13f44 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 15 Sep 2017 17:52:14 -0600 Subject: [PATCH 47/53] fix doc in lib/latte/Makefile.lammps.* --- lib/latte/Makefile.lammps.gfortran | 2 +- lib/latte/Makefile.lammps.gfortran.dev | 2 +- lib/latte/Makefile.lammps.ifort | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index fa6a44869f..3db8f13682 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -2,7 +2,7 @@ # 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/qmmd/bml +# BML: https://github.com/lanl/bml # PROGRESS: https://github.com/losalamos/qmd-progress # METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download diff --git a/lib/latte/Makefile.lammps.gfortran.dev b/lib/latte/Makefile.lammps.gfortran.dev index b2876f9777..12b3c1985f 100644 --- a/lib/latte/Makefile.lammps.gfortran.dev +++ b/lib/latte/Makefile.lammps.gfortran.dev @@ -2,7 +2,7 @@ # 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/qmmd/bml +# BML: https://github.com/lanl/bml # PROGRESS: https://github.com/losalamos/qmd-progress # METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download diff --git a/lib/latte/Makefile.lammps.ifort b/lib/latte/Makefile.lammps.ifort index af622dfbd2..4c89ec2a96 100644 --- a/lib/latte/Makefile.lammps.ifort +++ b/lib/latte/Makefile.lammps.ifort @@ -2,7 +2,7 @@ # 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/qmmd/bml +# BML: https://github.com/lanl/bml # PROGRESS: https://github.com/losalamos/qmd-progress # METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download From ac897ea6457cf101a9e6ef24d90a842f1e93ddd1 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 19 Sep 2017 16:27:25 -0600 Subject: [PATCH 48/53] LATTE package doc update and some small code changes --- doc/src/Section_packages.txt | 60 + doc/src/fix_latte.txt | 200 +++ examples/README | 1 + examples/latte/data.sucrose_non_opt.lmp | 63 - ...{in.latte.sucrose.min => in.latte.sucrose} | 11 +- examples/latte/log.19Sep17.latte.water.g++.1 | 103 ++ .../latte/log.19Sep17.latte.water.min.g++.1 | 1102 +++++++++++++++++ lib/latte/Install.py | 178 +++ lib/latte/Makefile.lammps.gfortran | 30 +- lib/latte/Makefile.lammps.gfortran.dev | 27 - lib/latte/Makefile.lammps.ifort | 35 +- lib/latte/README | 74 +- src/LATTE/Install.sh | 4 +- src/LATTE/README | 29 +- src/LATTE/fix_latte.cpp | 33 +- src/LATTE/fix_latte.h | 1 + src/fix_latte.txt | 171 --- 17 files changed, 1737 insertions(+), 385 deletions(-) create mode 100644 doc/src/fix_latte.txt delete mode 100644 examples/latte/data.sucrose_non_opt.lmp rename examples/latte/{in.latte.sucrose.min => in.latte.sucrose} (79%) create mode 100644 examples/latte/log.19Sep17.latte.water.g++.1 create mode 100644 examples/latte/log.19Sep17.latte.water.min.g++.1 create mode 100644 lib/latte/Install.py delete mode 100644 lib/latte/Makefile.lammps.gfortran.dev delete mode 100644 src/fix_latte.txt diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index c6f976fe23..d9a9fb4163 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -96,6 +96,7 @@ Package, Description, Doc page, Example, Library "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, - "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, - "MC"_#MC, Monte Carlo options, "fix gcmc"_fix_gcmc.html, -, - "MEAM"_#MEAM, modified EAM potential, "pair_style meam"_pair_meam.html, meam, int @@ -695,6 +696,65 @@ bench/in.rhodo :ul :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 [Contents:] diff --git a/doc/src/fix_latte.txt b/doc/src/fix_latte.txt new file mode 100644 index 0000000000..d50d32bc48 --- /dev/null +++ b/doc/src/fix_latte.txt @@ -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). diff --git a/examples/README b/examples/README index dc622ef7c4..a8dfe63d92 100644 --- a/examples/README +++ b/examples/README @@ -79,6 +79,7 @@ granregion: use of fix wall/region/gran as boundary on granular particles hugoniostat: Hugoniostat shock dynamics indent: spherical indenter into a 2d solid 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) melt: rapid melt of 3d LJ system micelle: self-assembly of small lipid-like molecules into 2d bilayers diff --git a/examples/latte/data.sucrose_non_opt.lmp b/examples/latte/data.sucrose_non_opt.lmp deleted file mode 100644 index a96a19eddb..0000000000 --- a/examples/latte/data.sucrose_non_opt.lmp +++ /dev/null @@ -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 diff --git a/examples/latte/in.latte.sucrose.min b/examples/latte/in.latte.sucrose similarity index 79% rename from examples/latte/in.latte.sucrose.min rename to examples/latte/in.latte.sucrose index 9513af9ac6..19df43ff99 100644 --- a/examples/latte/in.latte.sucrose.min +++ b/examples/latte/in.latte.sucrose @@ -1,4 +1,4 @@ -# simple water model with LATTE +# simple sucrose model with LATTE units metal atom_style full @@ -34,10 +34,7 @@ fix_modify 2 energy yes thermo_style custom step temp pe etotal -# minimization +# dynamics -thermo 1 -min_style cg -min_modify dmax 0.1 -min_modify line quadratic -minimize 1.0e-6 1.0e-6 10000 10000 +thermo 10 +run 100 diff --git a/examples/latte/log.19Sep17.latte.water.g++.1 b/examples/latte/log.19Sep17.latte.water.g++.1 new file mode 100644 index 0000000000..15bc2d4d9a --- /dev/null +++ b/examples/latte/log.19Sep17.latte.water.g++.1 @@ -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 diff --git a/examples/latte/log.19Sep17.latte.water.min.g++.1 b/examples/latte/log.19Sep17.latte.water.min.g++.1 new file mode 100644 index 0000000000..44838091c7 --- /dev/null +++ b/examples/latte/log.19Sep17.latte.water.min.g++.1 @@ -0,0 +1,1102 @@ +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 + +# minimization + +thermo 1 +min_style fire +minimize 1.0e-9 1.0e-9 1000 1000 +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 + 1 1.5201687 -104.95614 -104.95162 + 2 6.808687 -104.96609 -104.94585 + 3 17.096723 -104.98663 -104.9358 + 4 33.629788 -105.01804 -104.91806 + 5 57.516859 -105.06035 -104.88935 + 6 89.635927 -105.11328 -104.8468 + 7 133.00392 -105.18246 -104.78704 + 8 189.48221 -105.27034 -104.70701 + 9 261.04605 -105.37899 -104.6029 + 10 349.44219 -105.50971 -104.47083 + 11 455.87927 -105.66241 -104.30709 + 12 580.58686 -105.8348 -104.10872 + 13 722.21599 -106.02157 -103.87443 + 14 877.0209 -106.21372 -103.60635 + 15 1037.5706 -106.3988 -103.31412 + 16 1190.0576 -106.56282 -103.0248 + 17 1308.737 -106.69593 -102.80507 + 18 1356.6462 -106.80052 -102.76723 + 19 1324.2012 -106.89597 -102.95914 + 20 1253.6752 -107.00898 -103.28182 + 21 1189.7219 -107.15076 -103.61374 + 22 1145.1972 -107.29296 -103.88831 + 23 1097.3801 -107.37395 -104.11146 + 24 1010.5781 -107.35683 -104.3524 + 25 2.7642487 -107.35683 -107.34861 + 26 12.06607 -107.37413 -107.33826 + 27 29.389846 -107.4078 -107.32042 + 28 55.737552 -107.45419 -107.28848 + 29 91.202574 -107.50779 -107.23664 + 30 134.63588 -107.56184 -107.16157 + 31 185.21604 -107.61416 -107.06352 + 32 235.87146 -107.65808 -106.95684 + 33 274.09495 -107.69189 -106.87701 + 34 293.31507 -107.72594 -106.85392 + 35 307.77093 -107.78314 -106.86814 + 36 339.57996 -107.88534 -106.87578 + 37 400.85391 -108.02136 -106.82963 + 38 484.65052 -108.12706 -106.6862 + 39 528.0129 -108.15301 -106.58324 + 40 2.4043703 -108.15301 -108.14586 + 41 10.447148 -108.16781 -108.13675 + 42 25.012648 -108.19542 -108.12106 + 43 46.1164 -108.23028 -108.09318 + 44 72.599193 -108.26441 -108.04857 + 45 101.66532 -108.28995 -107.9877 + 46 127.53127 -108.30326 -107.92411 + 47 137.26619 -108.3044 -107.89631 + 48 133.7112 -108.30622 -107.9087 + 49 136.36908 -108.33282 -107.9274 + 50 162.13426 -108.40551 -107.92349 + 51 217.8747 -108.50923 -107.86149 + 52 296.92621 -108.57482 -107.69206 + 53 335.06365 -108.56171 -107.56557 + 54 3.2295141 -108.56171 -108.55211 + 55 13.909877 -108.58127 -108.53992 + 56 32.803473 -108.61675 -108.51922 + 57 59.175985 -108.65851 -108.48258 + 58 90.493713 -108.69322 -108.42419 + 59 121.1211 -108.70878 -108.34869 + 60 134.03149 -108.70118 -108.30271 + 61 0.45680704 -108.70118 -108.69982 + 62 1.9220639 -108.70396 -108.69824 + 63 4.5573866 -108.70936 -108.69581 + 64 8.5126491 -108.71694 -108.69163 + 65 13.901778 -108.72605 -108.68472 + 66 20.795969 -108.73593 -108.6741 + 67 29.608718 -108.7468 -108.65877 + 68 40.203648 -108.75805 -108.63853 + 69 52.042332 -108.76919 -108.61447 + 70 64.159014 -108.78034 -108.5896 + 71 75.771577 -108.79236 -108.56709 + 72 86.942891 -108.8071 -108.54862 + 73 98.679499 -108.82686 -108.53348 + 74 112.70258 -108.85388 -108.51882 + 75 131.01392 -108.88888 -108.49938 + 76 155.01269 -108.92941 -108.46856 + 77 183.59183 -108.96971 -108.4239 + 78 208.14268 -109.00548 -108.38667 + 79 221.74997 -109.04482 -108.38557 + 80 240.49926 -109.10766 -108.39266 + 81 282.15521 -109.19299 -108.35415 + 82 343.75437 -109.24572 -108.22375 + 83 362.9105 -109.2425 -108.16357 + 84 403.79102 -109.29324 -108.09277 + 85 533.47235 -109.45377 -107.86776 + 86 620.34731 -109.14983 -107.30554 + 87 64.320652 -109.14983 -108.9586 + 88 270.57464 -109.45885 -108.65444 + 89 492.20963 -109.61818 -108.15485 + 90 0.60467192 -109.61818 -109.61639 + 91 2.6144224 -109.62188 -109.61411 + 92 6.2234632 -109.62872 -109.61022 + 93 11.397514 -109.63722 -109.60333 + 94 17.80749 -109.64529 -109.59235 + 95 24.69956 -109.65096 -109.57753 + 96 30.405841 -109.65342 -109.56302 + 97 32.007417 -109.65294 -109.55778 + 98 0.14532348 -109.65294 -109.65251 + 99 0.61550004 -109.65383 -109.652 + 100 1.4691163 -109.65556 -109.65119 + 101 2.7597829 -109.65799 -109.64979 + 102 4.5248313 -109.66092 -109.64747 + 103 6.7796415 -109.66409 -109.64393 + 104 9.6384283 -109.66756 -109.6389 + 105 13.025477 -109.67112 -109.63239 + 106 16.72282 -109.6746 -109.62488 + 107 20.380897 -109.67803 -109.61744 + 108 23.765982 -109.68173 -109.61108 + 109 26.990792 -109.68632 -109.60607 + 110 30.500628 -109.69267 -109.602 + 111 34.955593 -109.70154 -109.59762 + 112 41.059474 -109.71314 -109.59107 + 113 49.239692 -109.72643 -109.58004 + 114 58.88016 -109.73932 -109.56427 + 115 66.55829 -109.75073 -109.55285 + 116 71.13871 -109.7644 -109.55291 + 117 78.727695 -109.78737 -109.55332 + 118 94.495003 -109.81741 -109.53648 + 119 114.50742 -109.83433 -109.4939 + 120 120.62379 -109.83749 -109.47888 + 121 142.59007 -109.87061 -109.44669 + 122 195.72194 -109.9242 -109.34232 + 123 207.84133 -109.75345 -109.13554 + 124 35.157191 -109.75345 -109.64893 + 125 147.98442 -109.91974 -109.47978 + 126 264.7384 -109.98589 -109.19883 + 127 0.47051461 -109.98589 -109.98449 + 128 2.015355 -109.98873 -109.98274 + 129 4.7258223 -109.99385 -109.9798 + 130 8.4742975 -109.99986 -109.97467 + 131 12.881215 -110.00486 -109.96657 + 132 17.120211 -110.00727 -109.95638 + 133 18.853219 -110.00671 -109.95066 + 134 0.049315826 -110.00671 -110.00657 + 135 0.21016075 -110.00702 -110.00639 + 136 0.50628438 -110.00762 -110.00611 + 137 0.96149821 -110.00847 -110.00561 + 138 1.5944825 -110.00953 -110.00479 + 139 2.4154448 -110.01072 -110.00354 + 140 3.4732679 -110.01209 -110.00176 + 141 4.7568004 -110.01357 -109.99942 + 142 6.2155655 -110.01509 -109.99661 + 143 7.7429964 -110.01663 -109.99361 + 144 9.2255652 -110.01827 -109.99084 + 145 10.654118 -110.02019 -109.98852 + 146 12.1764 -110.02273 -109.98653 + 147 14.061879 -110.02625 -109.98445 + 148 16.636125 -110.03101 -109.98155 + 149 20.183789 -110.03683 -109.97683 + 150 24.749482 -110.04313 -109.96955 + 151 29.465936 -110.04917 -109.96157 + 152 32.835843 -110.05564 -109.95802 + 153 36.307815 -110.06511 -109.95717 + 154 42.640377 -110.07913 -109.95236 + 155 53.335987 -110.09229 -109.93372 + 156 59.52499 -110.09859 -109.92162 + 157 64.805012 -110.1105 -109.91783 + 158 84.05518 -110.14398 -109.89409 + 159 108.56754 -110.13288 -109.81011 + 160 4.1106505 -110.13288 -110.12066 + 161 17.351424 -110.15432 -110.10274 + 162 34.434168 -110.1739 -110.07153 + 163 38.293556 -110.15649 -110.04264 + 164 0.56281645 -110.15649 -110.15481 + 165 2.3904042 -110.15985 -110.15274 + 166 5.5501762 -110.16586 -110.14936 + 167 9.8340496 -110.17282 -110.14358 + 168 14.736744 -110.1784 -110.13459 + 169 19.307459 -110.18061 -110.12321 + 170 0.0065628716 -110.18061 -110.18059 + 171 0.028903477 -110.18065 -110.18056 + 172 0.07206358 -110.18073 -110.18052 + 173 0.14167704 -110.18087 -110.18044 + 174 0.2432297 -110.18104 -110.18032 + 175 0.38157525 -110.18126 -110.18013 + 176 0.57077598 -110.18155 -110.17985 + 177 0.82062274 -110.18192 -110.17948 + 178 1.1425778 -110.18239 -110.17899 + 179 1.5491674 -110.18297 -110.17837 + 180 2.0542078 -110.1837 -110.17759 + 181 2.6736416 -110.18455 -110.17661 + 182 3.4275312 -110.18565 -110.17546 + 183 4.3437566 -110.18697 -110.17406 + 184 5.4629592 -110.18863 -110.17239 + 185 6.8429151 -110.19074 -110.17039 + 186 8.558499 -110.19334 -110.1679 + 187 10.692141 -110.19653 -110.16474 + 188 13.310329 -110.20037 -110.1608 + 189 16.442058 -110.20502 -110.15614 + 190 20.134782 -110.21071 -110.15085 + 191 24.609014 -110.21761 -110.14445 + 192 30.257672 -110.22595 -110.13599 + 193 37.14715 -110.23562 -110.12518 + 194 44.381882 -110.2469 -110.11496 + 195 52.302288 -110.26099 -110.1055 + 196 63.063861 -110.27647 -110.08898 + 197 70.430937 -110.29106 -110.08167 + 198 78.953909 -110.3136 -110.07887 + 199 97.133765 -110.3244 -110.03563 + 200 2.3397267 -110.3244 -110.31745 + 201 9.9507947 -110.3357 -110.30612 + 202 18.252321 -110.33895 -110.28468 + 203 0.11908387 -110.33895 -110.33859 + 204 0.50535824 -110.33965 -110.33815 + 205 1.1576304 -110.34086 -110.33742 + 206 2.004619 -110.34215 -110.33619 + 207 2.8994964 -110.34306 -110.33444 + 208 3.5526113 -110.34348 -110.33292 + 209 3.9282379 -110.34372 -110.33205 + 210 4.3544709 -110.34438 -110.33143 + 211 5.2437118 -110.34617 -110.33058 + 212 6.9571269 -110.34945 -110.32876 + 213 9.5965365 -110.35329 -110.32476 + 214 12.473823 -110.35524 -110.31816 + 215 12.392386 -110.35514 -110.3183 + 216 13.141518 -110.35781 -110.31874 + 217 18.385711 -110.36822 -110.31356 + 218 26.967993 -110.37299 -110.29282 + 219 0.27744298 -110.37299 -110.37217 + 220 1.1872367 -110.37457 -110.37104 + 221 2.6133584 -110.37688 -110.36911 + 222 4.1221053 -110.3782 -110.36594 + 223 4.6040177 -110.37758 -110.36389 + 224 0.038524702 -110.37758 -110.37747 + 225 0.16360485 -110.37782 -110.37733 + 226 0.38846835 -110.37826 -110.37711 + 227 0.72006206 -110.37887 -110.37673 + 228 1.15539 -110.37954 -110.37611 + 229 1.6790598 -110.3802 -110.3752 + 230 2.2798399 -110.38081 -110.37403 + 231 2.8672337 -110.38134 -110.37282 + 232 3.3478905 -110.38182 -110.37187 + 233 3.7553338 -110.38241 -110.37124 + 234 4.2370426 -110.38334 -110.37074 + 235 4.9776058 -110.38485 -110.37005 + 236 6.1525909 -110.38704 -110.36874 + 237 7.8624459 -110.38958 -110.36621 + 238 9.9211391 -110.39179 -110.3623 + 239 11.098374 -110.39351 -110.36052 + 240 11.835907 -110.39611 -110.36092 + 241 13.879769 -110.40138 -110.36012 + 242 18.005229 -110.40769 -110.35416 + 243 22.038485 -110.40864 -110.34312 + 244 0.33152568 -110.40864 -110.40766 + 245 1.4129442 -110.41053 -110.40633 + 246 3.1138224 -110.41334 -110.40408 + 247 4.9440082 -110.41504 -110.40035 + 248 5.6140158 -110.41433 -110.39764 + 249 0.032328434 -110.41433 -110.41423 + 250 0.13741849 -110.41453 -110.41412 + 251 0.32731465 -110.4149 -110.41393 + 252 0.60968042 -110.41542 -110.41361 + 253 0.98438724 -110.41601 -110.41308 + 254 1.4414324 -110.4166 -110.41231 + 255 1.9783767 -110.41717 -110.41129 + 256 2.5269237 -110.41767 -110.41016 + 257 2.9864493 -110.4181 -110.40922 + 258 3.3404751 -110.41856 -110.40863 + 259 3.7000476 -110.41924 -110.40824 + 260 4.2283185 -110.42036 -110.40779 + 261 5.0929444 -110.42209 -110.40695 + 262 6.4211772 -110.4243 -110.40521 + 263 8.2088401 -110.42647 -110.40207 + 264 9.7475518 -110.42811 -110.39913 + 265 10.398229 -110.42987 -110.39896 + 266 11.593843 -110.43342 -110.39895 + 267 14.481156 -110.43927 -110.39622 + 268 19.109019 -110.44284 -110.38603 + 269 0.10999952 -110.44284 -110.44251 + 270 0.47243724 -110.44349 -110.44208 + 271 1.0736256 -110.44454 -110.44135 + 272 1.807867 -110.44548 -110.4401 + 273 2.4452359 -110.44599 -110.43872 + 274 2.6625254 -110.44599 -110.43808 + 275 2.785323 -110.44615 -110.43787 + 276 3.302696 -110.44719 -110.43737 + 277 4.6100787 -110.44981 -110.43611 + 278 6.8021878 -110.45302 -110.4328 + 279 9.1774593 -110.45428 -110.427 + 280 0.06090137 -110.45428 -110.4541 + 281 0.26196159 -110.45465 -110.45387 + 282 0.61371568 -110.4553 -110.45348 + 283 1.0959743 -110.45606 -110.4528 + 284 1.6532799 -110.45669 -110.45177 + 285 2.1625988 -110.45709 -110.45066 + 286 2.492327 -110.45735 -110.44994 + 287 2.7144098 -110.45775 -110.44968 + 288 3.097138 -110.45866 -110.44946 + 289 3.9134697 -110.46038 -110.44875 + 290 5.3413962 -110.46285 -110.44697 + 291 7.3225065 -110.46502 -110.44325 + 292 8.5167013 -110.466 -110.44068 + 293 9.0887705 -110.46724 -110.44022 + 294 11.341897 -110.472 -110.43828 + 295 16.144881 -110.47893 -110.43093 + 296 20.323071 -110.47596 -110.41554 + 297 0.62480115 -110.47596 -110.4741 + 298 2.6374357 -110.47942 -110.47158 + 299 5.6021367 -110.484 -110.46734 + 300 8.2032986 -110.48519 -110.4608 + 301 0.015187497 -110.48519 -110.48514 + 302 0.066019062 -110.48528 -110.48509 + 303 0.16066379 -110.48547 -110.48499 + 304 0.30540054 -110.48573 -110.48482 + 305 0.50262503 -110.48603 -110.48454 + 306 0.7493026 -110.48636 -110.48414 + 307 1.0487089 -110.48672 -110.4836 + 308 1.3812875 -110.4871 -110.483 + 309 1.7239596 -110.48754 -110.48241 + 310 2.0783529 -110.48807 -110.48189 + 311 2.4965626 -110.48882 -110.4814 + 312 3.0728969 -110.4899 -110.48076 + 313 3.9147407 -110.49136 -110.47972 + 314 5.0989332 -110.49314 -110.47799 + 315 6.5265502 -110.49493 -110.47553 + 316 7.8355869 -110.49689 -110.47359 + 317 9.2485993 -110.4996 -110.47211 + 318 11.39912 -110.50353 -110.46964 + 319 14.616181 -110.50755 -110.46409 + 320 16.629185 -110.51002 -110.46058 + 321 17.915541 -110.51459 -110.46133 + 322 23.33314 -110.52495 -110.45558 + 323 30.701654 -110.5184 -110.42712 + 324 1.7024233 -110.5184 -110.51334 + 325 7.2172864 -110.52715 -110.5057 + 326 14.136271 -110.53408 -110.49206 + 327 0.0091732469 -110.53408 -110.53406 + 328 0.040486998 -110.53414 -110.53402 + 329 0.10076896 -110.53426 -110.53396 + 330 0.19723065 -110.53444 -110.53385 + 331 0.33648313 -110.53468 -110.53368 + 332 0.52395589 -110.53498 -110.53342 + 333 0.77740543 -110.53536 -110.53305 + 334 1.1094345 -110.53587 -110.53257 + 335 1.5378094 -110.53652 -110.53195 + 336 2.0877795 -110.53736 -110.53115 + 337 2.7946127 -110.53844 -110.53013 + 338 3.7019787 -110.53981 -110.5288 + 339 4.8522999 -110.54151 -110.52708 + 340 6.2758334 -110.54361 -110.52495 + 341 8.0206889 -110.54622 -110.52237 + 342 10.220372 -110.54951 -110.51912 + 343 13.023126 -110.55347 -110.51476 + 344 16.254162 -110.55805 -110.50973 + 345 19.635435 -110.56384 -110.50546 + 346 23.722197 -110.57066 -110.50014 + 347 27.359038 -110.57746 -110.49612 + 348 31.450587 -110.586 -110.4925 + 349 39.563961 -110.59108 -110.47346 + 350 1.4539052 -110.59108 -110.58676 + 351 6.1846365 -110.59786 -110.57947 + 352 10.912663 -110.59773 -110.56528 + 353 0.1418159 -110.59773 -110.5973 + 354 0.59634761 -110.59854 -110.59677 + 355 1.3265134 -110.59986 -110.59592 + 356 2.1737891 -110.601 -110.59454 + 357 2.8137884 -110.60134 -110.59298 + 358 0.0047385569 -110.60134 -110.60133 + 359 0.020794419 -110.60137 -110.60131 + 360 0.0514233 -110.60143 -110.60128 + 361 0.099863846 -110.60152 -110.60122 + 362 0.16870681 -110.60164 -110.60113 + 363 0.2594644 -110.60177 -110.601 + 364 0.37826008 -110.60194 -110.60081 + 365 0.5261316 -110.60214 -110.60057 + 366 0.70257336 -110.60237 -110.60028 + 367 0.90552875 -110.60265 -110.59996 + 368 1.1347907 -110.60298 -110.5996 + 369 1.3992667 -110.60339 -110.59923 + 370 1.7240145 -110.60394 -110.59881 + 371 2.1509141 -110.60466 -110.59826 + 372 2.7309435 -110.60558 -110.59746 + 373 3.5037713 -110.60669 -110.59627 + 374 4.4459813 -110.60796 -110.59474 + 375 5.4735635 -110.60946 -110.59318 + 376 6.6518712 -110.61139 -110.59162 + 377 8.208323 -110.61399 -110.58958 + 378 10.282841 -110.61685 -110.58628 + 379 12.01759 -110.61953 -110.5838 + 380 13.28516 -110.62337 -110.58387 + 381 15.889958 -110.62877 -110.58153 + 382 19.287881 -110.63021 -110.57287 + 383 0.46379478 -110.63021 -110.62883 + 384 1.9752244 -110.63267 -110.62679 + 385 3.9828624 -110.63496 -110.62312 + 386 4.7747037 -110.63317 -110.61897 + 387 0.071622328 -110.63317 -110.63296 + 388 0.30183499 -110.63359 -110.6327 + 389 0.69584184 -110.63436 -110.63229 + 390 1.2247432 -110.63525 -110.63161 + 391 1.8211576 -110.63599 -110.63057 + 392 2.3459167 -110.63635 -110.62937 + 393 2.4938393 -110.63632 -110.62891 + 394 0.0051669703 -110.63632 -110.63631 + 395 0.022381418 -110.63635 -110.63629 + 396 0.054808687 -110.63642 -110.63625 + 397 0.10567163 -110.63651 -110.6362 + 398 0.17755237 -110.63663 -110.6361 + 399 0.2719078 -110.63677 -110.63596 + 400 0.3946985 -110.63694 -110.63576 + 401 0.5457279 -110.63712 -110.6355 + 402 0.72129327 -110.63732 -110.63518 + 403 0.91127426 -110.63753 -110.63482 + 404 1.0989282 -110.63777 -110.6345 + 405 1.2714413 -110.63801 -110.63423 + 406 1.4388042 -110.6383 -110.63402 + 407 1.6387845 -110.63871 -110.63384 + 408 1.9260356 -110.63929 -110.63357 + 409 2.3588163 -110.64007 -110.63306 + 410 2.9831433 -110.641 -110.63213 + 411 3.7734773 -110.64198 -110.63076 + 412 4.5274242 -110.64299 -110.62953 + 413 5.2410718 -110.64427 -110.62869 + 414 6.2162991 -110.64617 -110.62769 + 415 7.7084244 -110.64852 -110.6256 + 416 9.5194461 -110.65032 -110.62202 + 417 9.8838935 -110.65176 -110.62237 + 418 11.184639 -110.65572 -110.62246 + 419 14.684588 -110.66029 -110.61664 + 420 0.068550589 -110.66029 -110.66009 + 421 0.29539378 -110.66068 -110.6598 + 422 0.64213101 -110.66121 -110.6593 + 423 0.97561769 -110.66146 -110.65856 + 424 1.0764453 -110.66136 -110.65816 + 425 0.021089898 -110.66136 -110.6613 + 426 0.089567929 -110.66149 -110.66123 + 427 0.21066154 -110.66173 -110.6611 + 428 0.38347957 -110.66203 -110.66089 + 429 0.59952234 -110.66233 -110.66055 + 430 0.83976182 -110.66259 -110.66009 + 431 1.0731469 -110.66279 -110.6596 + 432 1.2460831 -110.66295 -110.65924 + 433 1.3801286 -110.66311 -110.659 + 434 1.5548502 -110.66346 -110.65883 + 435 1.8597768 -110.66409 -110.65856 + 436 2.3713797 -110.66503 -110.65798 + 437 3.1163555 -110.66606 -110.6568 + 438 3.9143615 -110.6668 -110.65516 + 439 4.1492514 -110.6673 -110.65496 + 440 4.4760907 -110.66844 -110.65513 + 441 5.6336568 -110.67098 -110.65423 + 442 7.6642733 -110.67297 -110.65018 + 443 0.03238132 -110.67297 -110.67287 + 444 0.13978415 -110.67316 -110.67275 + 445 0.32089579 -110.67348 -110.67253 + 446 0.54931661 -110.67379 -110.67215 + 447 0.76754392 -110.67398 -110.6717 + 448 0.90357041 -110.67409 -110.6714 + 449 1.029454 -110.67429 -110.67123 + 450 1.2841241 -110.67482 -110.671 + 451 1.7935857 -110.6758 -110.67047 + 452 2.5904597 -110.67691 -110.66921 + 453 3.3674255 -110.67748 -110.66746 + 454 3.5590305 -110.67772 -110.66714 + 455 4.3558952 -110.67927 -110.66632 + 456 6.5321949 -110.68267 -110.66325 + 457 9.0736951 -110.68153 -110.65455 + 458 0.29052224 -110.68153 -110.68067 + 459 1.2270991 -110.68312 -110.67947 + 460 2.5707455 -110.68509 -110.67745 + 461 3.6258533 -110.6852 -110.67442 + 462 0.012225256 -110.6852 -110.68516 + 463 0.052556953 -110.68527 -110.68512 + 464 0.12578634 -110.68541 -110.68504 + 465 0.2339884 -110.6856 -110.68491 + 466 0.37512927 -110.68581 -110.68469 + 467 0.54171271 -110.686 -110.68439 + 468 0.72382166 -110.68618 -110.68403 + 469 0.88407632 -110.68632 -110.68369 + 470 0.99721544 -110.68646 -110.6835 + 471 1.0951923 -110.68666 -110.6834 + 472 1.2448695 -110.68701 -110.68331 + 473 1.5161784 -110.68759 -110.68308 + 474 1.9620534 -110.68836 -110.68253 + 475 2.5878014 -110.68912 -110.68142 + 476 3.1271616 -110.6897 -110.6804 + 477 3.4332441 -110.69032 -110.68012 + 478 4.0061586 -110.69164 -110.67973 + 479 5.1910912 -110.69373 -110.67829 + 480 6.8379261 -110.69468 -110.67435 + 481 0.060888378 -110.69468 -110.6945 + 482 0.2583599 -110.69503 -110.69426 + 483 0.5715391 -110.69556 -110.69386 + 484 0.91943661 -110.69595 -110.69322 + 485 1.1196201 -110.69597 -110.69265 + 486 0.0055228977 -110.69597 -110.69596 + 487 0.023854618 -110.69601 -110.69594 + 488 0.057869256 -110.69608 -110.6959 + 489 0.10996303 -110.69617 -110.69584 + 490 0.18134438 -110.69628 -110.69574 + 491 0.27150481 -110.69641 -110.6956 + 492 0.38256549 -110.69657 -110.69543 + 493 0.50788932 -110.69671 -110.6952 + 494 0.63611745 -110.69685 -110.69496 + 495 0.75907076 -110.69702 -110.69476 + 496 0.88605958 -110.69723 -110.6946 + 497 1.0461601 -110.69754 -110.69443 + 498 1.2789289 -110.69798 -110.69417 + 499 1.62264 -110.69855 -110.69372 + 500 2.0946523 -110.69918 -110.69295 + 501 2.6088672 -110.69981 -110.69206 + 502 3.0358581 -110.70053 -110.6915 + 503 3.5515029 -110.7016 -110.69104 + 504 4.3985675 -110.70312 -110.69004 + 505 5.6459941 -110.70445 -110.68766 + 506 6.0990762 -110.70514 -110.687 + 507 6.7157715 -110.70701 -110.68705 + 508 9.0535843 -110.71091 -110.684 + 509 11.174598 -110.70688 -110.67365 + 510 0.79459723 -110.70688 -110.70451 + 511 3.3633858 -110.71096 -110.70096 + 512 6.5782726 -110.71417 -110.69462 + 513 0.0030935553 -110.71417 -110.71417 + 514 0.013674302 -110.71419 -110.71415 + 515 0.034072635 -110.71424 -110.71413 + 516 0.066750909 -110.7143 -110.7141 + 517 0.11396881 -110.71438 -110.71404 + 518 0.17757946 -110.71448 -110.71395 + 519 0.26362907 -110.71461 -110.71383 + 520 0.37639989 -110.71478 -110.71366 + 521 0.52186576 -110.715 -110.71345 + 522 0.70846407 -110.71529 -110.71319 + 523 0.94805742 -110.71569 -110.71287 + 524 1.2556523 -110.71616 -110.71243 + 525 1.6464782 -110.71674 -110.71185 + 526 2.1323412 -110.71746 -110.71112 + 527 2.7320161 -110.71836 -110.71024 + 528 3.4945293 -110.71945 -110.70907 + 529 4.4714878 -110.7208 -110.70751 + 530 5.5879842 -110.72237 -110.70575 + 531 6.7275757 -110.72434 -110.70434 + 532 8.1271374 -110.72667 -110.70251 + 533 9.3792267 -110.72894 -110.70106 + 534 10.826215 -110.73201 -110.69982 + 535 13.89306 -110.73411 -110.6928 + 536 0.43817773 -110.73411 -110.73281 + 537 1.865474 -110.73614 -110.73059 + 538 3.2770883 -110.73605 -110.72631 + 539 0.043880686 -110.73605 -110.73592 + 540 0.18484895 -110.7363 -110.73575 + 541 0.41271666 -110.73671 -110.73549 + 542 0.68110153 -110.73708 -110.73505 + 543 0.89647942 -110.7372 -110.73453 + 544 0.0014610616 -110.7372 -110.73719 + 545 0.0064191302 -110.73721 -110.73719 + 546 0.01589607 -110.73723 -110.73718 + 547 0.030925063 -110.73725 -110.73716 + 548 0.05236165 -110.73729 -110.73713 + 549 0.080752593 -110.73733 -110.73709 + 550 0.11814918 -110.73739 -110.73703 + 551 0.16512698 -110.73745 -110.73696 + 552 0.22193512 -110.73753 -110.73687 + 553 0.28849228 -110.73762 -110.73676 + 554 0.36521652 -110.73773 -110.73664 + 555 0.45482458 -110.73787 -110.73651 + 556 0.56434305 -110.73804 -110.73637 + 557 0.70577291 -110.73825 -110.73615 + 558 0.89434861 -110.73855 -110.73589 + 559 1.1431126 -110.73892 -110.73552 + 560 1.4493742 -110.73934 -110.73503 + 561 1.7925251 -110.73984 -110.73451 + 562 2.1904612 -110.74049 -110.73398 + 563 2.714606 -110.74132 -110.73325 + 564 3.4152072 -110.74235 -110.73219 + 565 4.066188 -110.74331 -110.73122 + 566 4.5620067 -110.74462 -110.73106 + 567 5.4219048 -110.74642 -110.7303 + 568 6.5798215 -110.74718 -110.72762 + 569 7.0885732 -110.7476 -110.72653 + 570 11.086029 -110.75246 -110.7195 + 571 14.984214 -110.73694 -110.69239 + 572 3.5196643 -110.73694 -110.72647 + 573 14.853405 -110.75248 -110.70832 + 574 24.581973 -110.7464 -110.67331 + 575 0.45195042 -110.7464 -110.74505 + 576 1.9114819 -110.749 -110.74331 + 577 4.2456497 -110.75307 -110.74045 + 578 6.8825072 -110.75614 -110.73568 + 579 8.8261902 -110.75549 -110.72925 + 580 0.013475296 -110.75549 -110.75545 + 581 0.056950074 -110.75557 -110.7554 + 582 0.13506437 -110.75573 -110.75532 + 583 0.2506323 -110.75594 -110.7552 + 584 0.40286684 -110.75619 -110.75499 + 585 0.58643564 -110.75643 -110.75469 + 586 0.7997906 -110.75665 -110.75427 + 587 1.0126418 -110.7568 -110.75379 + 588 1.1237802 -110.75684 -110.7535 + 589 0.00066194441 -110.75684 -110.75684 + 590 0.0028746739 -110.75684 -110.75684 + 591 0.0070881008 -110.75685 -110.75683 + 592 0.013811996 -110.75687 -110.75682 + 593 0.023535698 -110.75688 -110.75681 + 594 0.036672256 -110.7569 -110.75679 + 595 0.054442114 -110.75693 -110.75677 + 596 0.077521824 -110.75693 -110.7567 + 597 0.10655408 -110.75697 -110.75665 + 598 0.14198154 -110.75701 -110.75659 + 599 0.18392175 -110.75707 -110.75652 + 600 0.23211462 -110.75713 -110.75644 + 601 0.28617454 -110.7572 -110.75635 + 602 0.34642016 -110.75728 -110.75625 + 603 0.41516549 -110.75739 -110.75615 + 604 0.49775257 -110.75752 -110.75604 + 605 0.60260219 -110.7577 -110.7559 + 606 0.73999101 -110.75791 -110.75571 + 607 0.9188763 -110.75818 -110.75544 + 608 1.1389225 -110.75848 -110.75509 + 609 1.3827637 -110.75883 -110.75472 + 610 1.6460528 -110.75926 -110.75437 + 611 1.9722185 -110.75982 -110.75396 + 612 2.4233092 -110.76051 -110.7533 + 613 2.9802598 -110.76122 -110.75236 + 614 3.3985054 -110.762 -110.75189 + 615 3.8907399 -110.7632 -110.75163 + 616 4.7825252 -110.76448 -110.75027 + 617 5.1993395 -110.76479 -110.74933 + 618 6.0193345 -110.7662 -110.7483 + 619 9.4601226 -110.76935 -110.74123 + 620 0.081115681 -110.76935 -110.76911 + 621 0.34846154 -110.76976 -110.76872 + 622 0.66633086 -110.76998 -110.768 + 623 0.0042339109 -110.76998 -110.76996 + 624 0.018326856 -110.77 -110.76995 + 625 0.04377725 -110.77005 -110.76992 + 626 0.080956724 -110.77011 -110.76987 + 627 0.12888643 -110.77018 -110.7698 + 628 0.18495479 -110.77025 -110.7697 + 629 0.24960335 -110.77034 -110.7696 + 630 0.32486237 -110.77045 -110.76948 + 631 0.42087549 -110.77061 -110.76936 + 632 0.55333209 -110.77084 -110.76919 + 633 0.73561706 -110.77112 -110.76893 + 634 0.9596218 -110.77142 -110.76857 + 635 1.1547164 -110.77173 -110.7683 + 636 1.3486816 -110.77218 -110.76817 + 637 1.6965062 -110.77287 -110.76783 + 638 2.2807746 -110.77351 -110.76673 + 639 2.5869067 -110.77379 -110.7661 + 640 3.0917448 -110.77476 -110.76557 + 641 4.5533663 -110.77662 -110.76308 + 642 4.6826772 -110.77274 -110.75881 + 643 0.73339039 -110.77274 -110.77056 + 644 3.0918858 -110.77631 -110.76712 + 645 5.6875382 -110.77782 -110.76091 + 646 0.014234767 -110.77782 -110.77778 + 647 0.061094104 -110.77791 -110.77773 + 648 0.14216076 -110.77806 -110.77763 + 649 0.25083867 -110.77822 -110.77748 + 650 0.37178987 -110.77834 -110.77724 + 651 0.46739691 -110.77838 -110.77699 + 652 0.00077014597 -110.77838 -110.77838 + 653 0.0033300693 -110.77839 -110.77838 + 654 0.0081657442 -110.7784 -110.77837 + 655 0.015818955 -110.77841 -110.77836 + 656 0.026799555 -110.77843 -110.77835 + 657 0.041520426 -110.77845 -110.77833 + 658 0.061244407 -110.77848 -110.7783 + 659 0.086538724 -110.7785 -110.77824 + 660 0.11784986 -110.77854 -110.77819 + 661 0.15537944 -110.77859 -110.77813 + 662 0.19921399 -110.77865 -110.77806 + 663 0.24983391 -110.77872 -110.77798 + 664 0.30896461 -110.7788 -110.77789 + 665 0.38033152 -110.77892 -110.77779 + 666 0.46976108 -110.77897 -110.77757 + 667 0.58426358 -110.77915 -110.77741 + 668 0.72920705 -110.77936 -110.77719 + 669 0.90220475 -110.7796 -110.77692 + 670 1.0907209 -110.77989 -110.77665 + 671 1.3010999 -110.78026 -110.77639 + 672 1.579138 -110.78074 -110.77604 + 673 1.9752747 -110.78129 -110.77542 + 674 2.4095927 -110.78188 -110.77471 + 675 2.7867189 -110.78254 -110.77426 + 676 3.3344671 -110.7836 -110.77369 + 677 4.1681184 -110.7843 -110.77191 + 678 4.1781791 -110.78455 -110.77213 + 679 5.6379907 -110.78697 -110.77021 + 680 8.2752818 -110.78344 -110.75883 + 681 0.95711052 -110.78344 -110.78059 + 682 4.0547121 -110.78784 -110.77579 + 683 7.0436218 -110.78745 -110.76651 + 684 0.079247334 -110.78745 -110.78722 + 685 0.33404898 -110.78791 -110.78692 + 686 0.7448276 -110.78865 -110.78643 + 687 1.2210946 -110.7893 -110.78567 + 688 1.5856458 -110.78937 -110.78466 + 689 0.001424572 -110.78937 -110.78937 + 690 0.0061874237 -110.78938 -110.78936 + 691 0.015132784 -110.7894 -110.78935 + 692 0.02904646 -110.78942 -110.78934 + 693 0.048461079 -110.78946 -110.78931 + 694 0.073518419 -110.78949 -110.78927 + 695 0.10533665 -110.78953 -110.78922 + 696 0.14305227 -110.78958 -110.78915 + 697 0.18441476 -110.78962 -110.78907 + 698 0.22546081 -110.78967 -110.789 + 699 0.26276979 -110.78971 -110.78893 + 700 0.29816292 -110.78978 -110.78889 + 701 0.34033505 -110.78983 -110.78882 + 702 0.40215539 -110.78996 -110.78877 + 703 0.49710809 -110.79014 -110.78866 + 704 0.63494767 -110.79034 -110.78845 + 705 0.8046709 -110.79055 -110.78815 + 706 0.95627727 -110.79076 -110.78792 + 707 1.1093459 -110.79105 -110.78775 + 708 1.3404902 -110.7915 -110.78751 + 709 1.697817 -110.79201 -110.78696 + 710 2.0414678 -110.79233 -110.78626 + 711 2.100282 -110.79266 -110.78642 + 712 2.5537259 -110.79378 -110.78619 + 713 3.4638793 -110.79428 -110.78398 + 714 0.064028052 -110.79428 -110.79409 + 715 0.27299279 -110.79462 -110.79381 + 716 0.55979905 -110.79498 -110.79331 + 717 0.72348617 -110.79482 -110.79267 + 718 0.0079361542 -110.79482 -110.7948 + 719 0.03358337 -110.79487 -110.79477 + 720 0.078182457 -110.79496 -110.79472 + 721 0.13994461 -110.79506 -110.79464 + 722 0.21366189 -110.79516 -110.79452 + 723 0.28885953 -110.79522 -110.79437 + 724 0.3448005 -110.79526 -110.79423 + 725 0.36664472 -110.79527 -110.79418 + 726 0.38025529 -110.79529 -110.79416 + 727 0.41722197 -110.79538 -110.79414 + 728 0.50522728 -110.79558 -110.79408 + 729 0.66303701 -110.79587 -110.7939 + 730 0.88456323 -110.79612 -110.79349 + 731 1.0355328 -110.7962 -110.79312 + 732 1.0005069 -110.79621 -110.79324 + 733 1.117072 -110.79655 -110.79323 + 734 1.5716682 -110.79737 -110.79269 + 735 2.2253963 -110.79752 -110.79091 + 736 0.030589802 -110.79752 -110.79743 + 737 0.13064182 -110.7977 -110.79731 + 738 0.28795501 -110.79795 -110.7971 + 739 0.4564381 -110.7981 -110.79675 + 740 0.51193593 -110.79803 -110.7965 + 741 0.0033230758 -110.79803 -110.79802 + 742 0.01407167 -110.79805 -110.798 + 743 0.033348975 -110.79808 -110.79799 + 744 0.061757893 -110.79814 -110.79795 + 745 0.099082219 -110.7982 -110.7979 + 746 0.14409751 -110.79825 -110.79782 + 747 0.19613014 -110.79831 -110.79772 + 748 0.24738139 -110.79835 -110.79762 + 749 0.28779582 -110.79839 -110.79753 + 750 0.31829419 -110.79843 -110.79749 + 751 0.3515822 -110.7985 -110.79745 + 752 0.40385864 -110.79861 -110.79741 + 753 0.49090724 -110.79878 -110.79732 + 754 0.62359458 -110.79899 -110.79714 + 755 0.79726812 -110.79919 -110.79682 + 756 0.9219639 -110.79934 -110.7966 + 757 0.9703893 -110.79951 -110.79662 + 758 1.099603 -110.79988 -110.79661 + 759 1.4069274 -110.80045 -110.79627 + 760 1.8649183 -110.8007 -110.79515 + 761 0.015730491 -110.8007 -110.80065 + 762 0.067387144 -110.80079 -110.80059 + 763 0.15143551 -110.80093 -110.80048 + 764 0.24964143 -110.80104 -110.8003 + 765 0.32096794 -110.80106 -110.80011 + 766 0.0012789399 -110.80106 -110.80106 + 767 0.0054935517 -110.80107 -110.80105 + 768 0.0132979 -110.80109 -110.80105 + 769 0.025308436 -110.80111 -110.80103 + 770 0.04196404 -110.80113 -110.80101 + 771 0.063414603 -110.80116 -110.80098 + 772 0.09066077 -110.8012 -110.80093 + 773 0.12302551 -110.80124 -110.80087 + 774 0.15915203 -110.80128 -110.80081 + 775 0.19793381 -110.80133 -110.80074 + 776 0.2405751 -110.80139 -110.80068 + 777 0.29181814 -110.80148 -110.80061 + 778 0.35931627 -110.8016 -110.80053 + 779 0.4515858 -110.80174 -110.8004 + 780 0.57393992 -110.80192 -110.80021 + 781 0.71563481 -110.80211 -110.79998 + 782 0.84635632 -110.80232 -110.7998 + 783 0.98902642 -110.80261 -110.79967 + 784 1.2095674 -110.80302 -110.79942 + 785 1.5517919 -110.80343 -110.79882 + 786 1.816302 -110.80378 -110.79838 + 787 2.0375365 -110.80433 -110.79828 + 788 2.5633946 -110.80532 -110.7977 + 789 3.2709115 -110.80515 -110.79543 + 790 0.11840801 -110.80515 -110.8048 + 791 0.49993496 -110.80576 -110.80427 + 792 0.98797368 -110.8063 -110.80336 + 793 1.0633384 -110.80579 -110.80263 + 794 0.01771068 -110.80579 -110.80574 + 795 0.075261756 -110.8059 -110.80567 + 796 0.17481972 -110.80609 -110.80557 + 797 0.3098324 -110.80631 -110.80538 + 798 0.46422207 -110.80648 -110.8051 + 799 0.60578413 -110.80655 -110.80475 + 800 0.00028586779 -110.80655 -110.80655 + 801 0.0012498287 -110.80655 -110.80655 + 802 0.0031014492 -110.80656 -110.80655 + 803 0.0060817027 -110.80656 -110.80654 + 804 0.010430676 -110.80657 -110.80654 + 805 0.016365398 -110.80658 -110.80653 + 806 0.024497142 -110.80659 -110.80652 + 807 0.035251385 -110.80661 -110.8065 + 808 0.049124232 -110.80663 -110.80648 + 809 0.066656657 -110.80665 -110.80645 + 810 0.088446858 -110.80668 -110.80642 + 811 0.1151938 -110.80672 -110.80638 + 812 0.14779771 -110.80677 -110.80633 + 813 0.18753306 -110.80682 -110.80627 + 814 0.23626646 -110.8069 -110.80619 + 815 0.29662092 -110.80699 -110.80611 + 816 0.37191468 -110.8071 -110.80599 + 817 0.46563952 -110.80724 -110.80585 + 818 0.58036647 -110.8074 -110.80568 + 819 0.717467 -110.80762 -110.80549 + 820 0.88163431 -110.80787 -110.80525 + 821 1.0874925 -110.80819 -110.80496 + 822 1.3538147 -110.80857 -110.80455 + 823 1.6721519 -110.80902 -110.80404 + 824 2.0085729 -110.80956 -110.80359 + 825 2.4133004 -110.81024 -110.80307 + 826 2.9501478 -110.81098 -110.80221 + 827 3.2604425 -110.81183 -110.80213 + 828 3.8498145 -110.81309 -110.80165 + 829 4.8918498 -110.81319 -110.79865 + 830 0.20269937 -110.81319 -110.81259 + 831 0.86060666 -110.81415 -110.81159 + 832 1.5390415 -110.81427 -110.8097 + 833 0.012733673 -110.81427 -110.81424 + 834 0.05390505 -110.81435 -110.81419 + 835 0.12215555 -110.81447 -110.81411 + 836 0.20707771 -110.8146 -110.81398 + 837 0.28801881 -110.81466 -110.8138 + 838 0.31551369 -110.81465 -110.81371 + 839 0.0010727809 -110.81465 -110.81465 + 840 0.0046324254 -110.81466 -110.81464 + 841 0.011283626 -110.81467 -110.81464 + 842 0.021604021 -110.81469 -110.81463 + 843 0.036001684 -110.81471 -110.81461 + 844 0.054614736 -110.81474 -110.81458 + 845 0.078335701 -110.81477 -110.81454 + 846 0.10658582 -110.8148 -110.81449 + 847 0.13770909 -110.81484 -110.81443 + 848 0.16859196 -110.81487 -110.81437 + 849 0.19632721 -110.8149 -110.81432 + 850 0.22199357 -110.81495 -110.81429 + 851 0.25189422 -110.81501 -110.81426 + 852 0.295402 -110.8151 -110.81422 + 853 0.36238721 -110.81522 -110.81415 + 854 0.46045357 -110.81537 -110.814 + 855 0.58476657 -110.81552 -110.81379 + 856 0.69670064 -110.81568 -110.81361 + 857 0.80081398 -110.81588 -110.8135 + 858 0.95618076 -110.81618 -110.81334 + 859 1.2063232 -110.81656 -110.81298 + 860 1.4978407 -110.81683 -110.81238 + 861 1.5476379 -110.81704 -110.81244 + 862 1.8191437 -110.81775 -110.81234 + 863 2.4763431 -110.81845 -110.81108 + 864 0.019522922 -110.81845 -110.81839 + 865 0.083534968 -110.81855 -110.81831 + 866 0.17658176 -110.81868 -110.81816 + 867 0.25086304 -110.8187 -110.81796 + 868 0.0020692281 -110.8187 -110.8187 + 869 0.008892742 -110.81871 -110.81869 + 870 0.02126317 -110.81874 -110.81868 + 871 0.039551971 -110.81877 -110.81865 + 872 0.063523354 -110.81881 -110.81862 + 873 0.092069148 -110.81884 -110.81857 + 874 0.12422275 -110.81888 -110.81851 + 875 0.15678229 -110.81891 -110.81845 + 876 0.1897484 -110.81896 -110.8184 + 877 0.22880568 -110.81903 -110.81835 + 878 0.28364562 -110.81913 -110.81829 + 879 0.36437628 -110.81927 -110.81819 + 880 0.47622842 -110.81943 -110.81801 + 881 0.59891528 -110.81958 -110.8178 + 882 0.68796001 -110.81975 -110.8177 + 883 0.80196387 -110.82001 -110.81763 + 884 1.018798 -110.82041 -110.81738 + 885 1.3517201 -110.82072 -110.8167 + 886 1.4560427 -110.82082 -110.81649 + 887 1.7143216 -110.82136 -110.81627 + 888 2.5127452 -110.8224 -110.81493 + 889 2.5168034 -110.82033 -110.81285 + 890 0.36423425 -110.82033 -110.81924 + 891 1.5380215 -110.82215 -110.81758 + 892 2.9123673 -110.82324 -110.81458 + 893 0.0029939901 -110.82324 -110.82323 + 894 0.012964825 -110.82326 -110.82322 + 895 0.030842365 -110.82329 -110.8232 + 896 0.056405174 -110.82333 -110.82317 + 897 0.087996299 -110.82337 -110.82311 + 898 0.12177464 -110.82341 -110.82305 + 899 0.15294877 -110.82344 -110.82299 + 900 0.17842635 -110.82347 -110.82294 + 901 0.20658535 -110.82353 -110.82292 + 902 0.25249368 -110.82363 -110.82288 + 903 0.33058934 -110.82378 -110.82279 + 904 0.44778312 -110.82394 -110.82261 + 905 0.57538465 -110.82408 -110.82237 + 906 0.6515268 -110.82421 -110.82227 + 907 0.76899373 -110.82455 -110.82226 + 908 1.0181963 -110.82499 -110.82197 + 909 1.378224 -110.82527 -110.82117 + 910 0.012382271 -110.82527 -110.82523 + 911 0.052598737 -110.82534 -110.82519 + 912 0.11586828 -110.82545 -110.8251 + 913 0.18457639 -110.82552 -110.82497 + 914 0.22010856 -110.82552 -110.82487 + 915 0.0014774258 -110.82552 -110.82552 + 916 0.0063635731 -110.82553 -110.82551 + 917 0.015366771 -110.82555 -110.8255 + 918 0.029022874 -110.82557 -110.82549 + 919 0.047508933 -110.8256 -110.82546 + 920 0.070496041 -110.82563 -110.82542 + 921 0.098127642 -110.82566 -110.82537 + 922 0.12791245 -110.8257 -110.82531 + 923 0.15619064 -110.82573 -110.82526 + 924 0.18176039 -110.82576 -110.82522 + 925 0.20938862 -110.82582 -110.82519 + 926 0.24820986 -110.8259 -110.82516 + 927 0.30847928 -110.82601 -110.82509 + 928 0.39848549 -110.82615 -110.82497 + 929 0.51626669 -110.82629 -110.82476 + 930 0.62177336 -110.82642 -110.82458 + 931 0.71424245 -110.82661 -110.82448 + 932 0.85871536 -110.8269 -110.82435 + 933 1.1006597 -110.82727 -110.824 + 934 1.3779084 -110.82749 -110.82339 + 935 1.4083037 -110.82764 -110.82345 + 936 1.7251782 -110.82838 -110.82325 + 937 2.4472442 -110.82892 -110.82165 + 938 0.032528006 -110.82892 -110.82883 + 939 0.13868599 -110.8291 -110.82869 + 940 0.28502305 -110.82928 -110.82844 + 941 0.36987694 -110.82922 -110.82812 + 942 0.0042549281 -110.82922 -110.82921 + 943 0.018072548 -110.82925 -110.82919 + 944 0.042299212 -110.8293 -110.82917 + 945 0.076267724 -110.82935 -110.82913 + 946 0.11754279 -110.82941 -110.82906 + 947 0.16093595 -110.82945 -110.82897 + 948 0.19713893 -110.82948 -110.82889 + 949 0.21767407 -110.82949 -110.82885 + 950 0.23377454 -110.82955 -110.82886 + 951 0.26344277 -110.82962 -110.82884 + 952 0.3236109 -110.82975 -110.82879 + 953 0.42561037 -110.82993 -110.82866 + 954 0.56639542 -110.83009 -110.82841 + 955 0.65813507 -110.83017 -110.82821 + 956 0.6691588 -110.83024 -110.82825 + 957 0.77813492 -110.83053 -110.82822 + 958 1.0745975 -110.83104 -110.82785 + 959 1.4715607 -110.83108 -110.82671 + 960 0.023661314 -110.83108 -110.83101 + 961 0.10069182 -110.83122 -110.83092 + 962 0.22052026 -110.83141 -110.83076 + 963 0.3454687 -110.83152 -110.83049 + 964 0.36840447 -110.83145 -110.83035 + 965 0.0026819278 -110.83145 -110.83144 + 966 0.0113667 -110.83146 -110.83143 + 967 0.026938478 -110.8315 -110.83142 + 968 0.049824865 -110.83154 -110.83139 + 969 0.079709944 -110.83158 -110.83135 + 970 0.11535288 -110.83163 -110.83129 + 971 0.15564115 -110.83167 -110.83121 + 972 0.19282311 -110.8317 -110.83113 + 973 0.21733101 -110.83172 -110.83108 + 974 0.23226817 -110.83175 -110.83106 + 975 0.2506313 -110.83179 -110.83105 + 976 0.28619255 -110.83188 -110.83102 + 977 0.35107929 -110.83201 -110.83096 + 978 0.45255419 -110.83217 -110.83082 + 979 0.5840993 -110.83231 -110.83057 + 980 0.65876224 -110.8324 -110.83044 + 981 0.68761299 -110.83251 -110.83047 + 982 0.79744046 -110.83281 -110.83043 + 983 1.0491262 -110.83324 -110.83012 + 984 1.385715 -110.83332 -110.8292 + 985 0.015687293 -110.83332 -110.83327 + 986 0.066817294 -110.83341 -110.83321 + 987 0.14848719 -110.83355 -110.83311 + 988 0.24010393 -110.83365 -110.83293 + 989 0.29198663 -110.83367 -110.8328 + 990 0.0012888046 -110.83367 -110.83367 + 991 0.005505215 -110.83368 -110.83366 + 992 0.0132254 -110.8337 -110.83366 + 993 0.024930309 -110.83372 -110.83364 + 994 0.04086177 -110.83374 -110.83362 + 995 0.060915784 -110.83374 -110.83356 + 996 0.085591505 -110.83377 -110.83351 + 997 0.113319 -110.8338 -110.83346 + 998 0.14138355 -110.83383 -110.83341 + 999 0.16803177 -110.83387 -110.83337 + 1000 0.19558981 -110.83392 -110.83334 +Loop time of 67.1723 on 1 procs for 1000 steps with 24 atoms + +881.6% CPU use with 1 MPI tasks x no OpenMP threads + +Minimization stats: + Stopping criterion = max iterations + Energy initial, next-to-last, final = + -104.95614332 -110.833873245 -110.833918128 + Force two-norm initial, final = 19.119 0.137146 + Force max component initial, final = 11.7759 0.0662489 + Final line search alpha, max atom move = 0 0 + Iterations, force evaluations = 1000 1000 + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.00028777 | 0.00028777 | 0.00028777 | 0.0 | 0.00 +Bond | 9.3937e-05 | 9.3937e-05 | 9.3937e-05 | 0.0 | 0.00 +Neigh | 4.6968e-05 | 4.6968e-05 | 4.6968e-05 | 0.0 | 0.00 +Comm | 0.0012362 | 0.0012362 | 0.0012362 | 0.0 | 0.00 +Output | 0.0079987 | 0.0079987 | 0.0079987 | 0.0 | 0.01 +Modify | 67.156 | 67.156 | 67.156 | 0.0 | 99.98 +Other | | 0.006447 | | | 0.01 + +Nlocal: 24 ave 24 max 24 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 25 ave 25 max 25 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 25 +Ave neighs/atom = 1.04167 +Ave special neighs/atom = 0 +Neighbor list builds = 3 +Dangerous builds = 0 +Total wall time: 0:01:07 diff --git a/lib/latte/Install.py b/lib/latte/Install.py new file mode 100644 index 0000000000..387b4547cd --- /dev/null +++ b/lib/latte/Install.py @@ -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) diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 3db8f13682..8873cb0bcf 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -1,27 +1,7 @@ -# 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 -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 +# Settings that the LAMMPS build will import when this package library is used +# GNU Fortran settings +latte_SYSINC = +latte_SYSLIB = ../../lib/latte/filelink -llatte -lgfortran -llapack -lblas +latte_SYSPATH = -fopenmp diff --git a/lib/latte/Makefile.lammps.gfortran.dev b/lib/latte/Makefile.lammps.gfortran.dev deleted file mode 100644 index 12b3c1985f..0000000000 --- a/lib/latte/Makefile.lammps.gfortran.dev +++ /dev/null @@ -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 - - diff --git a/lib/latte/Makefile.lammps.ifort b/lib/latte/Makefile.lammps.ifort index 4c89ec2a96..23d2b32fcc 100644 --- a/lib/latte/Makefile.lammps.ifort +++ b/lib/latte/Makefile.lammps.ifort @@ -1,29 +1,12 @@ -# 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 +# Settings that the LAMMPS build will import when this package library is used -latte_PATH = ${HOME}/LATTE -progress_PATH = ${HOME}/qmd-progress -bml_PATH = ${HOME}/bml -metis_PATH = ${HOME}/Programs/metis-5.1.0 +# Intel ifort settings -latte_SYSINC = -I${latte_PATH}/src -I${bml_PATH}/install/include -I${progress_PATH}/install/include -latte_SYSLIB = -openmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a \ - -lifcore -lsvml -lompstub -limf -L${MKLROOT}/lib/intel64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 \ - -lmkl_intel_thread -lmkl_core -lmkl_intel_thread -lpthread -openmp -O0 \ +latte_SYSINC = +latte_SYSLIB = ../../lib/latte/filelink \ + -llatte -lifcore -lsvml -lompstub -limf -lmkl_intel_lp64 \ + -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 diff --git a/lib/latte/README b/lib/latte/README index 4166d03166..bfa91e62cd 100644 --- a/lib/latte/README +++ b/lib/latte/README @@ -1,43 +1,55 @@ -This directory contains build settings for the LATTE library which -is required to use the LATTE package and its fix latte command in a -LAMMPS input script. +This directory contains links to the LATTE library which is required +to use the LATTE package and its fix latte command in a LAMMPS input +script. -Information about the LATTE DFTB code can be found at: -https://github.com/losalamos/LATTE +Information about the LATTE DFTB code can be found at: +https://github.com/lanl/LATTE The LATTE development effort is led by Marc Cawkwell and Anders Niklasson at Los Alamos National Laboratory. -To download, build, and install LATTE as a library on your system, -follow these steps: - -- Download or clone the LATTE source code from: - https://github.com/losalamos/LATTE. +You can type "make lib-latte" from the src directory to see help on +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 +directory, or you can do it manually by following the instructions +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 -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. +Instructions: -To build LAMMPS with the LATTE library you should follow the following -instructions: +1. Download or clone the LATTE source code from + 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 - to your compilers, architecture and the LATTE location. +3. Create three soft links in this dir (lib/latte) + 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: - $ cd lammps/src - $ make yes-latte - $ make g++ (or whatever target you wish) +4. Choose a Makefile.lammps.* file appropriate for your compiler + (GNU gfortran or Intel ifort) and copy it to Makefile.lammps. + Note that you may need to edit Makefile.lammps for paths + 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. diff --git a/src/LATTE/Install.sh b/src/LATTE/Install.sh index 2fb34096c8..d034774e7a 100644 --- a/src/LATTE/Install.sh +++ b/src/LATTE/Install.sh @@ -38,8 +38,8 @@ if (test $1 = 1) then if (test -e ../Makefile.package) then 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_PATH =[ \t]*|&-L../../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/liblink |' ../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_SYSLIB =[ \t]*|&$(latte_SYSLIB) |' ../Makefile.package diff --git a/src/LATTE/README b/src/LATTE/README index e82480c865..2103074ad4 100644 --- a/src/LATTE/README +++ b/src/LATTE/README @@ -1,28 +1,23 @@ 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 using density-functional tight-binding quantum forces calculated by -LATTE. More information on LATTE can be found at "web site". Its -authors are Anders Niklasson, etc at LANL. +LATTE. More information on LATTE can be found at this web site: +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 -as a library on your system. The library can be downloaded and built -in lib/latte or elsewhere on your system, which must be done before -building LAMMPS with this package. Details of the download, build, and -install process for LATTE are given in the lib/latte/README file, and -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. +Using this package requires the LATTE code to first be downloaded and +built as a library on your system. This can be done in lib/latte or +elsewhere on your system. Details of the download and build process +for LATTE are given in the lib/latte/README file and it can also be +done via the make lib-latte command from the LAMMPS src directory. Once you have successfully built LAMMPS with this package and the 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 developers. diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index a35318bc3a..b42867018e 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -11,19 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -// NOTES on possible future issues: -// LATTE compute and return 6-value virial tensor -// 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 !!!!!!!!!!!!! +/* ---------------------------------------------------------------------- + Contributing author: Christian Negre (LANL) +------------------------------------------------------------------------- */ #include #include @@ -58,11 +48,14 @@ extern "C" { FixLatte::FixLatte(LAMMPS *lmp, int narg, char **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) error->all(FLERR,"Fix latte currently runs only in serial"); + if (narg != 4) error->all(FLERR,"Illegal fix latte command"); + scalar_flag = 1; global_freq = 1; extscalar = 1; @@ -76,6 +69,8 @@ FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : if (strcmp(arg[3],"NULL") != 0) { coulomb = 1; + error->all(FLERR,"Fix latte does not yet support a LAMMPS calculation " + "of a Coulomb potential"); int n = strlen(arg[3]) + 1; id_pe = new char[n]; @@ -130,7 +125,7 @@ void FixLatte::init() if (coulomb) { 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); 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); } +/* ---------------------------------------------------------------------- */ + +void FixLatte::setup_pre_reverse(int eflag, int vflag) +{ + pre_reverse(eflag,vflag); +} + /* ---------------------------------------------------------------------- integrate electronic degrees of freedom ------------------------------------------------------------------------- */ @@ -222,7 +224,6 @@ void FixLatte::post_force(int vflag) { int eflag = eflag_caller; if (eflag || vflag) ev_setup(eflag,vflag); - // else evflag = 0; else evflag = eflag_global = vflag_global = eflag_atom = vflag_atom = 0; // compute Coulombic potential = pe[i]/q[i] diff --git a/src/LATTE/fix_latte.h b/src/LATTE/fix_latte.h index d6b75d52f4..86a58fdf3f 100644 --- a/src/LATTE/fix_latte.h +++ b/src/LATTE/fix_latte.h @@ -33,6 +33,7 @@ class FixLatte : public Fix { void init_list(int, class NeighList *); void setup(int); void min_setup(int); + void setup_pre_reverse(int, int); void initial_integrate(int); void pre_reverse(int, int); void post_force(int); diff --git a/src/fix_latte.txt b/src/fix_latte.txt deleted file mode 100644 index 4c9d0f9f95..0000000000 --- a/src/fix_latte.txt +++ /dev/null @@ -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). From 76d93f21dd9cd750a0d1fee7dee62372179bc250 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 19 Sep 2017 16:55:08 -0600 Subject: [PATCH 49/53] add fix latte command to doc pages --- doc/src/Section_commands.txt | 1 + doc/src/fix.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 010454b870..0d46a01424 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -580,6 +580,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "halt"_fix_halt.html, "heat"_fix_heat.html, "indent"_fix_indent.html, +"latte"_fix_latte.html, "langevin (k)"_fix_langevin.html, "lineforce"_fix_lineforce.html, "momentum (k)"_fix_momentum.html, diff --git a/doc/src/fix.txt b/doc/src/fix.txt index 464eab3169..e54a918cd0 100644 --- a/doc/src/fix.txt +++ b/doc/src/fix.txt @@ -193,6 +193,7 @@ of "this page"_Section_commands.html#cmd_5. "halt"_fix_halt.html - terminate a dynamics run or minimization "heat"_fix_heat.html - add/subtract momentum-conserving heat "indent"_fix_indent.html - impose force due to an indenter +"latte"_fix_latte.html - wrapper on LATTE density-functional tight-binding code "langevin"_fix_langevin.html - Langevin temperature control "lineforce"_fix_lineforce.html - constrain atoms to move in a line "momentum"_fix_momentum.html - zero the linear and/or angular momentum of a group of atoms From 59d2e13d48feee6fa74dfab34b5dfef0e680cad9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 19 Sep 2017 19:06:02 -0400 Subject: [PATCH 50/53] add .gitignore and add Makefile.lammps.* symlinks to stay consistent with other libraries --- lib/latte/.gitignore | 5 +++++ lib/latte/Makefile.lammps.gfortran | 2 +- lib/latte/Makefile.lammps.mpi | 1 + lib/latte/Makefile.lammps.serial | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 lib/latte/.gitignore create mode 120000 lib/latte/Makefile.lammps.mpi create mode 120000 lib/latte/Makefile.lammps.serial diff --git a/lib/latte/.gitignore b/lib/latte/.gitignore new file mode 100644 index 0000000000..a4c2a2362e --- /dev/null +++ b/lib/latte/.gitignore @@ -0,0 +1,5 @@ +# files and folders to ignore +/filelink +/liblink +/includelink +/LATTE-master diff --git a/lib/latte/Makefile.lammps.gfortran b/lib/latte/Makefile.lammps.gfortran index 8873cb0bcf..921721552b 100644 --- a/lib/latte/Makefile.lammps.gfortran +++ b/lib/latte/Makefile.lammps.gfortran @@ -3,5 +3,5 @@ # GNU Fortran settings latte_SYSINC = -latte_SYSLIB = ../../lib/latte/filelink -llatte -lgfortran -llapack -lblas +latte_SYSLIB = ../../lib/latte/filelink -llatte -lgfortran -llapack -lblas latte_SYSPATH = -fopenmp diff --git a/lib/latte/Makefile.lammps.mpi b/lib/latte/Makefile.lammps.mpi new file mode 120000 index 0000000000..6017d01535 --- /dev/null +++ b/lib/latte/Makefile.lammps.mpi @@ -0,0 +1 @@ +Makefile.lammps.gfortran \ No newline at end of file diff --git a/lib/latte/Makefile.lammps.serial b/lib/latte/Makefile.lammps.serial new file mode 120000 index 0000000000..6017d01535 --- /dev/null +++ b/lib/latte/Makefile.lammps.serial @@ -0,0 +1 @@ +Makefile.lammps.gfortran \ No newline at end of file From d708e34ba6d49f476ed142c657b302eeec20985a Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 20 Sep 2017 12:01:26 -0600 Subject: [PATCH 51/53] cmake: download/build latte if not found --- cmake/CMakeLists.txt | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 4744b601fe..bc33da60de 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -47,6 +47,7 @@ endif() include(GNUInstallDirs) set(LAMMPS_LINK_LIBS) +set(LAMMPS_DEPS) set(LAMMPS_API_DEFINES) option(ENABLE_MPI "Build MPI version" OFF) if(ENABLE_MPI) @@ -172,7 +173,7 @@ if(ENABLE_MISC) endif() endif() -if(ENABLE_MSCG OR ENABLE_USER-ATC OR ENABLE_USER-AWPMD OR ENABLE_USER-QUIP) +if(ENABLE_MSCG OR ENABLE_USER-ATC OR ENABLE_USER-AWPMD OR ENABLE_USER-QUIP OR ENABLE_LATTE) find_package(LAPACK) if(NOT LAPACK_FOUND) enable_language(Fortran) @@ -238,8 +239,21 @@ if(ENABLE_VORONOI) endif() if(ENABLE_LATTE) - find_package(LATTE REQUIRED) - list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) + find_package(LATTE QUIET) + if(NOT LATTE_FOUND) + message(STATUS "LATTE not found - we will build our own") + include(ExternalProject) + ExternalProject_Add(latte_build + URL https://github.com/lanl/LATTE/archive/v1.0.1.tar.gz + URL_MD5 5137e28cb1a64444bd571c98c98a6eee + SOURCE_SUBDIR cmake + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE} + ) + ExternalProject_get_property(latte_build INSTALL_DIR) + set(LATTE_LIBRARIES ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/liblatte.a) + list(APPEND LAMMPS_DEPS latte_build) + endif() + list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) endif() if(ENABLE_USER-MOLFILE) @@ -651,6 +665,7 @@ include_directories(${LAMMPS_STYLE_HEADERS_DIR}) ############################################ add_library(lammps ${LIB_SOURCES}) target_link_libraries(lammps ${LAMMPS_LINK_LIBS}) +add_dependencies(lammps ${LAMMPS_DEPS}) set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_MACHINE}) if(BUILD_SHARED_LIBS) set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION}) From 5e35ab251b23b135d4eaa3aa712c98bc45bbb069 Mon Sep 17 00:00:00 2001 From: Christian Negre Date: Wed, 20 Sep 2017 17:11:49 -0600 Subject: [PATCH 52/53] fixed sucrose --- examples/latte/data.sucrose.lmp | 63 +++++++++++++++++++++++++++++++++ examples/latte/in.latte.sucrose | 2 +- examples/latte/latte.in | 5 +-- 3 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 examples/latte/data.sucrose.lmp diff --git a/examples/latte/data.sucrose.lmp b/examples/latte/data.sucrose.lmp new file mode 100644 index 0000000000..aae490cd19 --- /dev/null +++ b/examples/latte/data.sucrose.lmp @@ -0,0 +1,63 @@ + LAMMPS Description + + 45 atoms + + 3 atom types + + 0.0000000000000000 17.202999999999999 xlo xhi + 0.0000000000000000 18.009000000000000 ylo yhi + 0.0000000000000000 21.643000000000001 zlo zhi + + Masses + + 1 15.9994 + 2 12.01 + 3 1.0079 + + Atoms + + 1 1 1 0.0 8.62700 8.66700 12.48600 + 2 1 1 0.0 9.11200 9.11800 10.27300 + 3 1 1 0.0 8.45700 11.33100 10.49000 + 4 1 1 0.0 11.72600 8.36500 10.66700 + 5 1 1 0.0 8.06500 8.99400 7.93600 + 6 1 2 0.0 9.62800 9.07200 11.59100 + 7 1 3 0.0 9.90900 10.08300 11.89200 + 8 1 2 0.0 9.07000 10.40400 9.64000 + 9 1 1 0.0 6.14600 11.61000 8.00500 + 10 1 1 0.0 11.07200 10.13000 8.37600 + 11 1 1 0.0 6.10200 10.00900 11.62100 + 12 1 2 0.0 8.14000 10.29100 8.45100 + 13 1 3 0.0 8.49000 10.91200 7.62300 + 14 1 1 0.0 7.41500 7.08400 14.43400 + 15 1 2 0.0 10.75100 8.07000 11.65100 + 16 1 3 0.0 11.24000 8.11800 12.63400 + 17 1 2 0.0 7.09000 11.63400 10.17000 + 18 1 3 0.0 7.06900 12.69800 9.91100 + 19 1 2 0.0 7.97200 7.44200 12.14000 + 20 1 3 0.0 7.54700 7.58300 11.13800 + 21 1 1 0.0 11.24900 5.73000 11.78600 + 22 1 2 0.0 10.26800 6.65900 11.37300 + 23 1 3 0.0 10.12300 6.53400 10.29200 + 24 1 2 0.0 6.78400 10.79500 8.95500 + 25 1 3 0.0 6.12100 9.95500 9.19600 + 26 1 2 0.0 10.47500 10.88300 9.39800 + 27 1 3 0.0 10.49500 11.92100 9.06900 + 28 1 3 0.0 11.09100 10.82000 10.30900 + 29 1 2 0.0 8.99100 6.32000 12.11700 + 30 1 3 0.0 9.23100 6.01100 13.14400 + 31 1 2 0.0 6.86600 7.25300 13.14500 + 32 1 3 0.0 6.17700 8.10100 13.15700 + 33 1 3 0.0 6.28900 6.35300 12.94300 + 34 1 2 0.0 6.24000 11.39400 11.39300 + 35 1 3 0.0 6.66500 11.86500 12.28300 + 36 1 3 0.0 5.23100 11.78100 11.26000 + 37 1 1 0.0 8.34300 5.24100 11.48000 + 38 1 3 0.0 12.00100 9.28600 10.78200 + 39 1 3 0.0 12.06300 5.97500 11.33000 + 40 1 3 0.0 6.99600 9.67600 11.79700 + 41 1 3 0.0 7.93700 7.87600 14.60900 + 42 1 3 0.0 10.95500 9.19800 8.60700 + 43 1 3 0.0 5.94400 11.05900 7.24100 + 44 1 3 0.0 7.94900 8.39500 8.68400 + 45 1 3 0.0 8.96400 4.50300 11.48800 diff --git a/examples/latte/in.latte.sucrose b/examples/latte/in.latte.sucrose index 19df43ff99..0c859bbd76 100644 --- a/examples/latte/in.latte.sucrose +++ b/examples/latte/in.latte.sucrose @@ -4,7 +4,7 @@ units metal atom_style full atom_modify sort 0 0.0 # turn off sorting of the coordinates -read_data data.sucrose_non_opt.lmp +read_data data.sucrose.lmp # replicate system if requested diff --git a/examples/latte/latte.in b/examples/latte/latte.in index 0790317a5d..7df354a742 100644 --- a/examples/latte/latte.in +++ b/examples/latte/latte.in @@ -1,9 +1,9 @@ LATTE INPUT FILE ================ #This input file resumes the content of MDcontroller and TBparam/control.in -#The parser will only read it if it's present inside the running folder. +#The parser will only read it is present inside the running folder. #In case this file is not present Latte will read the two files as original. -#The order of the kewords is not important in this file. +#The order of the keywords is not important in this file. #To get a full description of these keywords please see: ## https://github.com/lanl/LATTE/blob/master/Manual/LATTE_manual.pdf @@ -12,6 +12,7 @@ CONTROL{ xControl= 1 BASISTYPE= NONORTHO COORDSFILE= "./coords.dat" + PARAMPATH= "/home/user/LATTE/TBparam" KBT= 0.0 ENTROPYKIND= 1 PPOTON= 1 From a8ae8866676eac1d40fc29445739ac876651d596 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 21 Sep 2017 10:40:54 -0600 Subject: [PATCH 53/53] update fix latte examples and virial --- doc/src/fix_latte.txt | 10 + .../latte/{data.sucrose.lmp => data.sucrose} | 0 examples/latte/in.latte.sucrose | 4 +- examples/latte/in.latte.water | 2 +- examples/latte/in.latte.water.min | 6 +- .../latte/log.19Sep17.latte.sucrose.g++.1 | 406 ++++++ examples/latte/log.19Sep17.latte.water.g++.1 | 509 ++++++-- .../latte/log.19Sep17.latte.water.min.g++.1 | 1098 ++--------------- lib/latte/Install.py | 1 - src/LATTE/fix_latte.cpp | 9 +- 10 files changed, 908 insertions(+), 1137 deletions(-) rename examples/latte/{data.sucrose.lmp => data.sucrose} (100%) create mode 100644 examples/latte/log.19Sep17.latte.sucrose.g++.1 diff --git a/doc/src/fix_latte.txt b/doc/src/fix_latte.txt index d50d32bc48..f78e13b866 100644 --- a/doc/src/fix_latte.txt +++ b/doc/src/fix_latte.txt @@ -112,6 +112,11 @@ 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. +The "fix_modify"_fix_modify.html {virial} option is supported by this +fix to add the LATTE DFTB contribution to the system's virial as part +of "thermodynamic output"_thermo_style.html. The default is {virial +yes} + 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 @@ -137,6 +142,11 @@ 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. +LATTE does not currently compute per-atom energy or per-atom virial +contributions. So they will not show up as part of the calculations +performed by the "compute pe/atom"_compute_pe_atom.html or "compute +stress/atom"_compute_stress_atom.html commands. + 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. diff --git a/examples/latte/data.sucrose.lmp b/examples/latte/data.sucrose similarity index 100% rename from examples/latte/data.sucrose.lmp rename to examples/latte/data.sucrose diff --git a/examples/latte/in.latte.sucrose b/examples/latte/in.latte.sucrose index 0c859bbd76..a10dae5c5e 100644 --- a/examples/latte/in.latte.sucrose +++ b/examples/latte/in.latte.sucrose @@ -4,7 +4,7 @@ units metal atom_style full atom_modify sort 0 0.0 # turn off sorting of the coordinates -read_data data.sucrose.lmp +read_data data.sucrose # replicate system if requested @@ -32,7 +32,7 @@ fix 1 all nve fix 2 all latte NULL fix_modify 2 energy yes -thermo_style custom step temp pe etotal +thermo_style custom step temp pe etotal press # dynamics diff --git a/examples/latte/in.latte.water b/examples/latte/in.latte.water index 1ab9fcaafe..e1185602b4 100644 --- a/examples/latte/in.latte.water +++ b/examples/latte/in.latte.water @@ -32,7 +32,7 @@ fix 1 all nve fix 2 all latte NULL fix_modify 2 energy yes -thermo_style custom step temp pe etotal +thermo_style custom step temp pe etotal press # dynamics diff --git a/examples/latte/in.latte.water.min b/examples/latte/in.latte.water.min index 5bf261547a..503e45a300 100644 --- a/examples/latte/in.latte.water.min +++ b/examples/latte/in.latte.water.min @@ -32,10 +32,10 @@ fix 1 all nve fix 2 all latte NULL fix_modify 2 energy yes -thermo_style custom step temp pe etotal +thermo_style custom step temp pe etotal press # minimization -thermo 1 +thermo 10 min_style fire -minimize 1.0e-9 1.0e-9 1000 1000 +minimize 1.0e-9 1.0e-9 500 500 diff --git a/examples/latte/log.19Sep17.latte.sucrose.g++.1 b/examples/latte/log.19Sep17.latte.sucrose.g++.1 new file mode 100644 index 0000000000..bc8843ef7f --- /dev/null +++ b/examples/latte/log.19Sep17.latte.sucrose.g++.1 @@ -0,0 +1,406 @@ + The log file for latte_lib + + CONTROL{ } + + WARNING: variable JobName= is missing. I will use a default value instead ... + WARNING: variable PARAMPATH= is missing. I will use a default value instead ... + WARNING: variable DEBUGON= is missing. I will use a default value instead ... + WARNING: variable FERMIM= is missing. I will use a default value instead ... + WARNING: variable CGORLIB= is missing. I will use a default value instead ... + WARNING: variable NORECS= is missing. I will use a default value instead ... + WARNING: variable VDWON= is missing. I will use a default value instead ... + WARNING: variable ORDERNMOL= is missing. I will use a default value instead ... + WARNING: variable LCNON= is missing. I will use a default value instead ... + WARNING: variable LCNITER= is missing. I will use a default value instead ... + WARNING: variable MDON= is missing. I will use a default value instead ... + WARNING: variable PBCON= is missing. I will use a default value instead ... + WARNING: variable RESTART= is missing. I will use a default value instead ... + WARNING: variable NGPU= is missing. I will use a default value instead ... + WARNING: variable COMPFORCE= is missing. I will use a default value instead ... + WARNING: variable DOSFIT= is missing. I will use a default value instead ... + WARNING: variable INTS2FIT= is missing. I will use a default value instead ... + WARNING: variable NFITSTEP= is missing. I will use a default value instead ... + WARNING: variable QFIT= is missing. I will use a default value instead ... + WARNING: variable PPFITON= is missing. I will use a default value instead ... + WARNING: variable ALLFITON= is missing. I will use a default value instead ... + WARNING: variable PPSTEP= is missing. I will use a default value instead ... + WARNING: variable BISTEP= is missing. I will use a default value instead ... + WARNING: variable PP2FIT= is missing. I will use a default value instead ... + WARNING: variable BINT2FIT= is missing. I will use a default value instead ... + WARNING: variable PPNMOL= is missing. I will use a default value instead ... + WARNING: variable PPNGEOM= is missing. I will use a default value instead ... + WARNING: variable PARREP= is missing. I will use a default value instead ... + WARNING: variable VERBOSE= is missing. I will use a default value instead ... + WARNING: variable MIXER= is missing. I will use a default value instead ... + WARNING: variable RESTARTLIB= is missing. I will use a default value instead ... + WARNING: variable CGTOL= is missing. I will use a default value instead ... + WARNING: variable ELEC_ETOL= is missing. I will use a default value instead ... + WARNING: variable COULACC= is missing. I will use a default value instead ... + WARNING: variable COULCUT= is missing. I will use a default value instead ... + WARNING: variable COULR1= is missing. I will use a default value instead ... + WARNING: variable CHTOL= is missing. I will use a default value instead ... + WARNING: variable BETA= is missing. I will use a default value instead ... + WARNING: variable MCSIGMA= is missing. I will use a default value instead ... + WARNING: variable PPBETA= is missing. I will use a default value instead ... + WARNING: variable PPSIGMA= is missing. I will use a default value instead ... + WARNING: variable ER= is missing. I will use a default value instead ... + WARNING: variable INITIALIZED= is missing. I will use a default value instead ... + + + ############### Parameters used for this run ################ + CONTROL{ + xControl= 1 + DEBUGON= 0 + FERMIM= 6 + CGORLIB= 1 + NORECS= 1 + ENTROPYKIND= 1 + PPOTON= 1 + VDWON= 0 + SPINON= 0 + ELECTRO= 1 + ELECMETH= 0 + MAXSCF= 450 + MINSP2ITER= 22 + FULLQCONV= 1 + QITER= 3 + ORDERNMOL= 0 + SPARSEON= 1 + THRESHOLDON= 1 + FILLINSTOP= 100 + BLKSZ= 4 + MSPARSE= 1500 + LCNON= 0 + LCNITER= 4 + RELAX= 0 + MAXITER= 100000 + MDON= 1 + PBCON= 1 + RESTART= 0 + CHARGE= 0 + XBO= 1 + XBODISON= 1 + XBODISORDER= 5 + NGPU= 2 + KON= 0 + COMPFORCE= 1 + DOSFIT= 0 + INTS2FIT= 1 + NFITSTEP= 5000 + QFIT= 0 + PPFITON= 0 + ALLFITON= 0 + PPSTEP= 500 + BISTEP= 500 + PP2FIT= 2 + BINT2FIT= 6 + PPNMOL= 10 + PPNGEOM= 200 + PARREP= 0 + VERBOSE= 0 + MIXER= 0 + RESTARTLIB= 0 + CGTOL= 9.9999999747524271E-007 + KBT= 0.0000000000000000 + SPINTOL= 1.0000000000000000E-004 + ELEC_ETOL= 1.0000000474974513E-003 + ELEC_QTOL= 1.0000000000000000E-008 + COULACC= 9.9999999747524271E-007 + COULCUT= -500.00000000000000 + COULR1= 500.00000000000000 + BREAKTOL= 9.9999999999999995E-007 + QMIX= 0.25000000000000000 + SPINMIX= 0.25000000000000000 + MDMIX= 0.25000000000000000 + NUMTHRESH= 9.9999999999999995E-007 + CHTOL= 9.9999997764825821E-003 + SKIN= 1.0000000000000000 + RLXFTOL= 9.9999999999999995E-008 + BETA= 1000.0000000000000 + MCSIGMA= 0.20000000298023224 + PPBETA= 1000.0000000000000 + PPSIGMA= 9.9999997764825821E-003 + ER= 1.0000000000000000 + JobName=MyJob + BASISTYPE=NONORTHO + SP2CONV=REL + RELAXTYPE=SD + PARAMPATH=./TBparam + COORDSFILE=./coords.dat + INITIALIZED= F + } + + ./TBparam/electrons.dat + MDCONTROL{ } + + WARNING: variable RNDIST= is missing. I will use a default value instead ... + WARNING: variable SEEDINIT= is missing. I will use a default value instead ... + WARNING: variable NPTTYPE= is missing. I will use a default value instead ... + WARNING: variable UDNEIGH= is missing. I will use a default value instead ... + WARNING: variable DUMPFREQ= is missing. I will use a default value instead ... + WARNING: variable RSFREQ= is missing. I will use a default value instead ... + WARNING: variable WRTFREQ= is missing. I will use a default value instead ... + WARNING: variable TOINITTEMP5= is missing. I will use a default value instead ... + WARNING: variable THERMPER= is missing. I will use a default value instead ... + WARNING: variable THERMRUN= is missing. I will use a default value instead ... + WARNING: variable NVTON= is missing. I will use a default value instead ... + WARNING: variable NPTON= is missing. I will use a default value instead ... + WARNING: variable AVEPER= is missing. I will use a default value instead ... + WARNING: variable SEED= is missing. I will use a default value instead ... + WARNING: variable SHOCKON= is missing. I will use a default value instead ... + WARNING: variable SHOCKSTART= is missing. I will use a default value instead ... + WARNING: variable SHOCKDIR= is missing. I will use a default value instead ... + WARNING: variable MDADAPT= is missing. I will use a default value instead ... + WARNING: variable GETHUG= is missing. I will use a default value instead ... + WARNING: variable RSLEVEL= is missing. I will use a default value instead ... + WARNING: variable DT= is missing. I will use a default value instead ... + WARNING: variable TEMPERATURE= is missing. I will use a default value instead ... + WARNING: variable FRICTION= is missing. I will use a default value instead ... + WARNING: variable PTARGET= is missing. I will use a default value instead ... + WARNING: variable UPARTICLE= is missing. I will use a default value instead ... + WARNING: variable USHOCK= is missing. I will use a default value instead ... + WARNING: variable C0= is missing. I will use a default value instead ... + WARNING: variable E0= is missing. I will use a default value instead ... + WARNING: variable V0= is missing. I will use a default value instead ... + WARNING: variable P0= is missing. I will use a default value instead ... + WARNING: variable DUMMY= is missing. I will use a default value instead ... + + + ############### Parameters used for this run ################ + MDCONTROL{ + MAXITER= -1 + UDNEIGH= 1 + DUMPFREQ= 250 + RSFREQ= 500 + WRTFREQ= 25 + TOINITTEMP5= 1 + THERMPER= 500 + THERMRUN= 50000 + NVTON= 0 + NPTON= 0 + AVEPER= 1000 + SEED= 54 + SHOCKON= 0 + SHOCKSTART= 100000 + SHOCKDIR= 1 + MDADAPT= 0 + GETHUG= 0 + RSLEVEL= 0 + DT= 0.25000000000000000 + TEMPERATURE= 300.00000000000000 + FRICTION= 1000.0000000000000 + PTARGET= 0.0000000000000000 + UPARTICLE= 500.00000000000000 + USHOCK= -4590.0000000000000 + C0= 1300.0000000000000 + E0= -795.72497558593750 + V0= 896.98486328125000 + P0= 8.3149001002311707E-002 + RNDIST=GAUSSIAN + SEEDINIT=UNIFORM + NPTTYPE=ISO + DUMMY= F + } + + LIBCALLS 0 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15165627147849 13.850829743067372 0.0000000000000000 3.9653384620309846 + LIBCALLS 1 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15142147081917 13.850596160685321 0.0000000000000000 3.9653428217526296 + LIBCALLS 2 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15072431717670 13.849902902335046 0.0000000000000000 3.9653556077235628 + LIBCALLS 3 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14958682134301 13.848772166382796 0.0000000000000000 3.9653762812719782 + LIBCALLS 4 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14804481054080 13.847240065975685 0.0000000000000000 3.9654039257311324 + LIBCALLS 5 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14614669298459 13.845355347298943 0.0000000000000000 3.9654372593625880 + LIBCALLS 6 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14395200541782 13.843177681164811 0.0000000000000000 3.9654747563744728 + LIBCALLS 7 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14152950027858 13.840775605612510 0.0000000000000000 3.9655146828204026 + LIBCALLS 8 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13895477239572 13.838224210058369 0.0000000000000000 3.9655551214573213 + LIBCALLS 9 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13630808318862 13.835602658269416 0.0000000000000000 3.9655940696401335 + LIBCALLS 10 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13367156672246 13.832991646694552 0.0000000000000000 3.9656294961085377 + LIBCALLS 11 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13112695791978 13.830470890853416 0.0000000000000000 3.9656594331001127 + LIBCALLS 12 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12875304084571 13.828116721514562 0.0000000000000000 3.9656820468287637 + LIBCALLS 13 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12662314462005 13.825999860613845 0.0000000000000000 3.9656956633599689 + LIBCALLS 14 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12480303363179 13.824183432931337 0.0000000000000000 3.9656988576578489 + LIBCALLS 15 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12334906554690 13.822721254684298 0.0000000000000000 3.9656905013961525 + LIBCALLS 16 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12230649281338 13.821656427050725 0.0000000000000000 3.9656697961568699 + LIBCALLS 17 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12170820445976 13.821020251989051 0.0000000000000000 3.9656362957330207 + LIBCALLS 18 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12157378544725 13.820831478957400 0.0000000000000000 3.9655899465557289 + LIBCALLS 19 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12190902409918 13.821095885466233 0.0000000000000000 3.9655310732858191 + LIBCALLS 20 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12270578464654 13.821806190548854 0.0000000000000000 3.9654603894825375 + LIBCALLS 21 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12394226924755 13.822942298269552 0.0000000000000000 3.9653789701528157 + LIBCALLS 22 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12558369933174 13.824471866833779 0.0000000000000000 3.9652882392864672 + LIBCALLS 23 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12758334335854 13.826351196916939 0.0000000000000000 3.9651899208403507 + LIBCALLS 24 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12988392857540 13.828526429544008 0.0000000000000000 3.9650859962581815 + LIBCALLS 25 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13241933900565 13.830935038404082 0.0000000000000000 3.9649786471076300 + LIBCALLS 26 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13511663668885 13.833507593821677 0.0000000000000000 3.9648702062183578 + LIBCALLS 27 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13789821166085 13.836169765592846 0.0000000000000000 3.9647630647732250 + LIBCALLS 28 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14068416314257 13.838844520440762 0.0000000000000000 3.9646596094056243 + LIBCALLS 29 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14339478125902 13.841454456993119 0.0000000000000000 3.9645621614306648 + LIBCALLS 30 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14595299166797 13.843924209084781 0.0000000000000000 3.9644728862209537 + LIBCALLS 31 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14828672908391 13.846182838096166 0.0000000000000000 3.9643937231592781 + LIBCALLS 32 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15033121417270 13.848166127650318 0.0000000000000000 3.9643263326484774 + LIBCALLS 33 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15203097820654 13.849818691045462 0.0000000000000000 3.9642720350529470 + LIBCALLS 34 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15334158494318 13.851095804201121 0.0000000000000000 3.9642317563508436 + LIBCALLS 35 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15423101277941 13.851964884709183 0.0000000000000000 3.9642060118064197 + LIBCALLS 36 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15468060067406 13.852406550643760 0.0000000000000000 3.9641948735126151 + LIBCALLS 37 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15468556770435 13.852415210893483 0.0000000000000000 3.9641979705462513 + LIBCALLS 38 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15425506702360 13.851999160128511 0.0000000000000000 3.9642145018322728 + LIBCALLS 39 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15341177086162 13.851180175004831 0.0000000000000000 3.9642432622019754 + LIBCALLS 40 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15219100341108 13.849992631968849 0.0000000000000000 3.9642826797086155 + LIBCALLS 41 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15063948253476 13.848482189284203 0.0000000000000000 3.9643308764467280 + LIBCALLS 42 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14881366363778 13.846704095034502 0.0000000000000000 3.9643857194231229 + LIBCALLS 43 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14677783841711 13.844721197666447 0.0000000000000000 3.9644449063996254 + LIBCALLS 44 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14460195130079 13.842601745208173 0.0000000000000000 3.9645060327113080 + LIBCALLS 45 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14235930197236 13.840417063344470 0.0000000000000000 3.9645666751650537 + LIBCALLS 46 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14012416839108 13.838239201362184 0.0000000000000000 3.9646244709241216 + LIBCALLS 47 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13796944534135 13.836138629087953 0.0000000000000000 3.9646771958199687 + LIBCALLS 48 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13596436459642 13.834182058508610 0.0000000000000000 3.9647228360374207 + LIBCALLS 49 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13417236277201 13.832430452024822 0.0000000000000000 3.9647596471475066 + LIBCALLS 50 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13264918465853 13.830937266579358 0.0000000000000000 3.9647862263274365 + LIBCALLS 51 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13144121811348 13.829746970164395 0.0000000000000000 3.9648015300858930 + LIBCALLS 52 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13058418584075 13.828893856279002 0.0000000000000000 3.9648049379175174 + LIBCALLS 53 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13010212355317 13.828401171909800 0.0000000000000000 3.9647962482159476 + LIBCALLS 54 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13000675986638 13.828280567696357 0.0000000000000000 3.9647757005033171 + LIBCALLS 55 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13029725443062 13.828531873218640 0.0000000000000000 3.9647439679967813 + LIBCALLS 56 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13096031859556 13.829143196581525 0.0000000000000000 3.9647021412055241 + LIBCALLS 57 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13197071275096 13.830091344339912 0.0000000000000000 3.9646517009757813 + LIBCALLS 58 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13329208290526 13.831342554670950 0.0000000000000000 3.9645944691057076 + LIBCALLS 59 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13487817952188 13.832853532802908 0.0000000000000000 3.9645325717081379 + LIBCALLS 60 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13667431785007 13.834572772174083 0.0000000000000000 3.9644683636269380 + LIBCALLS 61 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13861917436014 13.836442137716100 0.0000000000000000 3.9644043716683206 + LIBCALLS 62 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14064674344610 13.838398678492441 0.0000000000000000 3.9643432117931376 + LIBCALLS 63 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14268847880851 13.840376626541268 0.0000000000000000 3.9642875107994442 + LIBCALLS 64 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14467552446979 13.842309527587247 0.0000000000000000 3.9642398279114381 + LIBCALLS 65 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14654097615647 13.844132438475109 0.0000000000000000 3.9642025589783412 + LIBCALLS 66 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14822207995957 13.845784117078871 0.0000000000000000 3.9641778771678413 + LIBCALLS 67 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14966231911774 13.847209123749478 0.0000000000000000 3.9641676470155103 + LIBCALLS 68 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15081329445576 13.848359751049152 0.0000000000000000 3.9641733618391299 + LIBCALLS 69 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15163634076458 13.849197700537186 0.0000000000000000 3.9641960937768981 + LIBCALLS 70 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15210380659516 13.849695432596437 0.0000000000000000 3.9642364336978391 + LIBCALLS 71 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15219997215792 13.849837127658775 0.0000000000000000 3.9642944914660605 + LIBCALLS 72 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15192153900722 13.849619213627008 0.0000000000000000 3.9643698667021590 + LIBCALLS 73 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15127769530471 13.849050434626310 0.0000000000000000 3.9644616585289247 + LIBCALLS 74 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.15028974592457 13.848151458176057 0.0000000000000000 3.9645684873567908 + LIBCALLS 75 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14899032381624 13.846954040343237 0.0000000000000000 3.9646885325372980 + LIBCALLS 76 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14742221364327 13.845499789571511 0.0000000000000000 3.9648195821504211 + LIBCALLS 77 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14563684020112 13.843838588134755 0.0000000000000000 3.9649591055666282 + LIBCALLS 78 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14369246883172 13.842026744273829 0.0000000000000000 3.9651043223068876 + LIBCALLS 79 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14165219754119 13.840124957235691 0.0000000000000000 3.9652522794782556 + LIBCALLS 80 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13958181195608 13.838196181062383 0.0000000000000000 3.9653999492835532 + LIBCALLS 81 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13754757713065 13.836303471774007 0.0000000000000000 3.9655443071963385 + LIBCALLS 82 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13561405478509 13.834507896249461 0.0000000000000000 3.9656824354232736 + LIBCALLS 83 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13384198639028 13.832866571528193 0.0000000000000000 3.9658115908515681 + LIBCALLS 84 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13228634940748 13.831430891696755 0.0000000000000000 3.9659292903699495 + LIBCALLS 85 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13099461122306 13.830244986101496 0.0000000000000000 3.9660333724384569 + LIBCALLS 86 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13000526350720 13.829344440260281 0.0000000000000000 3.9661220782532145 + LIBCALLS 87 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12934661713206 13.828755299191645 0.0000000000000000 3.9661940662588862 + LIBCALLS 88 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12903595764971 13.828493364127572 0.0000000000000000 3.9662484623936765 + LIBCALLS 89 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12907904533250 13.828563786156602 0.0000000000000000 3.9662848954537067 + LIBCALLS 90 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.12946994320248 13.828960955791626 0.0000000000000000 3.9663034756730777 + LIBCALLS 91 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13019123489619 13.829668684955367 0.0000000000000000 3.9663048073711558 + LIBCALLS 92 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13121457766835 13.830660675785223 0.0000000000000000 3.9662899643566578 + LIBCALLS 93 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13250159637499 13.831901269302985 0.0000000000000000 3.9662604605307470 + LIBCALLS 94 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13400508153813 13.833346464674193 0.0000000000000000 3.9662181906403653 + LIBCALLS 95 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13567049003717 13.834945196074795 0.0000000000000000 3.9661653991148187 + LIBCALLS 96 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13743766487022 13.836640848231452 0.0000000000000000 3.9661045863001441 + LIBCALLS 97 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.13924277096038 13.838372983906890 0.0000000000000000 3.9660384593805307 + LIBCALLS 98 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14102036682124 13.840079246589914 0.0000000000000000 3.9659698320311318 + LIBCALLS 99 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14270555407057 13.841697390518378 0.0000000000000000 3.9659015537535014 + LIBCALLS 100 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -261.14423615166146 13.843167378892108 0.0000000000000000 3.9658364191978137 diff --git a/examples/latte/log.19Sep17.latte.water.g++.1 b/examples/latte/log.19Sep17.latte.water.g++.1 index 15bc2d4d9a..f4603f5963 100644 --- a/examples/latte/log.19Sep17.latte.water.g++.1 +++ b/examples/latte/log.19Sep17.latte.water.g++.1 @@ -1,103 +1,406 @@ -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 + The log file for latte_lib + + CONTROL{ } + + WARNING: variable JobName= is missing. I will use a default value instead ... + WARNING: variable PARAMPATH= is missing. I will use a default value instead ... + WARNING: variable DEBUGON= is missing. I will use a default value instead ... + WARNING: variable FERMIM= is missing. I will use a default value instead ... + WARNING: variable CGORLIB= is missing. I will use a default value instead ... + WARNING: variable NORECS= is missing. I will use a default value instead ... + WARNING: variable VDWON= is missing. I will use a default value instead ... + WARNING: variable ORDERNMOL= is missing. I will use a default value instead ... + WARNING: variable LCNON= is missing. I will use a default value instead ... + WARNING: variable LCNITER= is missing. I will use a default value instead ... + WARNING: variable MDON= is missing. I will use a default value instead ... + WARNING: variable PBCON= is missing. I will use a default value instead ... + WARNING: variable RESTART= is missing. I will use a default value instead ... + WARNING: variable NGPU= is missing. I will use a default value instead ... + WARNING: variable COMPFORCE= is missing. I will use a default value instead ... + WARNING: variable DOSFIT= is missing. I will use a default value instead ... + WARNING: variable INTS2FIT= is missing. I will use a default value instead ... + WARNING: variable NFITSTEP= is missing. I will use a default value instead ... + WARNING: variable QFIT= is missing. I will use a default value instead ... + WARNING: variable PPFITON= is missing. I will use a default value instead ... + WARNING: variable ALLFITON= is missing. I will use a default value instead ... + WARNING: variable PPSTEP= is missing. I will use a default value instead ... + WARNING: variable BISTEP= is missing. I will use a default value instead ... + WARNING: variable PP2FIT= is missing. I will use a default value instead ... + WARNING: variable BINT2FIT= is missing. I will use a default value instead ... + WARNING: variable PPNMOL= is missing. I will use a default value instead ... + WARNING: variable PPNGEOM= is missing. I will use a default value instead ... + WARNING: variable PARREP= is missing. I will use a default value instead ... + WARNING: variable VERBOSE= is missing. I will use a default value instead ... + WARNING: variable MIXER= is missing. I will use a default value instead ... + WARNING: variable RESTARTLIB= is missing. I will use a default value instead ... + WARNING: variable CGTOL= is missing. I will use a default value instead ... + WARNING: variable ELEC_ETOL= is missing. I will use a default value instead ... + WARNING: variable COULACC= is missing. I will use a default value instead ... + WARNING: variable COULCUT= is missing. I will use a default value instead ... + WARNING: variable COULR1= is missing. I will use a default value instead ... + WARNING: variable CHTOL= is missing. I will use a default value instead ... + WARNING: variable BETA= is missing. I will use a default value instead ... + WARNING: variable MCSIGMA= is missing. I will use a default value instead ... + WARNING: variable PPBETA= is missing. I will use a default value instead ... + WARNING: variable PPSIGMA= is missing. I will use a default value instead ... + WARNING: variable ER= is missing. I will use a default value instead ... + WARNING: variable INITIALIZED= is missing. I will use a default value instead ... + + + ############### Parameters used for this run ################ + CONTROL{ + xControl= 1 + DEBUGON= 0 + FERMIM= 6 + CGORLIB= 1 + NORECS= 1 + ENTROPYKIND= 1 + PPOTON= 1 + VDWON= 0 + SPINON= 0 + ELECTRO= 1 + ELECMETH= 0 + MAXSCF= 450 + MINSP2ITER= 22 + FULLQCONV= 1 + QITER= 3 + ORDERNMOL= 0 + SPARSEON= 1 + THRESHOLDON= 1 + FILLINSTOP= 100 + BLKSZ= 4 + MSPARSE= 1500 + LCNON= 0 + LCNITER= 4 + RELAX= 0 + MAXITER= 100000 + MDON= 1 + PBCON= 1 + RESTART= 0 + CHARGE= 0 + XBO= 1 + XBODISON= 1 + XBODISORDER= 5 + NGPU= 2 + KON= 0 + COMPFORCE= 1 + DOSFIT= 0 + INTS2FIT= 1 + NFITSTEP= 5000 + QFIT= 0 + PPFITON= 0 + ALLFITON= 0 + PPSTEP= 500 + BISTEP= 500 + PP2FIT= 2 + BINT2FIT= 6 + PPNMOL= 10 + PPNGEOM= 200 + PARREP= 0 + VERBOSE= 0 + MIXER= 0 + RESTARTLIB= 0 + CGTOL= 9.9999999747524271E-007 + KBT= 0.0000000000000000 + SPINTOL= 1.0000000000000000E-004 + ELEC_ETOL= 1.0000000474974513E-003 + ELEC_QTOL= 1.0000000000000000E-008 + COULACC= 9.9999999747524271E-007 + COULCUT= -500.00000000000000 + COULR1= 500.00000000000000 + BREAKTOL= 9.9999999999999995E-007 + QMIX= 0.25000000000000000 + SPINMIX= 0.25000000000000000 + MDMIX= 0.25000000000000000 + NUMTHRESH= 9.9999999999999995E-007 + CHTOL= 9.9999997764825821E-003 + SKIN= 1.0000000000000000 + RLXFTOL= 9.9999999999999995E-008 + BETA= 1000.0000000000000 + MCSIGMA= 0.20000000298023224 + PPBETA= 1000.0000000000000 + PPSIGMA= 9.9999997764825821E-003 + ER= 1.0000000000000000 + JobName=MyJob + BASISTYPE=NONORTHO + SP2CONV=REL + RELAXTYPE=SD + PARAMPATH=./TBparam + COORDSFILE=./coords.dat + INITIALIZED= F + } + + ./TBparam/electrons.dat + MDCONTROL{ } + + WARNING: variable RNDIST= is missing. I will use a default value instead ... + WARNING: variable SEEDINIT= is missing. I will use a default value instead ... + WARNING: variable NPTTYPE= is missing. I will use a default value instead ... + WARNING: variable UDNEIGH= is missing. I will use a default value instead ... + WARNING: variable DUMPFREQ= is missing. I will use a default value instead ... + WARNING: variable RSFREQ= is missing. I will use a default value instead ... + WARNING: variable WRTFREQ= is missing. I will use a default value instead ... + WARNING: variable TOINITTEMP5= is missing. I will use a default value instead ... + WARNING: variable THERMPER= is missing. I will use a default value instead ... + WARNING: variable THERMRUN= is missing. I will use a default value instead ... + WARNING: variable NVTON= is missing. I will use a default value instead ... + WARNING: variable NPTON= is missing. I will use a default value instead ... + WARNING: variable AVEPER= is missing. I will use a default value instead ... + WARNING: variable SEED= is missing. I will use a default value instead ... + WARNING: variable SHOCKON= is missing. I will use a default value instead ... + WARNING: variable SHOCKSTART= is missing. I will use a default value instead ... + WARNING: variable SHOCKDIR= is missing. I will use a default value instead ... + WARNING: variable MDADAPT= is missing. I will use a default value instead ... + WARNING: variable GETHUG= is missing. I will use a default value instead ... + WARNING: variable RSLEVEL= is missing. I will use a default value instead ... + WARNING: variable DT= is missing. I will use a default value instead ... + WARNING: variable TEMPERATURE= is missing. I will use a default value instead ... + WARNING: variable FRICTION= is missing. I will use a default value instead ... + WARNING: variable PTARGET= is missing. I will use a default value instead ... + WARNING: variable UPARTICLE= is missing. I will use a default value instead ... + WARNING: variable USHOCK= is missing. I will use a default value instead ... + WARNING: variable C0= is missing. I will use a default value instead ... + WARNING: variable E0= is missing. I will use a default value instead ... + WARNING: variable V0= is missing. I will use a default value instead ... + WARNING: variable P0= is missing. I will use a default value instead ... + WARNING: variable DUMMY= is missing. I will use a default value instead ... + + + ############### Parameters used for this run ################ + MDCONTROL{ + MAXITER= -1 + UDNEIGH= 1 + DUMPFREQ= 250 + RSFREQ= 500 + WRTFREQ= 25 + TOINITTEMP5= 1 + THERMPER= 500 + THERMRUN= 50000 + NVTON= 0 + NPTON= 0 + AVEPER= 1000 + SEED= 54 + SHOCKON= 0 + SHOCKSTART= 100000 + SHOCKDIR= 1 + MDADAPT= 0 + GETHUG= 0 + RSLEVEL= 0 + DT= 0.25000000000000000 + TEMPERATURE= 300.00000000000000 + FRICTION= 1000.0000000000000 + PTARGET= 0.0000000000000000 + UPARTICLE= 500.00000000000000 + USHOCK= -4590.0000000000000 + C0= 1300.0000000000000 + E0= -795.72497558593750 + V0= 896.98486328125000 + P0= 8.3149001002311707E-002 + RNDIST=GAUSSIAN + SEEDINIT=UNIFORM + NPTTYPE=ISO + DUMMY= F + } + + LIBCALLS 0 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -110.94281402417451 9.3197859655447317 0.0000000000000000 3.3331152608769714 + LIBCALLS 1 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -111.00875524736128 9.3653691493930946 0.0000000000000000 3.3307590218500454 + LIBCALLS 2 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -111.20542679804305 9.5022104076319209 0.0000000000000000 3.3237269236958826 + LIBCALLS 3 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -111.52938059528239 9.7304811436977623 0.0000000000000000 3.3121168872278743 + LIBCALLS 4 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -111.97463249071366 10.050121693432235 0.0000000000000000 3.2961492065207088 + LIBCALLS 5 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -112.53270518796754 10.460328095449432 0.0000000000000000 3.2761112890303719 + LIBCALLS 6 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.19233973551384 10.958848347453728 0.0000000000000000 3.2524094948032394 + LIBCALLS 7 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.93936061504219 11.541120618354967 0.0000000000000000 3.2255715906285793 + LIBCALLS 8 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -114.75657630591589 12.199315594286325 0.0000000000000000 3.1962412869596100 + LIBCALLS 9 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -115.62363727592754 12.921383532128770 0.0000000000000000 3.1652236023838971 + LIBCALLS 10 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -116.51738028417616 13.690253224922545 0.0000000000000000 3.1333864449223818 + LIBCALLS 11 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -117.41167836078414 14.483370804317431 0.0000000000000000 3.1018474945925432 + LIBCALLS 12 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -118.27888830961329 15.272791625586624 0.0000000000000000 3.0716022180609772 + LIBCALLS 13 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -119.09006809777934 16.026020995592610 0.0000000000000000 3.0437832241644842 + LIBCALLS 14 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -119.81665859965702 16.707725410478066 0.0000000000000000 3.0194382402972129 + LIBCALLS 15 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.43171665196000 17.282293509806884 0.0000000000000000 2.9995944159949395 + LIBCALLS 16 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.91202932933264 17.717025741135480 0.0000000000000000 2.9850159611897484 + LIBCALLS 17 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.23935305628714 17.985521384886379 0.0000000000000000 2.9763132734231292 + LIBCALLS 18 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.40195013006486 18.070687763205626 0.0000000000000000 2.9738279411203812 + LIBCALLS 19 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.39540873020161 17.966785565900089 0.0000000000000000 2.9776410698341418 + LIBCALLS 20 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.22299732491055 17.680085363043698 0.0000000000000000 2.9875419962840417 + LIBCALLS 21 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.89520311723561 17.228004261852682 0.0000000000000000 3.0030824758482719 + LIBCALLS 22 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.42892991839108 16.636927104987372 0.0000000000000000 3.0235548851138652 + LIBCALLS 23 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -119.84603562384113 15.939176953031323 0.0000000000000000 3.0480682132279808 + LIBCALLS 24 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -119.17151378155378 15.169713318754383 0.0000000000000000 3.0757033760823562 + LIBCALLS 25 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -118.43237009319661 14.363090728730079 0.0000000000000000 3.1053593079625457 + LIBCALLS 26 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -117.65587959220025 13.551051330611342 0.0000000000000000 3.1359367589132958 + LIBCALLS 27 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -116.86794783202731 12.760928656005802 0.0000000000000000 3.1665525874091585 + LIBCALLS 28 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -116.09314111752745 12.014864684105008 0.0000000000000000 3.1962157162544820 + LIBCALLS 29 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -115.35329645548983 11.329720850249741 0.0000000000000000 3.2241713466126849 + LIBCALLS 30 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -114.66766945168203 10.717501941208962 0.0000000000000000 3.2497326120829619 + LIBCALLS 31 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -114.05267853351812 10.186102377105355 0.0000000000000000 3.2723439005172468 + LIBCALLS 32 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.52195471723405 9.7402032028335377 0.0000000000000000 3.2915777178346559 + LIBCALLS 33 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.08654808143162 9.3821857555240076 0.0000000000000000 3.3070881064986164 + LIBCALLS 34 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -112.75494140290169 9.1129669843369658 0.0000000000000000 3.3186769594405297 + LIBCALLS 35 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -112.53346080566452 8.9326971516334606 0.0000000000000000 3.3261797960311763 + LIBCALLS 36 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -112.42631053676025 8.8412887543407273 0.0000000000000000 3.3295101207595583 + LIBCALLS 37 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -112.43567911088179 8.8387604511711384 0.0000000000000000 3.3286360397306387 + LIBCALLS 38 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -112.56180874683180 8.9253908783870841 0.0000000000000000 3.3235794828927934 + LIBCALLS 39 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -112.80290981416660 9.1016780459478674 0.0000000000000000 3.3144303393175201 + LIBCALLS 40 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.15529209572232 9.3681021116147463 0.0000000000000000 3.3012719922659173 + LIBCALLS 41 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.61284717182851 9.7246892073080176 0.0000000000000000 3.2843276907821406 + LIBCALLS 42 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -114.16711238367500 10.170382433756300 0.0000000000000000 3.2638758866524444 + LIBCALLS 43 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -114.80697882175535 10.702240750749448 0.0000000000000000 3.2402928278295451 + LIBCALLS 44 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -115.51862249254057 11.314512276989859 0.0000000000000000 3.2140189987358694 + LIBCALLS 45 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -116.28534475502829 11.997664972113199 0.0000000000000000 3.1855791836729437 + LIBCALLS 46 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -117.08723294353808 12.737504349188432 0.0000000000000000 3.1557205936583181 + LIBCALLS 47 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -117.90172272355942 13.514542609912253 0.0000000000000000 3.1252466759266087 + LIBCALLS 48 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -118.70392627447073 14.303827027310493 0.0000000000000000 3.0950533786893732 + LIBCALLS 49 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -119.46728361372288 15.075425279261220 0.0000000000000000 3.0661202668284480 + LIBCALLS 50 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.16480071670361 15.795723720235596 0.0000000000000000 3.0394030522382605 + LIBCALLS 51 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.77012122199473 16.429579578207949 0.0000000000000000 3.0158910566711334 + LIBCALLS 52 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.25943485841766 16.943195338409559 0.0000000000000000 2.9964108616830281 + LIBCALLS 53 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.61275582007269 17.307379355481601 0.0000000000000000 2.9817016064731785 + LIBCALLS 54 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.81557415209883 17.500688554193868 0.0000000000000000 2.9722905637821611 + LIBCALLS 55 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.85979389563140 17.511877645177901 0.0000000000000000 2.9685356305551474 + LIBCALLS 56 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.74454585055143 17.341170281709367 0.0000000000000000 2.9705149057151141 + LIBCALLS 57 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.47625724150488 17.000096879575938 0.0000000000000000 2.9780008785307088 + LIBCALLS 58 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.06771474420596 16.509959464438374 0.0000000000000000 2.9906138266349656 + LIBCALLS 59 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.53702830874704 15.899266098308772 0.0000000000000000 3.0078351734174715 + LIBCALLS 60 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -119.90667912574422 15.200652842845301 0.0000000000000000 3.0288733658622142 + LIBCALLS 61 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -119.20142467775943 14.447825469624703 0.0000000000000000 3.0529481020908245 + LIBCALLS 62 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -118.44747494197328 13.672949108115853 0.0000000000000000 3.0790791220573088 + LIBCALLS 63 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -117.67063237406208 12.904741667499017 0.0000000000000000 3.1063745183559131 + LIBCALLS 64 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -116.89550228683500 12.167344616151606 0.0000000000000000 3.1339818740985033 + LIBCALLS 65 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -116.14487351718614 11.479908971904207 0.0000000000000000 3.1610748652786995 + LIBCALLS 66 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -115.43917601644073 10.856755674815151 0.0000000000000000 3.1869042214936911 + LIBCALLS 67 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -114.79630542914917 10.307930318909381 0.0000000000000000 3.2107896540741994 + LIBCALLS 68 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -114.23118520942130 9.8399835349372715 0.0000000000000000 3.2322754400486997 + LIBCALLS 69 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.75645667348935 9.4568320682906393 0.0000000000000000 3.2508686207040949 + LIBCALLS 70 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.38220191758144 9.1605931457952803 0.0000000000000000 3.2662052636761625 + LIBCALLS 71 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.11651461323785 8.9523172650382463 0.0000000000000000 3.2778578161416640 + LIBCALLS 72 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -112.96490300473705 8.8325758589074610 0.0000000000000000 3.2856373346184280 + LIBCALLS 73 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -112.93101384064629 8.8018792766284140 0.0000000000000000 3.2893376450243901 + LIBCALLS 74 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.01657988020818 8.8609123616606951 0.0000000000000000 3.2887786713823335 + LIBCALLS 75 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.22122702505257 9.0105808374276855 0.0000000000000000 3.2838806809960044 + LIBCALLS 76 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.54255812607462 9.2518619694254909 0.0000000000000000 3.2746170980725564 + LIBCALLS 77 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -113.97595003796289 9.5854566564348804 0.0000000000000000 3.2610495238703536 + LIBCALLS 78 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -114.51445216471619 10.011242264155852 0.0000000000000000 3.2433103887056101 + LIBCALLS 79 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -115.14835871057100 10.527538366743359 0.0000000000000000 3.2217018278255036 + LIBCALLS 80 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -115.86512618816471 11.130220642932718 0.0000000000000000 3.1966546818138903 + LIBCALLS 81 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -116.64916580084807 11.811746817430592 0.0000000000000000 3.1687509169099037 + LIBCALLS 82 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -117.48162972769103 12.560201275368994 0.0000000000000000 3.1387793445426220 + LIBCALLS 83 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -118.34080112521505 13.358507776606700 0.0000000000000000 3.1076005013428842 + LIBCALLS 84 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -119.20206255799097 14.183999576696523 0.0000000000000000 3.0762625451098367 + LIBCALLS 85 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.03875955947012 15.008549885925623 0.0000000000000000 3.0458557745855401 + LIBCALLS 86 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.82281065648482 15.799445052997022 0.0000000000000000 3.0175902569508040 + LIBCALLS 87 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.52638053902615 16.521105731022047 0.0000000000000000 2.9925661691795984 + LIBCALLS 88 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -122.12297505178334 17.137613862262167 0.0000000000000000 2.9718740800190462 + LIBCALLS 89 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -122.58954501498538 17.615819283155187 0.0000000000000000 2.9563457612376758 + LIBCALLS 90 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -122.90768650775293 17.928615619513138 0.0000000000000000 2.9466637669908935 + LIBCALLS 91 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -123.06510359278838 18.057846294334183 0.0000000000000000 2.9432773288779130 + LIBCALLS 92 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -123.05653995529889 17.996310208253615 0.0000000000000000 2.9463730237128352 + LIBCALLS 93 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -122.88443709725219 17.748486968230267 0.0000000000000000 2.9557418006906766 + LIBCALLS 94 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -122.55804625906457 17.329857520510558 0.0000000000000000 2.9710497340098647 + LIBCALLS 95 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -122.09316916859144 16.764989519228550 0.0000000000000000 2.9916333369114647 + LIBCALLS 96 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -121.51050736457847 16.084787212290774 0.0000000000000000 3.0167038701280053 + LIBCALLS 97 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.83475656442954 15.323405512114466 0.0000000000000000 3.0451593241515909 + LIBCALLS 98 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -120.09218577985371 14.515310319889227 0.0000000000000000 3.0759929793994090 + LIBCALLS 99 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -119.30969482099719 13.692843612811791 0.0000000000000000 3.1081426979179545 + LIBCALLS 100 + Energy Components (TRRHOH, EREP, ENTE, ECOUL) -118.51358261827596 12.884492109393644 0.0000000000000000 3.1405428597121636 diff --git a/examples/latte/log.19Sep17.latte.water.min.g++.1 b/examples/latte/log.19Sep17.latte.water.min.g++.1 index 44838091c7..4b96bd2668 100644 --- a/examples/latte/log.19Sep17.latte.water.min.g++.1 +++ b/examples/latte/log.19Sep17.latte.water.min.g++.1 @@ -41,13 +41,13 @@ fix 1 all nve fix 2 all latte NULL fix_modify 2 energy yes -thermo_style custom step temp pe etotal +thermo_style custom step temp pe etotal press # minimization -thermo 1 +thermo 10 min_style fire -minimize 1.0e-9 1.0e-9 1000 1000 +minimize 1.0e-9 1.0e-9 500 500 Neighbor list info ... update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 @@ -61,1042 +61,92 @@ Neighbor list info ... 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 - 1 1.5201687 -104.95614 -104.95162 - 2 6.808687 -104.96609 -104.94585 - 3 17.096723 -104.98663 -104.9358 - 4 33.629788 -105.01804 -104.91806 - 5 57.516859 -105.06035 -104.88935 - 6 89.635927 -105.11328 -104.8468 - 7 133.00392 -105.18246 -104.78704 - 8 189.48221 -105.27034 -104.70701 - 9 261.04605 -105.37899 -104.6029 - 10 349.44219 -105.50971 -104.47083 - 11 455.87927 -105.66241 -104.30709 - 12 580.58686 -105.8348 -104.10872 - 13 722.21599 -106.02157 -103.87443 - 14 877.0209 -106.21372 -103.60635 - 15 1037.5706 -106.3988 -103.31412 - 16 1190.0576 -106.56282 -103.0248 - 17 1308.737 -106.69593 -102.80507 - 18 1356.6462 -106.80052 -102.76723 - 19 1324.2012 -106.89597 -102.95914 - 20 1253.6752 -107.00898 -103.28182 - 21 1189.7219 -107.15076 -103.61374 - 22 1145.1972 -107.29296 -103.88831 - 23 1097.3801 -107.37395 -104.11146 - 24 1010.5781 -107.35683 -104.3524 - 25 2.7642487 -107.35683 -107.34861 - 26 12.06607 -107.37413 -107.33826 - 27 29.389846 -107.4078 -107.32042 - 28 55.737552 -107.45419 -107.28848 - 29 91.202574 -107.50779 -107.23664 - 30 134.63588 -107.56184 -107.16157 - 31 185.21604 -107.61416 -107.06352 - 32 235.87146 -107.65808 -106.95684 - 33 274.09495 -107.69189 -106.87701 - 34 293.31507 -107.72594 -106.85392 - 35 307.77093 -107.78314 -106.86814 - 36 339.57996 -107.88534 -106.87578 - 37 400.85391 -108.02136 -106.82963 - 38 484.65052 -108.12706 -106.6862 - 39 528.0129 -108.15301 -106.58324 - 40 2.4043703 -108.15301 -108.14586 - 41 10.447148 -108.16781 -108.13675 - 42 25.012648 -108.19542 -108.12106 - 43 46.1164 -108.23028 -108.09318 - 44 72.599193 -108.26441 -108.04857 - 45 101.66532 -108.28995 -107.9877 - 46 127.53127 -108.30326 -107.92411 - 47 137.26619 -108.3044 -107.89631 - 48 133.7112 -108.30622 -107.9087 - 49 136.36908 -108.33282 -107.9274 - 50 162.13426 -108.40551 -107.92349 - 51 217.8747 -108.50923 -107.86149 - 52 296.92621 -108.57482 -107.69206 - 53 335.06365 -108.56171 -107.56557 - 54 3.2295141 -108.56171 -108.55211 - 55 13.909877 -108.58127 -108.53992 - 56 32.803473 -108.61675 -108.51922 - 57 59.175985 -108.65851 -108.48258 - 58 90.493713 -108.69322 -108.42419 - 59 121.1211 -108.70878 -108.34869 - 60 134.03149 -108.70118 -108.30271 - 61 0.45680704 -108.70118 -108.69982 - 62 1.9220639 -108.70396 -108.69824 - 63 4.5573866 -108.70936 -108.69581 - 64 8.5126491 -108.71694 -108.69163 - 65 13.901778 -108.72605 -108.68472 - 66 20.795969 -108.73593 -108.6741 - 67 29.608718 -108.7468 -108.65877 - 68 40.203648 -108.75805 -108.63853 - 69 52.042332 -108.76919 -108.61447 - 70 64.159014 -108.78034 -108.5896 - 71 75.771577 -108.79236 -108.56709 - 72 86.942891 -108.8071 -108.54862 - 73 98.679499 -108.82686 -108.53348 - 74 112.70258 -108.85388 -108.51882 - 75 131.01392 -108.88888 -108.49938 - 76 155.01269 -108.92941 -108.46856 - 77 183.59183 -108.96971 -108.4239 - 78 208.14268 -109.00548 -108.38667 - 79 221.74997 -109.04482 -108.38557 - 80 240.49926 -109.10766 -108.39266 - 81 282.15521 -109.19299 -108.35415 - 82 343.75437 -109.24572 -108.22375 - 83 362.9105 -109.2425 -108.16357 - 84 403.79102 -109.29324 -108.09277 - 85 533.47235 -109.45377 -107.86776 - 86 620.34731 -109.14983 -107.30554 - 87 64.320652 -109.14983 -108.9586 - 88 270.57464 -109.45885 -108.65444 - 89 492.20963 -109.61818 -108.15485 - 90 0.60467192 -109.61818 -109.61639 - 91 2.6144224 -109.62188 -109.61411 - 92 6.2234632 -109.62872 -109.61022 - 93 11.397514 -109.63722 -109.60333 - 94 17.80749 -109.64529 -109.59235 - 95 24.69956 -109.65096 -109.57753 - 96 30.405841 -109.65342 -109.56302 - 97 32.007417 -109.65294 -109.55778 - 98 0.14532348 -109.65294 -109.65251 - 99 0.61550004 -109.65383 -109.652 - 100 1.4691163 -109.65556 -109.65119 - 101 2.7597829 -109.65799 -109.64979 - 102 4.5248313 -109.66092 -109.64747 - 103 6.7796415 -109.66409 -109.64393 - 104 9.6384283 -109.66756 -109.6389 - 105 13.025477 -109.67112 -109.63239 - 106 16.72282 -109.6746 -109.62488 - 107 20.380897 -109.67803 -109.61744 - 108 23.765982 -109.68173 -109.61108 - 109 26.990792 -109.68632 -109.60607 - 110 30.500628 -109.69267 -109.602 - 111 34.955593 -109.70154 -109.59762 - 112 41.059474 -109.71314 -109.59107 - 113 49.239692 -109.72643 -109.58004 - 114 58.88016 -109.73932 -109.56427 - 115 66.55829 -109.75073 -109.55285 - 116 71.13871 -109.7644 -109.55291 - 117 78.727695 -109.78737 -109.55332 - 118 94.495003 -109.81741 -109.53648 - 119 114.50742 -109.83433 -109.4939 - 120 120.62379 -109.83749 -109.47888 - 121 142.59007 -109.87061 -109.44669 - 122 195.72194 -109.9242 -109.34232 - 123 207.84133 -109.75345 -109.13554 - 124 35.157191 -109.75345 -109.64893 - 125 147.98442 -109.91974 -109.47978 - 126 264.7384 -109.98589 -109.19883 - 127 0.47051461 -109.98589 -109.98449 - 128 2.015355 -109.98873 -109.98274 - 129 4.7258223 -109.99385 -109.9798 - 130 8.4742975 -109.99986 -109.97467 - 131 12.881215 -110.00486 -109.96657 - 132 17.120211 -110.00727 -109.95638 - 133 18.853219 -110.00671 -109.95066 - 134 0.049315826 -110.00671 -110.00657 - 135 0.21016075 -110.00702 -110.00639 - 136 0.50628438 -110.00762 -110.00611 - 137 0.96149821 -110.00847 -110.00561 - 138 1.5944825 -110.00953 -110.00479 - 139 2.4154448 -110.01072 -110.00354 - 140 3.4732679 -110.01209 -110.00176 - 141 4.7568004 -110.01357 -109.99942 - 142 6.2155655 -110.01509 -109.99661 - 143 7.7429964 -110.01663 -109.99361 - 144 9.2255652 -110.01827 -109.99084 - 145 10.654118 -110.02019 -109.98852 - 146 12.1764 -110.02273 -109.98653 - 147 14.061879 -110.02625 -109.98445 - 148 16.636125 -110.03101 -109.98155 - 149 20.183789 -110.03683 -109.97683 - 150 24.749482 -110.04313 -109.96955 - 151 29.465936 -110.04917 -109.96157 - 152 32.835843 -110.05564 -109.95802 - 153 36.307815 -110.06511 -109.95717 - 154 42.640377 -110.07913 -109.95236 - 155 53.335987 -110.09229 -109.93372 - 156 59.52499 -110.09859 -109.92162 - 157 64.805012 -110.1105 -109.91783 - 158 84.05518 -110.14398 -109.89409 - 159 108.56754 -110.13288 -109.81011 - 160 4.1106505 -110.13288 -110.12066 - 161 17.351424 -110.15432 -110.10274 - 162 34.434168 -110.1739 -110.07153 - 163 38.293556 -110.15649 -110.04264 - 164 0.56281645 -110.15649 -110.15481 - 165 2.3904042 -110.15985 -110.15274 - 166 5.5501762 -110.16586 -110.14936 - 167 9.8340496 -110.17282 -110.14358 - 168 14.736744 -110.1784 -110.13459 - 169 19.307459 -110.18061 -110.12321 - 170 0.0065628716 -110.18061 -110.18059 - 171 0.028903477 -110.18065 -110.18056 - 172 0.07206358 -110.18073 -110.18052 - 173 0.14167704 -110.18087 -110.18044 - 174 0.2432297 -110.18104 -110.18032 - 175 0.38157525 -110.18126 -110.18013 - 176 0.57077598 -110.18155 -110.17985 - 177 0.82062274 -110.18192 -110.17948 - 178 1.1425778 -110.18239 -110.17899 - 179 1.5491674 -110.18297 -110.17837 - 180 2.0542078 -110.1837 -110.17759 - 181 2.6736416 -110.18455 -110.17661 - 182 3.4275312 -110.18565 -110.17546 - 183 4.3437566 -110.18697 -110.17406 - 184 5.4629592 -110.18863 -110.17239 - 185 6.8429151 -110.19074 -110.17039 - 186 8.558499 -110.19334 -110.1679 - 187 10.692141 -110.19653 -110.16474 - 188 13.310329 -110.20037 -110.1608 - 189 16.442058 -110.20502 -110.15614 - 190 20.134782 -110.21071 -110.15085 - 191 24.609014 -110.21761 -110.14445 - 192 30.257672 -110.22595 -110.13599 - 193 37.14715 -110.23562 -110.12518 - 194 44.381882 -110.2469 -110.11496 - 195 52.302288 -110.26099 -110.1055 - 196 63.063861 -110.27647 -110.08898 - 197 70.430937 -110.29106 -110.08167 - 198 78.953909 -110.3136 -110.07887 - 199 97.133765 -110.3244 -110.03563 - 200 2.3397267 -110.3244 -110.31745 - 201 9.9507947 -110.3357 -110.30612 - 202 18.252321 -110.33895 -110.28468 - 203 0.11908387 -110.33895 -110.33859 - 204 0.50535824 -110.33965 -110.33815 - 205 1.1576304 -110.34086 -110.33742 - 206 2.004619 -110.34215 -110.33619 - 207 2.8994964 -110.34306 -110.33444 - 208 3.5526113 -110.34348 -110.33292 - 209 3.9282379 -110.34372 -110.33205 - 210 4.3544709 -110.34438 -110.33143 - 211 5.2437118 -110.34617 -110.33058 - 212 6.9571269 -110.34945 -110.32876 - 213 9.5965365 -110.35329 -110.32476 - 214 12.473823 -110.35524 -110.31816 - 215 12.392386 -110.35514 -110.3183 - 216 13.141518 -110.35781 -110.31874 - 217 18.385711 -110.36822 -110.31356 - 218 26.967993 -110.37299 -110.29282 - 219 0.27744298 -110.37299 -110.37217 - 220 1.1872367 -110.37457 -110.37104 - 221 2.6133584 -110.37688 -110.36911 - 222 4.1221053 -110.3782 -110.36594 - 223 4.6040177 -110.37758 -110.36389 - 224 0.038524702 -110.37758 -110.37747 - 225 0.16360485 -110.37782 -110.37733 - 226 0.38846835 -110.37826 -110.37711 - 227 0.72006206 -110.37887 -110.37673 - 228 1.15539 -110.37954 -110.37611 - 229 1.6790598 -110.3802 -110.3752 - 230 2.2798399 -110.38081 -110.37403 - 231 2.8672337 -110.38134 -110.37282 - 232 3.3478905 -110.38182 -110.37187 - 233 3.7553338 -110.38241 -110.37124 - 234 4.2370426 -110.38334 -110.37074 - 235 4.9776058 -110.38485 -110.37005 - 236 6.1525909 -110.38704 -110.36874 - 237 7.8624459 -110.38958 -110.36621 - 238 9.9211391 -110.39179 -110.3623 - 239 11.098374 -110.39351 -110.36052 - 240 11.835907 -110.39611 -110.36092 - 241 13.879769 -110.40138 -110.36012 - 242 18.005229 -110.40769 -110.35416 - 243 22.038485 -110.40864 -110.34312 - 244 0.33152568 -110.40864 -110.40766 - 245 1.4129442 -110.41053 -110.40633 - 246 3.1138224 -110.41334 -110.40408 - 247 4.9440082 -110.41504 -110.40035 - 248 5.6140158 -110.41433 -110.39764 - 249 0.032328434 -110.41433 -110.41423 - 250 0.13741849 -110.41453 -110.41412 - 251 0.32731465 -110.4149 -110.41393 - 252 0.60968042 -110.41542 -110.41361 - 253 0.98438724 -110.41601 -110.41308 - 254 1.4414324 -110.4166 -110.41231 - 255 1.9783767 -110.41717 -110.41129 - 256 2.5269237 -110.41767 -110.41016 - 257 2.9864493 -110.4181 -110.40922 - 258 3.3404751 -110.41856 -110.40863 - 259 3.7000476 -110.41924 -110.40824 - 260 4.2283185 -110.42036 -110.40779 - 261 5.0929444 -110.42209 -110.40695 - 262 6.4211772 -110.4243 -110.40521 - 263 8.2088401 -110.42647 -110.40207 - 264 9.7475518 -110.42811 -110.39913 - 265 10.398229 -110.42987 -110.39896 - 266 11.593843 -110.43342 -110.39895 - 267 14.481156 -110.43927 -110.39622 - 268 19.109019 -110.44284 -110.38603 - 269 0.10999952 -110.44284 -110.44251 - 270 0.47243724 -110.44349 -110.44208 - 271 1.0736256 -110.44454 -110.44135 - 272 1.807867 -110.44548 -110.4401 - 273 2.4452359 -110.44599 -110.43872 - 274 2.6625254 -110.44599 -110.43808 - 275 2.785323 -110.44615 -110.43787 - 276 3.302696 -110.44719 -110.43737 - 277 4.6100787 -110.44981 -110.43611 - 278 6.8021878 -110.45302 -110.4328 - 279 9.1774593 -110.45428 -110.427 - 280 0.06090137 -110.45428 -110.4541 - 281 0.26196159 -110.45465 -110.45387 - 282 0.61371568 -110.4553 -110.45348 - 283 1.0959743 -110.45606 -110.4528 - 284 1.6532799 -110.45669 -110.45177 - 285 2.1625988 -110.45709 -110.45066 - 286 2.492327 -110.45735 -110.44994 - 287 2.7144098 -110.45775 -110.44968 - 288 3.097138 -110.45866 -110.44946 - 289 3.9134697 -110.46038 -110.44875 - 290 5.3413962 -110.46285 -110.44697 - 291 7.3225065 -110.46502 -110.44325 - 292 8.5167013 -110.466 -110.44068 - 293 9.0887705 -110.46724 -110.44022 - 294 11.341897 -110.472 -110.43828 - 295 16.144881 -110.47893 -110.43093 - 296 20.323071 -110.47596 -110.41554 - 297 0.62480115 -110.47596 -110.4741 - 298 2.6374357 -110.47942 -110.47158 - 299 5.6021367 -110.484 -110.46734 - 300 8.2032986 -110.48519 -110.4608 - 301 0.015187497 -110.48519 -110.48514 - 302 0.066019062 -110.48528 -110.48509 - 303 0.16066379 -110.48547 -110.48499 - 304 0.30540054 -110.48573 -110.48482 - 305 0.50262503 -110.48603 -110.48454 - 306 0.7493026 -110.48636 -110.48414 - 307 1.0487089 -110.48672 -110.4836 - 308 1.3812875 -110.4871 -110.483 - 309 1.7239596 -110.48754 -110.48241 - 310 2.0783529 -110.48807 -110.48189 - 311 2.4965626 -110.48882 -110.4814 - 312 3.0728969 -110.4899 -110.48076 - 313 3.9147407 -110.49136 -110.47972 - 314 5.0989332 -110.49314 -110.47799 - 315 6.5265502 -110.49493 -110.47553 - 316 7.8355869 -110.49689 -110.47359 - 317 9.2485993 -110.4996 -110.47211 - 318 11.39912 -110.50353 -110.46964 - 319 14.616181 -110.50755 -110.46409 - 320 16.629185 -110.51002 -110.46058 - 321 17.915541 -110.51459 -110.46133 - 322 23.33314 -110.52495 -110.45558 - 323 30.701654 -110.5184 -110.42712 - 324 1.7024233 -110.5184 -110.51334 - 325 7.2172864 -110.52715 -110.5057 - 326 14.136271 -110.53408 -110.49206 - 327 0.0091732469 -110.53408 -110.53406 - 328 0.040486998 -110.53414 -110.53402 - 329 0.10076896 -110.53426 -110.53396 - 330 0.19723065 -110.53444 -110.53385 - 331 0.33648313 -110.53468 -110.53368 - 332 0.52395589 -110.53498 -110.53342 - 333 0.77740543 -110.53536 -110.53305 - 334 1.1094345 -110.53587 -110.53257 - 335 1.5378094 -110.53652 -110.53195 - 336 2.0877795 -110.53736 -110.53115 - 337 2.7946127 -110.53844 -110.53013 - 338 3.7019787 -110.53981 -110.5288 - 339 4.8522999 -110.54151 -110.52708 - 340 6.2758334 -110.54361 -110.52495 - 341 8.0206889 -110.54622 -110.52237 - 342 10.220372 -110.54951 -110.51912 - 343 13.023126 -110.55347 -110.51476 - 344 16.254162 -110.55805 -110.50973 - 345 19.635435 -110.56384 -110.50546 - 346 23.722197 -110.57066 -110.50014 - 347 27.359038 -110.57746 -110.49612 - 348 31.450587 -110.586 -110.4925 - 349 39.563961 -110.59108 -110.47346 - 350 1.4539052 -110.59108 -110.58676 - 351 6.1846365 -110.59786 -110.57947 - 352 10.912663 -110.59773 -110.56528 - 353 0.1418159 -110.59773 -110.5973 - 354 0.59634761 -110.59854 -110.59677 - 355 1.3265134 -110.59986 -110.59592 - 356 2.1737891 -110.601 -110.59454 - 357 2.8137884 -110.60134 -110.59298 - 358 0.0047385569 -110.60134 -110.60133 - 359 0.020794419 -110.60137 -110.60131 - 360 0.0514233 -110.60143 -110.60128 - 361 0.099863846 -110.60152 -110.60122 - 362 0.16870681 -110.60164 -110.60113 - 363 0.2594644 -110.60177 -110.601 - 364 0.37826008 -110.60194 -110.60081 - 365 0.5261316 -110.60214 -110.60057 - 366 0.70257336 -110.60237 -110.60028 - 367 0.90552875 -110.60265 -110.59996 - 368 1.1347907 -110.60298 -110.5996 - 369 1.3992667 -110.60339 -110.59923 - 370 1.7240145 -110.60394 -110.59881 - 371 2.1509141 -110.60466 -110.59826 - 372 2.7309435 -110.60558 -110.59746 - 373 3.5037713 -110.60669 -110.59627 - 374 4.4459813 -110.60796 -110.59474 - 375 5.4735635 -110.60946 -110.59318 - 376 6.6518712 -110.61139 -110.59162 - 377 8.208323 -110.61399 -110.58958 - 378 10.282841 -110.61685 -110.58628 - 379 12.01759 -110.61953 -110.5838 - 380 13.28516 -110.62337 -110.58387 - 381 15.889958 -110.62877 -110.58153 - 382 19.287881 -110.63021 -110.57287 - 383 0.46379478 -110.63021 -110.62883 - 384 1.9752244 -110.63267 -110.62679 - 385 3.9828624 -110.63496 -110.62312 - 386 4.7747037 -110.63317 -110.61897 - 387 0.071622328 -110.63317 -110.63296 - 388 0.30183499 -110.63359 -110.6327 - 389 0.69584184 -110.63436 -110.63229 - 390 1.2247432 -110.63525 -110.63161 - 391 1.8211576 -110.63599 -110.63057 - 392 2.3459167 -110.63635 -110.62937 - 393 2.4938393 -110.63632 -110.62891 - 394 0.0051669703 -110.63632 -110.63631 - 395 0.022381418 -110.63635 -110.63629 - 396 0.054808687 -110.63642 -110.63625 - 397 0.10567163 -110.63651 -110.6362 - 398 0.17755237 -110.63663 -110.6361 - 399 0.2719078 -110.63677 -110.63596 - 400 0.3946985 -110.63694 -110.63576 - 401 0.5457279 -110.63712 -110.6355 - 402 0.72129327 -110.63732 -110.63518 - 403 0.91127426 -110.63753 -110.63482 - 404 1.0989282 -110.63777 -110.6345 - 405 1.2714413 -110.63801 -110.63423 - 406 1.4388042 -110.6383 -110.63402 - 407 1.6387845 -110.63871 -110.63384 - 408 1.9260356 -110.63929 -110.63357 - 409 2.3588163 -110.64007 -110.63306 - 410 2.9831433 -110.641 -110.63213 - 411 3.7734773 -110.64198 -110.63076 - 412 4.5274242 -110.64299 -110.62953 - 413 5.2410718 -110.64427 -110.62869 - 414 6.2162991 -110.64617 -110.62769 - 415 7.7084244 -110.64852 -110.6256 - 416 9.5194461 -110.65032 -110.62202 - 417 9.8838935 -110.65176 -110.62237 - 418 11.184639 -110.65572 -110.62246 - 419 14.684588 -110.66029 -110.61664 - 420 0.068550589 -110.66029 -110.66009 - 421 0.29539378 -110.66068 -110.6598 - 422 0.64213101 -110.66121 -110.6593 - 423 0.97561769 -110.66146 -110.65856 - 424 1.0764453 -110.66136 -110.65816 - 425 0.021089898 -110.66136 -110.6613 - 426 0.089567929 -110.66149 -110.66123 - 427 0.21066154 -110.66173 -110.6611 - 428 0.38347957 -110.66203 -110.66089 - 429 0.59952234 -110.66233 -110.66055 - 430 0.83976182 -110.66259 -110.66009 - 431 1.0731469 -110.66279 -110.6596 - 432 1.2460831 -110.66295 -110.65924 - 433 1.3801286 -110.66311 -110.659 - 434 1.5548502 -110.66346 -110.65883 - 435 1.8597768 -110.66409 -110.65856 - 436 2.3713797 -110.66503 -110.65798 - 437 3.1163555 -110.66606 -110.6568 - 438 3.9143615 -110.6668 -110.65516 - 439 4.1492514 -110.6673 -110.65496 - 440 4.4760907 -110.66844 -110.65513 - 441 5.6336568 -110.67098 -110.65423 - 442 7.6642733 -110.67297 -110.65018 - 443 0.03238132 -110.67297 -110.67287 - 444 0.13978415 -110.67316 -110.67275 - 445 0.32089579 -110.67348 -110.67253 - 446 0.54931661 -110.67379 -110.67215 - 447 0.76754392 -110.67398 -110.6717 - 448 0.90357041 -110.67409 -110.6714 - 449 1.029454 -110.67429 -110.67123 - 450 1.2841241 -110.67482 -110.671 - 451 1.7935857 -110.6758 -110.67047 - 452 2.5904597 -110.67691 -110.66921 - 453 3.3674255 -110.67748 -110.66746 - 454 3.5590305 -110.67772 -110.66714 - 455 4.3558952 -110.67927 -110.66632 - 456 6.5321949 -110.68267 -110.66325 - 457 9.0736951 -110.68153 -110.65455 - 458 0.29052224 -110.68153 -110.68067 - 459 1.2270991 -110.68312 -110.67947 - 460 2.5707455 -110.68509 -110.67745 - 461 3.6258533 -110.6852 -110.67442 - 462 0.012225256 -110.6852 -110.68516 - 463 0.052556953 -110.68527 -110.68512 - 464 0.12578634 -110.68541 -110.68504 - 465 0.2339884 -110.6856 -110.68491 - 466 0.37512927 -110.68581 -110.68469 - 467 0.54171271 -110.686 -110.68439 - 468 0.72382166 -110.68618 -110.68403 - 469 0.88407632 -110.68632 -110.68369 - 470 0.99721544 -110.68646 -110.6835 - 471 1.0951923 -110.68666 -110.6834 - 472 1.2448695 -110.68701 -110.68331 - 473 1.5161784 -110.68759 -110.68308 - 474 1.9620534 -110.68836 -110.68253 - 475 2.5878014 -110.68912 -110.68142 - 476 3.1271616 -110.6897 -110.6804 - 477 3.4332441 -110.69032 -110.68012 - 478 4.0061586 -110.69164 -110.67973 - 479 5.1910912 -110.69373 -110.67829 - 480 6.8379261 -110.69468 -110.67435 - 481 0.060888378 -110.69468 -110.6945 - 482 0.2583599 -110.69503 -110.69426 - 483 0.5715391 -110.69556 -110.69386 - 484 0.91943661 -110.69595 -110.69322 - 485 1.1196201 -110.69597 -110.69265 - 486 0.0055228977 -110.69597 -110.69596 - 487 0.023854618 -110.69601 -110.69594 - 488 0.057869256 -110.69608 -110.6959 - 489 0.10996303 -110.69617 -110.69584 - 490 0.18134438 -110.69628 -110.69574 - 491 0.27150481 -110.69641 -110.6956 - 492 0.38256549 -110.69657 -110.69543 - 493 0.50788932 -110.69671 -110.6952 - 494 0.63611745 -110.69685 -110.69496 - 495 0.75907076 -110.69702 -110.69476 - 496 0.88605958 -110.69723 -110.6946 - 497 1.0461601 -110.69754 -110.69443 - 498 1.2789289 -110.69798 -110.69417 - 499 1.62264 -110.69855 -110.69372 - 500 2.0946523 -110.69918 -110.69295 - 501 2.6088672 -110.69981 -110.69206 - 502 3.0358581 -110.70053 -110.6915 - 503 3.5515029 -110.7016 -110.69104 - 504 4.3985675 -110.70312 -110.69004 - 505 5.6459941 -110.70445 -110.68766 - 506 6.0990762 -110.70514 -110.687 - 507 6.7157715 -110.70701 -110.68705 - 508 9.0535843 -110.71091 -110.684 - 509 11.174598 -110.70688 -110.67365 - 510 0.79459723 -110.70688 -110.70451 - 511 3.3633858 -110.71096 -110.70096 - 512 6.5782726 -110.71417 -110.69462 - 513 0.0030935553 -110.71417 -110.71417 - 514 0.013674302 -110.71419 -110.71415 - 515 0.034072635 -110.71424 -110.71413 - 516 0.066750909 -110.7143 -110.7141 - 517 0.11396881 -110.71438 -110.71404 - 518 0.17757946 -110.71448 -110.71395 - 519 0.26362907 -110.71461 -110.71383 - 520 0.37639989 -110.71478 -110.71366 - 521 0.52186576 -110.715 -110.71345 - 522 0.70846407 -110.71529 -110.71319 - 523 0.94805742 -110.71569 -110.71287 - 524 1.2556523 -110.71616 -110.71243 - 525 1.6464782 -110.71674 -110.71185 - 526 2.1323412 -110.71746 -110.71112 - 527 2.7320161 -110.71836 -110.71024 - 528 3.4945293 -110.71945 -110.70907 - 529 4.4714878 -110.7208 -110.70751 - 530 5.5879842 -110.72237 -110.70575 - 531 6.7275757 -110.72434 -110.70434 - 532 8.1271374 -110.72667 -110.70251 - 533 9.3792267 -110.72894 -110.70106 - 534 10.826215 -110.73201 -110.69982 - 535 13.89306 -110.73411 -110.6928 - 536 0.43817773 -110.73411 -110.73281 - 537 1.865474 -110.73614 -110.73059 - 538 3.2770883 -110.73605 -110.72631 - 539 0.043880686 -110.73605 -110.73592 - 540 0.18484895 -110.7363 -110.73575 - 541 0.41271666 -110.73671 -110.73549 - 542 0.68110153 -110.73708 -110.73505 - 543 0.89647942 -110.7372 -110.73453 - 544 0.0014610616 -110.7372 -110.73719 - 545 0.0064191302 -110.73721 -110.73719 - 546 0.01589607 -110.73723 -110.73718 - 547 0.030925063 -110.73725 -110.73716 - 548 0.05236165 -110.73729 -110.73713 - 549 0.080752593 -110.73733 -110.73709 - 550 0.11814918 -110.73739 -110.73703 - 551 0.16512698 -110.73745 -110.73696 - 552 0.22193512 -110.73753 -110.73687 - 553 0.28849228 -110.73762 -110.73676 - 554 0.36521652 -110.73773 -110.73664 - 555 0.45482458 -110.73787 -110.73651 - 556 0.56434305 -110.73804 -110.73637 - 557 0.70577291 -110.73825 -110.73615 - 558 0.89434861 -110.73855 -110.73589 - 559 1.1431126 -110.73892 -110.73552 - 560 1.4493742 -110.73934 -110.73503 - 561 1.7925251 -110.73984 -110.73451 - 562 2.1904612 -110.74049 -110.73398 - 563 2.714606 -110.74132 -110.73325 - 564 3.4152072 -110.74235 -110.73219 - 565 4.066188 -110.74331 -110.73122 - 566 4.5620067 -110.74462 -110.73106 - 567 5.4219048 -110.74642 -110.7303 - 568 6.5798215 -110.74718 -110.72762 - 569 7.0885732 -110.7476 -110.72653 - 570 11.086029 -110.75246 -110.7195 - 571 14.984214 -110.73694 -110.69239 - 572 3.5196643 -110.73694 -110.72647 - 573 14.853405 -110.75248 -110.70832 - 574 24.581973 -110.7464 -110.67331 - 575 0.45195042 -110.7464 -110.74505 - 576 1.9114819 -110.749 -110.74331 - 577 4.2456497 -110.75307 -110.74045 - 578 6.8825072 -110.75614 -110.73568 - 579 8.8261902 -110.75549 -110.72925 - 580 0.013475296 -110.75549 -110.75545 - 581 0.056950074 -110.75557 -110.7554 - 582 0.13506437 -110.75573 -110.75532 - 583 0.2506323 -110.75594 -110.7552 - 584 0.40286684 -110.75619 -110.75499 - 585 0.58643564 -110.75643 -110.75469 - 586 0.7997906 -110.75665 -110.75427 - 587 1.0126418 -110.7568 -110.75379 - 588 1.1237802 -110.75684 -110.7535 - 589 0.00066194441 -110.75684 -110.75684 - 590 0.0028746739 -110.75684 -110.75684 - 591 0.0070881008 -110.75685 -110.75683 - 592 0.013811996 -110.75687 -110.75682 - 593 0.023535698 -110.75688 -110.75681 - 594 0.036672256 -110.7569 -110.75679 - 595 0.054442114 -110.75693 -110.75677 - 596 0.077521824 -110.75693 -110.7567 - 597 0.10655408 -110.75697 -110.75665 - 598 0.14198154 -110.75701 -110.75659 - 599 0.18392175 -110.75707 -110.75652 - 600 0.23211462 -110.75713 -110.75644 - 601 0.28617454 -110.7572 -110.75635 - 602 0.34642016 -110.75728 -110.75625 - 603 0.41516549 -110.75739 -110.75615 - 604 0.49775257 -110.75752 -110.75604 - 605 0.60260219 -110.7577 -110.7559 - 606 0.73999101 -110.75791 -110.75571 - 607 0.9188763 -110.75818 -110.75544 - 608 1.1389225 -110.75848 -110.75509 - 609 1.3827637 -110.75883 -110.75472 - 610 1.6460528 -110.75926 -110.75437 - 611 1.9722185 -110.75982 -110.75396 - 612 2.4233092 -110.76051 -110.7533 - 613 2.9802598 -110.76122 -110.75236 - 614 3.3985054 -110.762 -110.75189 - 615 3.8907399 -110.7632 -110.75163 - 616 4.7825252 -110.76448 -110.75027 - 617 5.1993395 -110.76479 -110.74933 - 618 6.0193345 -110.7662 -110.7483 - 619 9.4601226 -110.76935 -110.74123 - 620 0.081115681 -110.76935 -110.76911 - 621 0.34846154 -110.76976 -110.76872 - 622 0.66633086 -110.76998 -110.768 - 623 0.0042339109 -110.76998 -110.76996 - 624 0.018326856 -110.77 -110.76995 - 625 0.04377725 -110.77005 -110.76992 - 626 0.080956724 -110.77011 -110.76987 - 627 0.12888643 -110.77018 -110.7698 - 628 0.18495479 -110.77025 -110.7697 - 629 0.24960335 -110.77034 -110.7696 - 630 0.32486237 -110.77045 -110.76948 - 631 0.42087549 -110.77061 -110.76936 - 632 0.55333209 -110.77084 -110.76919 - 633 0.73561706 -110.77112 -110.76893 - 634 0.9596218 -110.77142 -110.76857 - 635 1.1547164 -110.77173 -110.7683 - 636 1.3486816 -110.77218 -110.76817 - 637 1.6965062 -110.77287 -110.76783 - 638 2.2807746 -110.77351 -110.76673 - 639 2.5869067 -110.77379 -110.7661 - 640 3.0917448 -110.77476 -110.76557 - 641 4.5533663 -110.77662 -110.76308 - 642 4.6826772 -110.77274 -110.75881 - 643 0.73339039 -110.77274 -110.77056 - 644 3.0918858 -110.77631 -110.76712 - 645 5.6875382 -110.77782 -110.76091 - 646 0.014234767 -110.77782 -110.77778 - 647 0.061094104 -110.77791 -110.77773 - 648 0.14216076 -110.77806 -110.77763 - 649 0.25083867 -110.77822 -110.77748 - 650 0.37178987 -110.77834 -110.77724 - 651 0.46739691 -110.77838 -110.77699 - 652 0.00077014597 -110.77838 -110.77838 - 653 0.0033300693 -110.77839 -110.77838 - 654 0.0081657442 -110.7784 -110.77837 - 655 0.015818955 -110.77841 -110.77836 - 656 0.026799555 -110.77843 -110.77835 - 657 0.041520426 -110.77845 -110.77833 - 658 0.061244407 -110.77848 -110.7783 - 659 0.086538724 -110.7785 -110.77824 - 660 0.11784986 -110.77854 -110.77819 - 661 0.15537944 -110.77859 -110.77813 - 662 0.19921399 -110.77865 -110.77806 - 663 0.24983391 -110.77872 -110.77798 - 664 0.30896461 -110.7788 -110.77789 - 665 0.38033152 -110.77892 -110.77779 - 666 0.46976108 -110.77897 -110.77757 - 667 0.58426358 -110.77915 -110.77741 - 668 0.72920705 -110.77936 -110.77719 - 669 0.90220475 -110.7796 -110.77692 - 670 1.0907209 -110.77989 -110.77665 - 671 1.3010999 -110.78026 -110.77639 - 672 1.579138 -110.78074 -110.77604 - 673 1.9752747 -110.78129 -110.77542 - 674 2.4095927 -110.78188 -110.77471 - 675 2.7867189 -110.78254 -110.77426 - 676 3.3344671 -110.7836 -110.77369 - 677 4.1681184 -110.7843 -110.77191 - 678 4.1781791 -110.78455 -110.77213 - 679 5.6379907 -110.78697 -110.77021 - 680 8.2752818 -110.78344 -110.75883 - 681 0.95711052 -110.78344 -110.78059 - 682 4.0547121 -110.78784 -110.77579 - 683 7.0436218 -110.78745 -110.76651 - 684 0.079247334 -110.78745 -110.78722 - 685 0.33404898 -110.78791 -110.78692 - 686 0.7448276 -110.78865 -110.78643 - 687 1.2210946 -110.7893 -110.78567 - 688 1.5856458 -110.78937 -110.78466 - 689 0.001424572 -110.78937 -110.78937 - 690 0.0061874237 -110.78938 -110.78936 - 691 0.015132784 -110.7894 -110.78935 - 692 0.02904646 -110.78942 -110.78934 - 693 0.048461079 -110.78946 -110.78931 - 694 0.073518419 -110.78949 -110.78927 - 695 0.10533665 -110.78953 -110.78922 - 696 0.14305227 -110.78958 -110.78915 - 697 0.18441476 -110.78962 -110.78907 - 698 0.22546081 -110.78967 -110.789 - 699 0.26276979 -110.78971 -110.78893 - 700 0.29816292 -110.78978 -110.78889 - 701 0.34033505 -110.78983 -110.78882 - 702 0.40215539 -110.78996 -110.78877 - 703 0.49710809 -110.79014 -110.78866 - 704 0.63494767 -110.79034 -110.78845 - 705 0.8046709 -110.79055 -110.78815 - 706 0.95627727 -110.79076 -110.78792 - 707 1.1093459 -110.79105 -110.78775 - 708 1.3404902 -110.7915 -110.78751 - 709 1.697817 -110.79201 -110.78696 - 710 2.0414678 -110.79233 -110.78626 - 711 2.100282 -110.79266 -110.78642 - 712 2.5537259 -110.79378 -110.78619 - 713 3.4638793 -110.79428 -110.78398 - 714 0.064028052 -110.79428 -110.79409 - 715 0.27299279 -110.79462 -110.79381 - 716 0.55979905 -110.79498 -110.79331 - 717 0.72348617 -110.79482 -110.79267 - 718 0.0079361542 -110.79482 -110.7948 - 719 0.03358337 -110.79487 -110.79477 - 720 0.078182457 -110.79496 -110.79472 - 721 0.13994461 -110.79506 -110.79464 - 722 0.21366189 -110.79516 -110.79452 - 723 0.28885953 -110.79522 -110.79437 - 724 0.3448005 -110.79526 -110.79423 - 725 0.36664472 -110.79527 -110.79418 - 726 0.38025529 -110.79529 -110.79416 - 727 0.41722197 -110.79538 -110.79414 - 728 0.50522728 -110.79558 -110.79408 - 729 0.66303701 -110.79587 -110.7939 - 730 0.88456323 -110.79612 -110.79349 - 731 1.0355328 -110.7962 -110.79312 - 732 1.0005069 -110.79621 -110.79324 - 733 1.117072 -110.79655 -110.79323 - 734 1.5716682 -110.79737 -110.79269 - 735 2.2253963 -110.79752 -110.79091 - 736 0.030589802 -110.79752 -110.79743 - 737 0.13064182 -110.7977 -110.79731 - 738 0.28795501 -110.79795 -110.7971 - 739 0.4564381 -110.7981 -110.79675 - 740 0.51193593 -110.79803 -110.7965 - 741 0.0033230758 -110.79803 -110.79802 - 742 0.01407167 -110.79805 -110.798 - 743 0.033348975 -110.79808 -110.79799 - 744 0.061757893 -110.79814 -110.79795 - 745 0.099082219 -110.7982 -110.7979 - 746 0.14409751 -110.79825 -110.79782 - 747 0.19613014 -110.79831 -110.79772 - 748 0.24738139 -110.79835 -110.79762 - 749 0.28779582 -110.79839 -110.79753 - 750 0.31829419 -110.79843 -110.79749 - 751 0.3515822 -110.7985 -110.79745 - 752 0.40385864 -110.79861 -110.79741 - 753 0.49090724 -110.79878 -110.79732 - 754 0.62359458 -110.79899 -110.79714 - 755 0.79726812 -110.79919 -110.79682 - 756 0.9219639 -110.79934 -110.7966 - 757 0.9703893 -110.79951 -110.79662 - 758 1.099603 -110.79988 -110.79661 - 759 1.4069274 -110.80045 -110.79627 - 760 1.8649183 -110.8007 -110.79515 - 761 0.015730491 -110.8007 -110.80065 - 762 0.067387144 -110.80079 -110.80059 - 763 0.15143551 -110.80093 -110.80048 - 764 0.24964143 -110.80104 -110.8003 - 765 0.32096794 -110.80106 -110.80011 - 766 0.0012789399 -110.80106 -110.80106 - 767 0.0054935517 -110.80107 -110.80105 - 768 0.0132979 -110.80109 -110.80105 - 769 0.025308436 -110.80111 -110.80103 - 770 0.04196404 -110.80113 -110.80101 - 771 0.063414603 -110.80116 -110.80098 - 772 0.09066077 -110.8012 -110.80093 - 773 0.12302551 -110.80124 -110.80087 - 774 0.15915203 -110.80128 -110.80081 - 775 0.19793381 -110.80133 -110.80074 - 776 0.2405751 -110.80139 -110.80068 - 777 0.29181814 -110.80148 -110.80061 - 778 0.35931627 -110.8016 -110.80053 - 779 0.4515858 -110.80174 -110.8004 - 780 0.57393992 -110.80192 -110.80021 - 781 0.71563481 -110.80211 -110.79998 - 782 0.84635632 -110.80232 -110.7998 - 783 0.98902642 -110.80261 -110.79967 - 784 1.2095674 -110.80302 -110.79942 - 785 1.5517919 -110.80343 -110.79882 - 786 1.816302 -110.80378 -110.79838 - 787 2.0375365 -110.80433 -110.79828 - 788 2.5633946 -110.80532 -110.7977 - 789 3.2709115 -110.80515 -110.79543 - 790 0.11840801 -110.80515 -110.8048 - 791 0.49993496 -110.80576 -110.80427 - 792 0.98797368 -110.8063 -110.80336 - 793 1.0633384 -110.80579 -110.80263 - 794 0.01771068 -110.80579 -110.80574 - 795 0.075261756 -110.8059 -110.80567 - 796 0.17481972 -110.80609 -110.80557 - 797 0.3098324 -110.80631 -110.80538 - 798 0.46422207 -110.80648 -110.8051 - 799 0.60578413 -110.80655 -110.80475 - 800 0.00028586779 -110.80655 -110.80655 - 801 0.0012498287 -110.80655 -110.80655 - 802 0.0031014492 -110.80656 -110.80655 - 803 0.0060817027 -110.80656 -110.80654 - 804 0.010430676 -110.80657 -110.80654 - 805 0.016365398 -110.80658 -110.80653 - 806 0.024497142 -110.80659 -110.80652 - 807 0.035251385 -110.80661 -110.8065 - 808 0.049124232 -110.80663 -110.80648 - 809 0.066656657 -110.80665 -110.80645 - 810 0.088446858 -110.80668 -110.80642 - 811 0.1151938 -110.80672 -110.80638 - 812 0.14779771 -110.80677 -110.80633 - 813 0.18753306 -110.80682 -110.80627 - 814 0.23626646 -110.8069 -110.80619 - 815 0.29662092 -110.80699 -110.80611 - 816 0.37191468 -110.8071 -110.80599 - 817 0.46563952 -110.80724 -110.80585 - 818 0.58036647 -110.8074 -110.80568 - 819 0.717467 -110.80762 -110.80549 - 820 0.88163431 -110.80787 -110.80525 - 821 1.0874925 -110.80819 -110.80496 - 822 1.3538147 -110.80857 -110.80455 - 823 1.6721519 -110.80902 -110.80404 - 824 2.0085729 -110.80956 -110.80359 - 825 2.4133004 -110.81024 -110.80307 - 826 2.9501478 -110.81098 -110.80221 - 827 3.2604425 -110.81183 -110.80213 - 828 3.8498145 -110.81309 -110.80165 - 829 4.8918498 -110.81319 -110.79865 - 830 0.20269937 -110.81319 -110.81259 - 831 0.86060666 -110.81415 -110.81159 - 832 1.5390415 -110.81427 -110.8097 - 833 0.012733673 -110.81427 -110.81424 - 834 0.05390505 -110.81435 -110.81419 - 835 0.12215555 -110.81447 -110.81411 - 836 0.20707771 -110.8146 -110.81398 - 837 0.28801881 -110.81466 -110.8138 - 838 0.31551369 -110.81465 -110.81371 - 839 0.0010727809 -110.81465 -110.81465 - 840 0.0046324254 -110.81466 -110.81464 - 841 0.011283626 -110.81467 -110.81464 - 842 0.021604021 -110.81469 -110.81463 - 843 0.036001684 -110.81471 -110.81461 - 844 0.054614736 -110.81474 -110.81458 - 845 0.078335701 -110.81477 -110.81454 - 846 0.10658582 -110.8148 -110.81449 - 847 0.13770909 -110.81484 -110.81443 - 848 0.16859196 -110.81487 -110.81437 - 849 0.19632721 -110.8149 -110.81432 - 850 0.22199357 -110.81495 -110.81429 - 851 0.25189422 -110.81501 -110.81426 - 852 0.295402 -110.8151 -110.81422 - 853 0.36238721 -110.81522 -110.81415 - 854 0.46045357 -110.81537 -110.814 - 855 0.58476657 -110.81552 -110.81379 - 856 0.69670064 -110.81568 -110.81361 - 857 0.80081398 -110.81588 -110.8135 - 858 0.95618076 -110.81618 -110.81334 - 859 1.2063232 -110.81656 -110.81298 - 860 1.4978407 -110.81683 -110.81238 - 861 1.5476379 -110.81704 -110.81244 - 862 1.8191437 -110.81775 -110.81234 - 863 2.4763431 -110.81845 -110.81108 - 864 0.019522922 -110.81845 -110.81839 - 865 0.083534968 -110.81855 -110.81831 - 866 0.17658176 -110.81868 -110.81816 - 867 0.25086304 -110.8187 -110.81796 - 868 0.0020692281 -110.8187 -110.8187 - 869 0.008892742 -110.81871 -110.81869 - 870 0.02126317 -110.81874 -110.81868 - 871 0.039551971 -110.81877 -110.81865 - 872 0.063523354 -110.81881 -110.81862 - 873 0.092069148 -110.81884 -110.81857 - 874 0.12422275 -110.81888 -110.81851 - 875 0.15678229 -110.81891 -110.81845 - 876 0.1897484 -110.81896 -110.8184 - 877 0.22880568 -110.81903 -110.81835 - 878 0.28364562 -110.81913 -110.81829 - 879 0.36437628 -110.81927 -110.81819 - 880 0.47622842 -110.81943 -110.81801 - 881 0.59891528 -110.81958 -110.8178 - 882 0.68796001 -110.81975 -110.8177 - 883 0.80196387 -110.82001 -110.81763 - 884 1.018798 -110.82041 -110.81738 - 885 1.3517201 -110.82072 -110.8167 - 886 1.4560427 -110.82082 -110.81649 - 887 1.7143216 -110.82136 -110.81627 - 888 2.5127452 -110.8224 -110.81493 - 889 2.5168034 -110.82033 -110.81285 - 890 0.36423425 -110.82033 -110.81924 - 891 1.5380215 -110.82215 -110.81758 - 892 2.9123673 -110.82324 -110.81458 - 893 0.0029939901 -110.82324 -110.82323 - 894 0.012964825 -110.82326 -110.82322 - 895 0.030842365 -110.82329 -110.8232 - 896 0.056405174 -110.82333 -110.82317 - 897 0.087996299 -110.82337 -110.82311 - 898 0.12177464 -110.82341 -110.82305 - 899 0.15294877 -110.82344 -110.82299 - 900 0.17842635 -110.82347 -110.82294 - 901 0.20658535 -110.82353 -110.82292 - 902 0.25249368 -110.82363 -110.82288 - 903 0.33058934 -110.82378 -110.82279 - 904 0.44778312 -110.82394 -110.82261 - 905 0.57538465 -110.82408 -110.82237 - 906 0.6515268 -110.82421 -110.82227 - 907 0.76899373 -110.82455 -110.82226 - 908 1.0181963 -110.82499 -110.82197 - 909 1.378224 -110.82527 -110.82117 - 910 0.012382271 -110.82527 -110.82523 - 911 0.052598737 -110.82534 -110.82519 - 912 0.11586828 -110.82545 -110.8251 - 913 0.18457639 -110.82552 -110.82497 - 914 0.22010856 -110.82552 -110.82487 - 915 0.0014774258 -110.82552 -110.82552 - 916 0.0063635731 -110.82553 -110.82551 - 917 0.015366771 -110.82555 -110.8255 - 918 0.029022874 -110.82557 -110.82549 - 919 0.047508933 -110.8256 -110.82546 - 920 0.070496041 -110.82563 -110.82542 - 921 0.098127642 -110.82566 -110.82537 - 922 0.12791245 -110.8257 -110.82531 - 923 0.15619064 -110.82573 -110.82526 - 924 0.18176039 -110.82576 -110.82522 - 925 0.20938862 -110.82582 -110.82519 - 926 0.24820986 -110.8259 -110.82516 - 927 0.30847928 -110.82601 -110.82509 - 928 0.39848549 -110.82615 -110.82497 - 929 0.51626669 -110.82629 -110.82476 - 930 0.62177336 -110.82642 -110.82458 - 931 0.71424245 -110.82661 -110.82448 - 932 0.85871536 -110.8269 -110.82435 - 933 1.1006597 -110.82727 -110.824 - 934 1.3779084 -110.82749 -110.82339 - 935 1.4083037 -110.82764 -110.82345 - 936 1.7251782 -110.82838 -110.82325 - 937 2.4472442 -110.82892 -110.82165 - 938 0.032528006 -110.82892 -110.82883 - 939 0.13868599 -110.8291 -110.82869 - 940 0.28502305 -110.82928 -110.82844 - 941 0.36987694 -110.82922 -110.82812 - 942 0.0042549281 -110.82922 -110.82921 - 943 0.018072548 -110.82925 -110.82919 - 944 0.042299212 -110.8293 -110.82917 - 945 0.076267724 -110.82935 -110.82913 - 946 0.11754279 -110.82941 -110.82906 - 947 0.16093595 -110.82945 -110.82897 - 948 0.19713893 -110.82948 -110.82889 - 949 0.21767407 -110.82949 -110.82885 - 950 0.23377454 -110.82955 -110.82886 - 951 0.26344277 -110.82962 -110.82884 - 952 0.3236109 -110.82975 -110.82879 - 953 0.42561037 -110.82993 -110.82866 - 954 0.56639542 -110.83009 -110.82841 - 955 0.65813507 -110.83017 -110.82821 - 956 0.6691588 -110.83024 -110.82825 - 957 0.77813492 -110.83053 -110.82822 - 958 1.0745975 -110.83104 -110.82785 - 959 1.4715607 -110.83108 -110.82671 - 960 0.023661314 -110.83108 -110.83101 - 961 0.10069182 -110.83122 -110.83092 - 962 0.22052026 -110.83141 -110.83076 - 963 0.3454687 -110.83152 -110.83049 - 964 0.36840447 -110.83145 -110.83035 - 965 0.0026819278 -110.83145 -110.83144 - 966 0.0113667 -110.83146 -110.83143 - 967 0.026938478 -110.8315 -110.83142 - 968 0.049824865 -110.83154 -110.83139 - 969 0.079709944 -110.83158 -110.83135 - 970 0.11535288 -110.83163 -110.83129 - 971 0.15564115 -110.83167 -110.83121 - 972 0.19282311 -110.8317 -110.83113 - 973 0.21733101 -110.83172 -110.83108 - 974 0.23226817 -110.83175 -110.83106 - 975 0.2506313 -110.83179 -110.83105 - 976 0.28619255 -110.83188 -110.83102 - 977 0.35107929 -110.83201 -110.83096 - 978 0.45255419 -110.83217 -110.83082 - 979 0.5840993 -110.83231 -110.83057 - 980 0.65876224 -110.8324 -110.83044 - 981 0.68761299 -110.83251 -110.83047 - 982 0.79744046 -110.83281 -110.83043 - 983 1.0491262 -110.83324 -110.83012 - 984 1.385715 -110.83332 -110.8292 - 985 0.015687293 -110.83332 -110.83327 - 986 0.066817294 -110.83341 -110.83321 - 987 0.14848719 -110.83355 -110.83311 - 988 0.24010393 -110.83365 -110.83293 - 989 0.29198663 -110.83367 -110.8328 - 990 0.0012888046 -110.83367 -110.83367 - 991 0.005505215 -110.83368 -110.83366 - 992 0.0132254 -110.8337 -110.83366 - 993 0.024930309 -110.83372 -110.83364 - 994 0.04086177 -110.83374 -110.83362 - 995 0.060915784 -110.83374 -110.83356 - 996 0.085591505 -110.83377 -110.83351 - 997 0.113319 -110.8338 -110.83346 - 998 0.14138355 -110.83383 -110.83341 - 999 0.16803177 -110.83387 -110.83337 - 1000 0.19558981 -110.83392 -110.83334 -Loop time of 67.1723 on 1 procs for 1000 steps with 24 atoms +Step Temp PotEng TotEng Press + 0 0 -104.95614 -104.95614 48229.712 + 10 349.44219 -105.50971 -104.47083 62149.591 + 20 1253.6752 -107.00898 -103.28182 116444.44 + 30 134.63588 -107.56184 -107.16157 59854.143 + 40 2.4043703 -108.15301 -108.14586 32685.77 + 50 162.13426 -108.40551 -107.92349 62104.273 + 60 134.03149 -108.70118 -108.30271 49400.525 + 70 64.159014 -108.78034 -108.5896 37243.303 + 80 240.49926 -109.10766 -108.39266 42158.884 + 90 0.60467192 -109.61818 -109.61639 14107.515 + 100 1.4691163 -109.65556 -109.65119 21596.775 + 110 30.500628 -109.69267 -109.602 16104.639 + 120 120.62379 -109.83749 -109.47888 9474.971 + 130 8.4742975 -109.99986 -109.97467 10104.102 + 140 3.4732679 -110.01209 -110.00176 11990.442 + 150 24.749482 -110.04313 -109.96955 10851.569 + 160 4.1106505 -110.13288 -110.12066 8257.3969 + 170 0.0065628716 -110.18061 -110.18059 7876.8748 + 180 2.0542078 -110.1837 -110.17759 7996.0533 + 190 20.134782 -110.21071 -110.15085 7556.1811 + 200 2.3397267 -110.3244 -110.31745 3767.062 + 210 4.3544709 -110.34438 -110.33143 4889.145 + 220 1.1872367 -110.37457 -110.37104 4162.6543 + 230 2.2798399 -110.38081 -110.37403 4321.0943 + 240 11.835907 -110.39611 -110.36092 4187.5757 + 250 0.13741849 -110.41453 -110.41412 3720.7527 + 260 4.2283185 -110.42036 -110.40779 3743.3494 + 270 0.47243724 -110.44349 -110.44208 3172.1866 + 280 0.06090137 -110.45428 -110.4541 3065.9348 + 290 5.3413962 -110.46285 -110.44697 3121.2924 + 300 8.2032986 -110.48519 -110.4608 2705.5001 + 310 2.0783529 -110.48807 -110.48189 2740.7989 + 320 16.629185 -110.51002 -110.46058 2581.7434 + 330 0.19723065 -110.53444 -110.53385 1942.0228 + 340 6.2758334 -110.54361 -110.52495 1924.0965 + 350 1.4539052 -110.59108 -110.58676 -449.41056 + 360 0.0514233 -110.60143 -110.60128 1284.8259 + 370 1.7240145 -110.60394 -110.59881 1468.0004 + 380 13.28516 -110.62337 -110.58387 1573.4714 + 390 1.2247432 -110.63525 -110.63161 1113.4557 + 400 0.3946985 -110.63694 -110.63576 1083.0801 + 410 2.9831433 -110.641 -110.63213 1112.419 + 420 0.068550589 -110.66029 -110.66009 897.09211 + 430 0.83976182 -110.66259 -110.66009 918.69832 + 440 4.4760907 -110.66844 -110.65513 915.24435 + 450 1.2841241 -110.67482 -110.671 953.30422 + 460 2.5707455 -110.68509 -110.67745 775.21273 + 470 0.99721544 -110.68646 -110.6835 812.74984 + 480 6.8379261 -110.69468 -110.67435 787.9705 + 490 0.18134438 -110.69628 -110.69574 675.52792 + 500 2.0946523 -110.69918 -110.69295 696.82065 +Loop time of 31.775 on 1 procs for 500 steps with 24 atoms -881.6% CPU use with 1 MPI tasks x no OpenMP threads +884.8% CPU use with 1 MPI tasks x no OpenMP threads Minimization stats: Stopping criterion = max iterations Energy initial, next-to-last, final = - -104.95614332 -110.833873245 -110.833918128 - Force two-norm initial, final = 19.119 0.137146 - Force max component initial, final = 11.7759 0.0662489 + -104.95614332 -110.698546127 -110.699182193 + Force two-norm initial, final = 19.119 0.234621 + Force max component initial, final = 11.7759 0.0903198 Final line search alpha, max atom move = 0 0 - Iterations, force evaluations = 1000 1000 + Iterations, force evaluations = 500 500 MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.00028777 | 0.00028777 | 0.00028777 | 0.0 | 0.00 -Bond | 9.3937e-05 | 9.3937e-05 | 9.3937e-05 | 0.0 | 0.00 -Neigh | 4.6968e-05 | 4.6968e-05 | 4.6968e-05 | 0.0 | 0.00 -Comm | 0.0012362 | 0.0012362 | 0.0012362 | 0.0 | 0.00 -Output | 0.0079987 | 0.0079987 | 0.0079987 | 0.0 | 0.01 -Modify | 67.156 | 67.156 | 67.156 | 0.0 | 99.98 -Other | | 0.006447 | | | 0.01 +Pair | 0.00016952 | 0.00016952 | 0.00016952 | 0.0 | 0.00 +Bond | 2.8372e-05 | 2.8372e-05 | 2.8372e-05 | 0.0 | 0.00 +Neigh | 3.0994e-05 | 3.0994e-05 | 3.0994e-05 | 0.0 | 0.00 +Comm | 0.00060034 | 0.00060034 | 0.00060034 | 0.0 | 0.00 +Output | 0.00057817 | 0.00057817 | 0.00057817 | 0.0 | 0.00 +Modify | 31.771 | 31.771 | 31.771 | 0.0 | 99.99 +Other | | 0.002469 | | | 0.01 Nlocal: 24 ave 24 max 24 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 81 ave 81 max 81 min +Nghost: 71 ave 71 max 71 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 25 ave 25 max 25 min +Neighs: 27 ave 27 max 27 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 25 -Ave neighs/atom = 1.04167 +Total # of neighbors = 27 +Ave neighs/atom = 1.125 Ave special neighs/atom = 0 -Neighbor list builds = 3 +Neighbor list builds = 2 Dangerous builds = 0 -Total wall time: 0:01:07 +Total wall time: 0:00:31 diff --git a/lib/latte/Install.py b/lib/latte/Install.py index 387b4547cd..b3e771e4cc 100644 --- a/lib/latte/Install.py +++ b/lib/latte/Install.py @@ -114,7 +114,6 @@ while iarg < nargs: elif args[iarg] == "-m": if iarg+2 > nargs: error() suffix = args[iarg+1] - print("SUFF",suffix) suffixflag = True iarg += 2 else: error() diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index b42867018e..f74b05624f 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -60,6 +60,7 @@ FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) : global_freq = 1; extscalar = 1; virial_flag = 1; + thermo_virial = 1; // store ID of compute pe/atom used to generate Coulomb potential for LATTE // NULL means LATTE will compute Coulombic potential @@ -258,14 +259,15 @@ void FixLatte::post_force(int vflag) neighflag = 0; // set flags used by LATTE + // NOTE: LATTE does not compute per-atom energies or virials int flags[6]; flags[0] = pbcflag; // 1 for fully periodic, 0 for fully non-periodic flags[1] = coulombflag; // 1 for LAMMPS computes Coulombics, 0 for LATTE flags[2] = eflag_atom; // 1 to return per-atom energies, 0 for no - flags[3] = vflag_global; // 1 to return global virial 0 for no - flags[4] = vflag_atom; // 1 to return per-atom virial, 0 for no + flags[3] = vflag_global && thermo_virial; // 1 to return global/per-atom + flags[4] = vflag_atom && thermo_virial; // virial, 0 for no flags[5] = neighflag; // 1 to pass neighbor list to LATTE, 0 for no // setup LATTE arguments @@ -288,7 +290,8 @@ void FixLatte::post_force(int vflag) &domain->xz,&domain->yz, forces,&maxiter,&latte_energy,&atom->v[0][0],&update->dt,virial); - // sum LATTE forces to LAMMPS (Coulombic) forces + // sum LATTE forces to LAMMPS forces + // e.g. LAMMPS may compute Coulombics at some point if (coulomb) { double **f = atom->f;