@@ -649,31 +649,28 @@ def test_valid_magmom_struct(self):
649
649
vis .incar .items ()
650
650
651
651
def test_write_input_and_from_directory (self ):
652
- structure = Structure .from_spacegroup ("Fm-3m" ,Lattice .cubic (4. ), ["Fe" ],[[0. , 0. , 0. ]])
652
+ structure = Structure .from_spacegroup ("Fm-3m" , Lattice .cubic (4.0 ), ["Fe" ], [[0.0 , 0.0 , 0.0 ]])
653
653
654
654
vis = self .set (structure = structure )
655
655
input_set = vis .get_input_set ()
656
656
657
657
vis .write_input (output_dir = "." )
658
- assert all (
659
- os .path .isfile (file ) for file in ("INCAR" ,"KPOINTS" ,"POSCAR" ,"POTCAR" )
660
- )
658
+ assert all (os .path .isfile (file ) for file in ("INCAR" , "KPOINTS" , "POSCAR" , "POTCAR" ))
661
659
input_set_from_dir = self .set ().from_directory ("." )
662
660
663
- assert all (
664
- input_set_from_dir [k ] == input_set [k ] for k in ("INCAR" ,"KPOINTS" ,"POTCAR" )
665
- )
661
+ assert all (input_set_from_dir [k ] == input_set [k ] for k in ("INCAR" , "KPOINTS" , "POTCAR" ))
666
662
# for some reason the POSCARs are not identical, but their structures and as_dict()'s are
667
663
assert input_set_from_dir ["POSCAR" ].structure == input_set ["POSCAR" ].structure
668
664
assert input_set_from_dir ["POSCAR" ].as_dict () == input_set ["POSCAR" ].as_dict ()
669
665
670
666
def test_get_nedos (self ):
671
- vrun = Vasprun (f"{ VASP_OUT_DIR } /vasprun.pbesol.xml.gz" )
667
+ vrun = Vasprun (f"{ VASP_OUT_DIR } /vasprun.pbesol.xml.gz" )
672
668
vis = self .set (structure = vrun .structures [- 1 ])
673
669
# no `prev_vasprun` --> default value of NEDOS
674
670
assert vis ._get_nedos (0.1 ) == 2000
675
671
vis .prev_vasprun = vrun
676
- assert vis ._get_nedos (0.1 ) == pytest .approx (741 ,abs = 1 )
672
+ assert vis ._get_nedos (0.1 ) == pytest .approx (741 , abs = 1 )
673
+
677
674
678
675
class TestMPStaticSet (PymatgenTest ):
679
676
def setUp (self ):
0 commit comments