tooluniverse.tools.visualize_molecule_2d moduleΒΆ

visualize_molecule_2d

Visualize 2D molecular structures using RDKit. Supports SMILES, InChI, molecule names, and variou…

tooluniverse.tools.visualize_molecule_2d.visualize_molecule_2d(smiles, inchi, molecule_name, width=400, height=400, output_format='png', show_atom_numbers=False, show_bond_numbers=False, include_stereo=True, *, stream_callback=None, use_cache=False, validate=True)[source]ΒΆ

Visualize 2D molecular structures using RDKit. Supports SMILES, InChI, molecule names, and variou…

Parameters:
  • smiles (str) – SMILES string representation of the molecule

  • inchi (str) – InChI string representation of the molecule

  • molecule_name (str) – Common name of the molecule (will be resolved to SMILES via PubChem)

  • width (int) – Width of the visualization in pixels

  • height (int) – Height of the visualization in pixels

  • output_format (str) – Output format

  • show_atom_numbers (bool) – Whether to show atom numbers

  • show_bond_numbers (bool) – Whether to show bond numbers

  • include_stereo (bool) – Whether to include stereochemistry information

  • stream_callback (Callable, optional) – Callback for streaming output

  • use_cache (bool, default False) – Enable caching

  • validate (bool, default True) – Validate parameters

Return type:

dict[str, Any]