@@ -725,21 +725,25 @@ def setUp(self):
725
725
filepath = os .path .join (test_dir , "COPL.BiSe" )
726
726
structure = os .path .join (test_dir , "CTRL.BiSe" )
727
727
self .cohp_lmto = CompleteCohp .from_file ("lmto" , filename = filepath , structure_file = structure )
728
- filepath = os .path .join (test_dir , "COHPCAR.lobster" )
728
+ filepath = os .path .join (test_dir , "COHPCAR.lobster.gz " )
729
729
structure = os .path .join (test_dir , "POSCAR" )
730
730
self .cohp_lobster = CompleteCohp .from_file ("lobster" , filename = filepath , structure_file = structure )
731
- filepath = os .path .join (test_dir , "COOPCAR.lobster.BiSe" )
731
+ # with open(os.path.join(test_dir, "complete_cohp_lobster.json"),'w') as f:
732
+ # json.dump(self.cohp_lobster.as_dict(),f)
733
+ filepath = os .path .join (test_dir , "COOPCAR.lobster.BiSe.gz" )
732
734
structure = os .path .join (test_dir , "POSCAR.BiSe" )
733
735
self .coop_lobster = CompleteCohp .from_file (
734
736
"lobster" , filename = filepath , structure_file = structure , are_coops = True
735
737
)
736
- filepath = os .path .join (test_dir , "COHPCAR.lobster.orbitalwise" )
738
+ filepath = os .path .join (test_dir , "COHPCAR.lobster.orbitalwise.gz " )
737
739
structure = os .path .join (test_dir , "POSCAR.orbitalwise" )
738
740
self .cohp_orb = CompleteCohp .from_file ("lobster" , filename = filepath , structure_file = structure )
739
- filepath = os .path .join (test_dir , "COHPCAR.lobster.notot.orbitalwise" )
741
+ # with open(os.path.join(test_dir, "complete_cohp_orbitalwise.json"),'w') as f:
742
+ # json.dump(self.cohp_orb.as_dict(),f)
743
+ filepath = os .path .join (test_dir , "COHPCAR.lobster.notot.orbitalwise.gz" )
740
744
self .cohp_notot = CompleteCohp .from_file ("lobster" , filename = filepath , structure_file = structure )
741
745
# Lobster 3.0
742
- filepath = os .path .join (test_dir , "COHPCAR.lobster.Na2UO4" )
746
+ filepath = os .path .join (test_dir , "COHPCAR.lobster.Na2UO4.gz " )
743
747
structure = os .path .join (test_dir , "POSCAR.Na2UO4" )
744
748
self .cohp_lobster_forb = CompleteCohp .from_file ("lobster" , filename = filepath , structure_file = structure )
745
749
@@ -750,12 +754,12 @@ def setUp(self):
750
754
"lobster" , filename = filepath , structure_file = structure
751
755
)
752
756
# COBI
753
- filepath = os .path .join (test_dir , "COBICAR.lobster" )
757
+ filepath = os .path .join (test_dir , "COBICAR.lobster.gz " )
754
758
structure = os .path .join (test_dir , "POSCAR.COBI" )
755
759
756
760
self .cobi = CompleteCohp .from_file ("lobster" , filename = filepath , structure_file = structure , are_cobis = True )
757
761
758
- def test_attiributes (self ):
762
+ def test_attributes (self ):
759
763
assert not self .cohp_lobster .are_coops
760
764
assert not self .cohp_lobster .are_cobis
761
765
assert not self .cohp_lobster_dict .are_coops
@@ -779,6 +783,9 @@ def test_attiributes(self):
779
783
assert self .cobi .are_cobis
780
784
assert not self .cobi .are_coops
781
785
786
+ assert self .cohp_lobster_forb .cohp [Spin .up ][0 ] == 0.00000
787
+ assert self .cohp_lobster_forb .icohp [Spin .up ][0 ] == - 0.09040
788
+
782
789
def test_dict (self ):
783
790
# The json files are dict representations of the COHPs from the LMTO
784
791
# and LOBSTER calculations and should thus be the same.
@@ -1092,11 +1099,11 @@ def test_orbital_resolved_cohp_summed_spin_channels(self):
1092
1099
1093
1100
class MethodTest (unittest .TestCase ):
1094
1101
def setUp (self ):
1095
- filepath = os .path .join (test_dir , "COHPCAR.lobster" )
1102
+ filepath = os .path .join (test_dir , "COHPCAR.lobster.gz " )
1096
1103
structure = os .path .join (test_dir , "POSCAR" )
1097
1104
self .cohp_lobster = CompleteCohp .from_file ("lobster" , filename = filepath , structure_file = structure )
1098
1105
1099
- filepath = os .path .join (test_dir , "COHPCAR.lobster.orbitalwise" )
1106
+ filepath = os .path .join (test_dir , "COHPCAR.lobster.orbitalwise.gz " )
1100
1107
structure = os .path .join (test_dir , "POSCAR.orbitalwise" )
1101
1108
self .cohp_orb = CompleteCohp .from_file ("lobster" , filename = filepath , structure_file = structure )
1102
1109
0 commit comments