This is part of the MolSSI Molecular Mechanics Interoperable Components (MMIC) project. This package provides a component for coarse-graining molecules.
# Import main component for coarse-graining
from mmic_cg.components import CoarseComponent
# Import a molecule model that complies with MMSchema
from mmelemental.models import Molecule
# Create MMSchema molecule
mol = Molecule.from_file(path_to_file)
# Create input for coarse-graining a molecule with protoMD
cgIn = {
"molecule": mol,
"method": "spacewarping",
"keywords": {
"kmax": 1,
"polynomial": "legendre",
},
}
# Execute coarse-graining
cgOut = CoarseComponent.compute(cgInput)
# Extract MMSchema CG mol
cgMol = cgOutput.mol
Project based on the Computational Molecular Science Python Cookiecutter version 1.1.