A simple but important bug fix was made for step3. The TDDFT coefficient matrix was not considered for the (t+\delta t) in the matrix multiplication.
old:
for i in range(len(St_sds_cmatrix)):
sd2ci = SD2CI[i]
St_ci = np.linalg.multi_dot([sd2ci.T, St_sds[i].todense().real, sd2ci])
new:
for i in range(len(St_sds_cmatrix)-1):
sd2ci_prev = SD2CI[i]
sd2ci_curr = SD2CI[i+1]
St_ci = np.linalg.multi_dot([sd2ci_prev.T, St_sds[i].todense().real, sd2ci_curr])
Made code compatible with new changes in libra_py/packages/cp2k/methods.py
Some working ML scripting for K-means but not perfectly polished
new: