POPOFF: POtential Parameter Optimisation for Force-Fields

PopOff is a Python module that fits Coulomb-Buckingham type interatomic potentials for classical potential-based molecular dynamics (MD). This is a modular fitting code, allowing increased control over several important aspects of the potenial. You can choose between fitting a formal charge, partial charge, or fitting a charge scaling factor. You can choose to fit a rigid ion model or a core-shell model. If choosing to fit a core-shell model, you are able to fix or fit the charge separation over the core and shell components and the spring constant. You can also selectively fix, fit, or set to zero the individual buckingham parameters.

PopOff currently fits to first principles derived forces and stress tensors obtained from a VASP training set. Details on how to build a VASP training set can be found in the training set guide. This code uses the LAMMPS molecular dynamics code.

Installation

Installation of this module requires use of the LAMMPS molecular dynamics code to run. Instructions on how to install these can be found on the LAMMPS installation documentation page.

The simplest way to install PopOff is to use pip to install from PyPI:

pip install PopOff

Alternatively, you can download the latest release from GitHub, and install directly:

cd popoff
pip install -e .

which installs an editable (-e) version of PopOff in your userspace.

Or clone the latest version from GitHub with:

git clone git@github.com:LMMorgan/PopOff.git

and install the same way:

cd popoff
pip install -e .

Tests

Tests for each module are conducted using pytest and can be found in:

popoff/tests/

The tests can be run using:

pytest

The input for the test calculations is stored in the test_files directory. Please make sure to unzip the vasprun.xml files for the tests to run correctly. This can be done using gzip <file>.

Userguides

These userguides cover building a training set and going through setting up the inputs for the fit and the different parameters which can be set. Following this, there are notebooks which show how to plot the forces, stress tensors, and errors for multiple fits, run a cross-validation, and check the lattice parameters against a reference.

An overview of the capabilities of PopOff, with example inputs for running the code and varying the simulation conditions can be found in:

popoff/userguides/README.md

Notebooks

Interactive versions of each notebook can be viewed using a Jupyter notebook, or viewed using nbviewer by following each (nbviewer) link.

  1. training_set (nbviewer)

  2. fitting (nbviewer)

  3. plotting (nbviewer)

  4. lattice_parameters (nbviewer)

  5. cross-validation (nbviewer)

Running PopOff

Once the dependencies and PopOff has been installed, the code can be run either through a python script or using a Jupyter notebook. An overview of the capabilities of PopOff, with examples for running the code and varying the fitting parameters ca be found in:

popoff/userguides/fitting.ipynb
popoff/userguides/fitting.py

or the Jupyter notebook and python scripy can be found on GitHub here.

The notebook or python script must be executed from the main directory and the training set must be located in vaspruns and formatted as vasprunX.xml where X increases sequentially from 0, i.e. vasprun0.xml, vasprun1.xml, vasprun2.xml, etc.

Citing PopOff

This code can be cited as:

Morgan, Lucy M., Clarke, Matt J., Islam, M. Saiful, & Morgan, Benjamin J. (2021). PopOff Zenodo. http://doi.org/10.5281/zenodo.4773795

### BibTeX:

@misc{morgan_2021_popoff,
  author       = {Morgan, Lucy M. and
                  Clarke, Matt J. and
                  Islam, M. Saiful and
                  Morgan, Benjamin J.},
  title        = {{PopOff: POtential Parameter Optimisation for Force-Fields}},
  month        = may,
  year         = 2021,
  doi          = {10.5281/zenodo.4773795},
  url          = {10.5281/zenodo.4773795}
}

Indices and tables