Commit aef515e8 authored by Samuel Poncé's avatar Samuel Poncé

Replacement of celldm(1) by alat.

parent d61ad7ad
......@@ -28,7 +28,7 @@
!--------------------------------------------------------------------------
!
USE kinds, ONLY : DP
USE cell_base, ONLY : at, bg, celldm
USE cell_base, ONLY : at, bg, alat
USE constants_epw, ONLY : bohr2ang, twopi, ci, czero, zero, ryd2ev
USE io_global, ONLY : ionode_id
USE io_epw, ONLY : iudecayH
......@@ -222,7 +222,7 @@
DO ir = 1, nrr
!
tmp = maxval( abs( chw (:,:,ir)) )
WRITE(iudecayH,*) wslen(ir) * celldm (1) * bohr2ang, tmp
WRITE(iudecayH,*) wslen(ir) * alat * bohr2ang, tmp
!
ENDDO
!
......@@ -255,7 +255,7 @@
!!
!
USE kinds, ONLY : DP
USE cell_base, ONLY : at, bg, celldm
USE cell_base, ONLY : at, bg, alat
USE elph2, ONLY : cdmew
USE io_epw, ONLY : iudecayP
USE constants_epw, ONLY : bohr2ang, twopi, ci, czero, cone
......@@ -465,7 +465,7 @@
DO ir = 1, nrr
!
tmp = maxval( abs( cdmew(:, :,:,ir)) )
WRITE(iudecayP,*) wslen(ir) * celldm(1) * bohr2ang, tmp
WRITE(iudecayP,*) wslen(ir) * alat * bohr2ang, tmp
!
ENDDO
!
......@@ -503,7 +503,7 @@
!!
!
USE kinds, ONLY : DP
USE cell_base, ONLY : at, bg, celldm
USE cell_base, ONLY : at, bg, alat
USE ions_base, ONLY : nat, tau
USE phcom, ONLY : nq1, nq2, nq3
USE elph2, ONLY : rdw, epsi, zstar
......@@ -605,7 +605,7 @@
DO ir = 1, nrr
!
tmp = maxval ( abs( rdw(:,:,ir)) )
WRITE(iudecaydyn, *) wslen(ir) * celldm(1) * bohr2ang, tmp
WRITE(iudecaydyn, *) wslen(ir) * alat * bohr2ang, tmp
!
ENDDO
CLOSE(iudecaydyn)
......@@ -627,7 +627,7 @@
!--------------------------------------------------------------------------
!
USE kinds, ONLY : DP
USE cell_base, ONLY : at, bg, celldm
USE cell_base, ONLY : at, bg, alat
USE elph2, ONLY : cvmew
USE constants_epw, ONLY : twopi, one, zero, ci, czero, cone, bohr2ang
USE io_epw, ONLY : iummn, iubvec, iudecayv
......@@ -916,7 +916,7 @@
DO ib = 1, nnb
!
! bring bvec to units of 2piba since xk is cartesian units of 2piba
b_tmp(:) = celldm(1) / (twopi) * bvec(:,ib,nkk_abs)
b_tmp(:) = alat / (twopi) * bvec(:,ib,nkk_abs)
CALL ktokpmq ( xk(:,ik), b_tmp(:), +1, ipool, nkb, nkb_abs)
!
! M_mn_utmp(:,:) = matmul( m_mat_opt(:,:,ib,ik), cu_big(:,:,nkb_abs) )
......@@ -1008,7 +1008,7 @@
DO ir = 1, nrr
!
tmp = maxval ( abs( cvmew(:,:,:,ir)) )
WRITE(iudecayv, *) wslen(ir) * celldm(1) * bohr2ang, tmp
WRITE(iudecayv, *) wslen(ir) * alat * bohr2ang, tmp
!
ENDDO
!
......@@ -1043,7 +1043,7 @@
!-----------------------------------------------------------------------
!
USE kinds, ONLY : DP
USE cell_base, ONLY : at, bg, celldm
USE cell_base, ONLY : at, bg, alat
USE constants_epw, ONLY : bohr2ang, twopi, ci, czero, cone
USE io_epw, ONLY : iuwane
USE io_global, ONLY : ionode_id
......@@ -1174,7 +1174,7 @@
DO ir = 1, nrr
!
tmp = maxval ( abs(epmatw(:,:,ir)) )
WRITE(iuwane, *) wslen(ir) * celldm(1) * bohr2ang, tmp
WRITE(iuwane, *) wslen(ir) * alat * bohr2ang, tmp
!
ENDDO
!
......@@ -1205,7 +1205,7 @@
!--------------------------------------------------------------------------------
!
USE kinds, ONLY : DP
USE cell_base, ONLY : at, bg, celldm
USE cell_base, ONLY : at, bg, alat
USE elph2, ONLY : epmatwp
USE constants_epw, ONLY : bohr2ang, twopi, ci, czero
USE io_epw, ONLY : iuwanep
......@@ -1306,8 +1306,8 @@
! rvec1 : electron-electron0 distance
! rvec2 : phonon - electron0 distance
!
WRITE(iuwanep, '(5f15.10)') len1 * celldm(1) * bohr2ang, &
len2 * celldm(1) * bohr2ang, tmp
WRITE(iuwanep, '(5f15.10)') len1 * alat * bohr2ang, &
len2 * alat * bohr2ang, tmp
ENDDO
IF (ir.eq.nrr_g) CLOSE(iuwanep)
ENDIF
......@@ -1332,7 +1332,7 @@
!--------------------------------------------------------------------------------
!
USE kinds, ONLY : DP
USE cell_base, ONLY : at, bg, celldm
USE cell_base, ONLY : at, bg, alat
USE constants_epw, ONLY : bohr2ang, twopi, ci, czero
USE io_epw, ONLY : iunepmatwe, iunepmatwp, iuwanep
USE io_global, ONLY : ionode_id
......@@ -1442,8 +1442,8 @@
! rvec1 : electron-electron0 distance
! rvec2 : phonon - electron0 distance
!
WRITE(iuwanep, '(5f15.10)') len1 * celldm(1) * bohr2ang, &
len2 * celldm(1) * bohr2ang, tmp
WRITE(iuwanep, '(5f15.10)') len1 * alat * bohr2ang, &
len2 * alat * bohr2ang, tmp
ENDDO
IF (ir == nrr_g) CLOSE(iuwanep)
ENDIF
......
......@@ -541,7 +541,7 @@ SUBROUTINE run_wannier
USE ions_base, ONLY : nat
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
USE cell_base, ONLY : celldm
USE cell_base, ONLY : alat
USE io_files, ONLY : prefix
USE io_epw, ONLY : QPeig_read
USE pwcom, ONLY : nkstot
......@@ -624,7 +624,7 @@ SUBROUTINE run_wannier
WRITE (stdout,*)
! RM - loop is up to n_wannier according to W90/wannierise.F90
DO iw = 1, n_wannier
WRITE (stdout, '(5x,"(",3f10.5,") : ",f8.5)') wann_centers(:,iw)/celldm(1)/bohr, wann_spreads(iw)
WRITE (stdout, '(5x,"(",3f10.5,") : ",f8.5)') wann_centers(:,iw)/alat/bohr, wann_spreads(iw)
ENDDO
WRITE (stdout,*)
!
......@@ -1600,7 +1600,7 @@ SUBROUTINE write_filukk
USE epwcom, ONLY : filukk
USE constants_epw,ONLY : czero, bohr
USE io_global, ONLY : meta_ionode
USE cell_base, ONLY : celldm
USE cell_base, ONLY : alat
!
IMPLICIT NONE
!
......@@ -1702,7 +1702,7 @@ SUBROUTINE write_filukk
!
! Now write the Wannier centers to files
DO iw = 1, n_wannier
WRITE (iuukk,'(3f12.8)') wann_centers(:,iw)/celldm(1)/bohr
WRITE (iuukk,'(3f12.8)') wann_centers(:,iw)/alat/bohr
ENDDO
!
CLOSE (iuukk)
......
......@@ -242,8 +242,12 @@
read (iudyn, '(a)') line
read (iudyn, '(a)') line
read (iudyn, * ) ntyp_, nat_, ibrav_, celldm_
IF (ntyp.ne.ntyp_.or.nat.ne.nat_.or.ibrav_.ne.ibrav.or.abs ( &
celldm_ (1) - celldm (1) ) .gt.1.0d-5) call errore ('readmat2', &
!
! We stop testing celldm as it can be different between scf and nscf
!IF (ntyp.ne.ntyp_.or.nat.ne.nat_.or.ibrav_.ne.ibrav.or.abs ( &
! celldm_ (1) - celldm (1) ) .gt.1.0d-5) call errore ('readmat_shuffle2', &
! 'inconsistent data', 1)
IF (ntyp.ne.ntyp_.or.nat.ne.nat_.or.ibrav_.ne.ibrav ) call errore ('readmat_shuffle2', &
'inconsistent data', 1)
!
! skip reading of cell parameters here
......@@ -262,7 +266,7 @@
ENDDO
DO na = 1, nat
read (iudyn, * ) i, ityp_, tau_
IF (na.ne.i.or.ityp_.ne.ityp (na) ) call errore ('readmat2', &
IF (na.ne.i.or.ityp_.ne.ityp (na) ) call errore ('readmat_shuffle2', &
'inconsistent data (names)', 10 + na)
ENDDO
!
......@@ -630,7 +634,7 @@
USE elph2, ONLY : ifc, zstar, epsi
USE epwcom, ONLY : asr_typ, dvscf_dir
USE ions_base, ONLY : nat
USE cell_base, ONLY : ibrav, omega, at, bg, celldm
USE cell_base, ONLY : ibrav, omega, at, bg, celldm, alat
USE phcom, ONLY : nq1, nq2, nq3
USE io_global, ONLY : stdout
USE io_epw, ONLY : iunifc
......@@ -654,7 +658,7 @@
idum, ibid, jbid, nabid, nbbid, m1bid, m2bid, m3bid, &
ntyp_, nat_, ibrav_, ityp_(nat), nqs
INTEGER, parameter :: ntypx = 10
REAL(kind=DP) :: tau_(3,nat), alat, amass2(ntypx)
REAL(kind=DP) :: tau_(3,nat), amass2(ntypx)
CHARACTER(LEN=3), ALLOCATABLE :: atm(:)
REAL(DP), ALLOCATABLE :: m_loc(:,:)
!
......@@ -678,7 +682,7 @@
CALL read_dyn_mat_header(ntyp_, nat_, ibrav, nspin_mag, &
celldm, at, bg, omega, atm, amass2, &
tau_, ityp_, m_loc, nqs, has_zstar, epsi, zstar )
alat=celldm(1)
! alat=celldm(1)
call volume(alat,at(1,1),at(1,2),at(1,3),omega)
CALL read_ifc_param(nq1,nq2,nq3)
CALL read_ifc_xml(nq1,nq2,nq3,nat_,ifc)
......
......@@ -1045,9 +1045,6 @@
nbnd, chf_a_tmp(:,:), nbnd, czero, chf_a(ipol,:,:), nbnd)
ENDDO
!DBSP
!if (mpime==1) write(902,*)SUM(irvec_tmp), celldm(1), at, SUM(irvec(:,ir))
!if (mpime==1) write(902,*) 'celldm',celldm
!if (mpime==1) write(902,*) 'celldm',alat
!if (mpime==1) write(902,*) 'at',at
!if (mpime==1) write(902,*)SUM(chw)
!if (mpime==1) write(902,*)SUM(cuf(:,:))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment