@@ -1152,7 +1152,7 @@ def get_structures(self, *args, **kwargs) -> list[Structure]:
1152
1152
1153
1153
def parse_structures (
1154
1154
self ,
1155
- primitive : bool = False ,
1155
+ primitive : bool | None = None ,
1156
1156
symmetrized : bool = False ,
1157
1157
check_occu : bool = True ,
1158
1158
on_error : Literal ["ignore" , "warn" , "raise" ] = "warn" ,
@@ -1183,12 +1183,14 @@ def parse_structures(
1183
1183
"""
1184
1184
if os .getenv ("CI" ) and datetime .now () > datetime (2024 , 3 , 1 ): # March 2024 seems long enough # pragma: no cover
1185
1185
raise RuntimeError ("remove the change of default primitive=True to False made on 2023-10-24" )
1186
- warnings .warn (
1187
- "The default value of primitive was changed from True to False in "
1188
- "https://github.com/materialsproject/pymatgen/pull/3419. CifParser now returns the cell "
1189
- "in the CIF file as is. If you want the primitive cell, please set primitive=True explicitly." ,
1190
- UserWarning ,
1191
- )
1186
+ if primitive is None :
1187
+ primitive = False
1188
+ warnings .warn (
1189
+ "The default value of primitive was changed from True to False in "
1190
+ "https://github.com/materialsproject/pymatgen/pull/3419. CifParser now returns the cell "
1191
+ "in the CIF file as is. If you want the primitive cell, please set primitive=True explicitly." ,
1192
+ UserWarning ,
1193
+ )
1192
1194
if not check_occu : # added in https://github.com/materialsproject/pymatgen/pull/2836
1193
1195
warnings .warn ("Structures with unphysical site occupancies are not compatible with many pymatgen features." )
1194
1196
if primitive and symmetrized :
0 commit comments