Skip to main content

class Molecule

data_or_path: 'str | pathlib.Path | TextIO',
caption: 'str | None' = None, **kwargs: 'str'

Description

W&B class for 3D Molecular data.

Args

  • data_or_path: Molecule can be initialized from a file name or an io object.
  • caption: Caption associated with the molecule for display.
  • kwargs:

Methods

method from_rdkit

data_or_path: 'RDKitDataType',
caption: 'str | None' = None,
convert_to_3d_and_optimize: 'bool' = True,
mmff_optimize_molecule_max_iterations: 'int' = 200
Convert RDKit-supported file/object types to wandb.Molecule.
Arguments
  • data_or_path: (string, rdkit.Chem.rdchem.Mol) Molecule can be initialized from a file name or an rdkit.Chem.rdchem.Mol object.
  • caption: (string) Caption associated with the molecule for display.
  • convert_to_3d_and_optimize: (bool) Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is an expensive operation that may take a long time for complicated molecules.

method from_smiles

data: 'str',
caption: 'str | None' = None,
sanitize: 'bool' = True,
convert_to_3d_and_optimize: 'bool' = True,
mmff_optimize_molecule_max_iterations: 'int' = 200
Convert SMILES string to wandb.Molecule.
Arguments
  • data: SMILES string.
  • caption: Caption associated with the molecule for display.
  • sanitize: Check if the molecule is chemically reasonable by the RDKit’s definition.
  • convert_to_3d_and_optimize: Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is a computationally intensive operation that may take a long time for complicated molecules.