@@ -677,15 +677,12 @@ def _read_eigenvalues(self):
677
677
if spin_unrestricted :
678
678
header_pattern = r"Final Beta MO Eigenvalues"
679
679
footer_pattern = r"Final Alpha MO Coefficients+\s*"
680
- beta_eigenvalues = read_matrix_pattern (
680
+ self . data [ " beta_eigenvalues" ] = read_matrix_pattern (
681
681
header_pattern , footer_pattern , elements_pattern , self .text , postprocess = float
682
682
)
683
683
684
684
self .data ["alpha_eigenvalues" ] = alpha_eigenvalues
685
685
686
- if spin_unrestricted :
687
- self .data ["beta_eigenvalues" ] = beta_eigenvalues
688
-
689
686
def _read_fock_matrix (self ):
690
687
"""Parses the Fock matrix. The matrix is read in whole
691
688
from the output file and then transformed into the right dimensions.
@@ -705,13 +702,6 @@ def _read_fock_matrix(self):
705
702
alpha_fock_matrix = read_matrix_pattern (
706
703
header_pattern , footer_pattern , elements_pattern , self .text , postprocess = float
707
704
)
708
- # The beta Fock matrix is only present if this is a spin-unrestricted calculation.
709
- if spin_unrestricted :
710
- header_pattern = r"Final Beta Fock Matrix"
711
- footer_pattern = "SCF time:"
712
- beta_fock_matrix = read_matrix_pattern (
713
- header_pattern , footer_pattern , elements_pattern , self .text , postprocess = float
714
- )
715
705
716
706
# Convert the matrices to the right dimension. Right now they are simply
717
707
# one massive list of numbers, but we need to split them into a matrix. The
@@ -720,7 +710,14 @@ def _read_fock_matrix(self):
720
710
alpha_fock_matrix = process_parsed_fock_matrix (alpha_fock_matrix )
721
711
self .data ["alpha_fock_matrix" ] = alpha_fock_matrix
722
712
713
+ # The beta Fock matrix is only present if this is a spin-unrestricted calculation.
723
714
if spin_unrestricted :
715
+ header_pattern = r"Final Beta Fock Matrix"
716
+ footer_pattern = "SCF time:"
717
+ beta_fock_matrix = read_matrix_pattern (
718
+ header_pattern , footer_pattern , elements_pattern , self .text , postprocess = float
719
+ )
720
+
724
721
# Perform the same transformation for the beta Fock matrix.
725
722
beta_fock_matrix = process_parsed_fock_matrix (beta_fock_matrix )
726
723
self .data ["beta_fock_matrix" ] = beta_fock_matrix
@@ -744,12 +741,6 @@ def _read_coefficient_matrix(self):
744
741
alpha_coeff_matrix = read_matrix_pattern (
745
742
header_pattern , footer_pattern , elements_pattern , self .text , postprocess = float
746
743
)
747
- if spin_unrestricted :
748
- header_pattern = r"Final Beta MO Coefficients"
749
- footer_pattern = "Final Alpha Density Matrix"
750
- beta_coeff_matrix = read_matrix_pattern (
751
- header_pattern , footer_pattern , elements_pattern , self .text , postprocess = float
752
- )
753
744
754
745
# Convert the matrices to the right dimension. Right now they are simply
755
746
# one massive list of numbers, but we need to split them into a matrix. The
@@ -759,6 +750,12 @@ def _read_coefficient_matrix(self):
759
750
self .data ["alpha_coeff_matrix" ] = alpha_coeff_matrix
760
751
761
752
if spin_unrestricted :
753
+ header_pattern = r"Final Beta MO Coefficients"
754
+ footer_pattern = "Final Alpha Density Matrix"
755
+ beta_coeff_matrix = read_matrix_pattern (
756
+ header_pattern , footer_pattern , elements_pattern , self .text , postprocess = float
757
+ )
758
+
762
759
# Perform the same transformation for the beta Fock matrix.
763
760
beta_coeff_matrix = process_parsed_fock_matrix (beta_coeff_matrix )
764
761
self .data ["beta_coeff_matrix" ] = beta_coeff_matrix
0 commit comments