Skip to main content

ASE-compatible Python bindings for the QUIP and GAP codes

Project description

QUIP - QUantum mechanics and Interatomic Potentials

Build Status build Docker Pulls

The QUIP package is a collection of software tools to carry out molecular dynamics simulations. It implements a variety of interatomic potentials and tight binding quantum mechanics, and is also able to call external packages, and serve as plugins to other software such as LAMMPS, CP2K and also the python framework ASE. Various hybrid combinations are also supported in the style of QM/MM, with a particular focus on materials systems such as metals and semiconductors.

For more details, see the online documentation. There is separate documentation for SOAP and GAP.

Long term support of the package is ensured by:

  • Noam Bernstein (@bernstei, Naval Research Laboratory)
  • Gabor Csanyi (@gabor1, University of Cambridge)
  • James Kermode (@jameskermode, University of Warwick)

Portions of this code were written by: Albert Bartok-Partay, Livia Bartok-Partay, Federico Bianchini, Anke Butenuth, Marco Caccin, Silvia Cereda, Gabor Csanyi, Alessio Comisso, Tom Daff, ST John, Chiara Gattinoni, Gianpietro Moras, James Kermode, Letif Mones, Alan Nichol, David Packwood, Lars Pastewka, Giovanni Peralta, Ivan Solt, Oliver Strickson, Wojciech Szlachta, Csilla Varnai, Steven Winfield, Tamas K Stenczel, Adam Fekete.

Copyright 2006-2021.

Most of the publicly available version is released under the GNU General Public license, version 2, with some portions in the public domain. The GAP code, included as a submodule, is distributed under a non-commerical academic source license

Citing QUIP, quippy and GAP

Please cite the following publication if you use QUIP:

@ARTICLE{Csanyi2007-py,
  title   = "Expressive Programming for Computational Physics in Fortran 95+",
  author  = "Cs{\'a}nyi, G{\'a}bor and Winfield, Steven and Kermode, J R and De
             Vita, A and Comisso, Alessio and Bernstein, Noam and Payne,
             Michael C",
  journal = "IoP Comput. Phys. Newsletter",
  pages   = "Spring 2007",
  year    =  2007
}

If you use the quippy Python interface, please cite:

@ARTICLE{Kermode2020-wu,
  title    = "f90wrap: an automated tool for constructing deep Python
              interfaces to modern Fortran codes",
  author   = "Kermode, James R",
  journal  = "J. Phys. Condens. Matter",
  month    =  mar,
  year     =  2020,
  keywords = "Fortran; Interfacing; Interoperability; Python; Wrapping codes;
              f2py",
  language = "en",
  issn     = "0953-8984, 1361-648X",
  pmid     = "32209737",
  doi      = "10.1088/1361-648X/ab82d2"
}

If you use the GAP code please cite

