Page 1 of 1

D3 with elements past plutonium

Posted: Thu Jan 30, 2025 3:24 am
by benjamin_atkinson1

Hi team,

We need to run some calculations with dispersion corrections for elements past plutonium. The current D3 implementation (v6.5.0) is only parameterised up to plutonium. DFT-D4 is parameterised past plutonium and with minor modifications to the source code can be used with VASP for these elements, however is not compatible with GPUs – these are big calculations and GPU support is essential. Grimme did release an updated D3 version with parameters past plutonium (see https://doi.org/10.1039/D4CP01514B, implemented in https://github.com/dftd3/simple-dftd3/), but this was never included in VASP.

Are you able to update your D3 implementation to include elements past plutonium?

DFT-D4 GPU support would be ideal, but I believe this would require changes to the DFT-D4 code to make it compatible with Nvidia compilers as the fortran module must be compiled using identical compilers to VASP.

Cheers,
Ben


Re: D3 with elements past plutonium

Posted: Fri Jan 31, 2025 10:40 am
by alexey.tal

Dear Ben,

Thank you for your question.

Grimme did release an updated D3 version with parameters past plutonium (see https://doi.org/10.1039/D4CP01514B, implemented in https://github.com/dftd3/simple-dftd3/), but this was never included in VASP.

Actually we weren't aware of this extension. Thanks for bringing it to our attention. We will look into it.

DFT-D4 GPU support would be ideal, but I believe this would require changes to the DFT-D4 code to make it compatible with Nvidia compilers as the fortran module must be compiled using identical compilers to VASP.

I took a quick look at DFT-D4 code and I don't see any GPU related code, i.e., no OpenACC directive and no CUDA. So to be able to run DFT-D4 on GPUs it has to be ported first.

The DFT-D3 in VASP has not been ported to GPUs, but the workload related to the D3 corrections is rather small, so running a VASP calculation with DFT-D3 on GPUs should work just fine because all other parts are ported.

Best wishes,
Alexey


Re: D3 with elements past plutonium

Posted: Mon Feb 03, 2025 2:07 pm
by alexey.tal

Actually, if DFT-D4 is parameterized for elements past plutonium you can directly use DFT-D4 in VASP, see the instructions here. As I said, neither DFT-D4 nor DFT-D3 is ported to GPUs, but the DFT calculation can be ran on GPUs and the vdW corrections can be computed on CPU without major overhead.


Re: D3 with elements past plutonium

Posted: Tue Feb 04, 2025 3:08 am
by benjamin_atkinson1

Hi Alexey,

Cheers for your reply.

My issue isn't so much running DFT-D3/4 on GPUs - as you point out the computational cost of running this part of the calculation is pretty negligible. Rather we'd like to use VASP compiled for GPUs, which also supports DFT-D3/4 for elements past plutonium.

DFT-D4 doesn't run on GPUs, but it is incompatible with the Nvidia fortran compiler (see https://github.com/dftd4/dftd4/issues/140). Since DFT-D4 must be compiled with the same fortran compiler as that used to compile VASP (https://dftd4.readthedocs.io/en/latest/recipe/vasp.html) I think that means it's impossible to use VASP on GPUs, with support for DFT-D4. If I'm wrong about that please do let me know.

Best wishes,

Ben


Re: D3 with elements past plutonium

Posted: Wed Feb 05, 2025 4:11 pm
by alexey.tal

Sorry, I didn't understand your question at first. Now, I see what the problem is.

DFT-D4 doesn't run on GPUs, but it is incompatible with the Nvidia fortran compiler (see https://github.com/dftd4/dftd4/issues/140). Since DFT-D4 must be compiled with the same fortran compiler as that used to compile VASP (https://dftd4.readthedocs.io/en/latest/recipe/vasp.html) I think that means it's impossible to use VASP on GPUs, with support for DFT-D4. If I'm wrong about that please do let me know.

You are absolutely right. If DFT-D4 cannot be compiled with the Nvidia compiler, running VASP on GPUs with DFT-D4 will not work.

We have looked at the DFT-D3 implementation in VASP and it seems that extending the parameterization to the elements past plutonium would requires some work. We are putting it on our TODO-list, but I can't promise you that it will be done in the next release.