get_ligand_attributes#

get_ligand_attributes(ligand_mol, metal_coordinating_indices, verbose=False, add_atom=None, add_hydrogens=False)[source]#

Analyze default valence and bonds to determine ligand attributes.

Parameters:
  • ligand_mol (rdkit.Chem.rdchem.Mol)) – Ligand molecule with dummy atoms replacing ligand-metal bonds, denoted by atom.GetIntProp("__original_index") == -1.

  • metal_coordinating_indices (list[int]) – List of atom indices in ligand_mol that were connected to the metal. It is expected that they have a Internal Property, __original_index as well.

  • verbose (bool, optional, default=False) – If True, print updates.

  • add_atom (str, optional, default=None) – If an element symbol, the number of hanging bonds will be the number of this atom type present.

  • add_hydrogens (bool, optional, default=False) – If True, add explicit hydrogens to the ligand.

Returns:

dict

  • “index” (int): Index of the ligand prospect.

  • ”rdmol” (rdkit.Chem.rdchem.Mol): Resolved ligand molecule.

  • ”smiles”: Canonical explicit hydrogen smiles string generated from the RDKit molecule

    of the complex. Note that the dummy atom type is present to denote where the metal attaches; commonly I.

  • ”total_charge” (int): Total charge of the ligand.

  • ”hanging_bonds” (int): Number of unused valencies.

  • ”charged_atoms” (dict): Atom information by index as defined in tmos.build_rdmol.assess_atoms().

  • ”L-type connectors” (list[int]): Original atom indices for L-type connectors.

  • ”X-type connectors” (list[int]): Original atom indices for X-type connectors.

Return type:

ligand_best, with keys: