Skip to content

Commit 4a4c807

Browse files
show chi in optimization log messages, change info to warning in increse chi
1 parent f1c6057 commit 4a4c807

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

varipeps/ctmrg/routine.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,8 @@ def calc_ctmrg_env(
766766
working_unitcell = working_unitcell.change_chi(new_chi)
767767
initial_unitcell = initial_unitcell.change_chi(new_chi)
768768

769-
if logger.isEnabledFor(logging.INFO):
770-
logger.info(
769+
if logger.isEnabledFor(logging.WARNING):
770+
logger.warning(
771771
"Increasing chi to %d since smallest SVD Norm was %.3e.",
772772
new_chi,
773773
norm_smallest_S,
@@ -800,8 +800,8 @@ def calc_ctmrg_env(
800800
if not new_chi in already_tried_chi:
801801
working_unitcell = working_unitcell.change_chi(new_chi)
802802

803-
if logger.isEnabledFor(logging.INFO):
804-
logger.info(
803+
if logger.isEnabledFor(logging.WARNING):
804+
logger.warning(
805805
"Decreasing chi to %d since smallest SVD Norm was %.3e or routine did not converge.",
806806
new_chi,
807807
norm_smallest_S,
@@ -824,8 +824,8 @@ def calc_ctmrg_env(
824824
new_truncation_eps
825825
<= varipeps_config.ctmrg_increase_truncation_eps_max_value
826826
):
827-
if logger.isEnabledFor(logging.INFO):
828-
logger.info(
827+
if logger.isEnabledFor(logging.WARNING):
828+
logger.warning(
829829
"Increasing SVD truncation eps to %d.",
830830
new_truncation_eps,
831831
)

varipeps/optimization/optimizer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,14 +1024,15 @@ def random_noise(a):
10241024

10251025
step_str = f"{float(linesearch_step):0.3f}" if linesearch_step is not None else "None"
10261026
logger.info(
1027-
"📉 Step %d | Energy: %.8f Δ: %.2e | Retries: %d | Conv: %.3e | Line search step: %s | Max. trunc. err.: %.1e | Runtime: %.0f sec",
1027+
"📉 Step %d | Energy: %.8f Δ: %.2e | Retries: %d | Conv: %.3e | Line search step: %s | Max. trunc. err.: %.1e χ: %d | Runtime: %.0f sec",
10281028
int(count),
10291029
float(working_value),
10301030
-float(working_value - step_energies[random_noise_retries][-2]) if len(step_energies[random_noise_retries]) > 1 else 0.0,
10311031
int(random_noise_retries),
10321032
float(conv),
10331033
step_str,
10341034
float(max_trunc_error),
1035+
int(step_chi[random_noise_retries][-1]),
10351036
float(runtime),
10361037
)
10371038

0 commit comments

Comments
 (0)