示例#1
0
文件: hartree.py 项目: yidapa/lfdft
class Hartree:
    def __init__(self, grid, atoms):
        self.grid = grid
        self.psolver = Psolver(grid)
        self.rho_bg, self.v_bg = calculate_background(grid, atoms)

    def update(self, density):
        b = -4*np.pi * (density.rho - self.rho_bg)
        self.v = e2*self.psolver.solve(b)
        self.e = -0.5*(density.rho * (self.v + self.v_bg)).sum()*self.grid.vol
示例#2
0
class Hartree:
    def __init__(self, grid, atoms):
        self.grid = grid
        self.psolver = Psolver(grid)
        self.rho_bg, self.v_bg = calculate_background(grid, atoms)

    def update(self, density):
        b = -4 * np.pi * (density.rho - self.rho_bg)
        self.v = e2 * self.psolver.solve(b)
        self.e = -0.5 * (density.rho *
                         (self.v + self.v_bg)).sum() * self.grid.vol
示例#3
0
 def __init__(self, grid, atoms):
     self.grid = grid
     self.psolver = Psolver(grid)
     self.rho_bg, self.v_bg = calculate_background(grid, atoms)
示例#4
0
文件: hartree.py 项目: yidapa/lfdft
 def __init__(self, grid, atoms):
     self.grid = grid
     self.psolver = Psolver(grid)
     self.rho_bg, self.v_bg = calculate_background(grid, atoms)