POTCAR setup : You do not have the right POTCAR with functional PBE_54 and label Mo in your VASP_PSP_DIR

I noticed that pymatgen code for generating POTCAR files has changed recently and the pseudopotential directories I set up a couple of years ago are no longer working. I tried following the installation instructions on the pymatgen home page for creating the pymatgen compatible pseudopotential directory, but still have the same problem. I outline the procedure I used below in the hope that someone can identify what I can do to fix the problems.

I have placed the pseudopotential files from the VASP web site. The files from the various tarballs were placed in directories as shown in the containing directory “pseudos”

drwxr-xr-x 271 8192 Nov 21 13:46 POT_GGA_PAW_PBE
drwxr-xr-x 305 8192 Nov 21 10:58 POT_GGA_PAW_PBE_52
drwxr-xr-x 328 8192 Nov 21 10:58 POT_GGA_PAW_PBE_54
drwxr-xr-x 171 4096 Nov 21 11:04 POT_GGA_PAW_PW91
drwxr-xr-x 99 4096 Nov 21 11:06 POT_GGA_US_PW91
drwxr-xr-x 319 8192 Nov 21 13:40 POT_LDA_PAW
drwxr-xr-x 276 8192 Nov 21 10:58 POT_LDA_PAW_52
drwxr-xr-x 296 8192 Nov 21 10:58 POT_LDA_PAW_54
drwxr-xr-x 105 4096 Nov 21 13:43 POT_LDA_US

I then used the command “pmg config -p pseudos mypseudos” to generate the pymatgen compatible POTCAR directory “mypseudos”:

drwxr-xr-x 2 12288 Nov 21 13:50 POT_GGA_PAW_PBE
drwxr-xr-x 2 12288 Nov 21 13:49 POT_GGA_PAW_PBE_52
drwxr-xr-x 2 12288 Nov 21 13:49 POT_GGA_PAW_PBE_54
drwxr-xr-x 2 8192 Nov 21 13:48 POT_GGA_PAW_PW91
drwxr-xr-x 2 4096 Nov 21 13:50 POT_GGA_US_PW91
drwxr-xr-x 2 12288 Nov 21 13:49 POT_LDA_PAW
drwxr-xr-x 2 12288 Nov 21 13:48 POT_LDA_PAW_52
drwxr-xr-x 2 12288 Nov 21 13:50 POT_LDA_PAW_54
drwxr-xr-x 2 4096 Nov 21 13:50 POT_LDA_US

A quick look at one of the directories POT_GGA_PAW_PBE shows that the directory structure seems correct.

(base) ls -l POT_GGA_PAW_PBE |head
total 18764
-rw-r----- 1 paulfons matstud 80385 Nov 21 13:50 POTCAR.Ac.gz
-rw-r----- 1 paulfons matstud 68258 Nov 21 13:50 POTCAR.Ag.gz
-rw-r–r-- 1 paulfons matstud 71867 Nov 21 13:50 POTCAR.Ag_new.gz
-rw-r–r-- 1 paulfons matstud 71396 Nov 21 13:50 POTCAR.Ag_pv.gz
-rw-r----- 1 paulfons matstud 59471 Nov 21 13:50 POTCAR.Al.gz
-rw-r–r-- 1 paulfons matstud 83759 Nov 21 13:50 POTCAR.Am.gz
-rw-r----- 1 paulfons matstud 50054 Nov 21 13:50 POTCAR.Ar.gz
-rw-r–r-- 1 paulfons matstud 73587 Nov 21 13:50 POTCAR.As_d_GW.gz
-rw-r–r-- 1 paulfons matstud 71502 Nov 21 13:50 POTCAR.As_d.gz

Trying to build a POTCAR with the MPStaticSet class results in the error:

File /data/miniconda/envs/pymatgen/lib/python3.10/site-packages/pymatgen/io/vasp/inputs.py:1910, in PotcarSingle.from_symbol_and_functional(symbol, functional)

1908 psingle = PotcarSingle.from_file(p)

1909 return psingle

→ 1910 raise OSError(

1911 f"You do not have the right POTCAR with functional {functional} and label {symbol} in your VASP_PSP_DIR"

1912 )

