[Pw_forum] DOS

Dariusz Chrobak dchrobak at us.edu.pl
Fri Jul 30 10:54:54 CEST 2004


Dear PWscf developers,
I wold like to calculate DOS (with tetrahedra) projected on the atomic 
states.
For each energy e and for each k two loops should make which I need:

# this can be inserted into attached dos0.f90  (line 234)
        e=e*13.6058
        proj1=0.0; proj2=0.0
        inter1=0.0; inter2=0.0
        l=0
        do i=1,nkpts
        do j=1,nbnds-1
            if ((ebnds(i,j)<=e).and.(ebnds(i,j+1)>=e)) then
            
amp(:)=psi(i,j,:)+(e-ebnds(i,j))/(ebnds(i,j+1)-ebnds(i,j))*(psi(i,j+1,:)-psi(i,j,:))
            proj1=proj1+DOSofE(1)*amp/13.6058
            proj2=proj2+DOSofE(2)*amp/13.6058
            inter1=inter1+DOSofE(1)*(1-sum(amp))/13.6058
            inter2=inter2+DOSofE(2)*(1-sum(amp))/13.6058
            l=l+1
            endif
        enddo
        enddo
        if (l>0) then
        proj1=proj1/l; inter1=inter1/l
        proj2=proj2/l; inter2=inter2/l
        else
        proj1=0.0; inter1=0.0
        proj2=0.0; inter2=0.0
        endif

# next writing proj1, proj2 and inter to the output file         

where: nkpts - number of k points
            nbnds - number of bands
            ebnds(i,j) - energy
             psi(i) -  coefficient  appears  in  expansion  of wave 
function on atomic states
            inter - nonlocalized part of DOS

What do you think about this small code? Is this a proper way?

Best regards
Dariusz Chrobak


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: projwfc0.f90
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20040730/a67172c4/attachment.f90>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dos0.f90
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20040730/a67172c4/attachment-0001.f90>


More information about the users mailing list