[Pw_forum] pw2wan.x available for use???
Andrea Ferretti
ferretti.andrea at unimore.it
Thu Nov 10 14:26:45 CET 2005
On Wed, 9 Nov 2005, Liping YU wrote:
> Hi, can someone tell me if pw2wan.x is now available for use now?
> Thanks!
> Liping
>
> Hello Mr. Paolo,
> So, should we assume that currently pw2wan.x cannot be used?
> Do you know the time-frame in which it will be usable?
> Thanks,
> Ravi
>
> Paolo Giannozzi <giannozz at nest.sns.it <mailto:giannozz at nest.sns.it>>
> Sent by: pw_forum-admin at pwscf.org <mailto:pw_forum-admin at pwscf.org>
> 08/09/2004 04:12 PM
> Please respond to
> pw_forum
>
>
> On Monday 09 August 2004 18:02, Ravinder Abrol wrote:
>
> >/ Is there any documentation on using pw2wan.x code provided in PWSCF
> />/ package for post-processing to get the localized wannier functions?
> /
> no, pw2wan.x is just an interface with the soon-to-be-released code
> that finds maximally localized Wannier functions.
>
> P.
I would just add that pw2wan.x is an interface to the already released
WanT 1.0 code for the calculation of transport using wannier functions,
while the soon-to-be-released 2.0 version uses a different datafile format
This format is based on the IOTK library by Giovanni Bussi
which is already used also in the CVS version of espresso (isn't it,
paolo ?). A patch (for versions 2.1.x) using this library to export (part
of) espresso data is available in the PWscf download page...
back to the case of pw2wan.x :
I did not use is recently but I think it should work in espresso 2.1.x, a
pseudo documentation of the binary file format produced by the code was
written to interface with WanT and is in the attachment
regards
Andrea
--
Andrea Ferretti
INFM National Research Center on nanoStructures and bioSystems at Surfaces
(S3)
Dipartimento di Fisica, Universita' di Modena e Reggio Emilia
Via Campi 213/A I-41100 Modena, Italy
Tel: +39 059 2055283
Fax: +39 059 374794
E-mail: ferretti.andrea at unimore.it
URL: http://www.nanoscience.unimo.it
-------------- next part --------------
This README illustrate the layout of the binary input file 'launch.dat'
which is used to pass information from ab-initio code and
wannier transport code.
For each variable in the file the FORTRAN type and its meaning are given
below
REAL*8 :: avec(3,3)
REAL*8 :: alat
INTEGER :: ntype
INTEGER :: natom(:)
CHARACTER(LEN=3) :: nameat(:)
REAL*8 :: rat(:,:,:)
REAL*8 :: emax
INTEGER :: nbandi
INTEGER :: nk(3)
REAL*8 :: s(3)
INTEGER :: ngm0
INTEGER :: ig1(:), ig2(:), ig3(:)
INTEGER :: nkp_tot
INTEGER :: mxddim, mxdbnd, nkpts
INTEGER :: isort_k(:,:)
REAL*8 :: ei_k(:,:)
INTEGER :: mtxd_k(:)
INTEGER :: neig_k(:)
INTEGER :: nr1, nr2, nr3
INTEGER :: ngm, ngwx
LOGICAL :: twrite
INTEGER :: file_version
CHARACTER(LEN=20) :: section_name
INTEGER :: ngw_ , nbnd_ , ik_ , nk_ , kunit_ , ispin_ , nspin_
REAL*8 :: scal_
INTEGER :: igwx_
LOGICAL :: t0_
COMPLEX*16 :: wtmp(:)
COMPLEX*16 :: zvec_k(:,:,:)
INTEGER :: idum_
OPEN ( UNIT=54, FILE='launch.dat', STATUS='OLD', FORM='UNFORMATTED' )
READ( 54 ) alat ! units of the Crystal basis vector
READ( 54 ) ( avec(i,1),i=1,3 ) ! basis vectors a = avec( :, 1 ) * alat
READ( 54 ) ( avec(i,2),i=1,3 ) ! basis vectors b = avec( :, 2 ) * alat
READ( 54 ) ( avec(i,3),i=1,3 ) ! basis vectors c = avec( :, 3 ) * alat
READ( 54 ) ntype ! number of different atomic species
DO nt = 1, ntype
! natom(nt) = number of atoms for the specie nt
! nameat(nt) = label of the atomic specie nt
READ ( 54 ) natom(nt), nameat( nt )
! rat( :, j, nt ) = lattice coordinetes of the j-th atom of specie nt
READ ( 54 ) ( ( rat( i, j, nt ), i = 1, 3 ), j = 1, natom( nt ) )
END DO
! emax = energy cutoff (emax) in Rydberg unit
! nbandi = number of electronic bands
READ(54) emax, nbandi
! nk(1), nk(2), nk(3) are the number of k-points
! s(1), s(2), s(3) is the origin of the k-points grid
! ngm0 = number of reciprocal space vectors
READ(54) (nk(i), i = 1, 3 ), ( s(i), i = 1, 3), ngm0
! ig1(:), ig2(:), ig3(:) = generators of the reciprocal space vectors
! G(i) = ig1(i) * b1 + ig2(i) * b2 + ig3(i) * b3
! where b1, b2, b3 are the base vectors of the reciprocal space
READ(54) ( ig1(ig), ig2(ig), ig3(ig), ig = 1, ngm0 )
!
! nkp_tot = nk(1) * nk(2) * nk(3) total number of k points
! mxddim = maximum number of g-vectors component for wave functions
! mxdbnd = number of wave functions for each k - points
! nkpts = number of k-points where wave functions are defined
READ(54) mxddim, mxdbnd, nkpts
! isort_k( i, nkp ) = for each k point this vector map the i-th wave function components
! into the G vector generators arrays ig1, ig2, ig3
DO nkp = 1, nkp_tot
READ(54) ( isort_k( i, nkp ), i = 1, mxddim )
END DO
! ei_k(i,nkp) = eigenvalues (in eV) of the i-th wave function relative to the nkp-th
! k -point
READ(54) ( (ei_k(i,nkp), i=1,mxdbnd ), nkp=1,nkp_tot )
! mtxd_k = for each k-point is the number of plane waves (wave function componenets
! consistent with the cut-off
READ(54) ( mtxd_k(nkp), nkp=1,nkp_tot )
! neig_k = for each k-point is the number of plane waves
READ(54) ( neig_k(nkp), nkp=1,nkp_tot )
! nr1, nr2, nr3 = dimension of the real and reciprocal space grid for FFT transforms
! ngm = number of G - vectors in reciprocal space
! ngwx = maximum number of wave functions reciprocal space components
! consistent with the cut-off
READ(54) nr1, nr2, nr3, ngm, ngwx
!
! HERE read wave functions components
!
DO nkp = 1, nkp_tot
! twrite = TRUE if wave functions informations are present in the file
! file_version = INTEGER not relevant for wannier transport code
! section_name = STRING not relevant for wannier transport code
READ(54) twrite, file_version, section_name
! ngw_ = number of wave functions components for the nkp-th k points
! nbnd_ = number of wave functions for the nkp-th k points
! ik_ = index of this k point
! nk_ = total number of k points
! kunit_ = INTEGER not relevant for wannier transport code
! ispin_ = index of the spin component
! nspin_ = number of the spin components
! scal_ = scaling factor (if any) for this wave functions
READ(54) ngw_, nbnd_, ik_, nk_, kunit_, ispin_, nspin_, scal_
! igwx_ =
READ(54) igwx_ = number of components to be read from file
! t0_ = LOGICAL variable not relevant for wannier transport code
READ(54) t0_
! wtmp = wave functions reciprocal space components, should be in
! the same order as the G space generators ig1, ig2, ig3
! zvec_k = wave function components consistent with the cut-off
! and sorted with array isort_k
DO i = 1, nbnd_
READ(54) ( wtmp(ig), ig=1,igwx_ )
DO ig = 1, mtxd_k( nkp )
zvec_k( ig, i, nkp ) = wtmp( isort_k( ig, nkp ) )
END DO
END DO
! t0_ = LOGICAL variable not relevant for wannier transport code
READ(54) t0_
DO i = 1, nbnd_
! idum_ = INTEGER variable not relevant for wannier transport code
READ(54) idum_
END DO
END DO
CLOSE(54)
More information about the users
mailing list