mirror of https://gitlab.com/QEF/q-e.git
Part of the variables for ultrasoft pseudopotentials have been moved to a
new module uspp_param, shared between PW and CP (in file Modules/uspp.f90) The flag newpseudo is no longer used to decide whether states with oc=0 are bound or not: for those states, and only for the old RRKJ format, oc is set to a negative value, and this signals that they are not bound. Not elegant but simpler than it used to be. The converter to UPF format did not include those states anyway. Beware unexpected side effects! git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@914 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
b895225c6e
commit
4a5732790a
|
@ -70,7 +70,6 @@
|
|||
!
|
||||
! Compute atomic wavefunctions in G-space
|
||||
!
|
||||
use ncprm
|
||||
use gvecw, only: ngw
|
||||
use reciprocal_vectors, only: gstart
|
||||
use ions_base, only: nsp, na, nas => nax
|
||||
|
@ -82,13 +81,20 @@
|
|||
complex(kind=8), intent(in) :: eigr(ngw,nas,nsp)
|
||||
complex(kind=8), intent(out):: wfc(ngw,n_atomic_wfc)
|
||||
!
|
||||
integer natwfc, ndm, is, ia, ir, nb, l, m, lm, i
|
||||
integer :: natwfc, ndm, is, ia, ir, nb, l, m, lm, i, lmax_wfc
|
||||
real(kind=8), allocatable:: ylm(:,:), q(:), jl(:), vchi(:), &
|
||||
& chiq(:)
|
||||
!
|
||||
! calculate max angular momentum required in wavefunctions
|
||||
!
|
||||
allocate(ylm(ngw,(lmaxkb+1)**2))
|
||||
call ylmr2 ((lmaxkb+1)**2, ngw, gx, g, ylm)
|
||||
lmax_wfc=-1
|
||||
do is = 1,nsp
|
||||
do nb = 1, nchi(is)
|
||||
lmax_wfc = max (lmax_wfc, lchi (nb, is) )
|
||||
enddo
|
||||
enddo
|
||||
allocate(ylm(ngw,(lmax_wfc+1)**2))
|
||||
call ylmr2 ((lmax_wfc+1)**2, ngw, gx, g, ylm)
|
||||
ndm = MAXVAL(mesh(1:nsp))
|
||||
allocate(jl(ndm), vchi(ndm))
|
||||
allocate(q(ngw), chiq(ngw))
|
||||
|
@ -4441,7 +4447,6 @@
|
|||
!
|
||||
! Projection on atomic wavefunctions
|
||||
!
|
||||
use ncprm
|
||||
use io_global, only: stdout
|
||||
use elct, only: n, nx
|
||||
use gvecw, only: ngw
|
||||
|
@ -4837,7 +4842,8 @@
|
|||
!---------------------------------------------------------------------
|
||||
!
|
||||
use atom, only: rab, r, mesh, nlcc, rho_atc
|
||||
use ncprm, only: betar, dion, vloc_at, lll, nbeta, kkbeta, cmesh
|
||||
use uspp_param, only: betar, dion, vloc_at, lll, nbeta, kkbeta
|
||||
use qrl_mod, only: cmesh
|
||||
use bhs, only: rcl, rc2, bl, al, wrc1, lloc, wrc2, rc1
|
||||
use funct, only: dft, which_dft
|
||||
use ions_base, only: zv
|
||||
|
@ -5013,14 +5019,14 @@
|
|||
! according to the Rabe Rappe Kaxiras Johannopoulos recipe.
|
||||
! Ultrasoft PP's are subsequently generated from the hard PP's.
|
||||
!
|
||||
! Output parameters in module "ncprm"
|
||||
! Output parameters in module "uspp_param"
|
||||
! info on DFT level in module "dft"
|
||||
!
|
||||
use parameters, only: nsx, natx, lqmax, ndmx
|
||||
use atom, only: rho_atc, r, rab, mesh, nlcc, lchi, chi, nchi, nchix
|
||||
use ncprm, only: nqlc, qfunc, vloc_at, rinner,&
|
||||
qrl, qqq, nbeta, nbrx, betar, &
|
||||
dion, lll, kkbeta
|
||||
use uspp_param, only: nqlc, qfunc, vloc_at, rinner,&
|
||||
qqq, nbeta, nbrx, betar, dion, lll, kkbeta
|
||||
use qrl_mod, only: qrl
|
||||
use funct, only: dft, iexch, icorr, igcx, igcc
|
||||
use ions_base, only: zv
|
||||
use io_global, only: stdout
|
||||
|
@ -5217,7 +5223,7 @@
|
|||
!
|
||||
! Read Vanderbilt pseudopotential of type "ipp" for species "is"
|
||||
! from unit "iunps"
|
||||
! Output parameters in module "ncprm"
|
||||
! Output parameters in module "uspp_param"
|
||||
! info on DFT level in module "funct"
|
||||
!
|
||||
!
|
||||
|
@ -5271,8 +5277,9 @@
|
|||
!
|
||||
use kinds, only: DP
|
||||
use parameters, only: nchix, lmaxx, nbrx, ndmx, nsx, lqmax, nqfx
|
||||
use ncprm, only: qfunc, qfcoef, qqq, betar, dion, vloc_at, cmesh,&
|
||||
qrl, rinner, kkbeta, lll, nbeta, nqf, nqlc
|
||||
use uspp_param, only: qfunc, qfcoef, qqq, betar, dion, vloc_at, &
|
||||
rinner, kkbeta, lll, nbeta, nqf, nqlc
|
||||
use qrl_mod, only: cmesh, qrl
|
||||
use funct, only: dft, which_dft
|
||||
use atom, only: nchi, chi, lchi, r, rab, mesh, nlcc, rho_atc
|
||||
use ions_base, only: zv
|
||||
|
@ -5648,8 +5655,9 @@
|
|||
!
|
||||
! for compatibility with old Vanderbilt formats
|
||||
!
|
||||
use ncprm, only: qfunc, qrl, nqf, qfcoef, rinner, lll, nbeta, &
|
||||
use uspp_param, only: qfunc, nqf, qfcoef, rinner, lll, nbeta, &
|
||||
kkbeta
|
||||
use qrl_mod, only: qrl
|
||||
use atom, only: r
|
||||
! the above module variables has no dependency from iosys
|
||||
!
|
||||
|
@ -6969,7 +6977,6 @@
|
|||
use energies, only: etot, eself, enl, ekin, epseu, esr, eht, exc
|
||||
use pseu
|
||||
use core
|
||||
use ncprm
|
||||
use gvecb
|
||||
use work, only: wrk1
|
||||
use work_box
|
||||
|
|
|
@ -215,7 +215,8 @@
|
|||
use pseu
|
||||
use reciprocal_vectors, only: gstart
|
||||
use atom, only: r, rab, mesh
|
||||
use ncprm, only: vloc_at, cmesh
|
||||
use uspp_param, only: vloc_at
|
||||
use qrl_mod, only: cmesh
|
||||
!
|
||||
use dpseu
|
||||
use dener
|
||||
|
@ -876,7 +877,7 @@
|
|||
use constants, only: pi, fpi
|
||||
use ions_base, only: nsp
|
||||
use elct
|
||||
use ncprm
|
||||
use uspp_param, only: lqx, nqlc, lmaxkb, kkbeta, nbrx, nbeta
|
||||
use atom, only: nlcc, r, rab, mesh, rho_atc
|
||||
use qradb_mod
|
||||
use qgb_mod
|
||||
|
@ -1235,7 +1236,9 @@
|
|||
use constants, only: pi, fpi
|
||||
use ions_base, only: ipp, na, nsp
|
||||
use elct
|
||||
use ncprm
|
||||
use uspp_param, only: kkbeta, qqq, nqlc, betar, nbrx, lqx, dion, nbeta, &
|
||||
lmaxkb, lll
|
||||
use qrl_mod, only: qrl, cmesh
|
||||
use atom, only: mesh, r, rab, nlcc
|
||||
use qradb_mod
|
||||
use qgb_mod
|
||||
|
@ -1560,7 +1563,7 @@
|
|||
use uspp, only: nlx, lpx, lpl, ap
|
||||
use gvecb
|
||||
use cdvan
|
||||
use ncprm, only: lqx
|
||||
use uspp_param, only: lqx
|
||||
!
|
||||
implicit none
|
||||
integer ngy, iv, jv, is
|
||||
|
@ -1636,7 +1639,7 @@
|
|||
use gvecb
|
||||
use dqrad_mod
|
||||
use cdvan
|
||||
use ncprm, only: lqx
|
||||
use uspp_param, only: lqx
|
||||
!
|
||||
implicit none
|
||||
integer ngy, iv, jv, is
|
||||
|
|
|
@ -136,11 +136,6 @@ contains
|
|||
end module gvec
|
||||
|
||||
|
||||
module ncprm
|
||||
|
||||
use parameters, only: nsx, ndmx, nqfx, nbrx, lqmax
|
||||
implicit none
|
||||
save
|
||||
!
|
||||
! lqmax: maximum angular momentum of Q (Vanderbilt augmentation charges)
|
||||
! nqfx : maximum number of coefficients in Q smoothing
|
||||
|
@ -156,10 +151,6 @@ module ncprm
|
|||
! lll lll(j) is l quantum number of j'th beta function
|
||||
! lqx highest angular momentum that is present in Q functions
|
||||
! lmaxkb highest angular momentum that is present in beta functions
|
||||
|
||||
integer :: nbeta(nsx), kkbeta(nsx), &
|
||||
nqf(nsx), nqlc(nsx), lll(nbrx,nsx), lqx, lmaxkb
|
||||
|
||||
! dion bare pseudopotential D_{\mu,\nu} parameters
|
||||
! (ionic and screening parts subtracted out)
|
||||
! betar the beta function on a r grid (actually, r*beta)
|
||||
|
@ -171,10 +162,11 @@ module ncprm
|
|||
! angular momentum (for r<rinner)
|
||||
! vloc_at local potential for each atom
|
||||
|
||||
real(kind=8) :: dion(nbrx,nbrx,nsx), &
|
||||
betar(ndmx,nbrx,nsx), qqq(nbrx,nbrx,nsx), &
|
||||
qfunc(ndmx,nbrx,nbrx,nsx), vloc_at(ndmx,nsx), &
|
||||
qfcoef(nqfx,lqmax,nbrx,nbrx,nsx), rinner(lqmax,nsx)
|
||||
module qrl_mod
|
||||
|
||||
use parameters, only: nsx, ndmx, nbrx, lqmax
|
||||
implicit none
|
||||
save
|
||||
!
|
||||
! qrl q(r) functions (old format)
|
||||
! cmesh used only for Herman-Skillman mesh (old format)
|
||||
|
@ -182,7 +174,7 @@ module ncprm
|
|||
real(kind=8) :: qrl(ndmx,nbrx,nbrx,lqmax,nsx)
|
||||
real(kind=8) :: cmesh(nsx)
|
||||
|
||||
end module ncprm
|
||||
end module qrl_mod
|
||||
|
||||
module pseu
|
||||
implicit none
|
||||
|
|
|
@ -9,7 +9,7 @@ subroutine read_pseudo (is, iunps, ierr)
|
|||
!
|
||||
! CP90 modules
|
||||
!
|
||||
use ncprm, only: qfunc, qfcoef, rinner, qqq, vloc_at, &
|
||||
use uspp_param, only: qfunc, qfcoef, rinner, qqq, vloc_at, &
|
||||
lll, nbeta, kkbeta, nqlc, nqf, betar, dion
|
||||
use atom, only: chi, lchi, nchi, rho_atc, r, rab, mesh, nlcc
|
||||
use ions_base, only: zv
|
||||
|
|
|
@ -328,7 +328,6 @@ PWOBJS = \
|
|||
../PW/save_in_cbands.o \
|
||||
../PW/save_in_electrons.o \
|
||||
../PW/save_in_ions.o \
|
||||
../PW/saveall.o \
|
||||
../PW/scala_cdiag.o \
|
||||
../PW/scala_cdiaghg.o \
|
||||
../PW/scala_utils.o \
|
||||
|
|
|
@ -12,6 +12,7 @@ subroutine d3_init
|
|||
!-----------------------------------------------------------------------
|
||||
|
||||
use pwcom
|
||||
USE uspp_param, ONLY : vloc_at
|
||||
use atom, only: numeric, mesh, msh, rab, r
|
||||
use phcom
|
||||
use d3com
|
||||
|
|
|
@ -20,6 +20,7 @@ subroutine d3_summary
|
|||
USE io_global, ONLY : stdout
|
||||
USE kinds, only : DP
|
||||
use pwcom
|
||||
USE uspp_param, ONLY : rinner, nqlc, nqf, lll, nbeta, psd, iver
|
||||
USE atom, ONLY: mesh, numeric, xmin, dx, nlcc
|
||||
USE control_flags, ONLY : iverbosity
|
||||
use phcom
|
||||
|
|
|
@ -150,7 +150,6 @@ PWOBJS = \
|
|||
../PW/rotate_wfc.o \
|
||||
../PW/ruotaijk.o \
|
||||
../PW/s_1psi.o \
|
||||
../PW/saveall.o \
|
||||
../PW/save_in_cbands.o \
|
||||
../PW/save_in_electrons.o \
|
||||
../PW/save_in_ions.o \
|
||||
|
|
|
@ -16,6 +16,7 @@ subroutine cg_summary
|
|||
!
|
||||
USE io_global, ONLY : stdout
|
||||
use pwcom
|
||||
USE uspp_param, ONLY: psd
|
||||
use cgcom
|
||||
!
|
||||
implicit none
|
||||
|
|
|
@ -14,7 +14,6 @@ MODULE read_namelists_module
|
|||
! --------------------------------------------------
|
||||
!
|
||||
USE kinds
|
||||
USE kinds
|
||||
USE input_parameters
|
||||
USE constants, ONLY: factem, kb_au, au_kb, k_boltzman_au, angstrom_au, &
|
||||
uma_au, pi
|
||||
|
|
|
@ -5,6 +5,40 @@
|
|||
! in the root directory of the present distribution,
|
||||
! or http://www.gnu.org/copyleft/gpl.txt .
|
||||
!
|
||||
MODULE uspp_param
|
||||
!
|
||||
! ... Ultrasoft and Norm-Conserving pseudopotential parameters
|
||||
!
|
||||
USE kinds, ONLY : DP
|
||||
USE parameters, ONLY : lqmax, nbrx, npsx, nqfx, ndmx
|
||||
!
|
||||
SAVE
|
||||
!
|
||||
CHARACTER(LEN=2 ) :: psd(npsx) ! name of the pseudopotential
|
||||
|
||||
REAL(KIND=DP) :: &
|
||||
dion(nbrx,nbrx,npsx), &! D_{mu,nu} parameters (in the atomic case)
|
||||
betar(ndmx,nbrx,npsx), &! radial beta_{mu} functions
|
||||
jjj(nbrx,npsx), &! total angular momentum of the beta function
|
||||
qqq(nbrx,nbrx,npsx), &! q_{mu,nu} parameters (in the atomic case)
|
||||
qfunc(ndmx,nbrx,nbrx,npsx), &! Q_{mu,nu}(|r|) function for |r|> r_L
|
||||
qfcoef(nqfx,lqmax,nbrx,nbrx,npsx), &! coefficients for Q for |r|<r_L
|
||||
vloc_at(ndmx,npsx), &! local potential
|
||||
rinner(lqmax,npsx) ! values of r_L
|
||||
INTEGER :: &
|
||||
nbeta(npsx), &! number of beta functions
|
||||
kkbeta(npsx), &! point where the beta are zero
|
||||
nqf(npsx), &! number of coefficients for Q
|
||||
nqlc(npsx), &! number of angular momenta in Q
|
||||
ifqopt(npsx), &! level of q optimization
|
||||
lll(nbrx,npsx), &! angular momentum of the beta function
|
||||
iver(3,npsx) ! version of the atomic code
|
||||
INTEGER :: &
|
||||
lmaxkb, &! max angular momentum
|
||||
lqx ! max angular momentum + 1 for Q functions
|
||||
END MODULE uspp_param
|
||||
!
|
||||
!
|
||||
MODULE uspp
|
||||
!
|
||||
! Ultrasoft PPs:
|
||||
|
|
|
@ -274,7 +274,6 @@ PWOBJS = \
|
|||
../PW/save_in_cbands.o \
|
||||
../PW/save_in_electrons.o \
|
||||
../PW/save_in_ions.o \
|
||||
../PW/saveall.o \
|
||||
../PW/scala_cdiag.o \
|
||||
../PW/scala_cdiaghg.o \
|
||||
../PW/scala_utils.o \
|
||||
|
|
|
@ -21,6 +21,7 @@ subroutine addusddens (drhoscf, dbecsum, irr, mode0, npe, iflag)
|
|||
USE wavefunctions_module, ONLY: psic
|
||||
use phcom
|
||||
USE kinds, only : DP
|
||||
USE uspp_param, ONLY: lqx
|
||||
implicit none
|
||||
!
|
||||
! the dummy variables
|
||||
|
|
|
@ -20,6 +20,7 @@ subroutine addusddense (drhoscf, dbecsum)
|
|||
use pwcom
|
||||
use phcom
|
||||
USE kinds, only : DP
|
||||
USE uspp_param, ONLY: lqx
|
||||
implicit none
|
||||
!
|
||||
! the dummy variables
|
||||
|
|
|
@ -16,6 +16,7 @@ subroutine addusldos (ldos, becsum1)
|
|||
#include "machine.h"
|
||||
use pwcom
|
||||
USE wavefunctions_module, ONLY: psic
|
||||
USE uspp_param, ONLY: lqx
|
||||
implicit none
|
||||
complex(kind=DP) :: ldos (nrxx, nspin)
|
||||
! local density of states
|
||||
|
|
|
@ -7,8 +7,9 @@ subroutine compute_qdipol
|
|||
USE constants, ONLY: fpi
|
||||
USE atom, ONLY: r, rab
|
||||
USE ions_base, ONLY: ntyp => nsp
|
||||
USE us, only: nbrx, tvanp, nbeta, lll, kkbeta, qfunc, rinner, &
|
||||
qfcoef, nh, nhtol, nhtolm, nqf, indv
|
||||
USE us, only: nh, nhtol, nhtolm, indv, tvanp
|
||||
USE uspp_param, only: nbrx, nbeta, lll, kkbeta, qfunc, rinner, &
|
||||
qfcoef, nqf
|
||||
USE uspp, ONLY: nlx, ap
|
||||
USE phus, ONLY: dpqq
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ subroutine dvanqq
|
|||
use pwcom
|
||||
USE kinds, only : DP
|
||||
use phcom
|
||||
USE uspp_param, ONLY: lqx
|
||||
implicit none
|
||||
!
|
||||
! And the local variables
|
||||
|
|
|
@ -23,7 +23,6 @@ subroutine localdos (ldos, ldoss, dos_ef)
|
|||
USE kinds, only : DP
|
||||
use phcom
|
||||
USE io_files, ONLY: iunigk
|
||||
|
||||
implicit none
|
||||
|
||||
complex(kind=DP) :: ldos (nrxx, nspin), ldoss (nrxxs, nspin)
|
||||
|
|
|
@ -19,6 +19,7 @@ subroutine newdq (dvscf, npe)
|
|||
use pwcom
|
||||
USE kinds, only : DP
|
||||
use phcom
|
||||
USE uspp_param, ONLY: lqx
|
||||
implicit none
|
||||
!
|
||||
! The dummy variables
|
||||
|
|
|
@ -39,6 +39,7 @@ SUBROUTINE phq_init()
|
|||
USE atom, ONLY : numeric, mesh, msh, r , rab
|
||||
USE wavefunctions_module, ONLY : evc
|
||||
USE kinds, ONLY : DP
|
||||
USE uspp_param, ONLY : vloc_at
|
||||
USE phcom
|
||||
!
|
||||
IMPLICIT NONE
|
||||
|
|
|
@ -20,6 +20,7 @@ subroutine phq_summary
|
|||
USE io_global, ONLY : stdout
|
||||
use pwcom
|
||||
USE atom, ONLY : numeric, mesh, msh, dx, r , rab, xmin, nlcc
|
||||
USE uspp_param, ONLY : psd, lll, iver, nbeta, nqf, rinner, nqlc
|
||||
use phcom
|
||||
USE control_flags, ONLY : iverbosity
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ subroutine set_drhoc (q)
|
|||
#include "machine.h"
|
||||
|
||||
use pwcom
|
||||
USE parameters, ONLY: ndmx
|
||||
USE atom, ONLY : numeric, nlcc, msh, r, rab, rho_atc
|
||||
USE kinds, only : DP
|
||||
use phcom
|
||||
|
|
|
@ -201,7 +201,6 @@ PWOBJS = \
|
|||
../PW/save_in_cbands.o \
|
||||
../PW/save_in_electrons.o \
|
||||
../PW/save_in_ions.o \
|
||||
../PW/saveall.o \
|
||||
../PW/scala_cdiag.o \
|
||||
../PW/scala_cdiaghg.o \
|
||||
../PW/scala_utils.o \
|
||||
|
|
|
@ -21,7 +21,8 @@ subroutine addusdens1d (plan, prho)
|
|||
USE ions_base, ONLY: nat, ntyp => nsp, ityp
|
||||
USE gvect, ONLY: nr3, nrx3, nrxx, nl, eigts1, eigts2, eigts3, ig1,ig2,ig3
|
||||
USE lsda_mod, ONLY: current_spin
|
||||
USE us, ONLY: lqx, becsum, nh, tvanp
|
||||
USE us, ONLY: becsum, nh, tvanp
|
||||
USE uspp_param, ONLY: lqx
|
||||
!
|
||||
! here the local variables
|
||||
!
|
||||
|
|
|
@ -14,8 +14,12 @@ program dos
|
|||
! prefix prefix of input file produced by pw.x 'pwscf'
|
||||
! (wavefunctions are not needed)
|
||||
! outdir directory containing the input file ./
|
||||
! ngauss1, gaussian broadening parameters 0
|
||||
! degauss1 if absent, read from file 0.d0
|
||||
! ngauss1 gaussian broadening parameters 0
|
||||
! = 0 Simple Gaussian broadening (default)
|
||||
! = 1 Methfessel-Paxton of order 1
|
||||
! = -1 Marzari-Vanderbilt "cold smearing"
|
||||
! = 99 Fermi-Dirac function
|
||||
! degauss1 if absent, read from file 0.d0
|
||||
! Emin, Emax min, max energy (eV) for DOS plot band extrema
|
||||
! DeltaE energy grid step (eV) none
|
||||
! fildos output file containing DOS(E) dos.out
|
||||
|
|
|
@ -30,7 +30,7 @@ subroutine local_dos (iflag, lsign, kpoint, kband, emin, emax, dos)
|
|||
USE lsda_mod, ONLY : lsda, nspin, current_spin, isk
|
||||
USE scf, ONLY : rho
|
||||
USE symme, ONLY : nsym, s, ftau
|
||||
USE us, ONLY : tvanp, becsum, nh, nkb, vkb
|
||||
USE us, ONLY : becsum, nh, nkb, vkb, tvanp
|
||||
USE wavefunctions_module, ONLY : evc, psic
|
||||
USE wvfct, ONLY : nbnd, npwx, npw, igk, wg, et, g2kin, &
|
||||
gamma_only
|
||||
|
|
|
@ -147,7 +147,7 @@ subroutine projection (first_band, last_band)
|
|||
do na = 1, nat
|
||||
nt = ityp (na)
|
||||
do n = 1, nchi (nt)
|
||||
if (oc (n, nt) .gt.0.d0.or..not.newpseudo (nt) ) then
|
||||
if (oc (n, nt) >= 0.d0) then
|
||||
l = lchi (n, nt)
|
||||
if ( (Hubbard_U(nt).ne.0.d0 .or. Hubbard_alpha(nt).ne.0.d0) .and. &
|
||||
l.eq.Hubbard_l(nt) )then
|
||||
|
@ -181,7 +181,7 @@ subroutine projection (first_band, last_band)
|
|||
do na = 1, nat
|
||||
nt = ityp (na)
|
||||
do n = 1, nchi (nt)
|
||||
if (oc (n, nt) > 0.d0 .OR..NOT.newpseudo (nt) ) then
|
||||
if (oc (n, nt) >= 0.d0) then
|
||||
l = lchi (n, nt)
|
||||
lmax_wfc = max (lmax_wfc, l )
|
||||
do m = 1, 2 * l + 1
|
||||
|
@ -240,7 +240,7 @@ subroutine projection (first_band, last_band)
|
|||
do na = 1, nat
|
||||
nt = ityp (na)
|
||||
do n = 1, nchi (nt)
|
||||
if (oc (n, nt) .gt.0.d0.or..not.newpseudo (nt) ) then
|
||||
if (oc (n, nt) >= 0.d0) then
|
||||
l = lchi (n, nt)
|
||||
if ( (Hubbard_U(nt).ne.0.d0.or.Hubbard_alpha(nt).ne.0.d0) .and. &
|
||||
l.eq.Hubbard_l(nt) )then
|
||||
|
@ -293,7 +293,7 @@ subroutine projection (first_band, last_band)
|
|||
do na = 1, nat
|
||||
nt = ityp (na)
|
||||
do n = 1, nchi (nt)
|
||||
if (oc (n, nt) .gt.0.d0.or..not.newpseudo (nt) ) then
|
||||
if (oc (n, nt) >= 0.d0) then
|
||||
l = lchi (n, nt)
|
||||
if ( (Hubbard_U(nt).ne.0.d0.or.Hubbard_alpha(nt).ne.0.d0) .and. &
|
||||
l.eq.Hubbard_l(nt) )then
|
||||
|
|
|
@ -177,7 +177,7 @@ subroutine projwave (io_choice,Emin, Emax, DeltaE, smoothing)
|
|||
do na = 1, nat
|
||||
nt = ityp (na)
|
||||
do n = 1, nchi (nt)
|
||||
if (oc (n, nt) > 0.d0 .OR..NOT.newpseudo (nt) ) then
|
||||
if (oc (n, nt) >= 0.d0) then
|
||||
l = lchi (n, nt)
|
||||
lmax_wfc = max (lmax_wfc, l )
|
||||
do m = 1, 2 * l + 1
|
||||
|
|
|
@ -175,7 +175,6 @@ s_psi.o \
|
|||
save_in_cbands.o \
|
||||
save_in_electrons.o \
|
||||
save_in_ions.o \
|
||||
saveall.o \
|
||||
scala_cdiag.o \
|
||||
scala_cdiaghg.o \
|
||||
scala_utils.o \
|
||||
|
|
|
@ -20,7 +20,8 @@ subroutine addusdens
|
|||
nl, nlm, gg, g, eigts1, eigts2, eigts3, ig1, ig2, ig3
|
||||
USE lsda_mod, ONLY: nspin
|
||||
USE scf, ONLY: rho
|
||||
USE us, ONLY : lqx, okvan, tvanp, nh, becsum
|
||||
USE us, ONLY : okvan, nh, becsum, tvanp
|
||||
USE uspp_param, ONLY : lqx
|
||||
USE wvfct, ONLY: gamma_only
|
||||
USE wavefunctions_module, ONLY : psic
|
||||
implicit none
|
||||
|
|
|
@ -22,7 +22,8 @@ subroutine addusforce (forcenl)
|
|||
nl, nlm, gg, g, eigts1, eigts2, eigts3, ig1, ig2, ig3
|
||||
USE lsda_mod, ONLY: nspin
|
||||
USE scf, ONLY: vr, vltot
|
||||
USE us, ONLY : lqx, okvan, tvanp, nhm, nh, becsum
|
||||
USE us, ONLY : okvan, nh, nhm, becsum, tvanp
|
||||
USE uspp_param, ONLY : lqx
|
||||
USE wvfct, ONLY: gamma_only
|
||||
implicit none
|
||||
real(kind=DP) :: forcenl (3, nat)
|
||||
|
|
|
@ -20,7 +20,8 @@ subroutine addusstres (sigmanlc)
|
|||
nl, nlm, gg, g, eigts1, eigts2, eigts3, ig1, ig2, ig3
|
||||
USE lsda_mod, ONLY: nspin
|
||||
USE scf, ONLY: vr, vltot
|
||||
USE us, ONLY : lqx, okvan, tvanp, nhm, nh, becsum
|
||||
USE us, ONLY : okvan, nh, nhm, becsum, tvanp
|
||||
USE uspp_param, ONLY : lqx
|
||||
USE wvfct, ONLY: gamma_only
|
||||
implicit none
|
||||
real(kind=DP) :: sigmanlc (3, 3)
|
||||
|
|
|
@ -34,8 +34,8 @@ subroutine allocate_nlpot
|
|||
USE ldaU, ONLY: Hubbard_lmax, ns, nsnew
|
||||
USE wvfct, ONLY: npwx, npw, igk, igk_l2g, g2kin
|
||||
USE us, ONLY: nh, indv, nhtol, nhtolm, qq, dvan, deeq, qrad, vkb, tab, &
|
||||
tab_at, dq, becsum, nhm, lqx, nqx, nqxq, nkb, lmaxkb, lll, nbeta, &
|
||||
tvanp, newpseudo, nhtoj
|
||||
tab_at, dq, becsum, nhm, nqx, nqxq, nkb, nhtoj
|
||||
USE uspp_param, ONLY: lqx, lmaxkb, lll, nbeta
|
||||
USE spin_orb, ONLY: lspinorb, qq_spinorb, fcoef
|
||||
implicit none
|
||||
!
|
||||
|
@ -61,28 +61,16 @@ subroutine allocate_nlpot
|
|||
!
|
||||
lmaxkb = - 1
|
||||
do nt = 1, ntyp
|
||||
if (tvanp (nt).or.newpseudo (nt)) then
|
||||
nh (nt) = 0
|
||||
do nb = 1, nbeta (nt)
|
||||
nh (nt) = nh (nt) + 2 * lll (nb, nt) + 1
|
||||
lmaxkb = max (lmaxkb, lll (nb, nt) )
|
||||
enddo
|
||||
else
|
||||
nh (nt) = (lmax(nt) + 1) * (lmax(nt) + 1) - (2 * lloc(nt) + 1)
|
||||
if (lloc (nt) .eq.lmax (nt) ) then
|
||||
lmaxkb = max (lmaxkb, lmax (nt) - 1)
|
||||
else
|
||||
lmaxkb = max (lmaxkb, lmax (nt) )
|
||||
endif
|
||||
endif
|
||||
nh (nt) = 0
|
||||
do nb = 1, nbeta (nt)
|
||||
nh (nt) = nh (nt) + 2 * lll (nb, nt) + 1
|
||||
lmaxkb = max (lmaxkb, lll (nb, nt) )
|
||||
enddo
|
||||
enddo
|
||||
!
|
||||
! calculate the maximum number of beta functions
|
||||
!
|
||||
nhm = 0
|
||||
do nt = 1, ntyp
|
||||
if (nh (nt) .gt.nhm) nhm = nh (nt)
|
||||
enddo
|
||||
nhm = MAXVAL (nh (1:ntyp))
|
||||
!
|
||||
! calculate the number of beta functions of the solid
|
||||
!
|
||||
|
|
|
@ -24,7 +24,7 @@ subroutine atomic_wfc (ik, wfcatom)
|
|||
USE gvect, ONLY: ig1, ig2, ig3, eigts1, eigts2, eigts3, g
|
||||
USE klist, ONLY: xk
|
||||
USE wvfct, ONLY: npwx, npw, nbnd, igk
|
||||
USE us, ONLY: tab_at, dq, newpseudo
|
||||
USE us, ONLY: tab_at, dq
|
||||
implicit none
|
||||
integer :: ik
|
||||
! input: k-point
|
||||
|
@ -76,7 +76,7 @@ subroutine atomic_wfc (ik, wfcatom)
|
|||
!
|
||||
do nt = 1, ntyp
|
||||
do nb = 1, nchi (nt)
|
||||
if (.not.newpseudo (nt) .or.oc (nb, nt) .gt.0.d0) then
|
||||
if ( oc (nb, nt) >= 0.d0) then
|
||||
do ig = 1, npw
|
||||
px = qg (ig) / dq - int (qg (ig) / dq)
|
||||
ux = 1.d0 - px
|
||||
|
@ -110,7 +110,7 @@ subroutine atomic_wfc (ik, wfcatom)
|
|||
!
|
||||
nt = ityp (na)
|
||||
do nb = 1, nchi (nt)
|
||||
if (.not.newpseudo (nt) .or.oc (nb, nt) .gt.0.d0) then
|
||||
if (oc (nb, nt) >= 0.d0) then
|
||||
l = lchi (nb, nt)
|
||||
lphase = (0.d0,1.d0)**l
|
||||
! the factor i^l MUST BE PRESENT in order to produce
|
||||
|
|
|
@ -157,7 +157,8 @@ SUBROUTINE c_phase
|
|||
USE constants, ONLY: pi, tpi
|
||||
USE gvect, ONLY: ngm, nr1, nr2, nr3, nrx1, nrx2, nrx3, ecutwfc, &
|
||||
g, gcutm
|
||||
USE us, ONLY: lqx, nhm, nkb, vkb, nh
|
||||
USE us, ONLY: nhm, nkb, vkb, nh
|
||||
USE uspp_param, ONLY: lqx
|
||||
USE lsda_mod, ONLY: nspin
|
||||
USE klist, ONLY: nelec, degauss, nks, xk, wk
|
||||
USE wvfct, ONLY: npwx, npw, nbnd
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
USE parameters, only: ndmx, nbrx
|
||||
USE kinds, only: DP
|
||||
use constants, only: fpi
|
||||
use us, only: lqx, tvanp, qfunc, qfcoef, nqf, rinner, lll, nbeta, &
|
||||
kkbeta
|
||||
!
|
||||
USE uspp_param, only: lqx, qfunc, qfcoef, nqf, rinner, lll, &
|
||||
nbeta, kkbeta
|
||||
USE us, ONLY: tvanp
|
||||
implicit none
|
||||
integer :: ik, msh_bp, i, np, m, k, l
|
||||
integer :: n,idbes,ilmin,ilmax,iv,jv
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
! calculate qg = SUM_LM (-I)^L AP(LM,iv,jv) YR_LM QRAD(iv,jv,L,is)
|
||||
USE kinds, ONLY: DP
|
||||
USE basis, ONLY: ntyp
|
||||
USE us, ONLY: lqx, dq, nbrx, indv, qrad, nhtol, nhtolm
|
||||
USE us, ONLY: dq, indv, qrad, nhtol, nhtolm
|
||||
USE uspp_param, ONLY: lqx, nbrx
|
||||
USE uspp, ONLY: nlx, lpl, lpx, ap
|
||||
|
||||
implicit none
|
||||
|
|
|
@ -21,7 +21,7 @@ subroutine dndepsilon ( dns,ldim,ipol,jpol )
|
|||
USE ldaU, ONLY: swfcatom, Hubbard_l, Hubbard_U, Hubbard_alpha
|
||||
USE lsda_mod, ONLY: lsda, nspin, current_spin, isk
|
||||
USE wvfct, ONLY: nbnd, npwx, npw, igk, wg
|
||||
USE us, ONLY: nkb, vkb, newpseudo
|
||||
USE us, ONLY: nkb, vkb
|
||||
use becmod
|
||||
use io_files
|
||||
#ifdef __PARA
|
||||
|
@ -60,7 +60,7 @@ subroutine dndepsilon ( dns,ldim,ipol,jpol )
|
|||
offset(na) = 0
|
||||
nt=ityp(na)
|
||||
do n=1,nchi(nt)
|
||||
if (oc(n,nt).gt.0.d0.or..not.newpseudo(nt)) then
|
||||
if (oc(n,nt) >= 0.d0) then
|
||||
l=lchi(n,nt)
|
||||
if (l.eq.Hubbard_l(nt)) offset(na) = counter
|
||||
counter = counter + 2 * l + 1
|
||||
|
|
|
@ -20,7 +20,7 @@ subroutine dndtau(dns,ldim,alpha,ipol)
|
|||
USE lsda_mod, ONLY: lsda, nspin, current_spin, isk
|
||||
USE ldaU, ONLY: swfcatom, Hubbard_l, Hubbard_U, Hubbard_alpha
|
||||
USE wavefunctions_module, ONLY : evc
|
||||
USE us, ONLY: nkb, vkb, newpseudo
|
||||
USE us, ONLY: nkb, vkb
|
||||
USE wvfct, ONLY: nbnd, npwx, npw, igk, wg
|
||||
use becmod
|
||||
use io_files
|
||||
|
@ -59,9 +59,9 @@ subroutine dndtau(dns,ldim,alpha,ipol)
|
|||
offset(na) = 0
|
||||
nt=ityp(na)
|
||||
do n=1,nchi(nt)
|
||||
if (oc(n,nt).gt.0.d0.or..not.newpseudo(nt)) then
|
||||
if (oc(n,nt) >= 0.d0) then
|
||||
l=lchi(n,nt)
|
||||
if (l.eq.Hubbard_l(nt)) offset(na) = counter
|
||||
if (l == Hubbard_l(nt)) offset(na) = counter
|
||||
counter = counter + 2 * l + 1
|
||||
end if
|
||||
end do
|
||||
|
|
|
@ -24,7 +24,7 @@ subroutine dprojdepsilon ( ik,dproj,wfcatom,spsi,ipol,jpol )
|
|||
USE ldaU, ONLY: swfcatom, Hubbard_l, Hubbard_U, Hubbard_alpha
|
||||
USE lsda_mod, ONLY: lsda, nspin, current_spin, isk
|
||||
USE wvfct, ONLY: nbnd, npwx, npw, igk, wg
|
||||
USE us, ONLY: nkb, vkb, nhm, nh, qq, newpseudo
|
||||
USE us, ONLY: nkb, vkb, nhm, nh, qq
|
||||
USE wavefunctions_module, ONLY : evc
|
||||
use becmod
|
||||
use io_files
|
||||
|
|
|
@ -24,7 +24,7 @@ subroutine dprojdtau(dproj,wfcatom,spsi,alpha,ipol,offset)
|
|||
USE ldaU, ONLY: swfcatom, Hubbard_l, Hubbard_U, Hubbard_alpha
|
||||
USE lsda_mod, ONLY: lsda, nspin, current_spin, isk
|
||||
USE wvfct, ONLY: nbnd, npwx, npw, igk, wg
|
||||
USE us, ONLY: nkb, vkb, nhm, nh, qq, newpseudo
|
||||
USE us, ONLY: nkb, vkb, nhm, nh, qq
|
||||
USE wavefunctions_module, ONLY : evc
|
||||
use becmod
|
||||
#ifdef __PARA
|
||||
|
|
|
@ -24,7 +24,8 @@ subroutine dqvan2 (ngy, ih, jh, np, qmod, dqg, ylmk0, dylmk0, ipol)
|
|||
USE kinds, ONLY: DP
|
||||
USE parameters, ONLY: nbrx
|
||||
USE gvect, ONLY: g
|
||||
USE us, ONLY: lqx, dq, indv, nhtol, nhtolm, qrad
|
||||
USE us, ONLY: dq, indv, nhtol, nhtolm, qrad
|
||||
USE uspp_param, ONLY: lqx
|
||||
USE uspp, ONLY: nlx, lpl, lpx, ap
|
||||
implicit none
|
||||
integer :: ngy, ih, jh, np, ipol
|
||||
|
|
|
@ -24,8 +24,8 @@ subroutine gen_at_dj ( kpoint, natw, lmax_wfc, dwfcat )
|
|||
USE klist, ONLY: xk
|
||||
USE gvect, ONLY: ig1, ig2, ig3, eigts1, eigts2, eigts3, g
|
||||
USE wvfct, ONLY: npw, npwx, igk
|
||||
USE us, ONLY: tab_at, dq, newpseudo
|
||||
implicit none
|
||||
USE us, ONLY: tab_at, dq
|
||||
implicit none
|
||||
!
|
||||
! I/O variables
|
||||
!
|
||||
|
@ -64,7 +64,7 @@ subroutine gen_at_dj ( kpoint, natw, lmax_wfc, dwfcat )
|
|||
|
||||
do nt=1,ntyp
|
||||
do nb=1,nchi(nt)
|
||||
if (.not.newpseudo(nt).or.oc(nb,nt).gt.0.d0) then
|
||||
if (oc(nb,nt) >= 0.d0) then
|
||||
l =lchi(nb,nt)
|
||||
do ig = 1, npw
|
||||
qt=q(ig)*tpiba
|
||||
|
@ -103,7 +103,7 @@ subroutine gen_at_dj ( kpoint, natw, lmax_wfc, dwfcat )
|
|||
eigts3(ig3(iig),na) * phase
|
||||
end do
|
||||
do nb = 1,nchi(nt)
|
||||
if (.not.newpseudo(nt).or.oc(nb,nt).gt.0.d0) then
|
||||
if (oc(nb,nt) >= 0.d0) then
|
||||
l = lchi(nb,nt)
|
||||
pref = (1.d0,0.d0)**l
|
||||
pref = (0.d0,1.d0)**l
|
||||
|
|
|
@ -24,7 +24,7 @@ subroutine gen_at_dy ( ik, natw, lmax_wfc, u, dwfcat )
|
|||
USE klist, ONLY: xk
|
||||
USE gvect, ONLY: ig1, ig2, ig3, eigts1, eigts2, eigts3, g
|
||||
USE wvfct, ONLY: npw, npwx, igk
|
||||
USE us, ONLY: tab_at, dq, newpseudo
|
||||
USE us, ONLY: tab_at, dq
|
||||
implicit none
|
||||
!
|
||||
! I/O variables
|
||||
|
@ -79,7 +79,7 @@ subroutine gen_at_dy ( ik, natw, lmax_wfc, u, dwfcat )
|
|||
!
|
||||
do nt = 1,ntyp
|
||||
do nb = 1,nchi(nt)
|
||||
if (.not.newpseudo(nt).or.oc(nb,nt).gt.0.d0) then
|
||||
if (oc(nb,nt) >= 0.d0) then
|
||||
l = lchi(nb,nt)
|
||||
do ig = 1, npw
|
||||
px = q (ig) / dq - int (q (ig) / dq)
|
||||
|
@ -113,7 +113,7 @@ subroutine gen_at_dy ( ik, natw, lmax_wfc, u, dwfcat )
|
|||
eigts3(ig3(iig),na) * phase
|
||||
end do
|
||||
do nb = 1,nchi(nt)
|
||||
if (.not.newpseudo(nt).or.oc(nb,nt).gt.0.d0) then
|
||||
if (oc(nb,nt) >= 0.d0) then
|
||||
l = lchi(nb,nt)
|
||||
pref = (1.d0,0.d0)**l
|
||||
pref = (0.d0,1.d0)**l
|
||||
|
|
|
@ -21,7 +21,8 @@ subroutine gen_us_dj (ik, dvkb)
|
|||
USE klist, ONLY: xk
|
||||
USE gvect, ONLY: ig1, ig2, ig3, eigts1, eigts2, eigts3, g
|
||||
USE wvfct, ONLY: npw, npwx, igk
|
||||
USE us, ONLY: nkb, lmaxkb, dq, nbeta, nh, indv, nhtol, nhtolm, tab
|
||||
USE us, ONLY: nkb, dq, nh, indv, nhtol, nhtolm, tab
|
||||
USE uspp_param, ONLY : lmaxkb, nbeta
|
||||
implicit none
|
||||
!
|
||||
integer :: ik
|
||||
|
|
|
@ -22,7 +22,8 @@ subroutine gen_us_dy (ik, u, dvkb)
|
|||
USE klist, ONLY: xk
|
||||
USE gvect, ONLY: ig1, ig2, ig3, eigts1, eigts2, eigts3, g
|
||||
USE wvfct, ONLY: npw, npwx, igk
|
||||
USE us, ONLY: nkb, lmaxkb, dq, nbeta, nh, indv, nhtol, nhtolm, tab
|
||||
USE us, ONLY: nkb, dq, nh, indv, nhtol, nhtolm, tab
|
||||
USE uspp_param, ONLY : lmaxkb, nbeta
|
||||
implicit none
|
||||
!
|
||||
integer :: ik
|
||||
|
|
|
@ -21,7 +21,7 @@ subroutine init_at_1
|
|||
USE constants, ONLY: fpi
|
||||
USE cell_base, ONLY: omega
|
||||
USE basis, ONLY: ntyp
|
||||
USE us, ONLY: tab_at, nqx, dq, newpseudo
|
||||
USE us, ONLY: tab_at, nqx, dq
|
||||
implicit none
|
||||
!
|
||||
integer :: n_starting_wfc, nt, nb, iq, ir, l, startq, lastq, ndm
|
||||
|
@ -44,7 +44,7 @@ subroutine init_at_1
|
|||
tab_at(:,:,:) = 0.d0
|
||||
do nt = 1, ntyp
|
||||
do nb = 1, nchi (nt)
|
||||
if (.not.newpseudo (nt) .or.oc (nb, nt) .gt.0.d0) then
|
||||
if (oc (nb, nt) >= 0.d0) then
|
||||
l = lchi (nb, nt)
|
||||
do iq = startq, lastq
|
||||
q = dq * (iq - 1)
|
||||
|
|
|
@ -36,9 +36,10 @@ subroutine init_us_1
|
|||
USE gvect, ONLY: g, gg
|
||||
USE pseud, ONLY: lloc, lmax
|
||||
USE lsda_mod, ONLY : nspin
|
||||
USE us, ONLY: lqx, dion, betar, qfunc, qfcoef, rinner, nh, nbeta, &
|
||||
kkbeta, nqf, nqlc, lll, jjj, tvanp, okvan, newpseudo, lmaxkb, &
|
||||
nqxq, dq, nqx, tab, dvan, qq, nhtol, nhtoj, nhtolm, qrad, indv, nhm
|
||||
USE us, ONLY: nh,tvanp, okvan, nqxq, dq, nqx, tab,nhtol, nhtoj, nhtolm, &
|
||||
dvan, qq, qrad, indv, nhm
|
||||
USE uspp_param, ONLY: lqx, dion, betar, qfunc, qfcoef, rinner, nbeta, &
|
||||
kkbeta, nqf, nqlc, lll, jjj, lmaxkb
|
||||
USE uspp, ONLY : ap, aainit
|
||||
USE spin_orb, ONLY : lspinorb, rot_ylm, qq_spinorb, fcoef
|
||||
implicit none
|
||||
|
|
|
@ -20,8 +20,8 @@ subroutine init_us_2 (npw_, igk_, q_, vkb_)
|
|||
USE constants, ONLY: tpi
|
||||
USE gvect, ONLY: eigts1, eigts2, eigts3, ig1, ig2, ig3, g
|
||||
USE wvfct, ONLY: npw, npwx, igk
|
||||
USE us, ONLY: nhm, nkb, vkb, lmaxkb, dq, nh, nhtol, nhtolm, tab, &
|
||||
indv, nbeta
|
||||
USE us, ONLY: nhm, nkb, vkb, dq, nh, nhtol, nhtolm, tab, indv
|
||||
USE uspp_param, ONLY: lmaxkb, nbeta
|
||||
implicit none
|
||||
!
|
||||
integer :: npw_, igk_ (npw_)
|
||||
|
|
|
@ -15,7 +15,7 @@ subroutine init_vloc
|
|||
!
|
||||
#include"machine.h"
|
||||
USE atom, ONLY: numeric, msh, mesh, r, rab
|
||||
USE us, ONLY: vloc_at
|
||||
USE uspp_param, ONLY: vloc_at
|
||||
USE basis, ONLY: ntyp
|
||||
USE cell_base, ONLY: omega, tpiba2
|
||||
USE vlocal, ONLY: vloc
|
||||
|
|
|
@ -51,8 +51,8 @@ subroutine setup2()
|
|||
USE gvect, ONLY: ecutwfc, gcutm, ngl, ngm
|
||||
USE klist, ONLY: xqq
|
||||
USE pseud, ONLY: lmax, lloc
|
||||
USE us, ONLY: lmaxkb, tvanp, nh, nbeta, lll, lqx, nqx, nqxq, nhm, nkb, &
|
||||
dq, newpseudo
|
||||
USE uspp_param, ONLY: lmaxkb, nbeta, lll, lqx
|
||||
USE us, ONLY: tvanp, nh, nqx, nqxq, nhm, nkb, dq
|
||||
USE wvfct, ONLY: npwx
|
||||
implicit none
|
||||
!
|
||||
|
@ -63,20 +63,11 @@ subroutine setup2()
|
|||
!
|
||||
lmaxkb = - 1
|
||||
do nt = 1, ntyp
|
||||
if (tvanp (nt) .or. newpseudo (nt)) then
|
||||
nh (nt) = 0
|
||||
do nb = 1, nbeta (nt)
|
||||
nh (nt) = nh (nt) + 2 * lll (nb, nt) + 1
|
||||
lmaxkb = max (lmaxkb, lll (nb, nt) )
|
||||
enddo
|
||||
else
|
||||
nh (nt) = (lmax(nt) + 1) * (lmax(nt) + 1) - (2 * lloc(nt) + 1)
|
||||
if (lloc (nt) == lmax (nt) ) then
|
||||
lmaxkb = max (lmaxkb, lmax (nt) - 1)
|
||||
else
|
||||
lmaxkb = max (lmaxkb, lmax (nt) )
|
||||
endif
|
||||
endif
|
||||
nh (nt) = 0
|
||||
do nb = 1, nbeta (nt)
|
||||
nh (nt) = nh (nt) + 2 * lll (nb, nt) + 1
|
||||
lmaxkb = max (lmaxkb, lll (nb, nt) )
|
||||
enddo
|
||||
enddo
|
||||
lqx = 2*lmaxkb+1
|
||||
!
|
||||
|
@ -122,7 +113,8 @@ subroutine memory_estimate ( )
|
|||
USE gsmooth,ONLY: ngms, doublegrid
|
||||
USE ldaU, ONLY: Hubbard_lmax, lda_plus_u
|
||||
USE lsda_mod, ONLY: nspin
|
||||
USE us, ONLY: okvan, nkb, lqx, nqx, nqxq, nhm
|
||||
USE us, ONLY: okvan, nkb, nqx, nqxq, nhm
|
||||
USE uspp_param, ONLY: lqx
|
||||
USE control_flags, ONLY: nmix, isolve, diis_ndim
|
||||
USE wvfct, ONLY: gamma_only, npwx, nbnd, nbndx
|
||||
#ifdef __PARA
|
||||
|
|
|
@ -27,8 +27,7 @@ subroutine new_ns
|
|||
USE symme, ONLY: nsym, irt
|
||||
USE wvfct, ONLY: nbnd, npw, npwx, igk, wg, gamma_only
|
||||
USE wavefunctions_module, ONLY : evc
|
||||
USE us, ONLY: newpseudo
|
||||
USE gvect, ONLY : gstart
|
||||
USE gvect, ONLY : gstart
|
||||
use io_files
|
||||
#ifdef __PARA
|
||||
use para
|
||||
|
@ -62,9 +61,9 @@ subroutine new_ns
|
|||
do na = 1, nat
|
||||
nt = ityp (na)
|
||||
do n = 1, nchi (nt)
|
||||
if (oc (n, nt) .gt.0.d0.or..not.newpseudo (nt) ) then
|
||||
if (oc (n, nt) >= 0.d0) then
|
||||
l = lchi (n, nt)
|
||||
if (l.eq.Hubbard_l(nt)) offset (na) = counter
|
||||
if (l == Hubbard_l(nt)) offset (na) = counter
|
||||
counter = counter + 2 * l + 1
|
||||
endif
|
||||
enddo
|
||||
|
|
|
@ -22,7 +22,8 @@ subroutine newd
|
|||
gstart, ig1, ig2, ig3, eigts1, eigts2, eigts3, nl
|
||||
USE lsda_mod, ONLY: nspin
|
||||
USE scf, ONLY: vr, vltot
|
||||
USE us, ONLY: lqx, deeq, dvan, okvan, nh, nhm, tvanp
|
||||
USE us, ONLY: deeq, dvan, okvan, nh, nhm, tvanp
|
||||
USE uspp_param, ONLY: lqx
|
||||
USE wvfct, ONLY: gamma_only
|
||||
USE wavefunctions_module, ONLY : psic
|
||||
implicit none
|
||||
|
|
36
PW/pwcom.f90
36
PW/pwcom.f90
|
@ -434,42 +434,16 @@ MODULE us
|
|||
!
|
||||
! ... These parameters are needed with the US pseudopotentials
|
||||
!
|
||||
USE parameters, ONLY : npsx
|
||||
USE kinds, ONLY : DP
|
||||
USE parameters, ONLY : lqmax, nbrx, npsx, nqfx, ndmx
|
||||
!
|
||||
SAVE
|
||||
!
|
||||
CHARACTER(LEN=2 ) :: psd(npsx) ! name of the pseudopotential
|
||||
|
||||
REAL(KIND=DP) :: &
|
||||
dion(nbrx,nbrx,npsx), &! D_{mu,nu} parameters (in the
|
||||
! atomic case)
|
||||
betar(ndmx,nbrx,npsx), &! radial beta_{mu} functions
|
||||
jjj(nbrx,npsx), &! total angular momentum of
|
||||
! the beta function
|
||||
qqq(nbrx,nbrx,npsx), &! q_{mu,nu} parameters (in the
|
||||
! atomic case)
|
||||
qfunc(ndmx,nbrx,nbrx,npsx), &! Q_{mu,nu}(|r|) function for
|
||||
! |r|> r_L
|
||||
qfcoef(nqfx,lqmax,nbrx,nbrx,npsx), &! coefficients for Q in region
|
||||
! |r|<r_L
|
||||
vloc_at(ndmx,npsx), &! local potential
|
||||
rinner(lqmax,npsx) ! values of r_L
|
||||
INTEGER :: &
|
||||
nh(npsx), &! number of beta functions per atomic type
|
||||
nbeta(npsx), &! number of beta functions
|
||||
kkbeta(npsx), &! point where the beta are zero
|
||||
nqf(npsx), &! number of coefficients for Q
|
||||
nqlc(npsx), &! number of angular momenta in Q
|
||||
ifqopt(npsx), &! level of q optimization
|
||||
lll(nbrx,npsx), &! angular momentum of the beta function
|
||||
iver(3,npsx) ! version of the atomic code
|
||||
INTEGER :: &
|
||||
nh(npsx), &! number of beta functions per atomic type
|
||||
nhm, &! max number of different beta functions per atom
|
||||
nkb, &! total number of beta functions, with struct.fact.
|
||||
nqxq, &! size of interpolation table
|
||||
lmaxkb, &! max angular momentum
|
||||
lqx, &! max angular momentum + 1 for Q functions
|
||||
nqx ! number of interpolation points
|
||||
INTEGER, ALLOCATABLE ::&
|
||||
indv(:,:), &! correspondence of betas atomic <-> soli
|
||||
|
@ -489,9 +463,9 @@ MODULE us
|
|||
tab(:,:,:), &! interpolation table for PPs
|
||||
tab_at(:,:,:) ! interpolation table for atomic wfc
|
||||
LOGICAL :: &
|
||||
tvanp(npsx), &! if .TRUE. the atom is of Vanderbilt type
|
||||
newpseudo(npsx), &! if .TRUE. RRKJ3 US pseudopotentials
|
||||
okvan ! if .TRUE. at least one pseudo is Vanderbilt
|
||||
tvanp(npsx), &! if .TRUE. the atom is of Vanderbilt type
|
||||
newpseudo(npsx), &! if .TRUE. multiple projectors are allowed
|
||||
okvan ! if .TRUE. at least one pseudo is Vanderbilt
|
||||
!
|
||||
END MODULE us
|
||||
!
|
||||
|
|
|
@ -21,7 +21,8 @@ subroutine qvan2 (ngy, ih, jh, np, qmod, qg, ylmk0)
|
|||
!
|
||||
#include "machine.h"
|
||||
USE kinds, ONLY: DP
|
||||
USE us, ONLY: lqx, dq, nbrx, indv, qrad, nhtolm
|
||||
USE us, ONLY: dq, indv, qrad, nhtolm
|
||||
USE uspp_param, ONLY: lqx, nbrx
|
||||
USE uspp, ONLY: nlx, lpl, lpx, ap
|
||||
implicit none
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ subroutine read_ncpp (np, iunps)
|
|||
nchi, lchi, rho_at, rho_atc, numeric, nlcc
|
||||
use pseud, only: cc, alpc, zp, aps, alps, nlc, nnl, lmax, lloc, &
|
||||
a_nlcc, b_nlcc, alpha_nlcc
|
||||
use us, only: vloc_at, betar, kkbeta, nbeta, lll, dion, psd
|
||||
use uspp_param, only: vloc_at, betar, kkbeta, nbeta, lll, dion, psd
|
||||
use funct, only: dft, which_dft
|
||||
implicit none
|
||||
!
|
||||
|
|
|
@ -13,7 +13,8 @@ subroutine readpp
|
|||
!
|
||||
#include "machine.h"
|
||||
USE atom, ONLY: numeric, xmin, dx
|
||||
USE us, ONLY: tvanp, iver, newpseudo
|
||||
USE us, ONLY: tvanp, newpseudo
|
||||
USE uspp_param, ONLY: iver
|
||||
USE basis, ONLY: ntyp
|
||||
USE funct, ONLY: iexch, icorr, igcx, igcc
|
||||
USE io_files, ONLY: pseudo_dir, psfile
|
||||
|
|
|
@ -20,9 +20,9 @@ subroutine readnewvan (is, iunps)
|
|||
use atom, only: zmesh, mesh, xmin, dx, r, rab, chi, oc, nchi, &
|
||||
lchi, rho_at, rho_atc, nlcc
|
||||
use pseud, only: zp, lmax, lloc
|
||||
use us, only: vloc_at, dion, betar, qqq, qfcoef, qfunc, nqlc, &
|
||||
rinner, nh, nbeta, kkbeta, lll, tvanp, psd
|
||||
|
||||
use uspp_param, only: vloc_at, dion, betar, qqq, qfcoef, qfunc, nqlc, &
|
||||
rinner, nbeta, kkbeta, lll, psd
|
||||
use us, only: tvanp
|
||||
use funct
|
||||
!
|
||||
implicit none
|
||||
|
@ -89,7 +89,10 @@ subroutine readnewvan (is, iunps)
|
|||
read (iunps, '(a2,2i3,f6.2)', err = 100, iostat = ios) &
|
||||
rdum, ndum, lchi (nb, is) , oc (nb, is)
|
||||
lll (nb, is) = lchi (nb, is)
|
||||
|
||||
!
|
||||
! workaround to distinguish bound states from unbound states
|
||||
!
|
||||
if (oc (nb, is) <= 0.d0) oc (nb, is) = -1.0
|
||||
enddo
|
||||
kkbeta (is) = 0
|
||||
do nb = 1, nbeta (is)
|
||||
|
|
|
@ -22,8 +22,9 @@ subroutine readvan (is, iunps)
|
|||
use atom, only: zmesh, mesh,dx, r, rab, chi, oc, nchi, lchi, &
|
||||
rho_at, rho_atc, nlcc
|
||||
use pseud, only: zp, lmax, lloc
|
||||
use us, only: vloc_at, dion, betar, qqq, qfcoef, qfunc, nqf, nqlc, &
|
||||
rinner, nh, nbeta, kkbeta, lll, tvanp, iver, ifqopt, psd
|
||||
use uspp_param, only: vloc_at, dion, betar, qqq, qfcoef, qfunc, nqf, nqlc, &
|
||||
rinner, nbeta, kkbeta, lll, iver, ifqopt, psd
|
||||
use us, only: tvanp
|
||||
use funct, only: dft, which_dft
|
||||
implicit none
|
||||
|
||||
|
|
|
@ -47,8 +47,9 @@ subroutine writefile_new( what, ndw, et_g, wg_g, kunit )
|
|||
rho_atc, mesh, msh, nchi, lchi, numeric, nlcc
|
||||
USE pseud, ONLY: cc, alpc, zp, aps, alps, nlc, nnl, lmax, lloc, &
|
||||
a_nlcc, b_nlcc, alpha_nlcc
|
||||
USE us, ONLY: vloc_at, dion, betar, qqq, qfunc, qfcoef, rinner, nh, psd, &
|
||||
nbeta, kkbeta, nqf, nqlc, ifqopt, lll, iver, tvanp, okvan, newpseudo
|
||||
USE us, ONLY: nh, tvanp, okvan, newpseudo
|
||||
USE uspp_param, ONLY: vloc_at, dion, betar, qqq, qfunc, qfcoef, rinner, &
|
||||
psd, nbeta, kkbeta, nqf, nqlc, ifqopt, lll, iver
|
||||
USE extfield, ONLY: tefield, dipfield, edir, emaxpos, eopreg, eamp
|
||||
USE wavefunctions_module, ONLY : evc
|
||||
USE fixed_occ, ONLY: tfixed_occ
|
||||
|
@ -517,8 +518,9 @@ subroutine readfile_new( what, ndr, et_g, wg_g, kunit, nsizwfc, iunitwfc, ierr )
|
|||
rho_atc, mesh, msh, nchi, lchi, numeric, nlcc
|
||||
USE pseud, ONLY: cc, alpc, zp, aps, alps, nlc, nnl, lmax, lloc, &
|
||||
a_nlcc, b_nlcc, alpha_nlcc
|
||||
USE us, ONLY: vloc_at, dion, betar, qqq, qfunc, qfcoef, rinner, nh, psd, &
|
||||
nbeta, kkbeta, nqf, nqlc, ifqopt, lll, iver, tvanp, okvan, newpseudo
|
||||
USE us, ONLY: nh, tvanp, okvan, newpseudo
|
||||
USE uspp_param, ONLY: vloc_at, dion, betar, qqq, qfunc, qfcoef, rinner, &
|
||||
psd, nbeta, kkbeta, nqf, nqlc, ifqopt, lll, iver
|
||||
USE extfield, ONLY: tefield, dipfield, edir, emaxpos, eopreg, eamp
|
||||
USE wavefunctions_module, ONLY : evc
|
||||
USE fixed_occ, ONLY: tfixed_occ
|
||||
|
@ -652,7 +654,7 @@ subroutine readfile_new( what, ndr, et_g, wg_g, kunit, nsizwfc, iunitwfc, ierr )
|
|||
trdhead = .TRUE.
|
||||
trdxdim = .TRUE.
|
||||
CASE DEFAULT
|
||||
CALL errore( ' writefile_new ', ' unknown value for what ', 1 )
|
||||
CALL errore( ' readfile_new ', ' unknown value for what ', 1 )
|
||||
END SELECT
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ SUBROUTINE s_psi( lda, n, m, psi, spsi )
|
|||
!
|
||||
USE kinds, ONLY : DP
|
||||
USE wvfct, ONLY : gamma_only
|
||||
USE us, ONLY : vkb, nkb, okvan, nh, tvanp, qq
|
||||
USE us, ONLY : vkb, nkb, okvan, nh, qq, tvanp
|
||||
USE wvfct, ONLY : igk, g2kin
|
||||
USE gsmooth, ONLY : nls, nr1s, nr2s, nr3s, nrx1s, nrx2s, nrx3s, nrxxs
|
||||
USE ldaU, ONLY : lda_plus_u
|
||||
|
|
116
PW/saveall.f90
116
PW/saveall.f90
|
@ -1,116 +0,0 @@
|
|||
!
|
||||
! Copyright (C) 2001 PWSCF group
|
||||
! This file is distributed under the terms of the
|
||||
! GNU General Public License. See the file `License'
|
||||
! in the root directory of the present distribution,
|
||||
! or http://www.gnu.org/copyleft/gpl.txt .
|
||||
!
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
subroutine saveall (iun, iflag)
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
! This subroutine writes to (iflag=1) or reads from (iflag!=1) unit
|
||||
! iun all quantities needed in subsequent calculations that are not
|
||||
! i) dynamically allocated, ii) distributed in parallel execution
|
||||
!
|
||||
USE cell_base
|
||||
USE basis
|
||||
USE gvect
|
||||
USE gsmooth
|
||||
USE klist
|
||||
USE lsda_mod, ONLY: lsda
|
||||
USE ktetra, ONLY: ntetra, ltetra, nk1, nk2, nk3, k1, k2, k3
|
||||
USE symme, ONLY: s, ftau, nsym, invsym
|
||||
USE atom
|
||||
USE pseud
|
||||
USE wvfct, ONLY: nbnd, npwx, nbndx, gamma_only
|
||||
USE ener, ONLY: ef
|
||||
USE force_mod, ONLY: lforce
|
||||
USE control_flags, ONLY: iswitch, istep, modenum, noinv
|
||||
USE char, ONLY : title, crystal, sname
|
||||
USE us
|
||||
USE extfield
|
||||
USE fixed_occ, ONLY: tfixed_occ
|
||||
USE ldaU, ONLY: lda_plus_u, Hubbard_lmax, Hubbard_l, &
|
||||
Hubbard_U, Hubbard_alpha
|
||||
USE io_files
|
||||
USE funct
|
||||
USE spin_orb, ONLY: lspinorb
|
||||
implicit none
|
||||
|
||||
integer :: iun, iflag
|
||||
! units where reads or writes
|
||||
! if 1 writes otherwise reads
|
||||
integer :: ios
|
||||
! integer variable for I/O control
|
||||
character (len=80) :: dummy_tmp_dir
|
||||
!
|
||||
if (iflag == 1) then
|
||||
write (iun) celldm, at, bg, alat, omega, tpiba, tpiba2, ibrav, symm_type
|
||||
write (iun) iswitch, istep, modenum
|
||||
write (iun) nat, ntyp, nbnd, npwx, nbndx, natomwfc, gamma_only
|
||||
write (iun) nr1, nr2, nr3, nrx1, nrx2, nrx3, nrxx, gcutm, ecutwfc, dual
|
||||
write (iun) nr1s, nr2s, nr3s, nrx1s, nrx2s, nrx3s, nrxxs, &
|
||||
doublegrid, gcutms
|
||||
write (iun) ef, degauss, nelec, nks, nkstot, ngauss, lgauss
|
||||
write (iun) k1, k2, k3, nk1, nk2, nk3, ntetra, ltetra
|
||||
write (iun) s, ftau, nsym, invsym, noinv
|
||||
write (iun) zmesh, xmin, dx, r, rab, vloc_at, chi, oc, rho_at, &
|
||||
rho_atc, mesh, msh, nchi, lchi, numeric
|
||||
write (iun) cc, alpc, zp, aps, alps, zv, nlc, nnl, lmax, lloc
|
||||
write (iun) dion, betar, qqq, qfunc, qfcoef, rinner, nbeta, &
|
||||
kkbeta, nqf, nqlc, ifqopt, lll, iver, tvanp, okvan
|
||||
write (iun) newpseudo
|
||||
write (iun) iexch, icorr, igcx, igcc, lsda
|
||||
write (iun) a_nlcc, b_nlcc, alpha_nlcc, nlcc
|
||||
write (iun) lforce
|
||||
write (iun) tfixed_occ
|
||||
write (iun) lda_plus_u, Hubbard_lmax, Hubbard_l, Hubbard_U, Hubbard_alpha
|
||||
write (iun) tefield, dipfield
|
||||
write (iun) edir
|
||||
write (iun) emaxpos, eopreg, eamp
|
||||
write (iun) jjj, jchi, lspinorb
|
||||
write (iun) title, crystal, atm, psd, sname, tmp_dir
|
||||
else
|
||||
read (iun, err = 100, iostat = ios) celldm, at, bg, alat, &
|
||||
omega, tpiba, tpiba2, ibrav, symm_type
|
||||
read (iun, err = 100, iostat = ios) iswitch, istep, modenum
|
||||
read (iun, err = 100, iostat = ios) nat, ntyp, nbnd, npwx, nbndx, &
|
||||
natomwfc, gamma_only
|
||||
read (iun, err = 100, iostat = ios) nr1, nr2, nr3, nrx1, nrx2, &
|
||||
nrx3, nrxx, gcutm, ecutwfc, dual
|
||||
read (iun, err = 100, iostat = ios) nr1s, nr2s, nr3s, nrx1s, &
|
||||
nrx2s, nrx3s, nrxxs, doublegrid, gcutms
|
||||
read (iun, err = 100, iostat = ios) ef, degauss, nelec, nks, nkstot,&
|
||||
ngauss, lgauss
|
||||
read (iun, err = 100, iostat = ios) k1, k2, k3, nk1, nk2, nk3, &
|
||||
ntetra, ltetra
|
||||
read (iun, err = 100, iostat = ios) s, ftau, nsym, invsym, noinv
|
||||
read (iun, err = 100, iostat = ios) zmesh, xmin, dx, r, rab, &
|
||||
vloc_at, chi, oc, rho_at, rho_atc, mesh, msh, nchi, lchi, numeric
|
||||
read (iun, err = 100, iostat = ios) cc, alpc, zp, aps, alps, &
|
||||
zv, nlc, nnl, lmax, lloc
|
||||
read (iun, err = 100, iostat = ios) dion, betar, qqq, qfunc, &
|
||||
qfcoef, rinner, nbeta, kkbeta, nqf, nqlc, ifqopt, lll, iver, &
|
||||
tvanp, okvan
|
||||
read (iun, err = 100, iostat = ios) newpseudo
|
||||
read (iun, err = 100, iostat = ios) iexch, icorr, igcx, igcc, lsda
|
||||
read (iun, err = 100, iostat = ios) a_nlcc, b_nlcc, alpha_nlcc, nlcc
|
||||
read (iun, err = 100, iostat = ios) lforce
|
||||
read (iun, err = 100, iostat = ios) tfixed_occ
|
||||
read (iun, err = 100, iostat = ios) lda_plus_u, Hubbard_lmax, Hubbard_l, &
|
||||
Hubbard_U, Hubbard_alpha
|
||||
read (iun, err = 100, iostat = ios) tefield, dipfield
|
||||
read (iun, err = 100, iostat = ios) edir
|
||||
read (iun, err = 100, iostat = ios) emaxpos, eopreg, eamp
|
||||
read (iun, err = 100, iostat = ios) jjj, jchi, lspinorb
|
||||
read (iun, err = 100, iostat = ios) title, crystal, atm, psd, &
|
||||
sname, dummy_tmp_dir
|
||||
!
|
||||
100 call errore ('saveall', 'reading file', abs (ios) )
|
||||
endif
|
||||
|
||||
return
|
||||
end subroutine saveall
|
||||
|
|
@ -20,7 +20,8 @@ subroutine scale_h
|
|||
USE cellmd, ONLY : at_old, omega_old
|
||||
USE gvect, ONLY: g, gg, ngm
|
||||
USE klist, ONLY: xk, wk, nkstot
|
||||
USE us, ONLY: nqxq, lqx, nbrx, nqx, qrad, tab
|
||||
USE uspp_param, ONLY: lqx, nbrx
|
||||
USE us, ONLY: nqxq, nqx, qrad, tab
|
||||
implicit none
|
||||
|
||||
integer :: ig
|
||||
|
|
10
PW/setup.f90
10
PW/setup.f90
|
@ -59,7 +59,8 @@ SUBROUTINE setup()
|
|||
restart, nosym, modenum, lraman
|
||||
USE relax, ONLY : dtau_ref, starting_diag_threshold
|
||||
USE cellmd, ONLY : calc
|
||||
USE us, ONLY : tvanp,okvan,newpseudo,psd,betar,nbeta,dion,jjj,lll
|
||||
USE uspp_param, ONLY : psd, betar, nbeta, dion, jjj, lll
|
||||
USE us, ONLY : tvanp, okvan
|
||||
USE ldaU, ONLY : d1, d2, d3, lda_plus_u, Hubbard_U, Hubbard_l, &
|
||||
Hubbard_alpha, Hubbard_lmax
|
||||
USE bp, ONLY : gdir, lberry, nppstr
|
||||
|
@ -304,7 +305,7 @@ SUBROUTINE setup()
|
|||
!
|
||||
! ... set number of atomic wavefunctions
|
||||
!
|
||||
natomwfc = n_atom_wfc( nat, npsx, ityp, newpseudo, nchix, nchi, oc, lchi )
|
||||
natomwfc = n_atom_wfc( nat, npsx, ityp, nchix, nchi, oc, lchi )
|
||||
!
|
||||
! ... set the max number of bands used in iterative diagonalization
|
||||
!
|
||||
|
@ -559,7 +560,7 @@ END SUBROUTINE setup
|
|||
!
|
||||
!
|
||||
!----------------------------------------------------------------------------
|
||||
FUNCTION n_atom_wfc( nat, npsx, ityp, newpseudo, nchix, nchi, oc, lchi )
|
||||
FUNCTION n_atom_wfc( nat, npsx, ityp, nchix, nchi, oc, lchi )
|
||||
!----------------------------------------------------------------------------
|
||||
!
|
||||
! ... Find max number of bands needed
|
||||
|
@ -571,7 +572,6 @@ FUNCTION n_atom_wfc( nat, npsx, ityp, newpseudo, nchix, nchi, oc, lchi )
|
|||
INTEGER :: n_atom_wfc
|
||||
INTEGER :: nat, npsx, ityp(nat), nchix, nchi(npsx), lchi(nchix, npsx)
|
||||
REAL(KIND=DP) :: oc(nchix, npsx)
|
||||
LOGICAL :: newpseudo(npsx)
|
||||
INTEGER :: na, nt, n
|
||||
!
|
||||
!
|
||||
|
@ -579,7 +579,7 @@ FUNCTION n_atom_wfc( nat, npsx, ityp, newpseudo, nchix, nchi, oc, lchi )
|
|||
DO na = 1, nat
|
||||
nt = ityp(na)
|
||||
DO n = 1, nchi(nt)
|
||||
IF ( oc(n,nt) > 0.D0 .OR. .NOT. newpseudo(nt) ) &
|
||||
IF ( oc(n,nt) >= 0.D0 ) &
|
||||
n_atom_wfc = n_atom_wfc + 2 * lchi(n,nt) + 1
|
||||
END DO
|
||||
END DO
|
||||
|
|
|
@ -23,7 +23,7 @@ subroutine stres_loc (sigmaloc)
|
|||
USE vlocal, ONLY : strf, vloc
|
||||
USE wvfct, ONLY: gamma_only
|
||||
USE wavefunctions_module, ONLY : psic
|
||||
USE us, ONLY: vloc_at
|
||||
USE uspp_param, ONLY: vloc_at
|
||||
implicit none
|
||||
real(kind=DP) :: sigmaloc (3, 3)
|
||||
real(kind=DP) , allocatable :: dvloc(:)
|
||||
|
|
|
@ -13,14 +13,14 @@ SUBROUTINE stres_us( ik, gk, sigmanlc )
|
|||
!
|
||||
! nonlocal (separable pseudopotential) contribution to the stress
|
||||
!
|
||||
USE kinds, ONLY : DP
|
||||
USE basis, ONLY : nat, ntyp, ityp
|
||||
USE constants, ONLY : eps8
|
||||
USE kinds, ONLY : DP
|
||||
USE klist, ONLY : nks, xk
|
||||
USE lsda_mod, ONLY : current_spin, lsda, isk
|
||||
USE wvfct, ONLY : gamma_only, npw, npwx, nbnd, igk, wg, et
|
||||
USE us, ONLY : nkb, vkb, lmaxkb, nh, qq, deeq, tvanp, &
|
||||
newpseudo
|
||||
USE uspp_param, ONLY : lmaxkb
|
||||
USE us, ONLY : nkb, vkb, nh, qq, deeq, tvanp, newpseudo
|
||||
USE wavefunctions_module, ONLY : evc
|
||||
#ifdef __PARA
|
||||
USE para, ONLY : me
|
||||
|
|
|
@ -32,7 +32,7 @@ SUBROUTINE sum_band()
|
|||
USE scf, ONLY : rho
|
||||
USE symme, ONLY : nsym, s, ftau
|
||||
USE io_files, ONLY : iunwfc, nwordwfc, iunigk
|
||||
USE us, ONLY : okvan, tvanp, becsum, nh, nkb, vkb
|
||||
USE us, ONLY : okvan, becsum, nh, nkb, vkb, tvanp
|
||||
USE wavefunctions_module, ONLY : evc, psic
|
||||
USE wvfct, ONLY : nbnd, npwx, npw, igk, wg, et
|
||||
USE mp_global, ONLY : intra_image_comm, me_image, root_image
|
||||
|
|
|
@ -35,7 +35,8 @@ subroutine summary
|
|||
a_nlcc, b_nlcc, alpha_nlcc
|
||||
USE symme, ONLY: nsym, invsym, s, ftau
|
||||
USE control_flags
|
||||
USE us, only: tvanp, nqf, rinner, nqlc, nbeta, iver, lll, psd
|
||||
USE us, ONLY: tvanp
|
||||
USE uspp_param, ONLY: nqf, rinner, nqlc, nbeta, iver, lll, psd
|
||||
USE spin_orb, only: lspinorb
|
||||
USE funct
|
||||
implicit none
|
||||
|
|
|
@ -15,7 +15,7 @@ subroutine tabd (nt, occ_loc)
|
|||
! (PPs usually are built on non physical configurations)
|
||||
!
|
||||
USE kinds, ONLY: DP
|
||||
USE us, ONLY: psd
|
||||
USE uspp_param, ONLY: psd
|
||||
implicit none
|
||||
real(kind=DP) :: occ_loc
|
||||
! output: the total number of d electrons
|
||||
|
|
|
@ -26,8 +26,9 @@ subroutine set_pseudo_upf (is, upf)
|
|||
USE atom, ONLY: zmesh, mesh, msh, dx, r, rab, &
|
||||
chi, oc, nchi, lchi, jchi, rho_at, rho_atc, nlcc
|
||||
USE pseud, ONLY: lloc, lmax, zp
|
||||
USE us, ONLY: vloc_at, dion, betar, qqq, qfcoef, qfunc, nqf, nqlc, &
|
||||
rinner, nh, nbeta, kkbeta, lll, jjj, tvanp, psd
|
||||
USE us, ONLY: tvanp
|
||||
USE uspp_param, ONLY: vloc_at, dion, betar, qqq, qfcoef, qfunc, nqf, nqlc, &
|
||||
rinner, nbeta, kkbeta, lll, jjj, psd
|
||||
USE funct, ONLY: dft, which_dft
|
||||
!
|
||||
USE ions_base, ONLY: zv
|
||||
|
|
|
@ -20,7 +20,6 @@ subroutine vhpsi (ldap, np, mp, psip, hpsi)
|
|||
ns, nsnew, swfcatom
|
||||
USE lsda_mod, ONLY: nspin, current_spin
|
||||
USE basis, ONLY: nat, ntyp, ityp, natomwfc
|
||||
USE us, ONLY: newpseudo
|
||||
USE wvfct, ONLY: gamma_only
|
||||
USE gvect, ONLY : gstart
|
||||
|
||||
|
@ -40,7 +39,7 @@ subroutine vhpsi (ldap, np, mp, psip, hpsi)
|
|||
do na = 1, nat
|
||||
nt = ityp (na)
|
||||
do n = 1, nchi (nt)
|
||||
if (oc (n, nt) > 0.d0 .or. .not.newpseudo (nt) ) then
|
||||
if (oc (n, nt) >= 0.d0) then
|
||||
l = lchi (n, nt)
|
||||
if (l.eq.Hubbard_l(nt)) offset (na) = counter
|
||||
counter = counter + 2 * l + 1
|
||||
|
|
|
@ -228,7 +228,6 @@ PWOBJS = \
|
|||
../PW/save_in_cbands.o \
|
||||
../PW/save_in_electrons.o \
|
||||
../PW/save_in_ions.o \
|
||||
../PW/saveall.o \
|
||||
../PW/scala_cdiag.o \
|
||||
../PW/scala_cdiaghg.o \
|
||||
../PW/scala_utils.o \
|
||||
|
|
|
@ -11,6 +11,7 @@ subroutine allocate_cond
|
|||
!
|
||||
#include "machine.h"
|
||||
use pwcom
|
||||
USE uspp_param, ONLY : nbrx, nbeta, lll, betar
|
||||
use atom, only: mesh, r
|
||||
use cond
|
||||
implicit none
|
||||
|
|
|
@ -32,6 +32,8 @@ subroutine four(alpha, w0, k, dz)
|
|||
!
|
||||
#include "machine.h"
|
||||
use pwcom
|
||||
USE parameters, ONLY: ndmx
|
||||
USE uspp_param, ONLY : betar
|
||||
use atom, only: msh, r, rab
|
||||
use cond
|
||||
implicit none
|
||||
|
|
|
@ -11,6 +11,7 @@ subroutine init_cond
|
|||
!
|
||||
USE io_global, ONLY : stdout
|
||||
use pwcom
|
||||
USE uspp_param, ONLY : dion, nbeta, lll
|
||||
use cond
|
||||
implicit none
|
||||
integer :: nt, ib, ir, is, na, iorb, iorb1, m, ih, ih1, ioins, &
|
||||
|
|
Loading…
Reference in New Issue