pymatgen-io-openmm
makes setting up OpenMM simulations fast and easy.
The documentation is under active development. If you would like to use this package, please contact Orion Cohen so that he makes time to finish documenting and mint a PyPI release.
pymatgen-io-openmm
is a pymatgen namespace package.
You can install this package from source and all functionality
will be available in the pymatgen namespace. A basic usage
example is shown below.
from pymatgen.io.openmm.generators import OpenMMGenerator
# Create a generator object
generator = OpenMMGenerator()
input_mol_dicts = [
{"smile": "O", "count": 200},
{"smile": "CCO", "count": 20},
]
input_set = generator.get_input_set(input_mol_dicts, density=1)
simulation = input_set.get_simulation()
simulation.minimizeEnergy()
simulation.step(1000)
-
Install the conda package manager and create a fresh conda environment with python 3.10 or greater.
conda create -n openmm python=3.10
-
Clone this repository and move into it.
git clone git@github.com:orionarcher/pymatgen-io-openmm.git cd pymatgen-io-openmm
-
Install the requirements in
requirements.txt
.conda install -c conda-forge --file requirements.txt
-
Install the package in editable mode.
pip install -e .
If you are using Apple Silicon, installation is a bit trickier. Some dependencies of OpenFF
are not compatible with Apple Silicon so you will need to use Rosetta 2. First open your
terminal application with Rosetta2 enabled, then create a conda environment following
these instructions
everything should work from there. This replaces step 1. Do not use mamba
, which is not
fully integrated with x86 installations for Apple Silicon.
To run the testing suite, run following commands from the root of the repository and with your conda environment activated:
cd /pymatgen/io/openmm/tests
pytest .
Data files paths within the testing suite assuming a path relative to pymatgen/io/openmm/tests
.