- `"Directional Message Passing for Molecular Graphs" <https://arxiv.org/abs/2003.03123>`_
Statistics:
- Number of graphs: 130,831
...
...
@@ -60,9 +60,9 @@ class QM9Dataset(DGLDataset):
Parameters
----------
label_keys: list
label_keys: list
Names of the regression property, which should be a subset of the keys in the table above.
cutoff: float
cutoff: float
Cutoff distance for interatomic interactions, i.e. two atoms are connected in the corresponding graph if the distance between them is no larger than this.
Default: 5.0 Angstrom
raw_dir : str
...
...
@@ -70,8 +70,12 @@ class QM9Dataset(DGLDataset):
Default: ~/.dgl/
force_reload : bool
Whether to reload the dataset. Default: False
verbose: bool
verbose: bool
Whether to print out progress information. Default: True.
transform : callable, optional
A transform that takes in a :class:`~dgl.DGLGraph` object and returns
a transformed version. The :class:`~dgl.DGLGraph` object will be
transformed before every access.
Attributes
----------
...
...
@@ -82,7 +86,7 @@ class QM9Dataset(DGLDataset):
------
UserWarning
If the raw data is changed in the remote server by the author.
Examples
--------
>>> data = QM9Dataset(label_keys=['mu', 'gap'], cutoff=5.0)
...
...
@@ -102,8 +106,9 @@ class QM9Dataset(DGLDataset):
cutoff=5.0,
raw_dir=None,
force_reload=False,
verbose=False):
verbose=False,
transform=None):
self.cutoff=cutoff
self.label_keys=label_keys
self._url=_get_dgl_url('dataset/qm9_eV.npz')
...
...
@@ -112,7 +117,8 @@ class QM9Dataset(DGLDataset):
url=self._url,
raw_dir=raw_dir,
force_reload=force_reload,
verbose=verbose)
verbose=verbose,
transform=transform)
defprocess(self):
npz_path=f'{self.raw_dir}/qm9_eV.npz'
...
...
@@ -148,7 +154,7 @@ class QM9Dataset(DGLDataset):
----------
idx : int
Item index
Returns
-------
dgl.DGLGraph
...
...
@@ -170,8 +176,12 @@ class QM9Dataset(DGLDataset):
@@ -14,34 +14,34 @@ class QM9EdgeDataset(DGLDataset):
This dataset consists of 130,831 molecules with 19 regression targets.
Nodes correspond to atoms and edges correspond to bonds.
This dataset differs from :class:`~dgl.data.QM9Dataset` in the following aspects:
1. It includes the bonds in a molecule in the edges of the corresponding graph while the edges in :class:`~dgl.data.QM9Dataset` are purely distance-based.
2. It provides edge features, and node features in addition to the atoms' coordinates and atomic numbers.
3. It provides another 7 regression tasks(from 12 to 19).
This class is built based on a preprocessed version of the dataset, and we provide the preprocessing datails `here <https://gist.github.com/hengruizhang98/a2da30213b2356fff18b25385c9d3cd2>`_.
Reference:
- `"MoleculeNet: A Benchmark for Molecular Machine Learning" <https://arxiv.org/abs/1703.00564>`_
- `"Neural Message Passing for Quantum Chemistry" <https://arxiv.org/abs/1704.01212>`_