mbuild_polybuild.aa_functional_groups.mptb.MPTB.to_rdkit

MPTB.to_rdkit()

Create an RDKit RWMol from an mBuild Compound.

Return type:

rdkit.Chem.RWmol

Notes

Use this method to utilzie rdkit funcitonality. This method only works when the mBuild compound contains accurate element information. As a result, this method is not compatible with compounds containing abstract particles (e.g. coarse-grained systems)

Example

>>> import mbuild
>>> from rdkit.Chem import Draw
>>> benzene = mb.load("c1cccc1", smiles=True)
>>> benzene_rdkmol = benzene.to_rdkit()
>>> img = Draw.MolToImage(benzene_rdkmol)

See https://www.rdkit.org/docs/GettingStartedInPython.html