Skip to content

RlyehAD/mmic_cg

 
 

Coarse-Graining Component

GitHub Actions Build Status codecov Language grade: Python

This is part of the MolSSI Molecular Mechanics Interoperable Components (MMIC) project. This package provides a component for coarse-graining molecules.

Basic Usage

Preparing Input

# 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",
    },
)

Run The CG Algorithm

# Execute coarse-graining
cgOut = CoarseComponent.compute(cgInput)

Extracting Output

# Extract MMSchema CG mol
cgMol = cgOutput.mol
cgVel = cgOutput.mol["velocities"]
cgPos = cgOutput.mol["geometry"]

Copyright

Copyright (c) 2021, Xu Guo, Andrew Abi-Mansour

Acknowledgements

Project based on the Computational Molecular Science Python Cookiecutter version 1.1.

About

Strategy MMIC for coarse-graining

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.6%
  • Shell 1.4%