This is part of the MolSSI Molecular Mechanics Interoperable Components (MMIC) project. This package provides a strategy component for running Molecular Dynamics simulations for systems composed by molecules and their forcefields.
# Import moleucule and forcefield models
from mmelemental.models import Molecule, ForceField
# Import MD component
import mmic_md
# Construct molecule and forcefield objects
mol = Molecule.from_file(path_to_file)
ff = ForceField.from_file(path_to_file)
# Construct input data model from molecule and forcefield objects
inp = mmic_md.InputMD(
schema_name=SCHEMA_NAME,
schema_version=SCHEMA_VERSION,
system={mol: ff},
...
)
# Import strategy compoent for runing MD simulation
from mmic_md.components import MDComponent
# Run MD Simulation
outp = MDComponent.compute(inp)
# Extract the potential energy
pot_energy = outp.observables["pot_energy"]
...
Copyright (c) 2021, Xu Guo, Andrew Abi-Mansour
Project based on the Computational Molecular Science Python Cookiecutter version 0.0.