graphchem.data.MoleculeDataset
Bases: torch_geometric.data.Dataset
Source code in graphchem/data/structs.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
__init__(graphs)
MoleculeDataset object, extends torch_geometric.data.Dataset object; a torch_geometric-iterable dataset comprised of MoleculeGraph objects
Parameters:
Name | Type | Description | Default |
---|---|---|---|
graphs |
List[MoleculeGraph]
|
list of molecule graphs |
required |
Source code in graphchem/data/structs.py
40 41 42 43 44 45 46 47 48 49 50 |
|
get(idx)
torch_geometric.data.Dataset.get definition (required)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idx |
int
|
index of item |
required |
Returns:
Name | Type | Description |
---|---|---|
MoleculeGraph |
MoleculeGraph
|
indexed item |
Source code in graphchem/data/structs.py
61 62 63 64 65 66 67 68 69 70 71 |
|
len()
torch_geometric.data.Dataset.len definition (required)
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
number of molecule graphs |
Source code in graphchem/data/structs.py
52 53 54 55 56 57 58 59 |
|