schrodinger.livedesign.bbchem_endpoints module

Collection of functions intended as bbchem web endpoints.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.livedesign.bbchem_endpoints.RegistrationData(sdf, requested_hash, no_stereo_hash, display_smiles, molecular_weight, molecular_formula, has_attachment_point)[source]

Bases: tuple

sdf: Union[str, bytes]

Alias for field number 0

requested_hash: str

Alias for field number 1

no_stereo_hash: str

Alias for field number 2

display_smiles: str

Alias for field number 3

molecular_weight: float

Alias for field number 4

molecular_formula: str

Alias for field number 5

has_attachment_point: bool

Alias for field number 6

__contains__(key, /)

Return key in self.

__len__()

Return len(self).

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

schrodinger.livedesign.bbchem_endpoints.registration_process(data: Union[str, bytes], options: Optional[schrodinger.livedesign.preprocessor.PreprocessorOptions] = None, hash_scheme: schrodinger.livedesign.molhash.HashScheme = HashScheme.ALL_LAYERS) Iterator[schrodinger.livedesign.bbchem_endpoints.RegistrationData][source]

Runs through the registration pipeline for each compound provided in the input data, which includes the preprocessor and canonicalization.

Parameters
  • data – input text string to be deserialized into RDKit mols

  • options – preprocessor options

schrodinger.livedesign.bbchem_endpoints.generate_image(mol: rdkit.Chem.rdchem.Mol, alignment_mol: Optional[rdkit.Chem.rdchem.Mol] = None, substructure_options: Optional[schrodinger.livedesign.substructure.QueryOptions] = None, highlight_mol: Optional[rdkit.Chem.rdchem.Mol] = None, draw_options: Optional[schrodinger.livedesign.draw.ImageGenOptions] = None) Union[str, bytes][source]

Generates an image used in LiveDesign which may have a request for compound alignment, or substructure highlighting, or both.

Parameters
  • mol – compound to generate an image of

  • alignment_mol – molecule to align to prior to image generation

  • substructure_options – substructure matching options

  • highlight_mol – core to highlight in generated image

  • draw_options – image generation options

Returns

generated image as a string

schrodinger.livedesign.bbchem_endpoints.generate_sar_analysis_image(mol: rdkit.Chem.rdchem.Mol, core_mol: rdkit.Chem.rdchem.Mol, rgroup_mols: List[rdkit.Chem.rdchem.Mol], options: Optional[schrodinger.livedesign.draw.ImageGenOptions] = None) Union[str, bytes][source]

Generates an image used in LiveDesign that is specifically from SAR analysis output, highlighting the core and all r-groups from the decomposition.

Parameters
  • mol – compound to generate an image of

  • core_mol – core to highlight in generated image

  • rgroup_mols – rgroups to highlight in generated image

  • options – image generation options

Returns

generated image as a string

schrodinger.livedesign.bbchem_endpoints.pop_properties(mol: rdkit.Chem.rdchem.Mol) dict[source]
Parameters

mol – molecule to extract, then clear all properties from

Returns

map of all removed properties as strings

schrodinger.livedesign.bbchem_endpoints.set_properties(mol: rdkit.Chem.rdchem.Mol, new_props: dict)[source]
Parameters
  • mol – molecule to clear, then set given properties on

  • new_props – map of properties to add onto the molecule

schrodinger.livedesign.bbchem_endpoints.num_substructure_matches(match_mol: rdkit.Chem.rdchem.Mol, query_mol: rdkit.Chem.rdchem.Mol, options: Optional[schrodinger.livedesign.substructure.QueryOptions] = None) int[source]

Returns the number of substructure matches between two molecules.

Parameters
  • match_mol – molecule to find substructure matches in

  • query_mol – substructure molecule on which to find matches

  • options – substructure query options

Returns

number of substructure matches found

schrodinger.livedesign.bbchem_endpoints.enumerate_stereoisomers(mol: rdkit.Chem.rdchem.Mol, max_stereoisomers: int = 512) Iterator[rdkit.Chem.rdchem.Mol][source]

Generates stereoisomers from a specified SDF structure string.

Parameters
  • structure – structure from which to generate stereoisomers

  • max_stereoisomers – maximum number of stereoisomers to generate

Returns

generated stereoisomers

schrodinger.livedesign.bbchem_endpoints.rgroup_decompose(scaffold_mol: rdkit.Chem.rdchem.Mol, match_mol: rdkit.Chem.rdchem.Mol, stereospecific: bool = True) List[dict][source]

Returns R-groups of a scaffold given a list of match cores.

Parameters
  • scaffold_mol – scaffold molecule on which to find R-groups

  • match_mol – source molecules for R-group decomposition

  • stereospecific – whether to consider bond stereochemistry and atom chirality of scaffold

Returns

list of dicts of R-group matches

schrodinger.livedesign.bbchem_endpoints.get_rgroup_labels(scaffold_mol: rdkit.Chem.rdchem.Mol) List[str][source]
Parameters

scaffold_mol – scaffold molecule

Returns

R-group labels present on the scaffold

schrodinger.livedesign.bbchem_endpoints.setup_reaction(rxn_input: str) str[source]

Tidy up and convert user sketched reactions into a format that can be used for reaction enumeration.

Parameters

rxn_input – a SMARTS string describing the user’s reaction.

Returns

a SMARTS string describing the cleaned up reaction