update and automate the QUIP configuration so that no environment variables are needed

This commit is contained in:
Axel Kohlmeyer 2017-07-28 16:11:13 -04:00
parent 7d0d701eaf
commit 9bfd9267fa
3 changed files with 35 additions and 13 deletions

1
lib/quip/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/QUIP

View File

@ -1,17 +1,26 @@
# Settings that the LAMMPS build will import when this package library is used
# include ${QUIP_ROOT}/Makefiles/Makefile.${QUIP_ARCH}
F95=$(shell egrep 'F95[ ]*=' ${QUIP_ROOT}/arch/Makefile.${QUIP_ARCH} | sed 's/.*F95[ ]*=[ ]*//')
# try to guess settings assuming there is a configured QUIP git checkout inside the lib/quip directory
QUIPDIR=$(abspath ../../lib/quip/QUIP)
ifeq (${QUIP_ROOT},)
QUIP_ROOT=$(shell test -d $(QUIPDIR) && echo $(QUIPDIR))
ifeq (${QUIP_ARCH},)
QUIP_ARCH=$(notdir $(wildcard $(QUIP_ROOT)/build/*))
endif
else
# uncomment and set manually or set the corresponding environment variables
# QUIP_ROOT=
# QUIP_ARCH=
endif
ifeq (${QUIP_ROOT},)
$(error Environment variable QUIP_ROOT must be set.)
$(error Environment or make variable QUIP_ROOT must be set.)
endif
ifeq (${QUIP_ARCH},)
$(error Environment variable QUIP_ARCH must be set.)
$(error Environment or make variable QUIP_ARCH must be set.)
endif
F95=$(shell egrep 'F95[ ]*=' ${QUIP_ROOT}/arch/Makefile.${QUIP_ARCH} | sed 's/.*F95[ ]*=[ ]*//')
include ${QUIP_ROOT}/build/${QUIP_ARCH}/Makefile.inc
include ${QUIP_ROOT}/Makefile.rules
@ -28,3 +37,4 @@ $(error fortran compiler >>${F95}<< not recognised. Edit lib/quip/Makefile.lammp
endif
quip_SYSPATH = -L${QUIP_ROOT}/build/${QUIP_ARCH}

View File

@ -17,7 +17,7 @@ Building LAMMPS with QUIP support:
1) Building QUIP
1.1) Obtaining QUIP
The most current release of QUIP can be obtained from github:
The most current release of QUIP can be obtained from github:
$ git clone https://github.com/libAtoms/QUIP.git QUIP
@ -59,7 +59,7 @@ necessary libraries will be built.
for example:
$ cd QUIP
$ export QUIP_ROOT=/path/to/QUIP
$ export QUIP_ROOT=${PWD}
$ export QUIP_ARCH=linux_x86_64_gfortran
$ make config
$ make libquip
@ -70,21 +70,32 @@ to run a test suite.
2) Building LAMMPS
LAMMPS is now shipped with the interface necessary to use QUIP potentials, but
it should be enabled first. Enter the LAMMPS directory:
Edit Makefile.lammps in the lib/quip folder, if necessary. If you
have cloned, configured, and built QUIP inside this folder, QUIP_ROOT
and QUIP_ARCH should be autodetected, even without having to set
the environment variables. Otherwise export the environment variables
as shown above or edit Makefile.lammps
LAMMPS ships with a user package containing the interface necessary
to use QUIP potentials, but it needs to be added to the compilation
first. To do that, enter the LAMMPS source directory and type:
$ cd LAMMPS
$ cd src
$ make yes-user-quip
2.2) Build LAMMPS according to the instructions on the LAMMPS website.
3) There are two example sets in examples/USER/quip:
3) There are three example sets in examples/USER/quip:
- a set of input files to compute the energy of an 8-atom cubic
diamond cell of silicon with the Stillinger-Weber potential. Use
this to benchmark that the interface is working correctly.
- a set of input files demonstrating the use of the QUIP pair style
for a molecular system with pair style hybrid/overlay and different
exclusion settings for different pair styles. This input is
for DEMONSTRATION purposes only, and does not simulate a physically
meaningful system.
- a set of input files to demonstrate how GAP potentials are specified
in a LAMMPS input file to run a short MD. The GAP parameter file
gap_example.xml is intended for TESTING purposes only. Potentials can be