You do not have the right POTCAR with functional PBE and label Zr in your VASP_PSP_DIR

The structure I use is ZrSi.cif.
When I use the MITMDSet of pymatgen:
structure = Structure.from_file(‘ZrSi.cif’)
MD=MITMDSet(structure=structure,start_temp=300,end_temp=300,nsteps=500,time_step=1,spin_polarized=True)
MD.write_input(‘md1’)

I found that the program would output errors:
You do not have the right POTCAR with functional PBE and label Zr in your VASP_PSP_DIR.

The reason is that there is no Zr in my PBE.
My PBE only has Zr_ Sv and Zr_ sv_ GW.

Does anyone know how to solve this problem and generate POTCAR?

When you create your vasp input set, pass the potcar variant you want to use via user_potcar_settings.

So in your case:
MD=MITMDSet(structure=structure, start_temp=300, end_temp=300, nsteps=500, time_step=1, spin_polarized=True, user_potcar_settings={"Zr": "Zr_sv"})

Note that you can pass a dictionary here for all elements for which you want to use potentials version that are not set as default by pymatgen. Even if you do not use those elements in the current structure. For example I always use user_potcar_settings={'W': 'W_sv'} since the default for tungsten, W_pv has been deprecated by VASP and replaced by W_sv. However for compatibility reasons pymatgen still uses W_pv.

1 Like

thank you. Your answer solves my problem.

After solving the above problems, I have a new problem.
When I run the code:

structure = Structure.from_file('ZrSi.cif')
MD=MITMDSet(structure=structure,start_temp=300,end_temp=300,nsteps=500,time_step=1,spin_polarized=True,user_potcar_settings={"Zr": "Zr_sv"})
MD.write_input('md')

My program will report errors:


Does anyone know what went wrong?

Hmmm… This is a problem with the structure maybe? Can you share your .cif file?

Thank you for your reply.
This is my .cif file:
ZrSi.cif (1.1 KB)

OK, so I think this has to do with the MITMDSet, which is a subclass of MITRelaxSet.

It is not the structure, since I could reproduce this error with a generic structure as well.

I never used those, but I think they might work differently? Try this with another vasp input set, e.g. MPRelaxSet. There it works for me.

In fact, looking at the .yaml files for MPRelaxSet and MITRelaxSet, there is a difference in the POTCAR field (end of file) structure. For MPRelaxSet there are just mappings of elements to POTCAR symbold. E.g.: Zr: Zr_sv. For the MITRelaxSet there is also a hash:

Zr:
    symbol: Zr
    hash: d221d2c0bac4f8e81af2f5c42a314274

I think this screws up the whole thing. But I am not sure why. Probably one has to use different kwargs than user_potcar_settings? Maybe go through the documentation of MITRelaxSet, unfortunately I have no time to do this now.

Cheers and good luck!

1 Like

Thank you for your reply, which is very helpful to me.I will follow your advice to see where the mistakes are.