@ARTICLE{Bartok2010-pw,
  title    = "Gaussian approximation potentials: the accuracy of quantum
              mechanics, without the electrons",
  author   = "Bart{\'o}k, Albert P and Payne, Mike C and Kondor, Risi and
              Cs{\'a}nyi, G{\'a}bor",
  journal  = "Phys. Rev. Lett.",
  volume   =  104,
  number   =  13,
  pages    = "136403",
  month    =  apr,
  year     =  2010,
  issn     = "0031-9007, 1079-7114",
  pmid     = "20481899",
  doi      = "10.1103/PhysRevLett.104.136403"
}

Features

The following interatomic potentials are presently coded or linked in QUIP:

  • BKS (van Beest, Kremer and van Santen) (silica)
  • EAM (fcc metals)
  • Fanourgakis-Xantheas (water)
  • Finnis-Sinclair (bcc metals)
  • Flikkema-Bromley
  • GAP (Gaussian Approximation Potentials) with (growing...) online documentation
  • Guggenheim-McGlashan
  • Brenner (carbon)
  • OpenKIM (general interface)
  • Lennard-Jones
  • MBD (many-body dispersion correction)
  • Morse
  • Partridge-Schwenke (water monomer)
  • Stillinger-Weber (carbon, silicon, germanium)
  • SiMEAM (silicon)
  • Sutton-Chen
  • Tangney-Scandolo (silica, titania etc)
  • Tersoff (silicon, carbon)
  • Tkatchenko-Sheffler pairwise dispersion correction

The following tight-binding functional forms and parametrisations are implemented:

  • Bowler
  • DFTB
  • GSP
  • NRL-TB

The following external packages can be called:

  • CASTEP
  • VASP
  • CP2K
  • ASAP
  • Molpro
  • ASE (required if using quippy Python interface; latest version recommended)

Code philosophy and goals

QUIP was born because of the need to efficiently tie together a wide variety of different models, both empirical and quantum mechanical. It will not be competitive in terms of performance with codes such as LAMMPS and Gromacs. The Atomic Simulation Environment also does this, and is much more widely used, but QUIP has a number of unique features:

  • Access to Fortran types and routines from Python via the quippy package
  • Support for Gaussian Approximation Potentials (GAP) - online docs
  • Does not assume minimum image convention, so interatomic potentials can have cutoffs that are larger than the periodic unit cell size

Binary Installation of QUIP and quippy

Binary wheels for QUIP and the associated quippy Python bindings that provide interopability with the Atomic Simulation Environment (ASE) are available from the Python package index (PyPI) under the package name quippy-ase. This means you can install the latest release with:

pip install quippy-ase

Installing via pip also makes the quip and gap_fit command line programs available (providing the directory that pip installs scripts to is on your PATH).

Currently, wheels are available for x86_64 architectures with Python 3.6+ on Mac OS X and glibc-based Linux distributions (e.g. Ubuntu, CentOS). The wheels are updated periodically using the quippy-wheels repository using GitHub Actions CI. Please open issues there if you have problems installing with pip.

Precompiled Containers

If you have access to Docker or Singularity, you can try one of the precompiled images to get up and running quickly.

Compilation Instructions

  1. To compile QUIP the minimum requirements are:

    • A working Fortran compiler. QUIP is tested with gfortran 4.4 and later, and ifort 11.1.

    • Linear algebra libraries BLAS and LAPACK. QUIP is tested with reference versions libblas-dev and liblapack-dev on Ubuntu 12.04, and mkl 11.1 with ifort.

  2. Clone the QUIP repository from GitHub. The --recursive option brings in submodules automatically (If you don't do this, then you will need to run git submodule update --init --recursive from the top-level QUIP directory after cloning) ::

    git clone --recursive https://github.com/libAtoms/QUIP.git
    

    One submodule is the GAP code, which can be found in src/GAP. Note that GAP is distributed under a diferent license.

    GAP is a machine learning method that uses Gaussian process regression, and needs large data files to run. You can find potentials that have been published as well as training data in our data repository, see also the online docs.

  3. Decide your architecture by looking in the arch/ directory, and define an environmental variable QUIP_ARCH, e.g.::

    export QUIP_ARCH=linux_x86_64_gfortran
    

    for standard gfortran on Linux. Here is where you can adjust which compiler is being used, if you do not like the defaults. You may need to create your own arch/Makefile.${QUIP_ARCH} file based on an existing file for more exotic systems.

  4. Customise QUIP, set the maths libraries and provide linking options::

    make config
    

    Makefile.config will create a build directory, build/${QUIP_ARCH}, and all the building happen there. First it will ask you some questions about where you keep libraries and other stuff, if you don't use something it is asking for, just leave it blank. The answers will be stored in Makefile.inc in the build/${QUIP_ARCH} directory, and you can edit them later (e.g. to change compiler, optimisation or debug options).

    If you later make significant changes to the configuration such as enabling or disabling tight-binding support you should force a full rebuild by doing a make deepclean; make.

  5. Compile all programs, modules and libraries::

    make
    

    From the top-level QUIP directory. All programs are built in build/${QUIP_ARCH}/. You can also find compiled object files and libraries (libquip.a) in that directory. Programs can be called directly from that directory.

    Other useful make targets include:

    • make install : copies all compiled programs it can find to QUIP_INSTALLDIR, if it's defined and is a directory (full path required), and copies bundled structures to QUIP_STRUCTS_DIR if it is defined.

    • make libquip: Compile QUIP as a library and link to it. This will make all the various libraries and combine them into one: build/${QUIP_ARCH}/libquip.a, which is what you need to link with (as well as LAPACK).

  6. A good starting point is to use the quip program, which can calculate the properties of an atomic configuration using a variety of models. For example::

    quip atoms_filename=test.xyz init_args='IP LJ' \
        param_filename=share/Parameters/ip.parms.LJ.xml E
    

    assuming that you have a file called test.xyz with the following data in it representing Cu atoms in a cubic fcc lattice::

    4
    Lattice="3.61 0 0 0 3.61 0 0 0 3.61" Properties=species:S:1:pos:R:3
    Cu     0.000 0.000 0.000
    Cu     0.000 1.805 1.805
    Cu     1.805 0.000 1.805
    Cu     1.805 1.805 0.000
    

    The Lennard-Jones parameters in the above example are defined in the ip.parms.LJ.xml file under share/Parameters (ensure the path to this file is correct). The format of the atomic configuration is given in Extended XYZ format, in which the first line is the number of atoms, the second line is a series of key=value pairs, which must at least contain the Lattice key giving the periodic bounding box and the Properties key that describes the remaining lines. The value of Properties is a sequence of triplets separated by a colon (:), that give the name, type and number of columns, with the type given by I for integers, R for reals, S for strings.

    Most string arguments can be replaced by --help and QUIP programs will then print a list of allowable keywords with brief help messages as to their usage, so e.g. init_args=--help will give a list of potential model types (and some combinations). The parsing is recursive, so init_args="IP --help" will then proceed to list the types of interatomic potentials (IP) that are available.

  7. To compile the Python wrappers (quippy), the minimum requirements are as follows. f90wrap will be installed automatically by the build process, but you might need to check that the directory where pip installs executuable scripts to is on your path (e.g. by setting PATH=~/.local/bin:$PATH).

    Note: If you are using a Python virtual environment (virtualenv) and would like to install quippy into it, ensure the environment is activated (source <env_dir>/bin/activate, where <env_dir> is the root of your virtual environment) before building quippy (otherwise library versions may cause unexpected conflicts).

  8. To compile the Python wrappers (quippy), run::

    make quippy
    

    Quippy can be used by adding the lib directory in quippy/build/${QUIP_ARCH} to your $PYTHONPATH, however it can be more convenient to install into a specific Python distribution::

    make install-quippy
    

    will either install into the current virtualenv or attempt to install systemwide (usually fails without sudo). To install only for the current user (into ~/.local), execute the command QUIPPY_INSTALL_OPTS=--user make install-quippy, or use QUIPPY_INSTALL_OPTS=--prefix=<directory> to install into a specific directory. QUIPPY_INSTALL_OPTS can also be set in the file build/${QUIP_ARCH}/Makefile.inc.

  9. More details on the quippy installation process and troubleshooting for common build problems are available in the online documentation.

  10. To run the unit and regression tests, which depend on quippy:: bash make test

  11. To get back to a state near to a fresh clone, use bash make distclean

  12. Some functionality is only available if you check out other modules within the QUIP/src/ directories, e.g. the ThirdParty (DFTB parameters, TTM3f water model).

  13. In order to run QUIP potentials via LAMMPS, make libquip to get QUIP into library form, and then follow the instructions in the LAMMPS documentation. You need at least 11 Aug 2017 version or later.

Developer notes:

Fixing/updating the version of GAP:

cd src/GAP
git checkout <commit> 

OR

git checkout main

Updating the version in the QUIP repository:

cd ../..
git add src/GAP
git commit -m "updating the version of GAP"

Mac OS

We do not recommend Apple-shipped compilers and python, and we do not test compatibility with them. Either use MacPorts or Homebrew to obtain GNU compilers, and also use the python from there or Anaconda. As of this edit, gcc-8.1 produces as internal compiler error, but gcc-4.6 through to gcc-7 is fine.

Triggering the wheel build

Wheels are built on push and pull requests to public using cibuildwheel with this workflow.

To make a release candidate create a tag with a suffix such as -rc1 for the first attempt, push to trigger the build:

git commit -m 'release v0.x.z-rc1'
git tag v0.x.y-rc1
git push --tags

If all goes well, the .whl files will show up as assets within a new GitHub release. The installation process can now be tested locally.

Release wheels to PyPI

Once everything works correctly, make a full release (i.e. create a tag named just v0.x.y without the -rc1 suffix). This will trigger the upload of wheels and source distribution to PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

quippy_ase-0.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

quippy_ase-0.9.10-cp310-cp310-macosx_11_0_arm64.whl (23.2 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

quippy_ase-0.9.10-cp310-cp310-macosx_10_9_x86_64.whl (28.4 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

quippy_ase-0.9.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

quippy_ase-0.9.10-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (26.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

quippy_ase-0.9.10-cp39-cp39-macosx_11_0_arm64.whl (23.2 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

quippy_ase-0.9.10-cp39-cp39-macosx_10_9_x86_64.whl (28.4 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

quippy_ase-0.9.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

quippy_ase-0.9.10-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (26.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

quippy_ase-0.9.10-cp38-cp38-macosx_11_0_arm64.whl (23.2 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

quippy_ase-0.9.10-cp38-cp38-macosx_10_9_x86_64.whl (28.4 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

quippy_ase-0.9.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.1 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

quippy_ase-0.9.10-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (26.4 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

quippy_ase-0.9.10-cp37-cp37m-macosx_10_9_x86_64.whl (28.4 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file quippy_ase-0.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 13c2ca37b85a7baa5aa1268e7d1acd6db61704c1e5e3a2ae0155ff956bfc99fa
MD5 4a8973a6c7215ba85c6f2f909fdf8a52
BLAKE2b-256 8ceda97a386c7d11d616d43a1c06c0d57a8e2aff3636e7392ae3e7b1d8743ab8

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 59f115dd20e04bdf2b6c1594ef274b5cad2f35b1887e83d53aaf7d25e65176d3
MD5 101fdd3beffd7183b5e76d38e7cd3a1b
BLAKE2b-256 6ba3716145fa46ba5bc0c563ef142f8f9e2ba9f5015e527c6a6fed712fe6598e

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d03db8fe7716bc570c5d1bf095c411bd64380e70b0dc4e63511d8e4d14476684
MD5 599fcb1c04d1d65c6199cc333a961ad6
BLAKE2b-256 162b024ad4a3cf1e63a1e6cde44dffb05e03faddeeedf7522177115aadb7802d

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e61f8a63ad82ac8b151edd03fda9643eb7dbfff895276afc5fed62a74864e898
MD5 8c93f4dd374eaf8980e742f76c6ccc47
BLAKE2b-256 b91d4d5adb69df4dbe51674ad6ca101ab1f8729a2a32208d74577ba546a5f47e

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f47b7855191a2a0ec0745265f808b6577deec06e29b3ad67d68fc0dbd062a722
MD5 d00834bdc2e072a4eeadaa3a7d031290
BLAKE2b-256 fa94257db3ed28947c213265e12c67434c545049d45d8ba5f85a6d2a9e2cd6d5

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 155c9850fda584333d11c9eb4aedefbf0946d20eaf04e6134ce5316f3218325b
MD5 456122aa3fd0b99516705eac3620821b
BLAKE2b-256 4569585327c0dddb290dd26368e6755c8264aab48e759658499f64141a926504

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 27c1e7bad9c0b5ea37bd52f1e4f8e0c57000d5341eca2a673ce8f12aaec1af45
MD5 43f906cb68df02d5a618bfa0156e0129
BLAKE2b-256 45d0c2b40e3bc856123da455e4a25ecfe8743f2a0922582b024c96b9342bf30c

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2f83670fcf1660efccf52dac8280882c40c86f5188575d0db5c8159de64f3669
MD5 176d68695524935ca2a640c935b3e2ab
BLAKE2b-256 39b103a8ac1a1a1f4ba687b0504eb0667a8c85ca392361a9f850279353f76fc0

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a744f3d4da37af01d799e4274238ce6c78e7d52d6f6dd749405df5f21df7084c
MD5 a4a80af0ce6671043215c89e7b83b6f0
BLAKE2b-256 e5aa6caf765d2d116249ef4807352aaf034e9838a62cd89bde3cd1600bc69f14

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 84164d9eb3dc0765c44dee821cb5d62f4e77e9271a3d8c1f5df77bca8af0e344
MD5 45716c235aa76de0fd2e8e23a785f252
BLAKE2b-256 34a593778f72cfb32f08f971e1010ee322ffb9a867107301fa61ef66f14f3863

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8b23720f7455a848a97e681b20b6fb372d126e3083cf5b3308f00d0ce6beec7e
MD5 970fe90d2f1e27ab51eb9c39df4b81b2
BLAKE2b-256 da95d4e819352123552044a3097abe22d998cb8da99a4ed597c5742cd44fdd71

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 011a2f8f1c6c791ba8a98d41a5d0bbeae45ff1b2650b9c6f8928ad0586588636
MD5 84ae69aa2d251b8dc45ea1ac6840fa16
BLAKE2b-256 a093d51a051649bf0decadb13ad0ca2d00e77db309cf4b385c3f93141e0e2145

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e5cafc3f8b00e0e57907836358acc4f435ed0d242ef834c23764fe04da50b449
MD5 e29e06ce25e464a13204c7f1d9d020d4
BLAKE2b-256 bc470d716db6c071ab38fb98754a1cdb3ab092e5e55d52631784e83adc0c738f

See more details on using hashes here.

File details

Details for the file quippy_ase-0.9.10-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for quippy_ase-0.9.10-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4ef2d996438b94d10a73b0e20a0454ae2b9830e5f89323d3b38d585ebeb8fb85
MD5 49ef864ca56006b7c5e8d2edd5c39002
BLAKE2b-256 71b0d26c9ea478520fbd937f44888c3687a7184204f8e525b226a3c56a5a9663

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page