> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-sdk-add-methods-properties.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Molecule methods

## <Badge color="yellow" size="lg" shape="rounded">Class</Badge> wandb.Molecule

## <Badge color="blue" size="lg" shape="rounded">method</Badge> Molecule.from\_rdkit()

Convert RDKit-supported file/object types to wandb.Molecule.

```python theme={null}
data_or_path: 'RDKitDataType',
caption: 'str | None' = None,
convert_to_3d_and_optimize: 'bool' = True,
mmff_optimize_molecule_max_iterations: 'int' = 200
```

##### Arguments

<ResponseField name="data_or_path" type="RDKitDataType">
  (string, rdkit.Chem.rdchem.Mol) Molecule can be initialized from a file name or an rdkit.Chem.rdchem.Mol object.
</ResponseField>

<ResponseField name="caption" type="str | None">
  (string) Caption associated with the molecule for display.
</ResponseField>

<ResponseField name="convert_to_3d_and_optimize" type="bool">
  (bool) Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is an expensive operation that may take a long time for complicated molecules.
</ResponseField>

## <Badge color="blue" size="lg" shape="rounded">method</Badge> Molecule.from\_smiles()

Convert SMILES string to wandb.Molecule.

```python theme={null}
data: 'str',
caption: 'str | None' = None,
sanitize: 'bool' = True,
convert_to_3d_and_optimize: 'bool' = True,
mmff_optimize_molecule_max_iterations: 'int' = 200
```

##### Arguments

<ResponseField name="data" type="str">
  SMILES string.
</ResponseField>

<ResponseField name="caption" type="str | None">
  Caption associated with the molecule for display.
</ResponseField>

<ResponseField name="sanitize" type="bool">
  Check if the molecule is chemically reasonable by the RDKit's definition.
</ResponseField>

<ResponseField name="convert_to_3d_and_optimize" type="bool">
  Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is a computationally intensive operation that may take a long time for complicated molecules.
</ResponseField>
