Comments (2)
Hi
In my code, there is no such assumption that the lattice should be orthogonal. In fact, the snippet you showed is just a rewrite of the Fortran version in VASP. Please refer to the VASP source code, e.g. vasp.5.4.4 main.F
ln966-968. Moreover, the number of g-vectors generated by my code and VASP are consistent, otherwise there will be an error and the code will not proceed.
In your example, your estimation is correct about n <= 500. However, please note that Anorm
is the norm of the real-space basis vectors other than the reciprocal-space ones.
Since you mentioned WaveTrans.f90, I have to tell you that the code calculates the real-space wavefunction in a very stupid way, i.e. the author just added all the plane-waves one by one, which is inefficient and takes a long time. On the other hand, the more efficient way is to use the FFT to do the transformation. I have seen someone used the wavetrans.f90 algorithm to plot the wavefunction and it took about 1 hour to get just one single KS orbital, while my code get the same orbital in just 1 second.
http://www.andrew.cmu.edu/user/feenstra/wavetrans/source/WaveTransPlot.f90
do iz=0,2*nb3max
z=dble(iz)/dble(1+2*nb3max)
xyz(3)=z
csum=cmplx(0.,0.)
do iplane=1,nplane
ig=igall(:,iplane)
wkpg=wk+ig
csum=csum+coeff(iplane)* &
cdexp(2.*pi*cmplx(0.,1.)*dot_product(wkpg,xyz))
enddo
csum=csum/dsqrt(Vcell)
!!$ output z*a3mag for units of Angstroms
write(6,*) sngl(z),sngl(real(csum)),sngl(dimag(csum))
enddo
from vaspbandunfolding.
Thank you.
I am trying to port the code to julia. I now realize your code is indeed correct. Sorry for the interuption.
from vaspbandunfolding.
Related Issues (19)
- Installation HOT 16
- dtype=int is not enough? (readWFHeader in vaspwfc) HOT 3
- Confusion about the installation
- Confusion about transformation matrix HOT 3
- How can I obtain the inverse participation ratio (IPR) value from the WAVECAR of vasp?
- How to cite this repository HOT 1
- `save2vesta` did not multiply the cell volume
- No module named 'pysbt' HOT 2
- band unfolding with spinor HOT 1
- usage for hybrid/metagga bandstructure unfolding HOT 1
- Read wavefunction from WAVRCAR for some specific purposes. HOT 4
- Raw data HOT 1
- Problem in testing the unfold example
- Warning and error about dtype
- elf_test error
- Deal with situation: no space between signed numbers in PROCAR
- Unfolding not working fo Si 4x4x4
- Wave function in real space can't reproduce charge density from CHGCAR HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vaspbandunfolding.