schrodinger.structutils.clash_resolution module¶
- class schrodinger.structutils.clash_resolution.ClashResolutionResult(spears: int, clashes: int, no: int, conformer: Structure)¶
Bases:
object
Result of the clash resolution.
- Parameters:
spears – The number of ring spears
clashes – The number of steric clashes
no – The sequence number of the generated conformer (0 if no conformer was needed)
conformer – The conformer structure
- spears: int¶
- clashes: int¶
- no: int¶
- class schrodinger.structutils.clash_resolution.ReceptorLigandClashResolver(receptor: Structure, exclude_asl: Optional[str] = None, reference: Optional[Structure] = None, smarts: Optional[str] = None, frozen_atoms: Optional[List[int]] = None, dist: float = 4.0)¶
Bases:
object
A class to provide logic for resolving clashes between a receptor and a constrained ligand.
Constraints on the ligand are based on keeping the atoms in the
smarts
or maximum common substructure with a reference ligand frozen, withsmarts
taking precedence.- __init__(receptor: Structure, exclude_asl: Optional[str] = None, reference: Optional[Structure] = None, smarts: Optional[str] = None, frozen_atoms: Optional[List[int]] = None, dist: float = 4.0)¶
- Parameters:
receptor – The receptor structure
exclude_asl – ASL to exclude atoms from the receptor
reference – A reference structure to use for the MCS
smarts – SMARTS to use for the frozen atoms
frozen_atoms – List of atom indices to be frozen, if provided this will take precedence over
smarts
andreference
. The attached hydrogens will also be frozen if not included.dist – The cutoff to use receptor distance cell
- getClashResult(ligand: Structure, exclude_h: bool = False, ofac_threshold: float = 0.4, lig_no: int = 0) ClashResolutionResult ¶
Get the clash result for the provided ligand.
- Parameters:
ligand – The ligand to resolve clashes for
exclude_h – Whether to exclude hydrogen atoms on the ligand
ofac_threshold – The cutoff to use for clash detection
lig_no – The sequence number of the ligand
- getBestRingSpearResolutionResult(ligand: Structure, exclude_h: bool = False, max_conformers: int = 1000, ofac_threshold: float = 0.4) ClashResolutionResult ¶
Resolve as many clashes as possible, only considering ring spears, when ring spear count is not zero, the steric clash count is still used for finding the best conformer when ring spear count ties.
- Parameters:
ligand – The ligand to resolve clashes for
exclude_h – Whether to exclude hydrogen atoms on the ligand
max_conformers – The maximum number of conformers to generate
ofac_threshold – The cutoff to use for clash detection
- getBestClashResolutionResult(ligand: Structure, exclude_h: bool = False, max_conformers: int = 1000, ofac_threshold: float = 0.4) ClashResolutionResult ¶
Resolve as many clashes as possible considering the ring spears to be more important to be resolved.
- Parameters:
ligand – The ligand to resolve clashes for
exclude_h – Whether to exclude hydrogen atoms on the ligand
max_conformers – The maximum number of conformers to generate
ofac_threshold – The cutoff to use for clash detection
- resolveClashes(ligand: Structure, exclude_h: bool = False, max_conformers: int = 1000, ofac_threshold: float = 0.4) Structure ¶
Resolve as many clashes as possible considering the ring spears to be more important to be resolved.
- Parameters:
ligand – The ligand to resolve clashes for
exclude_h – Whether to exclude hydrogen atoms on the ligand
max_conformers – The maximum number of conformers to generate
ofac_threshold – The cutoff to use for clash detection
- schrodinger.structutils.clash_resolution.get_atoms_from_smarts_or_mcs(st: Structure, smarts: str | None, reference_st: Structure | None) set[int] ¶
Get atoms from a structure based on the provided SMARTS pattern or the MCS with the reference structure.
- Parameters:
st – The structure to get atoms from
smarts – The SMARTS pattern to match against the structure
reference_st – The reference structure to use for MCS
- Returns:
The atom indices that are frozen