@@ -1689,7 +1689,7 @@ class PotcarSingle:
1689
1689
)
1690
1690
1691
1691
# used for POTCAR validation
1692
- potcar_summary_stats = loadfn (f"{ module_dir } /potcar_summary_stats.json.gz " )
1692
+ potcar_summary_stats = loadfn (f"{ module_dir } /potcar_summary_stats.json.bz2 " )
1693
1693
1694
1694
def __init__ (self , data : str , symbol : str | None = None ) -> None :
1695
1695
"""
@@ -2369,22 +2369,26 @@ def __repr__(self) -> str:
2369
2369
def _gen_potcar_summary_stats (
2370
2370
append : bool = False ,
2371
2371
vasp_psp_dir : str | None = None ,
2372
- summary_stats_filename : str = f"{ module_dir } /potcar_summary_stats.json.gz " ,
2372
+ summary_stats_filename : str = f"{ module_dir } /potcar_summary_stats.json.bz2 " ,
2373
2373
):
2374
2374
"""
2375
2375
This function solely intended to be used for PMG development to regenerate the
2376
- potcar_summary_stats.json.gz file used to validate POTCARs
2376
+ potcar_summary_stats.json.bz2 file used to validate POTCARs
2377
2377
2378
- THIS FUNCTION IS DESTRUCTIVE. It will completely overwrite your potcar_summary_stats.json.gz .
2378
+ THIS FUNCTION IS DESTRUCTIVE. It will completely overwrite your potcar_summary_stats.json.bz2 .
2379
2379
2380
2380
Args:
2381
- append (bool): Change whether data is appended to the existing potcar_summary_stats.json.gz ,
2381
+ append (bool): Change whether data is appended to the existing potcar_summary_stats.json.bz2 ,
2382
2382
or if a completely new file is generated. Defaults to False.
2383
2383
PMG_VASP_PSP_DIR (str): Change where this function searches for POTCARs
2384
2384
defaults to the PMG_VASP_PSP_DIR environment variable if not set. Defaults to None.
2385
2385
summary_stats_filename (str): Name of the output summary stats file. Defaults to
2386
- '<pymatgen_install_dir>/io/vasp/potcar_summary_stats.json.gz '.
2386
+ '<pymatgen_install_dir>/io/vasp/potcar_summary_stats.json.bz2 '.
2387
2387
"""
2388
+
2389
+ if not os .path .isfile (summary_stats_filename ):
2390
+ dumpfn ({func : {} for func in PotcarSingle .functional_dir }, summary_stats_filename )
2391
+
2388
2392
func_dir_exist : dict [str , str ] = {}
2389
2393
vasp_psp_dir = vasp_psp_dir or SETTINGS .get ("PMG_VASP_PSP_DIR" )
2390
2394
for func in PotcarSingle .functional_dir :
@@ -2420,6 +2424,7 @@ def _gen_potcar_summary_stats(
2420
2424
"LEXCH" : psp .LEXCH ,
2421
2425
"VRHFIN" : psp .VRHFIN .replace (" " , "" ),
2422
2426
"symbol" : psp .symbol ,
2427
+ "ZVAL" : psp .ZVAL ,
2423
2428
** psp ._summary_stats ,
2424
2429
}
2425
2430
)
0 commit comments