Kohnsham

class CADMium.Kohnsham(grid, Za, Zb, pol, Nmo, N, optKS={})[source]

Bases: object

Handles a standard Kohn-Sham calculation

Methods Summary

calc_chempot()

Calculates the chemical potential as the maximum of the homo per orbital

calc_density([ITERATIVE, dif])

Calculates density using each of the orbitals solvers.

calc_hxc_potential()

Calculates the HXC potential using the current density

calc_nuclear_potential()

Calculate nuclear potential using the common Coulomb function.

energy()

Computes each of the energy components using Kohn-Sham definition and the selected density functional approximation.

scf([ks_scf_options])

set_effective_potential()

Sets new effective potential.

Methods Documentation

calc_chempot()[source]

Calculates the chemical potential as the maximum of the homo per orbital

Parameters

None

Returns

Sets chemical potential in self.u

Return type

None

calc_density(ITERATIVE=False, dif=0.0)[source]

Calculates density using each of the orbitals solvers. Each of the orbital solvers is solved in parallel using Python’s std multiprocessing module.

Parameters

Iterative (bool. Optional. Default=False.) – Switches to iterative way of diagonalizing each orbitals.

Returns

nout – Numpy array with resulting electronic density.

Return type

np.ndarray

calc_hxc_potential()[source]

Calculates the HXC potential using the current density

Parameters

None

Returns

Sets the Hartee and Exchange-Correlation energy and potential in the E and V data classes.

Return type

None

calc_nuclear_potential()[source]

Calculate nuclear potential using the common Coulomb function. Sets the nuclear potential in the object’s attribute self.vnuc

energy()[source]

Computes each of the energy components using Kohn-Sham definition and the selected density functional approximation.

Parameters

None

Returns

Sets each of the energy components in the data class E. Which is an attribute of the object.

Return type

None

scf(ks_scf_options={})[source]
set_effective_potential()[source]

Sets new effective potential. Distributes the current effective potential (vnuc + vhxc) To each orbital’s sovler.