class_docstr: GraphTopology for DAG models
    
docstr: Converts the current batch of mol_graphs into tensorflow feed_dict.
  
  Assigns the graph information in array of ConvMol objects to the
  placeholders tensors for DAG models
  
  params
  ------
  batch : np.ndarray
    Array of ConvMol objects
  
  returns
  -------
  feed_dict : dict
    Can be merged with other feed_dicts for input into tensorflow
docstr_tok: ["Converts","the","current","batch","of","mol_graphs","into","tensorflow","feed_dict",".","Assigns","the","graph","information","in","array","of","ConvMol","objects","to","the","placeholders","tensors","for","DAG","models","params","--","--","--","batch",":","np.ndarray","Array","of","ConvMol","objects","returns","--","--","--","-","feed_dict",":","dict","Can","be","merged","with","other","feed_dicts","for","input","into","tensorflow"]
code: def batch_to_feed_dict(self, batch):
      """Converts the current batch of mol_graphs into tensorflow feed_dict.
  
      Assigns the graph information in array of ConvMol objects to the
      placeholders tensors for DAG models
  
      params
      ------
      batch : np.ndarray
        Array of ConvMol objects
  
      returns
      -------
      feed_dict : dict
        Can be merged with other feed_dicts for input into tensorflow
      """
  
      atoms_per_mol = [mol.get_num_atoms() for mol in batch]
      n_atoms = sum(atoms_per_mol)
      start_index = [0] + list(np.cumsum(atoms_per_mol)[:-1])
  
      atoms_all = []
      # calculation orders for a batch of molecules
      parents_all = []
      calculation_orders = []
      calculation_masks = []
      membership = []
      for idm, mol in enumerate(batch):
          # padding atom features vector of each molecule with 0
          atoms_all.append(mol.get_atom_features())
          parents = mol.parents
          parents_all.extend(parents)
          calculation_index = np.array(parents)[:, :, 0]
          mask = np.array(
              calculation_index - self.max_atoms, dtype=bool
          )
          calculation_orders.append(
              calculation_index + start_index[idm]
          )
          calculation_masks.append(mask)
          membership.extend([idm] * atoms_per_mol[idm])
  
      atoms_all = np.concatenate(atoms_all, axis=0)
      parents_all = np.stack(parents_all, axis=0)
      calculation_orders = np.concatenate(calculation_orders, axis=0)
      calculation_masks = np.concatenate(calculation_masks, axis=0)
      membership = np.array(membership)
  
      atoms_dict = {
          self.atom_features_placeholder: atoms_all,
          self.parents_placeholder: parents_all,
          self.calculation_orders_placeholder: calculation_orders,
          self.calculation_masks_placeholder: calculation_masks,
          self.membership_placeholder: membership,
          self.n_atoms_placeholder: n_atoms,
      }
  
      return atoms_dict
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import unicode_literals
  import warnings
  import numpy
  import tensorflow
  from deepchem.nn.copy import Input
  from deepchem.feat.mol_graphs import ConvMol
label_desc: Use image node_id 4 for calling the DAGGraphTopology obj's underlying member method code with example usage: obj.batch_to_feed_dict(batch) and returns: atoms_dict