Skip to content

MolSSI/mmic_optim

Optimization 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 strategy component for running energy minimization based on a force field.

Preparing Input

# Import molecule data model
from mmelemental.models.molecule import Molecule

# Construct molecule object
solute = Molecule.from_file(path_to_file)
solvent = Molecule.from_file(path_to_file)

# Construct input data model from molecule object
inop = {
    "mol":{
        "solute": solute, "solvent": solvent
    }, 
    nsteps=1e4
}

Running energy minimization

# Import generic component for running energy minimization
from mmic_optim.components import OptimComponent

# Run minimization
outop = OptimComponent.compute(inop)

Extracting output

pot_energy = outop.observables["pot_energy"]
...

Copyright

Copyright (c) 2021, MolSSI

Acknowledgements

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