schrodinger.structutils.ccd module

This module contains API for assigning bond orders and formal charges to structures based on the CCD database. Residues and atoms are identified by their PDB residue names and PDB atom names, or by SMILES.

class schrodinger.structutils.ccd.CCDAtomMapper(use_chirality: bool)

Bases: schrodinger.comparison.atom_mapper.ConnectivityAtomMapper

Class for determining most ideal mapping of a CCD SMILES structure to a 3D ligand conformation.

score_mapping(ccd_st, st, atset)

This method is called to “score” a given mapping. Here, both input structures have been re-ordered to have the same atom ordering, and <atset> is a set of atoms that are “shared” between the 2 structures.

exception schrodinger.structutils.ccd.CCDStructureMismatchError

Bases: RuntimeError

raise this error when structure in CCD template doesn’t match HET

exception schrodinger.structutils.ccd.SmilesGenerateError

Bases: RuntimeError

raise this error when RDKit fails to generate SMILES

schrodinger.structutils.ccd.read_ccd_structures(pdbres_iter: Iterable[str]) Dict[str, List[schrodinger.structure._structure.Structure]]

Read in CCD entries as structures.

Returns

Dictionary that maps a pdbres to reference CCD structures

schrodinger.structutils.ccd.build_ref_charges_and_bonds_cache(st: schrodinger.structure._structure.Structure)

Given a structure extract all CCD reference charges and bonds for each unique residue.

Populates the module level CCD_CHARGES_AND_BONDS_CACHE dict.

schrodinger.structutils.ccd.determine_ccd_pdbres(res: schrodinger.structure._structure.Residue) str

Determine the CCD state that is consistent with the information present in the residue. For now only histidine is checked.

schrodinger.structutils.ccd.determine_his_ccd_pdbres(his: schrodinger.structure._structure.Residue) str

Given a HIS residue, determine its protonation state based on PDB names and bond orders, and return the PDB residue name for the state.

schrodinger.structutils.ccd.ccd_assign_by_names_and_bonds(res: schrodinger.structure._structure.Residue) Tuple[List[Tuple[int, int]], List[Tuple[int, int, int]]]

Assign bond orders and charges to residue based on CCD entry. A target residue matches with the reference if the atom names and all intra-residue bonds are a subset of the reference atom names and intra-residue bonds.

The CCD typically contains the most protonated form, which is not desirable for residues that are not handled by Epik, typically standard residues, e.g. it contains the neutral form of GLU. In that case the CCD is overwritten.

Returns

Tuple with list of atom indices and assigned charges, and list of assigned bond orders.

schrodinger.structutils.ccd.attempt_ccd_assignment(res: schrodinger.structure._structure.Residue, res_assign_atoms: Optional[List[int]] = None, _logger: Optional[logging.Logger] = None) Tuple[List[Tuple[int, int]], List[Tuple[int, int, int]]]

Attempt to use the CCD record to assign the bond orders. Returns list of bonds that were assigned. Returns empty list if assignment was not successful.

Parameters
  • res – Residue for the het to assign orders to.

  • res_assign_atoms – List of atoms (substructure from the residue) to assign bond orders to. By default all residue atoms are assigned.

  • _logger – Logger

Returns

List of assigned charges and bonds