Coverage for gpaw/xc/gllb/contribution.py: 83%
29 statements
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-12 00:18 +0000
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-12 00:18 +0000
1class Contribution:
2 def __init__(self, weight):
3 self.weight = weight
5 def get_name(self):
6 raise NotImplementedError
8 def get_desc(self):
9 raise NotImplementedError
11 def initialize(self, density, hamiltonian, wfs):
12 self.density = density
13 self.gd = density.gd
14 self.finegd = density.finegd
15 self.nspins = wfs.nspins
16 self.wfs = wfs
18 def initialize_1d(self, ae):
19 self.ae = ae
21 def initialize_from_atomic_orbitals(self, basis_functions):
22 # Pass if contribution needs only density which is already initialized
23 pass
25 def calculate(self, e_g, n_sg, v_sg):
26 raise NotImplementedError
28 def calculate_energy_and_derivatives(self, setup, D_sp, H_sp):
29 raise NotImplementedError
31 def add_smooth_xc_potential_and_energy_1d(self, vt_g):
32 raise NotImplementedError
34 def get_extra_setup_data(self, extra_data):
35 pass
37 def write(self, writer):
38 pass
40 def read(self, reader):
41 pass