Skip to main content

class wandb.Molecule

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 Molecule.from_rdkit()

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 Molecule.from_smiles()

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.