schrodinger.livedesign.bbchem_endpoints module¶
Collection of functions intended as bbchem web endpoints.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.livedesign.bbchem_endpoints.RegistrationDescriptors(average_molecular_weight, exact_molecular_weight, total_charge, molecular_formula)[source]¶
Bases:
tuple
- average_molecular_weight: float¶
Alias for field number 0
- exact_molecular_weight: float¶
Alias for field number 1
- total_charge: int¶
Alias for field number 2
- molecular_formula: str¶
Alias for field number 3
- __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.
- class schrodinger.livedesign.bbchem_endpoints.RegistrationData(sdf, requested_hash, no_stereo_hash, display_smiles, descriptors, 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
- descriptors: schrodinger.livedesign.bbchem_endpoints.RegistrationDescriptors¶
Alias for field number 4
- has_attachment_point: bool¶
Alias for field number 5
- __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, data_field_names: Optional[Iterable] = None, escape: Optional[str] = None) 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
- class schrodinger.livedesign.bbchem_endpoints.FingerprintUse(value)[source]¶
Bases:
enum.Enum
An enumeration.
- SUBSTRUCTURE_SEARCH = 1¶
- SIMILARITY_SCORE = 2¶
- schrodinger.livedesign.bbchem_endpoints.generate_fingerprint(mol: rdkit.Chem.rdchem.Mol, use: schrodinger.livedesign.bbchem_endpoints.FingerprintUse, substructure_options: Optional[schrodinger.livedesign.substructure.QueryOptions] = None) rdkit.DataStructs.cDataStructs.ExplicitBitVect [source]¶
Generates a substructure or similarity fingerprint for a given mol.
- Parameters
mol – RDKit mol to generate fingerprint of
fingerprint_type – type of fingerprint to generate
substructure_options – substructure matching 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_reaction_image(rxn: rdkit.Chem.rdChemReactions.ChemicalReaction, draw_options: Optional[schrodinger.livedesign.draw.ImageGenOptions] = None) Union[str, bytes] [source]¶
Generates an image of a reaction used in LiveDesign
- Parameters
rxn – reaction to generate an image of
draw_options – image generation options
- Returns
generated image as a string
- schrodinger.livedesign.bbchem_endpoints.generate_sar_analysis_image(match_mol: rdkit.Chem.rdchem.Mol, scaffold_mol: rdkit.Chem.rdchem.Mol, substructure_options: Optional[schrodinger.livedesign.substructure.QueryOptions] = None, draw_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
match_mol – source molecule for R-group decomposition to highlight and generate image of
scaffold_mol – scaffold molecule on which to find R-groups
substructure_options – substructure matching options
draw_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.split_fragments(mol: rdkit.Chem.rdchem.Mol)[source]¶
- Param
input molecule
- Returns
iterable containing each fragment mol
- 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.has_substructure_match(match_mol: rdkit.Chem.rdchem.Mol, query_mol: rdkit.Chem.rdchem.Mol, options: Optional[schrodinger.livedesign.substructure.QueryOptions] = None) bool [source]¶
- Parameters
match_mol – molecule to find substructure matches in
query_mol – substructure molecule on which to find matches
options – substructure query options
- Returns
whether a substructure match was 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, options: Optional[schrodinger.livedesign.substructure.QueryOptions] = None) List[dict] [source]¶
Decomposes a molecule into its core and R-groups given a scaffold
- Parameters
scaffold_mol – scaffold molecule on which to find R-groups
match_mol – source molecule 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