OSError: You do not have the right POTCAR with functional PBE and label Mo_pv in your VASP_PSP_DIR

A search within the mypseudos directory shows the POTCAR files do exist:

(base) find . -name “Mo_pv” -print
./POT_LDA_PAW_52/POTCAR.Mo_pv.gz
./POT_GGA_PAW_PW91/POTCAR.Mo_pv.gz
./POT_LDA_PAW/POTCAR.Mo_pv_new.gz
./POT_LDA_PAW/POTCAR.Mo_pv.gz
./POT_LDA_US/POTCAR.Mo_pv.gz
./POT_GGA_PAW_PBE_52/POTCAR.Mo_pv.gz
./POT_GGA_PAW_PBE_54/POTCAR.Mo_pv.gz
./POT_LDA_PAW_54/POTCAR.Mo_pv.gz
./POT_GGA_US_PW91/POTCAR.Mo_pv.gz
./POT_GGA_PAW_PBE/POTCAR.Mo_pv_new.gz
./POT_GGA_PAW_PBE/POTCAR.Mo_pv.gz

Even a simple attempt to generate a POTCAR from the command line fails
“pmg potcar -s Mo” results in:

(base) pmg potcar -s Mo -f PBE_54
/data/miniconda/lib/python3.10/site-packages/pymatgen/io/vasp/inputs.py:1737: UserWarning: Ignoring unknown variable type SHA256
warnings.warn(f"Ignoring unknown variable type {key}“)
/data/miniconda/lib/python3.10/site-packages/pymatgen/io/vasp/inputs.py:1737: UserWarning: Ignoring unknown variable type COPYR
warnings.warn(f"Ignoring unknown variable type {key}”)
/data/miniconda/lib/python3.10/site-packages/pymatgen/io/vasp/inputs.py:1822: UnknownPotcarWarning: POTCAR with symbol Mo has metadata that does not match any VASP POTCAR known to pymatgen. The data in this POTCAR is known to match the following functionals: [‘PBE_52’, ‘PBE_54’, ‘unvie_PBE_52’]
warnings.warn(

How can I fix this. As of the moment, I am manually copying the potcar files over, but this is a very poor solution. Everything worked fine before the recent changes.

What was wrong with the procedure I used to generate the pymatgen pseudopotential directory? Are the directory names incorrect?

The instructions on the pymatgen website regarding the generation of the pseudopotential directory state the initial structure of the expanded pseudopotential tarballs should look like:

  • <EXTRACTED_VASP_POTCAR>
    |- POT_GGA_PAW_PBE
    ||- Ac_s
    |||-POTCAR
    |||-…

and they do! This is very frustrating. Perhaps the instructions need to be updated on the webpage. I would even be willing to write some text explaining the procedure if I understood it! Note that for the directory names in the initial pseudopotential directory, I took them from the python dictionary in “inputs.py” source.

Thanks for any help you can offer. I suspect the answer is simple, but rather than spending lots of time on trial and error, it would be more effective to hear the proper instructions.

Kind of obvious but do you have the correct PMG_VASP_PSP_DIR set in the .pmgrc.yaml file?

Other than that, I had this issue due to a missing version suffix in the pymatgen potcar directory. Pymatgen created a folder case POT_GGA_PAW_PBE and I was getting the same error. Renaming the folder to POT_GGA_PAW_PBE_54 worked in the end.

1 Like

Thanks for the suggestion, but my .pmgrc.yaml file I believe is correct.

PMG_MAPI_KEY: xxxxxxx
PMG_VASP_PSP_DIR: /data/Software/Vasp/mypseudos

The directory names also seem to be correct from what I can see. Certainly the version numbers are present:

POT_GGA_PAW_PBE
POT_GGA_PAW_PBE_52
POT_GGA_PAW_PBE_54
POT_GGA_PAW_PW91
POT_GGA_US_PW91
POT_LDA_PAW
POT_LDA_PAW_52
POT_LDA_PAW_54
POT_LDA_US

It is very frustrating that I have to generate my POTCAR files now from the command line. Any suggestions would be gratefully received.