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
from mmic_cg.models import InputCoarse
# Create MMSchema molecule
mol = Molecule.from_file(path_to_file)
# Create input for coarse-graining a molecule with protoMD
cgInp = InputCoarse(
"molecule"=mol,
"method"="spacewarping",
"method_keywords"={
"kmax": 1,
"polynomial": "legendre",
},
)
# Execute coarse-graining
cgOut = CoarseComponent.compute(cgInput)
# Extract MMSchema CG mol
cgMol = cgOutput.mol
cgVel = cgOutput.mol["velocities"]
cgPos = cgOutput.mol["geometry"]
Copyright (c) 2021, Xu Guo, Andrew Abi-Mansour
Project based on the Computational Molecular Science Python Cookiecutter version 1.1.