Commit 227e6f78 authored by juan rodriguez-carvajal's avatar juan rodriguez-carvajal
Browse files

Nothing important (just few writes that are commented!). In...

Nothing important (just few writes that are commented!). In CFML_Reflections_Utilities.f90, the calculation for reflections in the asymmetric unit of orthorhombic system has been simplified.
parent d6bbd2cd
Pipeline #11299 failed with stages
in 6 minutes and 35 seconds
...@@ -548,6 +548,7 @@ Program Bond_Str ...@@ -548,6 +548,7 @@ Program Bond_Str
end if end if
else if(bvel_calc) then else if(bvel_calc) then
Write(unit=*,fmt="(/,a)") " => Calculation of Bond-Valence Energy Landscape Map (it can take few minutes) ...." Write(unit=*,fmt="(/,a)") " => Calculation of Bond-Valence Energy Landscape Map (it can take few minutes) ...."
write (unit=lun, fmt='(/,a,f10.4,a)')" => Global distance cutoff:",drmax," angstroms" write (unit=lun, fmt='(/,a,f10.4,a)')" => Global distance cutoff:",drmax," angstroms"
write(unit=lun,fmt='(/,2a/)') " => Bond-site energies for species ",trim(atname) write(unit=lun,fmt='(/,2a/)') " => Bond-site energies for species ",trim(atname)
......
...@@ -1181,7 +1181,7 @@ ...@@ -1181,7 +1181,7 @@
do n=1,At2%natoms do n=1,At2%natoms
n2=At2%Atom(n)%ind(1) n2=At2%Atom(n)%ind(1)
!write(unit=*,fmt="(a,a,3f12.5)") At2%Atom(n)%Lab,At2%Atom(n)%SfacSymb,At2%Atom(n)%x !write(unit=*,fmt="(a,a,3f12.5)") At2%Atom(n)%Lab,At2%Atom(n)%SfacSymb,At2%Atom(n)%x
if (n2 ==0) then if (n2 == 0) then
err_conf=.true. err_conf=.true.
ERR_Conf_Mess="The atom "//trim(At2%Atom(n)%lab)//" is not in the Species Table" ERR_Conf_Mess="The atom "//trim(At2%Atom(n)%lab)//" is not in the Species Table"
return return
...@@ -1233,6 +1233,8 @@ ...@@ -1233,6 +1233,8 @@
sbvs=0.0 sbvs=0.0
rep=0.0 rep=0.0
ncont=0 ncont=0
!write(*,"(a,6i4)") "nz1,nz2,ny1,ny2,nx1,nx2: ",nz1,nz2,ny1,ny2,nx1,nx2
!write(*,"(a,3f10.5,a,f10.4)") "Coordinates of the site: ",pto, " drmax: ",drmax
do n=1,At2%natoms do n=1,At2%natoms
n2=At2%Atom(n)%ind(1) n2=At2%Atom(n)%ind(1)
q2=At2%Atom(n)%charge q2=At2%Atom(n)%charge
...@@ -1245,12 +1247,14 @@ ...@@ -1245,12 +1247,14 @@
occ=At2%Atom(n)%VarF(1) occ=At2%Atom(n)%VarF(1)
c_rep=occ*q1*q2/sqrt(n_tion*n_j(n2)) c_rep=occ*q1*q2/sqrt(n_tion*n_j(n2))
c_atr=occ*dzero c_atr=occ*dzero
!write(*,"(2i4,12f10.4)") n1,n2,q1,q2,rho,dzero,dmin,alpha,d_cutoff,occ,n_tion,n_j(n2), c_rep, c_atr
ferfc=erfc(drmax/rho)/drmax !always below 10^(-9) when drmax/rho > 4.2 ferfc=erfc(drmax/rho)/drmax !always below 10^(-9) when drmax/rho > 4.2
do k1=nz1,nz2 do k1=nz1,nz2
do j1=ny1,ny2 do j1=ny1,ny2
do i1=nx1,nx2 do i1=nx1,nx2
pta=At2%Atom(n)%x+real((/i1,j1,k1/)) pta=At2%Atom(n)%x+real((/i1,j1,k1/))
dd=max(Distance(pto,pta,Cell),0.0001) !To avoid division by zero dd=max(Distance(pto,pta,Cell),0.0001) !To avoid division by zero
!write(*,"(a,i5,3i4,3f10.4,f12.4)") " n,i1,j1,k1,pta,distance: ",n,i1,j1,k1,pta,dd
if (dd > drmax) cycle if (dd > drmax) cycle
if (sig1 == sig2) then if (sig1 == sig2) then
rep=rep + c_rep*(erfc(dd/rho)/dd-ferfc) rep=rep + c_rep*(erfc(dd/rho)/dd-ferfc)
...@@ -1258,6 +1262,7 @@ ...@@ -1258,6 +1262,7 @@
!if(dd > d_cutoff) cycle !if(dd > d_cutoff) cycle
sbvs=sbvs+ c_atr*((exp(alpha*(dmin-dd))-1.0)**2-1.0) sbvs=sbvs+ c_atr*((exp(alpha*(dmin-dd))-1.0)**2-1.0)
end if end if
!write(*,"(a,3f10.4)") " rep,sbvs,distance: ",rep,sbvs,dd
end do end do
end do end do
end do end do
...@@ -1265,6 +1270,7 @@ ...@@ -1265,6 +1270,7 @@
end do end do
!Multiply the repulsion term by the Coulomb constant to convert to eV !Multiply the repulsion term by the Coulomb constant to convert to eV
emin=sbvs+ke*rep emin=sbvs+ke*rep
!write(*,"(a,2f10.4)") " => Drmax and Site Energy",drmax,emin
return return
End Subroutine Calc_Site_Ene End Subroutine Calc_Site_Ene
......
...@@ -895,32 +895,34 @@ ...@@ -895,32 +895,34 @@
integer, dimension(3) :: k integer, dimension(3) :: k
!---- Local Variable ----! !---- Local Variable ----!
integer, dimension(3) :: hh !integer, dimension(3) :: hh
k=0
!---- Laue: mmm ----! !---- Laue: mmm ----!
!---- hkl: h >=0, k >=0, l >=0 ----! !---- hkl: h >=0, k >=0, l >=0 ----
select case (h(1)) k=abs(H)
case (:-1) !k=0
hh=-h !
case (0) !select case (h(1))
select case (h(2)) ! case (:-1)
case (:-1) ! hh=-h
hh=-h ! case (0)
case (0) ! select case (h(2))
if (h(3) >= 0) then ! case (:-1)
hh=h ! hh=-h
else ! case (0)
hh=-h ! if (h(3) >= 0) then
end if ! hh=h
case (1:) ! else
hh=h ! hh=-h
end select ! end if
case (1:) ! case (1:)
hh=h ! hh=h
end select ! end select
! case (1:)
if (hh(1) >= 0 .and. hh(2) >= 0 .and. hh(3) >= 0) k=hh ! hh=h
!end select
!
!if (hh(1) >= 0 .and. hh(2) >= 0 .and. hh(3) >= 0) k=hh
return return
End Function Asu_Hkl_Orthorhombic End Function Asu_Hkl_Orthorhombic
......
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