17.1.1.5. pysisyphus.diabatization package
17.1.1.5.1. Submodules
17.1.1.5.2. pysisyphus.diabatization.chimerabatch module
17.1.1.5.3. pysisyphus.diabatization.coulomb module
- pysisyphus.diabatization.coulomb.edmiston_ruedenberg_diabatization(adia_ens, R_tensor, **kwargs)
Property-based diabatization using the Coulomb tensor and Jacobi sweeps.
Similar to Edmiston-Ruedenberg-localization, but w/ electronic states.
- Parameters:
adia_ens (
ndarray) -- 1d array of shape (nstates, ) containing adiabatic excitation energies in atomic units/Hartree.R_tensor (
ndarray) -- 4d array of shape (nstates, nstates, nstates, nstates). Coulomb tensor in the basis of the adiabatic electronic states.
- Returns:
Result of diabatization containing various quantities, e.g., the adiabatic- diabatic-transformation matrix.
- Return type:
dia_result
- pysisyphus.diabatization.coulomb.edmiston_ruedenberg_diabatization_df(adia_ens, df_tensor, overlap_matrix=None, nruns=25, max_cycles=10000)[source]
Property-based diabatization using the Coulomb tensor and density fitting.
Similar to Edmiston-Ruedenberg-localization, but w/ electronic states.
TODO: factor out the call to edmiston_ruedenberg() and put it in a separate function.
- Parameters:
adia_ens (
ndarray) -- 1d array of shape (nstates, ) containing adiabatic excitation energies in atomic units/Hartree.df_tensor (
ndarray) -- 3d array of shape (naux, nstates, nstates). Coulomb tensor in the basis of the adiabatic electronic states.overlap_matrix (
Optional[ndarray], default:None) -- Optional 2d array of shape (nstates, nstates). If not given, orthogonal electronic states are assumed, which should be the case in typical TDDFT calculations.nruns (
int, default:25) -- Number of initial conditions that are tested/number of macro cycles.max_cycles (
int, default:10000) -- Positive intger, specifying the maximum number of micro cycles in a macro cycle.
- Returns:
Result of diabatization containing various quantities, e.g., the adiabatic- diabatic-transformation matrix.
- Return type:
dia_result
- pysisyphus.diabatization.coulomb.edmiston_ruedenberg_diabatization_jacobi(adia_ens, R_tensor, **kwargs)[source]
Property-based diabatization using the Coulomb tensor and Jacobi sweeps.
Similar to Edmiston-Ruedenberg-localization, but w/ electronic states.
- Parameters:
adia_ens (
ndarray) -- 1d array of shape (nstates, ) containing adiabatic excitation energies in atomic units/Hartree.R_tensor (
ndarray) -- 4d array of shape (nstates, nstates, nstates, nstates). Coulomb tensor in the basis of the adiabatic electronic states.
- Returns:
Result of diabatization containing various quantities, e.g., the adiabatic- diabatic-transformation matrix.
- Return type:
dia_result
17.1.1.5.4. pysisyphus.diabatization.coulomb_eta module
- pysisyphus.diabatization.coulomb_eta.edmiston_ruedenberg_eta_diabatization(adia_ens, R_tensor, pekar, temperature)[source]
- Return type:
17.1.1.5.5. pysisyphus.diabatization.driver module
17.1.1.5.6. pysisyphus.diabatization.driver_yaml module
17.1.1.5.7. pysisyphus.diabatization.helpers module
17.1.1.5.8. pysisyphus.diabatization.multipole module
- pysisyphus.diabatization.multipole.dq_diabatization(adia_ens, dip_moms, quad_moms=None, epots=None, **kwargs)[source]
Property-based diabatization using multipole moments.
Similar to Foster-Boys-localization, but w/ electronic states.
- Parameters:
adia_ens (
ndarray) -- 1d array of shape (nstates, ) containing adiabatic excitation energies in atomic units/Hartree.dip_moms (
ndarray) -- 3d array of shape (3, nstates, nstates) containing (transition) dipole moments (x, y, z).quad_moms (
Optional[ndarray], default:None) -- Optional 3d array of shape (3, nstates, nstates) containing the diagonal of the (transition) quadrupole moment tensor (xx, yy, zz)epots (
Optional[ndarray], default:None) -- Optional 3d array of shape (3, nstates, nstates) containing electronic part of electrostatic potential.
- Returns:
Result of diabatization containing various quantities, e.g., the adiabatic- diabatic-transformation matrix.
- Return type:
dia_result
- pysisyphus.diabatization.multipole.dq_jacobi_sweeps(dip_moms, quad_moms=None, epots=None, alpha=10.0, beta=1.0, random=False)[source]
Rotation matrix from DQ-diabatization as outlined in [1], [2] and [3].
When no quadrupole moments are given, the DQ-diabatization reduces to a simple Boys-diabatization, as outlined by Subotnik et al in [3]. In this case we just zeros for the quadrupole moments. As the overall size of the matrices is small, the additional FLOPs dont hurt and the code can be kept simpler.
We only use the trace of the quadrupole moment matrix. There are three dipole moment components, but only one trace of the quadrupole moment matrix.
TODO: In principle this function can easily be extended to support an arbitrary number of properties, each with its own scaling factor. When this is implemented, we could drop the separate Boys-localiatzion function in wavefunction.localization.
- Parameters:
dip_moms (
ndarray) -- Dipole moment matrix of the adiabatic states. Shape (3, nstates, nstates).quad_moms (
Optional[ndarray], default:None) -- Optional matrix containing the trace of the primitive quadrupole moments. Shape (1, nstates, nstates). Optional.epots (
Optional[ndarray], default:None) -- Electronic part of the electrostatic potential.alpha (
Optional[float], default:10.0) -- Scaling factor for quadrupole moment contribution.beta (
Optional[float], default:1.0) -- Scaling factor for electrostatic potential contribution.random (
bool, default:False) -- Boolean that controls if we start from the original adiabatic states (rotation matrix U is the identity matrix) or if we start from randomly mixed states. In high symmetry systems it may be beneficial to start from a random state.
- Returns:
Diabatization result.
- Return type:
17.1.1.5.9. pysisyphus.diabatization.plot module
- pysisyphus.diabatization.plot.map_array_to_interval(arr, min_new, max_new, thresh=1e-12)[source]
Map array from interval [array.min(), array.max()] to [min_new, max_new].
17.1.1.5. Parameter
- arr
1d array containing floating point numbers.
- min_new
Lower bound of the new interval.
- max_new
Upper bound of the new interval.
- thresh
When 'max_new - min_new' falls between this threshold an exception is raised.
- returns:
1d array w/ original shapped mapped onto the new interval.
- rtype:
mapped
- pysisyphus.diabatization.plot.state_graph_from_en_mat(en_mat, state_inds, thresh_eV=0.0)[source]
Graph representation of energy matrix with state couplings as edges.
- Parameters:
en_mat (
ndarray) -- Quadratic energy matrix containing electronic energies in eV.state_inds (
Sequence[int]) -- Sequence of positive integers containing state labels.thresh_eV (
float, default:0.0) -- Positive floating point number that can be used to filter the couplings. If a coupling is below 'thresh_eV', no edge is created. Defaults to 0.0 eV, so by default all couplings are included.
- Returns:
networkx.Graph representation of the energy matrix with states as nodes and couplings as edges. The node have an 'energy' attribute, containing the state energy in eV and the edges have an "weight" attribute, containing the electronic coupling in eV.
- Return type:
G
17.1.1.5.10. pysisyphus.diabatization.results module
- class pysisyphus.diabatization.results.DiabatizationResult(kind, U, adia_ens, is_converged, cur_cycle, P, dip_mom_tensor=None, quad_mom_tensor=None, epots=None, R_tensor=None, L_tensor=None)[source]
Bases:
object-
L_tensor:
Optional[ndarray] = None
-
P:
float
-
R_tensor:
Optional[ndarray] = None
-
U:
ndarray
-
adia_ens:
ndarray
- property couplings
-
cur_cycle:
int
-
dip_mom_tensor:
Optional[ndarray] = None
-
epots:
Optional[ndarray] = None
-
is_converged:
bool
-
kind:
str
- property nstates
-
quad_mom_tensor:
Optional[ndarray] = None
-
L_tensor:
- pysisyphus.diabatization.results.dia_result_from_jac_result(kind, adia_ens, jac_res, sort=True, **property_tensors)[source]
DiabatizationResult construction wrapper.
17.1.1.5. Parameter
- kind
String label containing the name of the diabatization algorithm, e.g., 'er' or 'boys'.
- adia_ens
1d array of shape (nstates, ) holding the electronic energies of the adiabatic states.
- jac_res
JacobiSweepResult from the diabatiatzion function.
- sort
Boolean flag that indicates whether the diabatic states will be sorted by their energies. If true, the columns of U will be reorderd.
- property_tensors
Various property tensors of varying shape containing e.g., the Coulomb tensor or multipole moments.
- returns:
DiabatizationResult.
- rtype:
dia_result