molmod / psiflow

scalable molecular simulation
https://molmod.github.io/psiflow/
MIT License
115 stars 8 forks source link

VASP reference #3

Closed svandenhaute closed 1 year ago

svandenhaute commented 1 year ago

Provide support for VASP 6 as a reference level of theory.

owen-rett commented 1 year ago

Hello, I was wondering if there was an estimated time of arrival for the VASP interface? Had been looking for a sequential learning algorithm that worked with MACE, and I'm trying to build a MLIAP for a phase transforming material, so this looked very well suited to my project. However all of my existing data is with VASP, so can't really restart with CP2K.

svandenhaute commented 1 year ago

We no longer plan to support it, unfortunately. The reason is that psiflow is now being packaged in a Singularity container, along with PyTorch, PLUMED, and CP2K. VASP is licensed, and in addition not well-documented. I have not come across any molecular or material system in which CP2K (which also supports pure plane wave calculations using SIRIUS -- similar to QE) would not do the job.

For your case in particular -- what if you do the active learning with psiflow, using cp2k at more or less the same level of theory, and afterwards re-evaluate the obtained data with VASP? Unless we're talking about highly reactive systems, datasets do not exceed a few thousand states, so the computational cost of re-evaluating the VASP energy and forces is relatively limited ...

CORRECTION: for non-periodic systems, CP2K is questionable and something like ORCA is probably better suited -- but VASP will suffer from the same limitations there.

owen-rett commented 1 year ago

I had considered an approach like that; using CP2K to generate the structures through Psiflow, and then re-evaluating them using VASP, however I am a bit worried if CP2K and VASP predict a different set of ground state lattice constants, as the sampling for CP2K could be misaligned from that of VASP.

As for why I'm using VASP, thanks to a prior project I have a good idea of the DFT+U values necessary for my system, as well as KPOINT density, psuedopotential choice, etc, and learning enough CP2K to optimize inputs for my system could take a while.

I might try messing around with some of the code written for the CP2K interface; if I reuse as much as I can from the existing ase-vasp interface I suspect I might be able to get Psiflow working with VASP. If I'm able to make progress on that end I think I'll open up a thread in the discussions section.

Thanks for the quick response.

svandenhaute commented 1 year ago

I had considered an approach like that; using CP2K to generate the structures through Psiflow, and then re-evaluating them using VASP, however I am a bit worried if CP2K and VASP predict a different set of ground state lattice constants, as the sampling for CP2K could be misaligned from that of VASP.

There are many ways to resolve this type of issue. The easiest would just be to apply a metadynamics bias on the individual walkers during active learning. This will ensure that out-of-distribution unit cell configurations (w.r.t the CP2K level of theory) are still sufficiently represented in the training data such that they also cover the distribution as would be obtained from VASP. You can also vary temperature and/or pressure of each of the walkers to achieve something similar.

I might try messing around with some of the code written for the CP2K interface; if I reuse as much as I can from the existing ase-vasp interface I suspect I might be able to get Psiflow working with VASP. If I'm able to make progress on that end I think I'll open up a thread in the discussions section.

You're certainly welcome to do so, but again, I don't think that's really necessary!