pymatgen icon indicating copy to clipboard operation
pymatgen copied to clipboard

POTCAR setting problem

Open lihaojie87 opened this issue 11 months ago • 1 comments

Python version

Python 3.12.0

Pymatgen version

2024.3.1

Operating system version

Windows

Current behavior

I have already downloaded the POTCAR into D:\DFT\POTCAR\origin and the folder contents is

> ls

        Directory: D:\DFT\POTCAR\origin


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d----          2024/3/1     21:40                  potpaw_LDA.52
d----          2024/3/1     21:09                  potpaw_LDA.54
d----          2024/3/1     21:09                  potpaw_LDA.64
d----          2024/3/1     21:40                  potpaw_PBE.52
d----          2024/3/1     21:09                  potpaw_PBE.54
d----          2024/3/1     19:02                  potpaw_PBE.64

when I use the command to generate my_psp pmg config -p D:\DFT\POTCAR\origin D:\DFT\POTCAR\MY_PSP there is no problem and the folder contents of D:\DFT\POTCAR\MY_PSP is

> ls

        Directory: D:\DFT\POTCAR\MY_PSP


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d----          2024/3/4     12:29                  POT_GGA_PAW_PBE_52
d----          2024/3/4     12:29                  POT_GGA_PAW_PBE_54
d----          2024/3/4     12:28                  POT_LDA_PAW_52
d----          2024/3/4     12:28                  POT_LDA_PAW_54
d----          2024/3/4     12:29                  potpaw_PBE.64

As you can see, there is 6 origin POTCAR but only generate 5 new POTCAR dir. When I use job = GenerateVaspInputJob(input_set="pymatgen.io.vasp.sets.MPRelaxSet", contcar_only=False) to generate vasp input file there will give an error :

OSError: You do not have the right POTCAR with functional='PBE' and label Ni_pv in your VASP_PSP_DIR. Paths tried: ['D:\\DFT\\POTCAR\\MY_PSP\\POT_GGA_PAW_PBE\\POTCAR.Ni_pv', 'D:\\DFT\\POTCAR\\MY_PSP\\POT_GGA_PAW_PBE\\Ni_pv\\POTCAR']

I check the source code which shows "potpaw_PBE": "POT_GGA_PAW_PBE". Which version of POTCAR is potpaw_PBE?

   name_mappings = {
        "potpaw_PBE": "POT_GGA_PAW_PBE",
        "potpaw_PBE_52": "POT_GGA_PAW_PBE_52",
        "potpaw_PBE_54": "POT_GGA_PAW_PBE_54",
        "potpaw_PBE.52": "POT_GGA_PAW_PBE_52",
        "potpaw_PBE.54": "POT_GGA_PAW_PBE_54",
        "potpaw_LDA": "POT_LDA_PAW",
        "potpaw_LDA.52": "POT_LDA_PAW_52",
        "potpaw_LDA.54": "POT_LDA_PAW_54",
        "potpaw_LDA_52": "POT_LDA_PAW_52",
        "potpaw_LDA_54": "POT_LDA_PAW_54",
        "potUSPP_LDA": "POT_LDA_US",
        "potpaw_GGA": "POT_GGA_PAW_PW91",
        "potUSPP_GGA": "POT_GGA_US_PW91",
    }

Expected Behavior

Correctly generate vasp input files

Minimal example

No response

Relevant files to reproduce this bug

No response

lihaojie87 avatar Mar 04 '24 04:03 lihaojie87

Hey @lihaojie87, it looks like VASP is now distributing these (from the portal) as "PAW POTCAR files: LDA & PW91 & PBE (outdated)" with the description:

The LDA, PW91 and PBE PAW datasets (snapshot: 05-05-2010, 19-09-2006 and 06-05-2010, respectively). These files are outdated, not supported and only distributed as is.

We're actively updating the POTCARs used at MP so this won't be an issue moving forwards

esoteric-ephemera avatar Mar 11 '24 17:03 esoteric-ephemera