gmol.base.data.mmcif.smiles#

Classes

MmcifRefLigand(atoms, bonds)

RefLigandInput(smiles, atom_ids)

Functions

convert_chem_comp(ccd)

Convert CCD to smiles and atom indexes.

input_from_reference(ref_ligand)

mol_from_chem_comp(atoms, bonds)

Return a RDKit molecule from a list of atoms and bonds.

reference_from_mmcif(res_cc[, extra_bonds])

unique_atom_id(residue_id, atom_id)

class RefLigandInput(smiles: str, atom_ids: list[str])#
smiles: str#
atom_ids: list[str]#
class MmcifRefLigand(atoms: list[ChemCompAtom], bonds: list[ChemCompBond])#
atoms: list[ChemCompAtom]#
bonds: list[ChemCompBond]#
mol_from_chem_comp(atoms: list[ChemCompAtom], bonds: list[ChemCompBond]) Mol#

Return a RDKit molecule from a list of atoms and bonds.

Parameters:
  • atoms – list of atoms.

  • bonds – list of bonds.

Returns:

A molecule with correct atom id (GetProp("atom_id"), stereochemistry (GetProp("absolute_config")) and aromaticity. All hydrogens are removed.

unique_atom_id(residue_id: ResidueId, atom_id: str) str#
reference_from_mmcif(res_cc: list[tuple[ResidueId, ChemComp]], extra_bonds: list[Branch] | None = None) MmcifRefLigand#
input_from_reference(ref_ligand: MmcifRefLigand) RefLigandInput#
convert_chem_comp(ccd: dict[str, ChemComp]) tuple[list[str], dict[str, ndarray[tuple[Any, ...], dtype[str_]]]]#

Convert CCD to smiles and atom indexes.

Parameters:

ccd – Dictionary of ccd code to ChemComp object.