Example #1
0
class Density:
    def __init__(self, grid, setups, atoms):
        self.grid = grid
        self.rho = _gaussian_density(grid, atoms)
        self.mixer = Mixer(grid)
        self.mixer.mix(self.rho)
        
    def update(self, wfs):
        self.rho = wfs.calculate_density()
        self.mixer.mix(self.rho)

    def get_total_charge(self):
        return self.rho.sum() * self.grid.vol
Example #2
0
class Density:
    def __init__(self, grid, setups, atoms):
        self.grid = grid
        self.rho = _gaussian_density(grid, atoms)
        self.mixer = Mixer(grid)
        self.mixer.mix(self.rho)

    def update(self, wfs):
        self.rho = wfs.calculate_density()
        self.mixer.mix(self.rho)

    def get_total_charge(self):
        return self.rho.sum() * self.grid.vol
Example #3
0
 def __init__(self, grid, setups, atoms):
     self.grid = grid
     self.rho = _gaussian_density(grid, atoms)
     self.mixer = Mixer(grid)
     self.mixer.mix(self.rho)
Example #4
0
 def __init__(self, grid, setups, atoms):
     self.grid = grid
     self.rho = _gaussian_density(grid, atoms)
     self.mixer = Mixer(grid)
     self.mixer.mix(self.rho)