Commit 7fd82208 authored by Simoes Brambila, Danilo (brambila)'s avatar Simoes Brambila, Danilo (brambila)
Browse files

fixed the counting of eigenvalues in case of unrestricted calcs

parent 9589bcb3
......@@ -218,14 +218,18 @@ class OrcaContext(object):
self.CalculationGIndex = gIndex
def onClose_section_eigenvalues(self, backend, gIndex, value):
number_of_eigenvalues = value["x_orca_orbital_nb"][-1] + 1
occupations = np.array(value["x_orca_orbital_occupation_nb"])
eigenvalues = np.array(value["x_orca_orbital_energy"])
number_of_eigenvalues = len(eigenvalues)
backend.addValue("number_of_eigenvalues", number_of_eigenvalues)
backend.addValue("number_of_eigenvalues_kpoints", 1)
occupations = np.array(value["x_orca_orbital_occupation_nb"])
eigenvalues = np.array(value["x_orca_orbital_energy"])
backend.addArrayValues("eigenvalues_occupation", occupations.reshape([1, 1, number_of_eigenvalues]))
eigenvalues = np.array(value["x_orca_orbital_energy"])
backend.addArrayValues("eigenvalues_values", eigenvalues.reshape([1, 1, number_of_eigenvalues]))
def onClose_section_excited_states(self, backend, gIndex, value):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment