polymerist.polymers.building.mbconvert

Enhanced conversions to and from mbuild Compound objects which preserve more molecular information than the utilities provided by

Functions

mbmol_from_mono_rdmol(→ tuple[mbuild.Compound, list[int]])

Accepts a monomer-spec-compliant SMARTS string and returns an mbuild Compound and a list of the indices of atom ports

mbmol_to_rdmol(→ rdkit.Chem.Mol)

Convert an mBuild Compound into an RDKit Mol, with correct atom coordinates and PDB residue info

mbmol_to_rdkit_pdb(→ None)

mbmol_to_openmm_pdb(→ None)

Module Contents

polymerist.polymers.building.mbconvert.mbmol_from_mono_rdmol(rdmol: rdkit.Chem.Mol, resname: str | None = None, kekulize: bool = True) tuple[mbuild.Compound, list[int]][source]

Accepts a monomer-spec-compliant SMARTS string and returns an mbuild Compound and a list of the indices of atom ports If “resname” is provided, will assign that name to the mBuild Compound returned

polymerist.polymers.building.mbconvert.mbmol_to_rdmol(mbmol: mbuild.Compound, atom_labeller: polymerist.molfiles.pdb.SerialAtomLabeller | None = None, resname_map: dict[str, str] | None = None) rdkit.Chem.Mol[source]

Convert an mBuild Compound into an RDKit Mol, with correct atom coordinates and PDB residue info

polymerist.polymers.building.mbconvert.mbmol_to_rdkit_pdb(pdb_path: str, mbmol: mbuild.Compound, atom_labeller: polymerist.molfiles.pdb.SerialAtomLabeller | None = None, resname_map: dict[str, str] | None = None) None[source]
polymerist.polymers.building.mbconvert.mbmol_to_openmm_pdb(pdb_path: pathlib.Path, mbmol: mbuild.Compound, atom_labeller: polymerist.molfiles.pdb.SerialAtomLabeller | None = None, resname_map: dict[str, str] | None = None) None[source]