mirror of
https://github.com/vale981/hopsflow
synced 2025-03-04 16:31:38 -05:00
fix thermal interaction energy
This commit is contained in:
parent
37f384a0ff
commit
af3e744c82
1 changed files with 2 additions and 2 deletions
|
@ -370,7 +370,7 @@ def heat_flow_ensemble(
|
|||
def _interaction_energy_ensemble_body(
|
||||
ψs: Union[Tuple[np.ndarray, np.ndarray], Tuple[np.ndarray, np.ndarray, int]],
|
||||
params: SystemParams,
|
||||
thermal: ThermalParams,
|
||||
thermal: Optional[ThermalParams],
|
||||
) -> np.ndarray:
|
||||
ψ_0, ψ_1 = ψs[0:2]
|
||||
|
||||
|
@ -381,7 +381,7 @@ def _interaction_energy_ensemble_body(
|
|||
run = HOPSRun(ψ_0, ψ_1, params)
|
||||
energy = interaction_energy_coupling(run, params)
|
||||
|
||||
if isinstance(ys, int):
|
||||
if thermal and (ys is not None):
|
||||
therm_run = ThermalRunParams(thermal, ys)
|
||||
energy += interaction_energy_therm(run, therm_run)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue