schrodinger.livedesign.bbchem_endpoints module¶
Collection of functions intended as bbchem web endpoints.
Copyright Schrodinger, LLC. All rights reserved.
- schrodinger.livedesign.bbchem_endpoints.to_registration_data(data: str, input_format: schrodinger.rdkit_extensions.Format, options: Optional[schrodinger.livedesign.registration.RegistrationOptions] = None) Iterator[Union[schrodinger.livedesign.registration.RegistrationData, ValueError]]¶
Generalizes small molecule and biologics registration processes, returning rdmol binaries instead of a textual format or ValueError exception. Output includes descriptors, splitting off properties to include in those descriptors.
- schrodinger.livedesign.bbchem_endpoints.to_format(mol_input: str, input_format: schrodinger.rdkit_extensions.Format, output_format: schrodinger.rdkit_extensions.Format, additional_properties: Optional[Dict] = None) str¶
Main entrypoint for converting to a serialized text format.
- Parameters
mol_input – serialized mol
input_format – input format of the mol string
output_format – desired format for output string
additional_properties – property data to include on serialization
- Returns
converted text string
- schrodinger.livedesign.bbchem_endpoints.to_image(mol_input: str, options: Optional[schrodinger.livedesign.draw.ImageGenOptions] = None) bytes¶
Generates an image from a serialized input string
- Parameters
mol_input – serialized mol
options – image generation options
- Returns
generated image SVG or PNG bytes
- schrodinger.livedesign.bbchem_endpoints.to_fingerprint(mol_input: str, use: schrodinger.livedesign.search.FingerprintUse, substructure_options: Optional[schrodinger.rdkit.substructure.QueryOptions] = None) rdkit.DataStructs.cDataStructs.ExplicitBitVect¶
Generates a substructure or similarity fingerprint for a given mol.
- Parameters
mol_input – serialized mol
use – type of fingerprint to generate
substructure_options – substructure matching options
- schrodinger.livedesign.bbchem_endpoints.num_substructure_matches(*args, **kwargs) int¶
- Returns
number of substructure/subsequence matches
- schrodinger.livedesign.bbchem_endpoints.has_substructure_match(*args, **kwargs) bool¶
- Returns
whether any substructure/subsequence match was found
- schrodinger.livedesign.bbchem_endpoints.generate_image(mol: rdkit.Chem.rdchem.Mol, alignment_mol: Optional[rdkit.Chem.rdchem.Mol] = None, substructure_options: Optional[schrodinger.rdkit.substructure.QueryOptions] = None, highlight_mol: Optional[rdkit.Chem.rdchem.Mol] = None, draw_options: Optional[schrodinger.livedesign.draw.ImageGenOptions] = None) bytes¶
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(match_mol: rdkit.Chem.rdchem.Mol, scaffold_mol: rdkit.Chem.rdchem.Mol, substructure_options: Optional[schrodinger.rdkit.substructure.QueryOptions] = None, draw_options: Optional[schrodinger.livedesign.draw.ImageGenOptions] = None) bytes¶
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¶
- 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)¶
- 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)¶
- Param
input molecule
- Returns
iterable containing each fragment mol
- schrodinger.livedesign.bbchem_endpoints.enumerate_stereoisomers(mol: rdkit.Chem.rdchem.Mol, max_stereoisomers: int = 512) Iterator[rdkit.Chem.rdchem.Mol]¶
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.rdkit.substructure.QueryOptions] = None) List[dict]¶
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]¶
- Parameters
scaffold_mol – scaffold molecule
- Returns
R-group labels present on the scaffold
- schrodinger.livedesign.bbchem_endpoints.setup_reaction(rxn_input: str) str¶
Tidy up and convert user sketched reactions into a format that can be used for reaction enumeration.
- Parameters
rxn_input – a RXNBlock or RXNSMARTS describing the user’s reaction.
- Returns
a SMARTS string describing the cleaned up reaction
- schrodinger.livedesign.bbchem_endpoints.run_reaction(rxn_input: str, reactant_lists: List[List[str]]) Generator[List[str], None, None]¶
Execute a reaction on one or more sets of reagents
Basically, each “reaction” can have one or more than reagents, and could be run on one or more sets of reagents.
- schrodinger.livedesign.bbchem_endpoints.get_PLDB_SMARTS(smiles: str) Tuple[str, List]¶
Generates SMARTS from the given mol with a unique atom map number on each atom, which PLDB uses to indicate canonical atom indices. Also collects which of those indices are marked with the SKETCHER_SELECTED_PROP to return a list of the indices of all sketcher-selected atoms.
- Parameters
mol – input SMILES
- Returns
(PLDB compatible SMARTS pattern, list of selected atom indices)