Commit aca28d06 by Gustav Bihlmayer

### Introduced logical l_st in cdnovlp.F90 to discriminate between calls

```from stden (t) and cdngen (f) to allow calculating starting densities
for atoms without core states.```
parent 06ef693a
 ... ... @@ -4,7 +4,7 @@ SUBROUTINE cdnovlp(mpi,& & sphhar,stars,atoms,sym,& & DIMENSION,vacuum,cell,& & input,oneD,& & input,oneD,l_st,& & jspin,rh,& & qpw,rhtxy,rho,rht) !***************************************************************** ... ... @@ -102,6 +102,7 @@ ! .. Scalar Arguments .. INTEGER,INTENT (IN) :: jspin LOGICAL,INTENT (IN) :: l_st ! .. ! .. Array Arguments .. COMPLEX,INTENT (INOUT) :: qpw(stars%n3d,DIMENSION%jspd) ... ... @@ -170,7 +171,7 @@ ! (2) cut_off core tails from noise ! nloop: DO n = 1 , atoms%ntype IF (atoms%ncst(n).GT.0) THEN IF ((atoms%ncst(n).GT.0).OR.l_st) THEN DO j = 1 , atoms%jri(n) rat(j,n) = atoms%rmsh(j,n) ENDDO ... ... @@ -198,7 +199,7 @@ ! IF mshc = jri either core tail too small or no core (i.e. H) ! DO n = 1,atoms%ntype IF ((mshc(n).GT.atoms%jri(n)).AND.(atoms%ncst(n).GT.0)) THEN IF ((mshc(n).GT.atoms%jri(n)).AND.((atoms%ncst(n).GT.0).OR.l_st)) THEN j1 = atoms%jri(n) - 1 IF ( method1 .EQ. 1) THEN ... ... @@ -600,7 +601,7 @@ ! they are contained in the plane wave part ! DO n = 1,atoms%ntype IF ((mshc(n).GT.atoms%jri(n)).AND.(atoms%ncst(n).GT.0)) THEN IF ((mshc(n).GT.atoms%jri(n)).AND.((atoms%ncst(n).GT.0).OR.l_st)) THEN DO j = 1,atoms%jri(n) rho(j,0,n,jspin) = rho(j,0,n,jspin)& & - sfp_const*rat(j,n)*rat(j,n)*rh(j,n) ... ...
 ... ... @@ -61,7 +61,7 @@ REAL slmom,slxmom,slymom,sum,thetai,phii INTEGER iter,ivac,j,jspin,jspmax,k,n,nt,ieig,ikpt INTEGER ityp,ilayer,urec,itype,iatom LOGICAL l_relax_any,exst,n_exist LOGICAL l_relax_any,exst,n_exist,l_st TYPE(t_noco)::noco_new ! .. ! .. Local Arrays .. ... ... @@ -81,6 +81,7 @@ !---> pk non-collinear LOGICAL l_enpara PARAMETER (l_st=.false.) IF (mpi%irank.EQ.0) WRITE (2,8005) 8005 FORMAT ('CHARGE DENSITY PART (cdngen):') ... ... @@ -235,7 +236,7 @@ enddo !---> pk non-collinear ELSEIF (input%ctail) THEN CALL cdnovlp(mpi,& sphhar,stars,atoms,sym, dimension,vacuum, cell, input,oneD, jspin,rh, qpw,rhtxy,rho,rht) sphhar,stars,atoms,sym, dimension,vacuum, cell, input,oneD,l_st, jspin,rh, qpw,rhtxy,rho,rht) ELSEIF (mpi%irank.EQ.0) THEN DO ityp = 1,atoms%ntype qpw(1,jspin) = qpw(1,jspin) + qint(ityp,jspin)/input%jspins/cell%volint ... ... @@ -295,7 +296,7 @@ enddo IF (input%ctail) THEN !+gu hope this works as well CALL cdnovlp(mpi, sphhar,stars,atoms,sym,& dimension,vacuum, cell, input,oneD, jspin,rh(1,1,jspin), qpw,rhtxy,rho,rht) dimension,vacuum, cell, input,oneD,l_st, jspin,rh(1,1,jspin), qpw,rhtxy,rho,rht) ELSEIF (mpi%irank.EQ.0) THEN DO ityp = 1,atoms%ntype qpw(1,jspin) = qpw(1,jspin) + qint(ityp,jspin)/input%jspins/cell%volint ... ...
 ... ... @@ -66,8 +66,8 @@ REAL, ALLOCATABLE :: rh(:,:,:),rh1(:,:,:),rhoss(:,:) REAL, ALLOCATABLE :: vacpar(:) INTEGER lnum(DIMENSION%nstd,atoms%ntypd),nst(atoms%ntypd) INTEGER dummy(atoms%ntypd),jrc(atoms%ntypd) LOGICAL l_found(0:3),llo_found(atoms%nlod),l_enpara INTEGER jrc(atoms%ntypd) LOGICAL l_found(0:3),llo_found(atoms%nlod),l_enpara,l_st CHARACTER*8 name_l(10) ! .. ! .. Intrinsic Functions .. ... ... @@ -75,7 +75,7 @@ ! .. ! .. Data statements .. DATA del/1.e-6/ PARAMETER (czero=(0.0,0.0)) PARAMETER (czero=(0.0,0.0),l_st=.true.) ! .. ! IF (input%jspins > DIMENSION%jspd) CALL juDFT_error("input%jspins > dimension%jspd",calledby& ... ... @@ -127,7 +127,6 @@ rat(jrc(n),n) = r r = r*d ENDDO dummy(n) = 1 ENDDO ! ! Generate the atomic charge densities ... ... @@ -223,7 +222,7 @@ & sphhar,stars,atoms,sym,& & DIMENSION,vacuum,& & cell,& & input,oneD,& & input,oneD,l_st,& & ispin,rh1(:,:,ispin),& & qpw,rhtxy,rho,rht) !roa- ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!