From fb2d2411c5ae8e360408caf7ac06398b43dbd9cb Mon Sep 17 00:00:00 2001 From: giannozz Date: Wed, 20 Sep 2006 14:04:17 +0000 Subject: [PATCH] Use the atomic species name given in input (atm) instead of zmesh to calculate Z (as it is done in cube). Thanks to Fernando Reboredo git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3405 c92efa57-630b-4861-b058-cf58834340f0 --- PP/pw2casino.f90 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PP/pw2casino.f90 b/PP/pw2casino.f90 index f2aa38d29..2fdaf2cf7 100644 --- a/PP/pw2casino.f90 +++ b/PP/pw2casino.f90 @@ -58,8 +58,7 @@ END PROGRAM pw2casino SUBROUTINE compute_casino USE kinds, ONLY: DP - USE atom, ONLY: zmesh - USE ions_base, ONLY : nat, ntyp => nsp, ityp, tau, zv + USE ions_base, ONLY : nat, ntyp => nsp, ityp, tau, zv, atm USE cell_base, ONLY: omega, alat, tpiba2, at, bg USE char, ONLY: title USE constants, ONLY: tpi @@ -79,12 +78,13 @@ SUBROUTINE compute_casino USE wavefunctions_module, ONLY : evc IMPLICIT NONE INTEGER :: ig, ibnd, ik, io, na, j, ispin, nbndup, nbnddown, & - nk, ngtot, ig7, ikk, nt, ijkb0, ikb, ih, jh, jkb + nk, ngtot, ig7, ikk, nt, ijkb0, ikb, ih, jh, jkb, at_num INTEGER, ALLOCATABLE :: INDEX(:), igtog(:) LOGICAL :: exst, found REAL(DP) :: ek, eloc, enl, charge, etotefield COMPLEX(DP), ALLOCATABLE :: aux(:), hpsi(:,:) INTEGER :: ios + INTEGER, EXTERNAL :: atomic_number REAL (DP), EXTERNAL :: ewald CALL init_us_1 @@ -259,7 +259,9 @@ SUBROUTINE compute_casino WRITE(io,*) nat WRITE(io,'(a)')' Atomic number and position of the atoms(au) ' DO na = 1, nat - WRITE(io,'(i6,3f20.14)') INT(zmesh(ityp(na))), (alat*tau(j,na),j=1,3) + nt = ityp(na) + at_num = atomic_number(TRIM(atm(nt))) + WRITE(io,'(i6,3f20.14)') at_num, (alat*tau(j,na),j=1,3) ENDDO WRITE(io,'(a)') ' Primitive lattice vectors (au) ' WRITE(io,100) alat*at(1,1), alat*at(2,1), alat*at(3,1)