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: Gets the train-valid set split indices of the dataset for different tasks.
  
  Args:
      task: The name of the task that the dataset will be used in, including 'rand_gen' for random molecular geometry generation, 
          'gap_opt' for discovering molecular geometries with low HOMO-LUMO gaps, and 'alpha_opt' for discovering molecular geometries 
          with high isotropic polarizabilities.
  :rtype: A dictionary for training-validation split with key :obj:`train` and :obj:`valid`.
docstr_tok: ["Gets","the","train-valid","set","split","indices","of","the","dataset","for","different","tasks",".","Args",":","task",":","The","name","of","the","task","that","the","dataset","will","be","used","in",",","including","'rand_gen","'","for","random","molecular","geometry","generation",",","'gap_opt","'","for","discovering","molecular","geometries","with","low","HOMO-LUMO","gaps",",","and","'alpha_opt","'","for","discovering","molecular","geometries","with","high","isotropic","polarizabilities",".",":","rtype",":","A","dictionary","for","training-validation","split","with","key",":","obj",":","`","train","`","and",":","obj",":","`","valid","`","."]
code: def get_idx_split(self, task):
      r"""Gets the train-valid set split indices of the dataset for different tasks.
  
      Args:
          task: The name of the task that the dataset will be used in, including 'rand_gen' for random molecular geometry generation,
              'gap_opt' for discovering molecular geometries with low HOMO-LUMO gaps, and 'alpha_opt' for discovering molecular geometries
              with high isotropic polarizabilities.
      :rtype: A dictionary for training-validation split with key :obj:`train` and :obj:`valid`.
      """
      assert task in ["rand_gen", "gap_opt", "alpha_opt"]
      if task == "rand_gen":
          split_idxs = np.load(osp.join(self.raw_dir, "split.npz"))
      elif task == "gap_opt":
          split_idxs = np.load(osp.join(self.raw_dir, "gap.npz"))
      elif task == "alpha_opt":
          split_idxs = np.load(osp.join(self.raw_dir, "alpha.npz"))
      else:
          print(
              "Not supported task! The task must be rand_gen, gap_opt, or alpha_opt!"
          )
          exit()
      split_dict = {
          "train": split_idxs["train_idx"].tolist(),
          "valid": split_idxs["val_idx"].tolist(),
      }
      return split_dict
  
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 9 for calling the QM93DGEN obj's underlying member method code with example usage: obj.get_idx_split(task) and returns: split_dict