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: The ground state density n(r) of a system.
  
  Parameters
  ----------
  rgrid: torch.Tensor
      Calculate integration grid using dqc.grid.
  
  Returns
  -------
  The total density profile in the given grid
  
  Reference
  ---------
  https://github.com/diffqc/dqc/blob/master/dqc/grid/base_grid.py
docstr_tok: ["The","ground","state","density","n","(","r",")","of","a","system",".","Parameters","--","--","--","--","--","rgrid",":","torch.Tensor","Calculate","integration","grid","using","dqc.grid",".","Returns","--","--","--","-","The","total","density","profile","in","the","given","grid","Reference","--","--","--","--","-","https",":","\/\/github.com\/diffqc\/dqc\/blob\/master\/dqc\/grid\/base_grid.py"]
code: def dens(self, rgrid: torch.Tensor) -> torch.Tensor:
      """
      The ground state density n(r) of a system.
  
      Parameters
      ----------
      rgrid: torch.Tensor
          Calculate integration grid using dqc.grid.
  
      Returns
      -------
      The total density profile in the given grid
  
      Reference
      ---------
      https://github.com/diffqc/dqc/blob/master/dqc/grid/base_grid.py
      """
      dmtot = self.aodmtot()
      return (
          self.qc.get_system().get_hamiltonian().aodm2dens(dmtot, rgrid)
      )
  
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 4 for calling the KSCalc obj's underlying member method code with example usage: obj.dens(rgrid) and returns: self