Skip to main content
PyPI Version GH Actions Binder
Documentation Status MIT License Coverage Status
JOSS Zenodo

matador is an aggregator, manipulator and runner of first-principles calculations, written with a bent towards battery electrode materials. The source can be found on GitHub and online documentation is hosted at ReadTheDocs.

Example Jupyter notebooks and tutorials can be found online or in the examples/ folder of the matador source code.

Written & maintained by Matthew Evans (2016-2026).

docs/src/img/hull.png

Installation

In the simplest case (e.g. you already have a compatible Python version set up), pip install matador-db is sufficient to get up and running, preferably in a fresh virtual environment.

Upgrading to the latest version should be as simple as pip install -U matador-db.

For an editable development installation, clone the source code from this repository and run pip install -e . from the matador folder. Tests can be run on your local machine with python -m unittest discover -v -b or simply with py.test after test dependencies have been installed with pip install .[test]. In order to test CASTEP-running functionality, the tests will look for an MPI-enabled executable named castep on your $PATH.

Further instructions can be found in the Installation instructions.

Usage

matador is primarily a Python library that can be used inside Python scripts/modules to create a custom workflow. There are, however, several command-line scripts bundled with matador itself. All of these scripts are listed under CLI Usage.

For basic command-line usage, please explore the help system for each command. Common workflows can be found inside examples/ and in the online docs.

Please consult the full Python API documentation for programmatic usage.

Core functionality

The API has many features that can be explored in the examples and API documentation. As a summary, matador can be used for:

  • Scraping of CASTEP (and Quantum Espresso) input/output files into flexible Python dictionaries/models.

  • The creation and curation of MongoDB collections of geometry optimisation calculations, with a powerful querying CLI/API.

  • Customisable, publication-ready plots for all models, e.g. phase diagrams, PDF, PXRD, voltage profiles, electronic/vibrational bandstructures etc.

  • High-throughput geometry optimisations, electronic and vibrational properties using CASTEP (and Quantum Espresso) with run3. Tested on several supercomputers. run3 is designed primarily for simple workflows and offers little in the way of tools for creating complex workflows; if this is your use case, then check out some of the other codes listed below.

  • Creation of phase diagrams and electrochemical voltage profiles from the results of DFT calculations.

This functionality is achieved by interfacing with much of the standard scientific Python stack (NumPy, SciPy, matplotlib), some more materials-specific packages (spglib, SeeK-path, periodictable) and other general packages (pymongo, python-ternary, numba).

Similar packages

This package is by no means unique in its functionality or goals. Below is a list of similar packages and an overview of where they overlap with matador:

  • ASE: manipulation of structures, parsing and exporting files, running jobs and local databases with ase-db. An interface is provided to ASE’s Atoms object.

  • pymatgen: similar to ASE, with a focus on the VASP DFT code. An interface is provided to pymatgen’s Structure object. Local databases can be constructed with the pymatgen-db add-on and high-throughput workflows are achieved with Fireworks.

  • AiiDA: high-throughput job running, provenance tracking and database storage for many simulation codes.

  • sumo publication quality plotting, primarily for VASP but also with support for other codes.

If you think this list is outdated, incorrect or simply incomplete, then please raise an issue!

Citing matador

If you use matador in your work, we kindly ask that you cite

Matthew L. Evans, Andrew J. Morris, matador: a Python library for analysing, curating and performing high-throughput density-functional theory calculations Journal of Open Source Software, 5(54), 2563 (2020) 10.21105/joss.02563

Source code archives for all versions above 0.9 can be found at Zenodo DOI 10.5281/zenodo.3908573.

You can also find the main author’s thesis (which made extensive use of matador):

Matthew L. Evans, Crystal structure prediction for rechargeable battery anodes [Apollo - University of Cambridge Repository] (2023) 10.17863/CAM.104811

Download files

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

Source Distribution

matador_db-0.12.0.tar.gz (5.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matador_db-0.12.0-py3-none-any.whl (467.2 kB view details)

Uploaded Python 3

File details

Details for the file matador_db-0.12.0.tar.gz.

File metadata

  • Download URL: matador_db-0.12.0.tar.gz
  • Upload date:
  • Size: 5.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.20

File hashes

Hashes for matador_db-0.12.0.tar.gz
Algorithm Hash digest
SHA256 bb429b33229cb75c1e9d0d617ba79789e8e9c7988b9e6a397e3b8faccdef20c1
MD5 7b67bcd5dc5b14f89231eef141d50261
BLAKE2b-256 694489bf5fbfd19a98bf0dc040a0fffde4fed7ce9a4acc711e0ee46b3891fc25

See more details on using hashes here.

File details

Details for the file matador_db-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: matador_db-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 467.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.20

File hashes

Hashes for matador_db-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ea510e5293911cf2b83f851106eefa7fb9ccd53b0e7e589c32b60017070d0c1
MD5 031fde14f8d8ec25a5a6ba0e7be8fab7
BLAKE2b-256 07050aa914114b6df20967ac037a2ef6f9175e13874b2f3df2cc2a7ecb5b8ac8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.11

2 files

0.9.10

2 files

0.9.9

2 files

0.9.8

2 files

0.9.7

2 files

0.9.6

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

3 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page