Commit 031d4acd authored by Steve Plimpton's avatar Steve Plimpton
Browse files

initial dummy version of fix_latte.cpp

parent 624c57e9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
# Settings that the LAMMPS build will import when this package is installed

latte_SYSINC  =
latte_SYSLIB  = -lgfortran
latte_SYSPATH =
+5 −0
Original line number Diff line number Diff line
# 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

lib/latte/README

0 → 100644
+33 −0
Original line number Diff line number Diff line
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.

src/LATTE/Install.sh

0 → 100644
+67 −0
Original line number Diff line number Diff line
# 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

src/LATTE/README

0 → 100644
+28 −0
Original line number Diff line number Diff line
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.
Loading