class_docstr: Interface to DQC's KS calculation.
  
  Parameters
  ----------
  qc: BaseQCCalc
      object often acts as a wrapper around an engine class (from dqc.qccalc) that contains information about the self-consistent iterations.
  
  References
  ----------
  Kasim, Muhammad F., and Sam M. Vinko. "Learning the exchange-correlation functional from nature with fully differentiable density functional theory." Physical Review Letters 127.12 (2021): 126403.
  https://github.com/diffqc/dqc/blob/master/dqc/qccalc/ks.py
class_docstr_tok: ["Interface","to","DQC","'s","KS","calculation",".","Parameters","--","--","--","--","--","qc",":","BaseQCCalc","object","often","acts","as","a","wrapper","around","an","engine","class","(","from","dqc.qccalc",")","that","contains","information","about","the","self-consistent","iterations",".","References","--","--","--","--","--","Kasim",",","Muhammad","F.",",","and","Sam","M.","Vinko",".","``","Learning","the","exchange-correlation","functional","from","nature","with","fully","differentiable","density","functional","theory",".","''","Physical","Review","Letters","127.12","(","2021",")",":","126403.","https",":","\/\/github.com\/diffqc\/dqc\/blob\/master\/dqc\/qccalc\/ks.py"]
docstr: Both interacting and non-interacting system's total energy can be expressed in terms of the density matrix. The ground state properties of a system can be calculated by minimizing the energy w.r.t the density matrix.
  
  Returns
  -------
  The total density matrix in atomic orbital bases.
docstr_tok: ["Both","interacting","and","non-interacting","system","'s","total","energy","can","be","expressed","in","terms","of","the","density","matrix",".","The","ground","state","properties","of","a","system","can","be","calculated","by","minimizing","the","energy","w.r.t","the","density","matrix",".","Returns","--","--","--","-","The","total","density","matrix","in","atomic","orbital","bases","."]
code: def aodmtot(self) -> torch.Tensor:
      """
      Both interacting and non-interacting system's total energy can be expressed in terms of the density matrix. The ground state properties of a system can be calculated by minimizing the energy w.r.t the density matrix.
  
      Returns
      -------
      The total density matrix in atomic orbital bases.
      """
      dm = self.qc.aodm()
      if isinstance(dm, SpinParam):
          dmtot = dm.u + dm.d
      else:
          dmtot = dm
      return dmtot
  
imports: import hashlib
  import xitorch
  from dataclasses import dataclass
  from abc import abstractmethod, abstractproperty
  from typing import Union, List, TypeVar, Generic, Callable
label_desc: Use image node_id 3 for calling the KSCalc obj's underlying member method code with example usage: obj.aodmtot() and returns: dmtot