Hi,

I am trying to understand how to calculate the energy for the infinite MPS.

In the idmrg.h file, you did

```
HL += -energy*IL;
```

for each sweep.

After finishing the all the sweep, the energy calculated from dmrgworker corresponds to the energy of the infinite MPS.

I wonder if the way you calculate the energy is equivalent to the recurrence formula in eq.35,36,37 of [arXiv:0804.2509][1] ? Also, does your method also apply to system with long-range interaction? In the presence of long-range interaction, the recurrence relation becomes more complicated ( [arXiv:1008.4667][2]). It is not obvious to me that the energy calculated in the idmrg.h is the same as these methods.

Thank you very much!

[1]: Infinite size density matrix renormalization group, revisited

[2]: Schur Forms of Matrix Product Operators in the Infinite Limit