class_docstr: A `Pytorch Geometric <https://pytorch-geometric.readthedocs.io/en/latest/index.html>`_ data interface for datasets used in molecule generation.
  
  .. note::
      When creating data loaders of this dataset class, only dig.ggraph3D.dataset.collate_fn can be used as the collate function.
  
  Args:
      root (string, optional): Root directory where the dataset should be saved. (default: :obj:`./`)
      subset_idxs (list, optional): if it is not None, only the data located 
          at the indexs in subset_idxs of the dataset will be sampled.
          (default: :obj:`None`)
      transform (callable, optional): A function/transform that takes in an
          :obj:`torch_geometric.data.Data` object and returns a transformed
          version. The data object will be transformed before every access.
          (default: :obj:`None`)
      pre_transform (callable, optional): A function/transform that takes in
          an :obj:`torch_geometric.data.Data` object and returns a
          transformed version. The data object will be transformed before
          being saved to disk. (default: :obj:`None`)
      pre_filter (callable, optional): A function that takes in an
          :obj:`torch_geometric.data.Data` object and returns a boolean
          value, indicating whether the data object should be included in the
          final dataset. (default: :obj:`None`)
docstr: Processes the dataset from raw data file to the :obj:`self.processed_dir` folder.
docstr_tok: ["Processes","the","dataset","from","raw","data","file","to","the",":","obj",":","`","self.processed_dir","`","folder","."]
code: def process(self):
      r"""
      Processes the dataset from raw data file to the :obj:`self.processed_dir` folder.
      """
      mols = Chem.SDMolSupplier(
          self.raw_paths[0], removeHs=False, sanitize=False
      )
      self.atom_type_list, self.position_list, self.con_mat_list = (
          [],
          [],
          [],
      )
  
      for idx in range(len(mols)):
          mol = mols[idx]
          num_atoms = mol.GetNumAtoms()
          position = mols.GetItemText(idx).split("\n")[
              4 : 4 + num_atoms
          ]
          position = np.array(
              [
                  [float(x) for x in line.split()[:3]]
                  for line in position
              ],
              dtype=np.float32,
          )
          atom_type = np.array(
              [
                  atomic_num_to_type[atom.GetAtomicNum()]
                  for atom in mol.GetAtoms()
              ]
          )
  
          con_mat = np.zeros([num_atoms, num_atoms], dtype=int)
          for bond in mol.GetBonds():
              start, end = bond.GetBeginAtomIdx(), bond.GetEndAtomIdx()
              bond_type = bond_to_type[bond.GetBondType()]
              con_mat[start, end] = bond_type
              con_mat[end, start] = bond_type
  
          if atom_type[0] != 1:
              carbon_idxs = np.nonzero(atom_type == 1)
              perm = np.arange(len(atom_type))
              if len(carbon_idxs[0]) > 0:
                  first_carbon = carbon_idxs[0][0]
                  perm[0] = first_carbon
                  perm[first_carbon] = 0
              atom_type, position = atom_type[perm], position[perm]
              con_mat = con_mat[perm][:, perm]
  
          self.atom_type_list.append(torch.tensor(atom_type))
          self.position_list.append(torch.tensor(position))
          self.con_mat_list.append(torch.tensor(con_mat))
  
      torch.save(
          (self.atom_type_list, self.position_list, self.con_mat_list),
          self.processed_paths[0],
      )
  
imports: import os
  import os.path
  import numpy
  import torch
  import networkx
  from networkx.algorithms import tree
  from math import pi
  from rdkit import Chem
  from rdkit.Chem.rdchem import BondType
  from torch_geometric.data import Data, InMemoryDataset, download_url, extract_tar
label_desc: Use image node_id 7 for calling the QM93DGEN obj's underlying member method code with example usage: obj.process() without return types