class_docstr: This layer initializes the neural network exchange correlation functional and
  the hybrid functional. It is then used to run the Kohn Sham iterations.
  
  Examples
  --------
  >>> import torch
  >>> from deepchem.feat.dft_data import DFTEntry
  >>> from deepchem.models.dft.dftxc import DFTXC
  >>> e_type = 'ie'
  >>> true_val= '0.53411947056'
  >>> systems = [{'moldesc': 'N 0 0 0',
  ...       'basis': '6-311++G(3df,3pd)',
  ...        'spin': '3'},
  ...       {'moldesc': 'N 0 0 0',
  ...       'basis': '6-311++G(3df,3pd)',
  ...       'charge': 1,
  ...        'spin': '2'}]
  >>> entry = DFTEntry.create(e_type, true_val, systems)
  >>> nnmodel = _construct_nn_model(input_size=2, hidden_size=10, n_layers=1,modeltype=1).to(torch.double)
  >>> model = DFTXC("lda_x", nnmodel)
  >>> output = model([entry])
  The 6-311++G(3df,3pd) basis for atomz 7 does not exist, but we will download it
  Downloaded to /usr/share/miniconda3/envs/deepchem/lib/python3.8/site-packages/dqc/api/.database/6-311ppg_3df_3pd_/07.gaussian94
class_docstr_tok: ["This","layer","initializes","the","neural","network","exchange","correlation","functional","and","the","hybrid","functional",".","It","is","then","used","to","run","the","Kohn","Sham","iterations",".","Examples","--","--","--","--",">",">",">","import","torch",">",">",">","from","deepchem.feat.dft_data","import","DFTEntry",">",">",">","from","deepchem.models.dft.dftxc","import","DFTXC",">",">",">","e_type","=","'ie'",">",">",">","true_val=","'","0.53411947056'",">",">",">","systems","=","[","{","'moldesc","'",":","'N","0","0","0","'",",","...","'basis","'",":","'","6-311++G","(","3df,3pd",")","'",",","...","'spin","'",":","'","3","'","}",",","...","{","'moldesc","'",":","'N","0","0","0","'",",","...","'basis","'",":","'","6-311++G","(","3df,3pd",")","'",",","...","'charge","'",":","1",",","...","'spin","'",":","'","2","'","}","]",">",">",">","entry","=","DFTEntry.create","(","e_type",",","true_val",",","systems",")",">",">",">","nnmodel","=","_construct_nn_model","(","input_size=2",",","hidden_size=10",",","n_layers=1",",","modeltype=1",")",".to","(","torch.double",")",">",">",">","model","=","DFTXC","(","``","lda_x","''",",","nnmodel",")",">",">",">","output","=","model","(","[","entry","]",")","The","6-311++G","(","3df,3pd",")","basis","for","atomz","7","does","not","exist",",","but","we","will","download","it","Downloaded","to","\/usr\/share\/miniconda3\/envs\/deepchem\/lib\/python3.8\/site-packages\/dqc\/api\/.database\/6-311ppg_3df_3pd_\/07.gaussian94"]
docstr: Parameters
  ----------
  inputs: list
      list of entry objects that have been defined using DFTEntry
  
  Returns
  -------
  output: list of torch.Tensor
      Calculated value of the data point after running the Kohn Sham iterations
      using the neural network XC functional.
docstr_tok: ["Parameters","--","--","--","--","--","inputs",":","list","list","of","entry","objects","that","have","been","defined","using","DFTEntry","Returns","--","--","--","-","output",":","list","of","torch.Tensor","Calculated","value","of","the","data","point","after","running","the","Kohn","Sham","iterations","using","the","neural","network","XC","functional","."]
code: def forward(self, inputs):
      """
      Parameters
      ----------
      inputs: list
          list of entry objects that have been defined using DFTEntry
  
      Returns
      -------
      output: list of torch.Tensor
          Calculated value of the data point after running the Kohn Sham iterations
          using the neural network XC functional.
      """
      hybridxc = HybridXC(self.xcstr, self.nnmodel, aweight0=0.0)
      output = []
      for entry in inputs:
          evl = XCNNSCF(hybridxc, entry)
          qcs = []
          for system in entry.get_systems():
              qcs.append(evl.run(system))
          if entry.entry_type == "dm":
              output.append((torch.as_tensor(entry.get_val(qcs)[0])))
          else:
              output.append(
                  torch.tensor(entry.get_val(qcs), requires_grad=True)
              )
      return output
  
file_path: deepchem/deepchem/models/dft/dftxc.py
imports: from deepchem.models.dft.scf import XCNNSCF
  import torch
  from deepchem.models.dft.nnxc import HybridXC
  from deepchem.models.losses import Loss, L2Loss
  from deepchem.models.torch_models.torch_model import TorchModel
  from typing import Tuple, Optional, List, Any
  import numpy
label_desc: Use image node_id 2 for calling the DFTXC obj's underlying member method code with example usage: obj.forward(inputs) and returns: output