This bug was caught in #72, and has been around for some 16 years at the very least. Essentially the expectation value of any operator $$\hat{O}(\mathbf{R})$$ needs to include the contribution from the dead trajectories that are carried in the Bundle class:
$$\begin{align} \langle \Psi_\text{FMS} | \hat{O}(\mathbf{R}) | \Psi_\text{FMS}\rangle &= \sum_{I,J=1}^{N_S} \sum_{k=1}^{N^I_\text{TBF}(t)} \sum_{l=1}^{N^J_\text{TBF}(t)} O^{IJ}_{kl} \\
&= \sum_{I,J=1}^{N_S} \sum_{k=1}^{N^I_A(t)} \sum_{l=1}^{N^J_A(t)} O^{IJ}_{kl} + \sum_{I,J=1}^{N_S} \sum_{k=N^I_A(t)+1}^{N^I_A(t)+N^I_D(t)} \sum_{l=N^J_A(t)+1}^{N^J_A(t)+N^J_D(t)} O^{IJ}_{kl} + \Delta E
\end{align}$$
where $$N^I_A(t)$$ and $$N^I_A(t)$$ are the number of alive and dead TBFs, respectively, on state $$I$$. $$\Delta E$$ I think can be assumed to be very small, if the TBFs drift away from each other (which is quite likely for molecules in their full dimensionality). However, the second term in the above equation is not calculated at all in the code. Whether this is a grave error, is hard to say a priori, but still I would like to open this issue to bring awareness to this potential bug.
This bug was caught in #72, and has been around for some 16 years at the very least. Essentially the expectation value of any operator$$\hat{O}(\mathbf{R})$$ needs to include the contribution from the dead trajectories that are carried in the Bundle class:
where$$N^I_A(t)$$ and $$N^I_A(t)$$ are the number of alive and dead TBFs, respectively, on state $$I$$ . $$\Delta E$$ I think can be assumed to be very small, if the TBFs drift away from each other (which is quite likely for molecules in their full dimensionality). However, the second term in the above equation is not calculated at all in the code. Whether this is a grave error, is hard to say a priori, but still I would like to open this issue to bring awareness to this potential bug.