https://github.com/bbye98/mdcraft
A Python assistant for performing and analyzing molecular dynamics simulations of soft matter systems
https://github.com/bbye98/mdcraft
Last synced: 8 months ago
JSON representation
A Python assistant for performing and analyzing molecular dynamics simulations of soft matter systems
- Host: GitHub
- URL: https://github.com/bbye98/mdcraft
- Owner: bbye98
- License: gpl-3.0
- Created: 2024-05-07T05:35:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-08-20T19:09:23.000Z (10 months ago)
- Last Synced: 2025-10-03T14:50:47.756Z (9 months ago)
- Language: Python
- Homepage: https://mdcraft.readthedocs.io/
- Size: 12.6 MB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Zenodo: .zenodo.json
Awesome Lists containing this project
README
# MDCraft

[](
https://github.com/bbye98/mdcraft/actions/workflows/ci.yml)
[](
https://mdcraft.readthedocs.io/en/latest/?badge=latest)
[](https://doi.org/10.5281/zenodo.13308642)
MDCraft is a toolkit of analysis modules and helper functions for
molecular dynamics (MD) simulations.
* **Documentation**: https://mdcraft.readthedocs.io/
* **Conda**: https://anaconda.org/bbye98/mdcraft
* **Python Package Index (PyPI)**: https://pypi.org/project/mdcraft/
## Features
* [`algorithm`](https://github.com/bbye98/mdcraft/tree/main/src/mdcraft/algorithm):
Efficient Numba, NumPy, and SciPy algorithms for data wrangling and
evaluating structural and dynamical properties.
* [`analysis`](https://github.com/bbye98/mdcraft/tree/main/src/mdcraft/analysis):
Serial and parallel data analysis tools built on top of the MDAnalysis
framework.
* [`fit`](https://github.com/bbye98/mdcraft/tree/main/src/mdcraft/fit):
Two-dimensional curve fitting models for use with SciPy.
* [`lammps`](https://github.com/bbye98/mdcraft/tree/main/src/mdcraft/lammps):
Helper functions for setting up LAMMPS simulations.
* [`openmm`](https://github.com/bbye98/mdcraft/tree/main/src/mdcraft/openmm):
Extensions to the high-performance OpenMM toolkit, such as custom
bond/pair potentials, support for NetCDF trajectories, and much more.
* [`plot`](https://github.com/bbye98/mdcraft/tree/main/src/mdcraft/plot):
Settings and additional functionality for Matplotlib figures.
### Benchmarks
The novel forcefield provided by MDCraft, Gaussian Core Model with smeared electrostatics (GCMe), provides multiple benefits discussed in more detail within our recent [publication](https://doi.org/10.1021/acs.jctc.4c00603). Of note is the computational speed-up obtained from GCMe, especially when used in OpenMM:

The codes used to generate these benchmarks are provided in the associated [repository](https://github.com/bbye98/gcme).
## Getting started
### Prerequisites
If you use pip to manage your Python packages and plan on using the
OpenMM simulation toolkit, you must compile and install OpenMM manually
since OpenMM is not available in PyPI. See the
["Compiling OpenMM from Source Code"](
http://docs.openmm.org/latest/userguide/library/02_compiling.html)
section of the OpenMM User Guide for more information.
If you use Conda, it is recommended that you use the conda-forge
channel to install dependencies. To make conda-forge the default
channel, use
conda config --add channels conda-forge
### Installation
MDCraft requires Python 3.9 or later.
For the most up-to-date version of MDCraft, clone the repository and
install the package using pip:
git clone https://github.com/bbye98/mdcraft.git
cd mdcraft
python3 -m pip install -e .
Alternatively, MDCraft is available on Conda:
conda install bbye98::mdcraft
and PyPI:
python3 -m pip install mdcraft
### Postrequisites
To use the method of image charges
(`mdcraft.openmm.system.add_image_charges()`) in your OpenMM
simulations, you must compile and install [`constvplugin`](
https://github.com/scychon/openmm_constV) or [`openmm-ic-plugin`](
https://github.com/bbye98/mdcraft/tree/main/lib/openmm-ic-plugin).
### Tests
After installing, to run the MDCraft tests locally, use `pytest`:
pip install pytest
cd mdcraft
pytest