brainandforce / Electrum.jl

A Julian toolkit for solid-state chemical theory.
MIT License
31 stars 0 forks source link

What is `maxHKLindex()` doing? Implications for reading wavefunction files #162

Open brainandforce opened 1 year ago

brainandforce commented 1 year ago

This function is critical to the implementation of readWAVECAR() and was adapted from some of the WaveTrans code, but I honestly can't be sure what it's actually doing.

From what I understand, the energy cutoff defines the maximum length of reciprocal lattice vectors G, because if Ecut = ħ^2 / 2*m_e * dot(G, G), and in Hartree atomic units, ħ^2 / 2*m_e == 1/2, then norm(G) == sqrt(2*Ecut). However, I don't think my attempts to implement a function to calculate this value correspond with those given by maxHKLindex(). I highly doubt it's VASP code that has the correctness issue, so I'd like others to assist me with this if possible.

brainandforce commented 1 year ago

Here is the code for maxHKLindex()