@@ -128,15 +128,15 @@ def test_sets_changed(self):
128
128
assert hashes [input_set ] == known_hashes [input_set ], f"{ input_set = } \n { msg } "
129
129
130
130
131
- class TestDictSet (PymatgenTest ):
131
+ class TestVaspInputSet (PymatgenTest ):
132
132
@classmethod
133
133
def setUpClass (cls ):
134
134
filepath = f"{ VASP_IN_DIR } /POSCAR"
135
135
cls .structure = Structure .from_file (filepath )
136
136
137
137
def test_as_dict (self ):
138
138
# https://github.com/materialsproject/pymatgen/pull/3031
139
- dict_set = DictSet (self .structure , config_dict = {"INCAR" : {}}, user_potcar_functional = "PBE_54" )
139
+ dict_set = VaspInputSet (self .structure , config_dict = {"INCAR" : {}}, user_potcar_functional = "PBE_54" )
140
140
assert {* dict_set .as_dict ()} >= {
141
141
"@class" ,
142
142
"@module" ,
@@ -1580,7 +1580,7 @@ def test_potcar(self):
1580
1580
assert input_set .potcar .functional == "PBE_52"
1581
1581
1582
1582
with pytest .raises (
1583
- ValueError , match = r"Invalid self. user_potcar_functional='PBE', must be one of \('PBE_52', 'PBE_54'\)"
1583
+ ValueError , match = r"Invalid user_potcar_functional='PBE', must be one of \('PBE_52', 'PBE_54'\)"
1584
1584
):
1585
1585
MVLScanRelaxSet (self .struct , user_potcar_functional = "PBE" )
1586
1586
@@ -1597,7 +1597,7 @@ def test_potcar(self):
1597
1597
#
1598
1598
# # https://github.com/materialsproject/pymatgen/pull/3022
1599
1599
# # same test also in MITMPRelaxSetTest above (for redundancy,
1600
- # # should apply to all classes inheriting from DictSet )
1600
+ # # should apply to all classes inheriting from VaspInputSet )
1601
1601
# for user_potcar_settings in [{"Fe": "Fe_pv"}, {"W": "W_pv"}, None]:
1602
1602
# for species in [("W", "W"), ("Fe", "W"), ("Fe", "Fe")]:
1603
1603
# struct = Structure(lattice=Lattice.cubic(3), species=species, coords=[[0, 0, 0], [0.5, 0.5, 0.5]])
@@ -1710,7 +1710,7 @@ def test_potcar(self):
1710
1710
assert input_set .potcar .functional == "PBE_54"
1711
1711
1712
1712
with pytest .raises (
1713
- ValueError , match = r"Invalid self. user_potcar_functional='PBE', must be one of \('PBE_52', 'PBE_54'\)"
1713
+ ValueError , match = r"Invalid user_potcar_functional='PBE', must be one of \('PBE_52', 'PBE_54'\)"
1714
1714
):
1715
1715
MPScanRelaxSet (self .struct , user_potcar_functional = "PBE" )
1716
1716
@@ -1880,7 +1880,7 @@ def test_potcar(self):
1880
1880
assert test_potcar_set_1 .potcar .functional == "PBE_52"
1881
1881
1882
1882
with pytest .raises (
1883
- ValueError , match = r"Invalid self. user_potcar_functional='PBE', must be one of \('PBE_52', 'PBE_54'\)"
1883
+ ValueError , match = r"Invalid user_potcar_functional='PBE', must be one of \('PBE_52', 'PBE_54'\)"
1884
1884
):
1885
1885
self .set (self .struct , user_potcar_functional = "PBE" )
1886
1886
@@ -2094,3 +2094,11 @@ def test_as_from_dict(self):
2094
2094
2095
2095
def test_vasp_input_set_alias ():
2096
2096
assert VaspInputSet is VaspInputGenerator
2097
+
2098
+
2099
+ def test_dict_set_alias ():
2100
+ assert isinstance (DictSet (), VaspInputSet )
2101
+ with pytest .warns (
2102
+ FutureWarning , match = "DictSet is deprecated, and will be removed on 2025-12-31\n ; use VaspInputSet"
2103
+ ):
2104
+ DictSet ()
0 commit comments