@@ -1242,15 +1242,13 @@ def __init__(
1242
1242
self ,
1243
1243
structure : Structure ,
1244
1244
xc_functional : Literal ["R2SCAN" , "PBE" , "PBE+U" ] = "PBE" ,
1245
- user_potcar_functional = "PBE_54" ,
1246
1245
prev_incar = None ,
1247
1246
** kwargs : Any ,
1248
1247
):
1249
1248
"""
1250
1249
Args:
1251
1250
structure (Structure): Structure for static calculation.
1252
1251
xc_functional ('R2SCAN'|'PBE'): Exchange-correlation functional to use. Defaults to 'PBE'.
1253
- user_potcar_functional: Choice of VASP POTCAR functional and version. Defaults to 'PBE_54'.
1254
1252
prev_incar (Incar|str): Incar file from previous run. Default settings of MatPESStaticSet
1255
1253
are prioritized over inputs from previous runs.
1256
1254
**kwargs: Passed to DictSet.
@@ -1260,21 +1258,15 @@ def __init__(
1260
1258
if xc_functional .upper () == "R2SCAN" :
1261
1259
self ._config_dict ["INCAR" ]["METAGGA" ] = "R2SCAN"
1262
1260
self ._config_dict ["INCAR" ]["ALGO" ] = "ALL"
1263
- del self ._config_dict ["INCAR" ][ "GGA" ]
1261
+ self ._config_dict ["INCAR" ]. pop ( "GGA" , None )
1264
1262
elif xc_functional .upper () == "PBE+U" :
1265
1263
self ._config_dict ["INCAR" ]["LDAU" ] = True
1266
1264
elif xc_functional .upper () != "PBE" :
1267
- raise ValueError (
1268
- f"{ xc_functional } is not supported."
1269
- " The supported exchange-correlation functionals are PBE, PBE+U and R2SCAN."
1270
- )
1271
- if user_potcar_functional .upper () != "PBE_54" :
1265
+ raise ValueError (f"{ xc_functional } is not supported. Supported xc functionals are PBE, PBE+U and R2SCAN." )
1266
+ if kwargs .get ("user_potcar_functional" , "PBE_54" ) != "PBE_54" :
1272
1267
warnings .warn (
1273
- f"POTCAR version ( { user_potcar_functional } ) is inconsistent with the recommended PBE_54." , UserWarning
1268
+ f"POTCAR ( { kwargs [ ' user_potcar_functional' ] } ) is inconsistent with the recommended PBE_54." , UserWarning
1274
1269
)
1275
-
1276
- self .user_potcar_functional = user_potcar_functional .upper ()
1277
-
1278
1270
self .kwargs = kwargs
1279
1271
self .xc_functional = xc_functional
1280
1272
self .prev_incar = prev_incar or {}
0 commit comments