kylebystrom / pawpyseed

Parallel C/Python package for numerical analysis of PAW DFT wavefunctions
BSD 3-Clause "New" or "Revised" License
31 stars 11 forks source link

access to wavefunctions without projectors #15

Open bernstei opened 3 years ago

bernstei commented 3 years ago

If there is an interface to pseudo-wavefunctions (as opposed to all electron with PAW projector contributions), I haven't found it, so maybe it could use better documentation. If there isn't, it might be nice to have such an interface, maybe via the existing WaveFunction and NCLWaveFunction classes, perhaps passing something like pseudo=True, or no CoreRegion, to the constructor?

kylebystrom commented 3 years ago

Currently, the raw plane-wave coefficients that define the pseudo wavefunction are hidden under the hood in the C backend, and all of the read/write utilities automatically add in the plane-wave matrix elements. Adding utilities for a "pseudo" mode in which the Wavefunction class has all of its utilities but without the core regions would be conceptually trivial but require quite a bit of code rearrangement. I figure I can get this done sometime in December if you'd like; it would definitely be nice to have all the pseudo wavefunction utilities wrapped up in the same interface as pawpyseed.

In the meantime, what specifically do you want this utility for? Most operations on pseudo wavefunctions are mathematically simple since it's just plane-waves. Specifically, pymatgen has a Wavecar class that can project the pseudo-wavefunction into real space: https://github.com/materialsproject/pymatgen/blob/25a476e101abbd59affa6ef6b1ad0dfdc02a5e93/pymatgen/io/vasp/outputs.py#L4199-L4765 There's also a couple other utilities for pseudo wavefunctions: https://github.com/QijingZheng/VaspBandUnfolding/blob/master/vaspwfc.py https://github.com/QijingZheng/vaspwfc The above (at lest vaspwfc.py) have more format flexibility than pawpyseed, with support for gamma-point calculations included. I also plan to add in the gamma-point calculation support next month since I've had that requested a few times.

bernstei commented 3 years ago

On Nov 24, 2020, at 11:58 PM, Kyle Bystrom notifications@github.com wrote: Currently, the raw plane-wave coefficients that define the pseudo wavefunction are hidden under the hood in the C backend, and all of the read/write utilities automatically add in the plane-wave matrix elements. Adding utilities for a "pseudo" mode in which the Wavefunction class has all of its utilities but without the core regions would be conceptually trivial but require quite a bit of code rearrangement. I figure I can get this done sometime in December if you'd like; it would definitely be nice to have all the pseudo wavefunction utilities wrapped up in the same interface as pawpyseed.

In the meantime, what specifically do you want this utility for? Most operations on pseudo wavefunctions are mathematically simple since it's just plane-waves. Specifically, pymatgen has a Wavecar class that can project the pseudo-wavefunction into real space: https://github.com/materialsproject/pymatgen/blob/25a476e101abbd59affa6ef6b1ad0dfdc02a5e93/pymatgen/io/vasp/outputs.py#L4199-L4765 https://github.com/materialsproject/pymatgen/blob/25a476e101abbd59affa6ef6b1ad0dfdc02a5e93/pymatgen/io/vasp/outputs.py#L4199-L4765 There's also a couple other utilities for pseudo wavefunctions: https://github.com/QijingZheng/VaspBandUnfolding/blob/master/vaspwfc.py https://github.com/QijingZheng/VaspBandUnfolding/blob/master/vaspwfc.py https://github.com/QijingZheng/vaspwfc https://github.com/QijingZheng/vaspwfc The above (at lest vaspwfc.py) have more format flexibility than pawpyseed, with support for gamma-point calculations included. I also plan to add in the gamma-point calculation support next month since I've had that requested a few times.

It probably isn't worth much of your time, given that pymatgen's Wavecar exists. It was just to compare postprocessed matrix elements computed from full and pseudo wavefunctions, where things like the interface that allows you to control the real space grid on which the WF is available can be helpful, but really just for consistency checking and debugging.

                        thanks,
                        Noam

|| |U.S. NAVAL| |RESEARCH| LABORATORY

Noam Bernstein, Ph.D. Center for Materials Physics and Technology U.S. Naval Research Laboratory T +1 202 404 8628 F +1 202 404 7546 https://www.nrl.navy.mil https://www.nrl.navy.mil/