Commit 9695aa60 authored by Stan Moore's avatar Stan Moore
Browse files

Merge branch 'master' into USER-DPD_kokkos_testing

parents bc446bb8 6d0a2286
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -734,8 +734,8 @@ package"_Section_start.html#start_3.
"smd/wall/surface"_fix_smd_wall_surface.html,
"temp/rescale/eff"_fix_temp_rescale_eff.html,
"ti/spring"_fix_ti_spring.html,
"ttm/mod"_fix_ttm.html
"wall/ees"_fix_wall_ees.html
"ttm/mod"_fix_ttm.html,
"wall/ees"_fix_wall_ees.html,
"wall/region/ees"_fix_wall_ees.html :tb(c=6,ea=c)

:line
+32 −8
Original line number Diff line number Diff line
@@ -492,14 +492,38 @@ Minnesota).

[Install or un-install:]

Using this package requires the KIM library and its models
(interatomic potentials) to be downloaded and installed on your
system.  The library can be downloaded and built in lib/kim or
elsewhere on your system.  Details of the download, build, and install
process for KIM are given in the lib/kim/README file.

Once that process is complete, you can then install/un-install the
package and build LAMMPS in the usual manner:
Before building LAMMPS with this package, you must first download and
build the KIM library and include the KIM models that you want to
use. You can do this manually if you prefer; follow the instructions
in lib/kim/README.  You can also do it in one step from the lammps/src
dir, using a command like these, which simply invoke the
lib/kim/Install.py script with the specified args.

make lib-kim                    # print help message
make lib-kim args="-b . none"   # install KIM API lib with only example models
make lib-kim args="-b . Glue_Ercolessi_Adams_Al__MO_324507536345_001"  # ditto plus one model
make lib-kim args="-b . OpenKIM"   # install KIM API lib with all models
make lib-kim args="-a EAM_Dynamo_Ackland_W__MO_141627196590_002"       # add one model or model driver :pre

Note that in LAMMPS lingo, a KIM model driver is a pair style
(e.g. EAM or Tersoff).  A KIM model is a pair style for a particular
element or alloy and set of parameters, e.g. EAM for Cu with a
specific EAM potential file.  Also note that installing the KIM API
library with all its models, may take around 30 min to build.  Of
course you only need to do that once.

See the list of KIM model drivers here:
https://openkim.org/kim-items/model-drivers/alphabetical

See the list of all KIM models here:
https://openkim.org/kim-items/models/by-model-drivers

See the list of example KIM models included by default here:
https://openkim.org/kim-api in the "What is in the KIM API source
package?" section

You can then install/un-install the package and build LAMMPS in the
usual manner:

make yes-kim
make machine :pre

lib/atc/Install.py

deleted100644 → 0
+1 −82
Original line number Diff line number Diff line
#!/usr/bin/env python

# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README

import sys,commands,os

# help message

help = """
Syntax: python Install.py -m machine -e suffix
  specify -m and optionally -e, order does not matter
  -m = peform a clean followed by "make -f Makefile.machine"
       machine = suffix of a lib/Makefile.* file
  -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
       does not alter existing Makefile.machine
"""

# print error message or help

def error(str=None):
  if not str: print help
  else: print "ERROR",str
  sys.exit()

# parse args

args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()

machine = None
extraflag = 0

iarg = 0
while iarg < nargs:
  if args[iarg] == "-m":
    if iarg+2 > nargs: error()
    machine = args[iarg+1]
    iarg += 2  
  elif args[iarg] == "-e":
    if iarg+2 > nargs: error()
    extraflag = 1
    suffix = args[iarg+1]
    iarg += 2  
  else: error()

# set lib from working dir

cwd = os.getcwd()
lib = os.path.basename(cwd)

# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
  
if not os.path.exists("Makefile.%s" % machine):
  error("lib/%s/Makefile.%s does not exist" % (lib,machine))

lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')

for line in lines:
  words = line.split()
  if len(words) == 3 and extraflag and \
        words[0] == "EXTRAMAKE" and words[1] == '=':
    line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
  print >>fp,line,

fp.close()

# make the library via Makefile.auto

print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt

if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
  print "lib/%s/Makefile.lammps was NOT created" % lib

lib/atc/Install.py

0 → 120000
+1 −82
Original line number Diff line number Diff line
Install.py
 No newline at end of file

lib/awpmd/Install.py

deleted100644 → 0
+1 −82
Original line number Diff line number Diff line
#!/usr/bin/env python

# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README

import sys,commands,os

# help message

help = """
Syntax: python Install.py -m machine -e suffix
  specify -m and optionally -e, order does not matter
  -m = peform a clean followed by "make -f Makefile.machine"
       machine = suffix of a lib/Makefile.* file
  -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
       does not alter existing Makefile.machine
"""

# print error message or help

def error(str=None):
  if not str: print help
  else: print "ERROR",str
  sys.exit()

# parse args

args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()

machine = None
extraflag = 0

iarg = 0
while iarg < nargs:
  if args[iarg] == "-m":
    if iarg+2 > nargs: error()
    machine = args[iarg+1]
    iarg += 2  
  elif args[iarg] == "-e":
    if iarg+2 > nargs: error()
    extraflag = 1
    suffix = args[iarg+1]
    iarg += 2  
  else: error()

# set lib from working dir

cwd = os.getcwd()
lib = os.path.basename(cwd)

# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
  
if not os.path.exists("Makefile.%s" % machine):
  error("lib/%s/Makefile.%s does not exist" % (lib,machine))

lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')

for line in lines:
  words = line.split()
  if len(words) == 3 and extraflag and \
        words[0] == "EXTRAMAKE" and words[1] == '=':
    line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
  print >>fp,line,

fp.close()

# make the library via Makefile.auto

print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt

if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
  print "lib/%s/Makefile.lammps was NOT created" % lib
Loading