gt4sd.training_pipelines.torchdrug.dataset module¶
Summary¶
Classes:
A generic TorchDrug dataset class that can be fed with custom data |
Reference¶
- class TorchDrugDataset(file_path, target_fields, smiles_field='smiles', verbose=1, lazy=False, transform=None, node_feature='default', edge_feature='default', graph_feature=None, with_hydrogen=False, kekulize=False)[source]¶
Bases:
MoleculeDatasetA generic TorchDrug dataset class that can be fed with custom data
- __init__(file_path, target_fields, smiles_field='smiles', verbose=1, lazy=False, transform=None, node_feature='default', edge_feature='default', graph_feature=None, with_hydrogen=False, kekulize=False)[source]¶
Constructor of TorchDrugDataset.
- Parameters
file_path (
str) – The path to the .csv file containing the data.target_fields (
str) – The columns containing the property to be optimized.smiles_field (
str) – The column name containing the SMILES. Defaults to ‘smiles’.verbose (
int) – output verbose level. Defaults to 1.lazy (
Optional[bool,None]) – If yes, molecules are processed in the dataloader. This is faster for setup, but slower at training time. Defaults to False.transform (
Optional[Callable,None]) – Optional data transformation function. Defaults to None.node_feature (
Union[str,List[str],None]) – Node features to extract. Defaults to ‘default’.edge_feature (
Union[str,List[str],None]) – Edge features to extract. Defaults to ‘default’.graph_feature (
Union[str,List[str],None]) – Graph features to extract. Defaults to None.with_hydrogen (
Optional[bool,None]) – Whether hydrogens are stored in molecular graph. Defaults to False.kekulize (
Optional[bool,None]) – Whether aromatic bonds are converted to single/double bonds. Defaults to False.
- __annotations__ = {}¶
- __doc__ = 'A generic TorchDrug dataset class that can be fed with custom data'¶
- __module__ = 'gt4sd.training_pipelines.torchdrug.dataset'¶
- __parameters__ = ()¶
- config_dict()¶
- classmethod load_config_dict(config)¶