diff --git a/iDEA/methods/hartree.py b/iDEA/methods/hartree.py index 5360e0a..62cdb21 100644 --- a/iDEA/methods/hartree.py +++ b/iDEA/methods/hartree.py @@ -14,6 +14,7 @@ kinetic_energy_operator = iDEA.methods.non_interacting.kinetic_energy_operator external_potential_operator = iDEA.methods.non_interacting.external_potential_operator +propagate_step = iDEA.methods.non_interacting.propagate_step def hartree_potential_operator(s: iDEA.system.System, n: np.ndarray) -> np.ndarray: diff --git a/iDEA/methods/hartree_fock.py b/iDEA/methods/hartree_fock.py index 108b148..648751e 100644 --- a/iDEA/methods/hartree_fock.py +++ b/iDEA/methods/hartree_fock.py @@ -16,6 +16,7 @@ kinetic_energy_operator = iDEA.methods.non_interacting.kinetic_energy_operator external_potential_operator = iDEA.methods.non_interacting.external_potential_operator hartree_potential_operator = iDEA.methods.hartree.hartree_potential_operator +propagate_step = iDEA.methods.non_interacting.propagate_step def exchange_potential_operator(s: iDEA.system.System, p: np.ndarray) -> np.ndarray: diff --git a/iDEA/methods/hybrid.py b/iDEA/methods/hybrid.py index 1fdbbd4..ff33a87 100644 --- a/iDEA/methods/hybrid.py +++ b/iDEA/methods/hybrid.py @@ -21,6 +21,7 @@ exchange_correlation_potential_operator = ( iDEA.methods.lda.exchange_correlation_potential_operator ) +propagate_step = iDEA.methods.non_interacting.propagate_step def hamiltonian( diff --git a/iDEA/methods/lda.py b/iDEA/methods/lda.py index 71e948a..6147b16 100644 --- a/iDEA/methods/lda.py +++ b/iDEA/methods/lda.py @@ -16,6 +16,7 @@ kinetic_energy_operator = iDEA.methods.non_interacting.kinetic_energy_operator external_potential_operator = iDEA.methods.non_interacting.external_potential_operator hartree_potential_operator = iDEA.methods.hartree.hartree_potential_operator +propagate_step = iDEA.methods.non_interacting.propagate_step class HEG: diff --git a/iDEA/methods/non_interacting.py b/iDEA/methods/non_interacting.py index 9da0429..629b3a3 100644 --- a/iDEA/methods/non_interacting.py +++ b/iDEA/methods/non_interacting.py @@ -465,13 +465,13 @@ def propagate( Propagate a set of orbitals forward in time due to a dynamic local pertubation. | Args: - | s: iDEA.system.System, System object. - | state: iDEA.state.SingleBodyState, State to be propigated. - | v_ptrb: np.ndarray, Local perturbing potential on the grid of t and x values, indexed as v_ptrb[time,space]. + | s: iDEA.system.System, System object. + | state: iDEA.state.SingleBodyState, State to be propigated. + | v_ptrb: np.ndarray, Local perturbing potential on the grid of t and x values, indexed as v_ptrb[time,space]. | t: np.ndarray, Grid of time values. \n - | hamiltonian_function: Callable, Hamiltonian function [If None this will be the non_interacting function]. (default = None) - | restricted: bool, Is the calculation restricted (r) on unrestricted (u). (default=False) - | name: str, Name of method. (default = "non_interacting") + | hamiltonian_function: Callable, Hamiltonian function [If None this will be the non_interacting function]. (default = None) + | restricted: bool, Is the calculation restricted (r) on unrestricted (u). (default=False) + | name: str, Name of method. (default = "non_interacting") | Returns: | evolution: iDEA.state.SingleBodyEvolution, Solved time-dependent evolution. diff --git a/iDEA/observables.py b/iDEA/observables.py index 9ef077b..6748b97 100644 --- a/iDEA/observables.py +++ b/iDEA/observables.py @@ -543,7 +543,9 @@ def exchange_energy( elif len(p.shape) == 3: E_x = np.zeros(shape=p.shape[0], dtype=complex) for j in range(E_x.shape[0]): - E_x[j] = 0.5 * np.tensordot(p[j, :, :].T, v_x[j, :, :], axes=2) * s.dx * s.dx + E_x[j] = ( + 0.5 * np.tensordot(p[j, :, :].T, v_x[j, :, :], axes=2) * s.dx * s.dx + ) return E_x.real else: diff --git a/iDEA/reverse_engineering.py b/iDEA/reverse_engineering.py index dee3362..c4473d4 100644 --- a/iDEA/reverse_engineering.py +++ b/iDEA/reverse_engineering.py @@ -219,7 +219,10 @@ def reverse_propagation( # Reverse propagation. for j, ti in enumerate( - tqdm(t, desc="iDEA.reverse_engineering.reverse_propagation: reversing propagation") + tqdm( + t, + desc="iDEA.reverse_engineering.reverse_propagation: reversing propagation", + ) ): if j != 0: diff --git a/iDEA/state.py b/iDEA/state.py index 5d22fb4..bdd6089 100644 --- a/iDEA/state.py +++ b/iDEA/state.py @@ -34,7 +34,7 @@ def __init__( r""" State of particles in a many-body state. - This is described by a spatial part + This is described by a spatial part .. math:: \psi(x_1,x_2,\dots,x_N) on the spatial grid, and a spin part on the spin grid