Commit 772c65b8 authored by Carlo Cavazzoni's avatar Carlo Cavazzoni
Browse files

- aligning mixed-precision branch with develop

Merge branch 'develop' into mixed-precision
parents ee5a9c33 115486d4
......@@ -125,7 +125,7 @@ program fd_raman
WRITE( stdout, '(/,5x,"Atomic coordiantes")')
WRITE( stdout, '(5x,"site n. atom positions (Angs)")')
WRITE( stdout, '(6x,i4,8x,a6," tau(",i4,") = (",3f12.7," )")') &
(na, atm(ityp(na)), na, (tau(ipol,na)*alat*0.5291772, ipol=1,3), na=1,nat)
(na, atm(ityp(na)), na, (tau(ipol,na)*alat*bohr_radius_angs, ipol=1,3), na=1,nat)
!symmetries
IF (verbose) THEN
......
......@@ -248,7 +248,7 @@ end do
allocate (force0(3,natx))
de=de/0.529177 ! de is read in A and used in bohr.
de=de/bohr_radius_angs ! de is read in A and used in bohr.
! read forces for null displacements (residual)
......
......@@ -249,7 +249,7 @@ SUBROUTINE chdens (plot_files,plot_num)
abs(e2(1)*e3(1) + e2(2)*e3(2) + e2(3)*e3(3)) > 1d-6 ) &
CALL errore ('chdens', 'e1, e2, e3 are not orthogonal', 1)
IF ( output_format < 4 .or. output_format > 6 ) &
IF ( output_format < 3 .or. output_format > 6 ) &
CALL errore ('chdens', 'incompatible iflag/output_format', 1)
ELSEIF (iflag == 4) THEN
......
......@@ -997,14 +997,12 @@ MODULE pw_restart_new
CALL readschema_header( gen_info )
END IF
IF ( ldim ) THEN
! !
!
CALL readschema_dim(par_info, output_obj%atomic_species, output_obj%atomic_structure, output_obj%symmetries, &
output_obj%basis_set, output_obj%band_structure )
CALL readschema_kdim(output_obj%symmetries, output_obj%band_structure )
CALL readschema_dim(par_info, output_obj%atomic_species, &
output_obj%atomic_structure, output_obj%symmetries, &
output_obj%basis_set, output_obj%band_structure )
CALL readschema_kdim(output_obj%symmetries, output_obj%band_structure )
!
ENDIF
!
IF ( lcell ) THEN
......@@ -1072,9 +1070,6 @@ MODULE pw_restart_new
!
IF ( lexx .AND. output_obj%dft%hybrid_ispresent ) CALL readschema_exx ( output_obj%dft%hybrid )
!
!
!
!
RETURN
!
! uncomment to continue execution after an error occurs
......
......@@ -10,7 +10,7 @@ print ""
}
{ if ($3=="atoms/cell" && nr==0) {nat=$5};
if ($1=="lattice" && $2=="parameter" && nr==0 ) {alat= $5*0.529177}
if ($1=="lattice" && $2=="parameter" && nr==0 ) {alat= $5*0.52917720859}
if ($1=="a(1)" && nr==0) \
{print"* it might be useful to duplicate as follows" ;
print "* dup ",$4*alat,$5*alat,$6*alat}
......
......@@ -18,7 +18,7 @@ if [ ! -f $1.cell ]; then
fi
#
# 1 Bohr = 0.529177249 Angstrom
# 1 Bohr = 0.52917720859 Angstrom
#
awk -v FILE="$1" '
......
......@@ -56,7 +56,7 @@ fi
awk -v FILE_PREFIX="$file_prefix" -v FILE="$file" -v VERSION="$version" -v do_IBRAV=$do_ibrav -v SG=$sg '
BEGIN {
bohr = 0.52917721092
bohr = 0.52917720859
nfield=split("H He Li Be B C N O F Ne Na Mg Al Si P S Cl Ar K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr " \
"Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe Cs Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb " \
"Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr Rf " \
......
BEGIN {nr=0; nat=0; nline=0; nframe=0; label=""; print}
{ if ($3=="atoms/cell" && nr==0) {nat=$5 };
if ($1=="lattice" && $2=="parameter" && nr==0 ) {alat= $5*0.529177}
if ($1=="lattice" && $2=="parameter" && nr==0 ) {alat= $5*0.52917720859}
if ($1=="Search") {label="BFGS Search" };
if ($1=="Final" && $2=="estimate") {label=$0};
if ($1=="ATOMIC_POSITIONS") {nframe=nframe+1; nr=NR; nline=nat; print "frame ",nframe,label ; print " "};
......
......@@ -166,7 +166,7 @@ BEGIN {
nat=0;
opt_coor_found=0;
error_status=0;
bohr=0.529177
bohr=0.52917720859
}
......@@ -344,7 +344,7 @@ function make_error(message,status) {
BEGIN {
bohr=0.529177;
bohr=0.52917720859;
istep=1;
error_status=0;
if (nvec>1 || (nvec==1 && ncoor==2)) {
......
......@@ -30,7 +30,7 @@ string=$( cat ${filename} | awk -v code=${code} -v alat=${alat} ' \
BEGIN{ \
iter = 0 ; \
done = 0 ; \
b2a = 0.529177 ; \
b2a = 0.52917720859 ; \
if ( code == "PW" ) { runt = b2a*alat } \
if ( code == "CP" ) { runt = b2a } \
} \
......@@ -57,7 +57,7 @@ cat ${filename} | awk -v runt=${runt} -v nat=${nat} \
-v alat=${alat} -v niter=${niter} ' \
BEGIN{ \
iter = 0 ; \
b2a = 0.529177 ; \
b2a = 0.52917720859 ; \
printf "ANIMSTEPS %5d\n", niter ; \
printf "CRYSTAL\n" ; \
printf "PRIMVEC\n" ; \
......
......@@ -22,7 +22,7 @@ fi
cat $input | awk -v coor_only=$coor_only '
BEGIN {
f=1.0;
bohr=0.529177;
bohr=0.52917720859;
}
/PRIMVEC/ {
if ( $2 != "bohr" ) {
......
......@@ -12,7 +12,7 @@ subroutine scat_states_plot(ik,ien,norb,nocros,nchan,vec,veceig,left_to_right)
! right-moving scattering states (or Bloch states if ikind = 0).
!
use kinds, ONLY : DP
USE constants, ONLY : tpi, rytoev
USE constants, ONLY : tpi, rytoev, bohr_radius_angs
use io_global, ONLY : stdout, ionode
USE ions_base, ONLY : ityp, tau, nat, atm
use noncollin_module, ONLY : noncolin, npol
......@@ -58,7 +58,7 @@ subroutine scat_states_plot(ik,ien,norb,nocros,nchan,vec,veceig,left_to_right)
allocate( aux_plot(dfftp%nr1*dfftp%nr2*dfftp%nr3) )
!-- z-mezh (in \AA)
raux1 = at(3,3)*alat*0.5291772108d0 / dfftp%nr3
raux1 = at(3,3)*alat*bohr_radius_angs / dfftp%nr3
zdata(1) = 0.d0
do iz = 2, dfftp%nr3
zdata(iz) = zdata(iz-1) + raux1
......
......@@ -48,8 +48,7 @@ module dftd3_common
! values >5 might lead to bumps in the potential
real(wp), parameter :: k3 = -4.
real(wp), parameter :: autoang =0.52917726d0
real(wp), parameter :: autoang = 0.52917720859_wp ! aligned to NIST data
real(wp), parameter :: autokcal = 627.509541d0
real(wp), parameter :: autoev = 27.21138505
! J/mol nm^6 - > au
......
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