schrodinger.livedesign.draw module¶
-
class
schrodinger.livedesign.draw.
Format
(value)[source]¶ Bases:
enum.Enum
An enumeration.
-
PNG
= 1¶
-
SVG
= 2¶
-
-
class
schrodinger.livedesign.draw.
ImageGenOptions
(img_format: schrodinger.livedesign.draw.Format = <Format.SVG: 2>, background_color: str = '#ff', width: int = 400, height: int = 400, show_r_s_label: bool = True, aligned_core_mol: Optional[rdkit.Chem.rdchem.Mol] = None, highlight_core_mol: Optional[rdkit.Chem.rdchem.Mol] = None)[source]¶ Bases:
tuple
- Parameters
img_format – image format to be returned
background_color – background color
width – width of the image
height – height of the image
show_r_s_label – whether to label chiral centers
aligned_core_mol – molecule to align to prior to image generation
highlight_core_mol – substructure to highlight in the generated image
-
img_format
: schrodinger.livedesign.draw.Format¶ Alias for field number 0
-
background_color
: str¶ Alias for field number 1
-
width
: int¶ Alias for field number 2
-
height
: int¶ Alias for field number 3
-
show_r_s_label
: bool¶ Alias for field number 4
-
aligned_core_mol
: Optional[rdkit.Chem.rdchem.Mol]¶ Alias for field number 5
-
highlight_core_mol
: Optional[rdkit.Chem.rdchem.Mol]¶ 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.draw.
generate_image
(mol: rdkit.Chem.rdchem.Mol, options: Optional[schrodinger.livedesign.draw.ImageGenOptions] = None) → Union[str, bytes][source]¶ Generates an image from an RDKit molecule
- Parameters
mol – molecule to get image of
options – image generation options
- Returns
generated image as a string for SVG format or as bytes for PNG format