Fixed recently added problem with K_POINTS crystal; added test for this case

git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8121 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
giannozz 2011-08-29 16:43:12 +00:00
parent 1e2dde0f84
commit d7f5597226
4 changed files with 272 additions and 19 deletions

View File

@ -96,7 +96,7 @@ SUBROUTINE iosys()
tot_magnetization_ => tot_magnetization
!
USE ktetra, ONLY : ltetra
USE start_k, ONLY : nk1, nk2, nk3
USE start_k, ONLY : init_start_k
!
USE ldaU, ONLY : Hubbard_U_ => hubbard_u, &
Hubbard_alpha_ => hubbard_alpha, &
@ -149,7 +149,7 @@ SUBROUTINE iosys()
!
USE relax, ONLY : epse, epsf, epsp, starting_scf_threshold
!
USE control_flags, ONLY : isolve, max_cg_iter, david, tr2, imix, &
USE control_flags, ONLY : isolve, max_cg_iter, david, tr2, imix, gamma_only,&
nmix, iverbosity, niter, pot_order, wfc_order, &
remove_rigid_rot_ => remove_rigid_rot, &
diago_full_acc_ => diago_full_acc, &
@ -159,7 +159,6 @@ SUBROUTINE iosys()
nstep_ => nstep, &
iprint_ => iprint, &
noinv_ => noinv, &
modenum_ => modenum, &
lkpoint_dir_ => lkpoint_dir, &
tqr_ => tqr, &
io_level, ethr, lscf, lbfgs, lmd, &
@ -298,6 +297,8 @@ SUBROUTINE iosys()
!
! ... CARDS
!
USE input_parameters, ONLY : k_points, xk, wk, nk1, nk2, nk3, &
k1, k2, k3, nkstot
USE input_parameters, ONLY : nconstr_inp, ncolvar_inp, trd_ht, rd_ht, &
cell_units
!
@ -944,7 +945,6 @@ SUBROUTINE iosys()
CASE( 'not_controlled', 'not-controlled', 'not controlled' )
!
control_temp = .false.
!
CASE( 'initial' )
!
@ -1287,6 +1287,13 @@ SUBROUTINE iosys()
call cell_base_init ( ibrav, celldm, a, b, c, cosab, cosac, cosbc, &
trd_ht, rd_ht, cell_units )
!
! ... set up k-points
!
CALL init_start_k ( nk1, nk2, nk3, k1, k2, k3, k_points, nkstot, xk, wk )
gamma_only = ( k_points == 'gamma' )
IF ( tfixed_occ .AND. (nkstot > 1 .OR. ( nk1 * nk2 * nk3 ) > 1 ) ) &
CALL errore( 'input', 'only one k point with fixed occupations', 1 )
!
CALL convert_tau ( tau_format, nat_, tau)
!
IF ( wmass == 0.D0 ) THEN
@ -1430,17 +1437,13 @@ SUBROUTINE read_cards_pw ( psfile, tau_format )
USE kinds, ONLY : DP
USE input_parameters, ONLY : atom_label, atom_pfile, atom_mass, taspc, &
tapos, rd_pos, atomic_positions, if_pos, &
sp_pos, k_points, xk, wk, nk1, nk2, nk3, &
k1, k2, k3, nkstot, &
f_inp, rd_for, tavel, sp_vel, rd_vel
sp_pos, f_inp, rd_for, tavel, sp_vel, rd_vel
USE dynamics_module, ONLY : tavel_ => tavel, vel
USE cell_base, ONLY : at, ibrav
USE ions_base, ONLY : nat, ntyp => nsp, ityp, tau, atm, extfor
USE start_k, ONLY : init_start_k
USE fixed_occ, ONLY : tfixed_occ, &
f_inp_ => f_inp
USE fixed_occ, ONLY : tfixed_occ, f_inp_ => f_inp
USE ions_base, ONLY : if_pos_ => if_pos, amass, fixatom
USE control_flags, ONLY : lfixatom, gamma_only, textfor
USE control_flags, ONLY : lfixatom, textfor
!
IMPLICIT NONE
!
@ -1506,15 +1509,8 @@ SUBROUTINE read_cards_pw ( psfile, tau_format )
!
tau_format = trim( atomic_positions )
!
CALL init_start_k ( nk1, nk2, nk3, k1, k2, k3, k_points, nkstot, xk, wk )
gamma_only = ( k_points == 'gamma' )
!
IF ( tfixed_occ ) THEN
!
IF ( nkstot > 1 .or. ( nk1 * nk2 * nk3 ) > 1 ) &
CALL errore( 'read_cards_pw', &
& 'only one k point with fixed occupations', 1 )
!
f_inp_ = f_inp
!
DEALLOCATE ( f_inp )

View File

@ -49,7 +49,7 @@ relax2 Al forces in metals
bfgs_ndim=3
scf Si fcc davidson and cg diagonalizations
simple, TF, local-TF mixing, ndim=4,8
Gamma, automatic, list of k-points
Gamma, automatic, list of k-points (tpiba, crystal, tpiba_b)
wf_collect and disk_io options
stress with k-points and at Gamma
non-scf calculation

20
tests/scf-kcrys.in Normal file
View File

@ -0,0 +1,20 @@
&control
calculation = 'scf'
tstress=.true.
/
&system
ibrav=2, celldm(1) =10.20,
nat=2, ntyp=1,
ecutwfc=12.0
/
&electrons
/
ATOMIC_SPECIES
Si 28.086 Si.pz-vbc.UPF
ATOMIC_POSITIONS
Si 0.00 0.00 0.00
Si 0.25 0.25 0.25
K_POINTS {crystal}
2
0.00 0.25 0.00 1.0
0.25 0.75 0.25 3.0

237
tests/scf-kcrys.ref Normal file
View File

@ -0,0 +1,237 @@
Program PWSCF v.4.3.2 starts on 29Aug2011 at 18:40: 9
This program is part of the open-source Quantum ESPRESSO suite
for quantum simulation of materials; please cite
"P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);
URL http://www.quantum-espresso.org",
in publications or presentations arising from this work. More details at
http://www.quantum-espresso.org/quote.php
Parallel version (MPI), running on 1 processors
Current dimensions of program PWSCF are:
Max number of different atomic species (ntypx) = 10
Max number of k-points (npk) = 40000
Max angular momentum in pseudopotentials (lmaxx) = 3
Reading input from /Users/giannozz/trunk/espresso/tests/scf-kcrys.in
Subspace diagonalization in iterative solution of the eigenvalue problem:
a serial algorithm will be used
G-vector sticks info
--------------------
sticks: dense smooth PW G-vecs: dense smooth PW
Sum 163 163 61 1459 1459 331
bravais-lattice index = 2
lattice parameter (alat) = 10.2000 a.u.
unit-cell volume = 265.3020 (a.u.)^3
number of atoms/cell = 2
number of atomic types = 1
number of electrons = 8.00
number of Kohn-Sham states= 4
kinetic-energy cutoff = 12.0000 Ry
charge density cutoff = 48.0000 Ry
convergence threshold = 1.0E-06
mixing beta = 0.7000
number of iterations used = 8 plain mixing
Exchange-correlation = SLA PZ NOGX NOGC ( 1 1 0 0 0)
EXX-fraction = 0.00
celldm(1)= 10.200000 celldm(2)= 0.000000 celldm(3)= 0.000000
celldm(4)= 0.000000 celldm(5)= 0.000000 celldm(6)= 0.000000
crystal axes: (cart. coord. in units of alat)
a(1) = ( -0.500000 0.000000 0.500000 )
a(2) = ( 0.000000 0.500000 0.500000 )
a(3) = ( -0.500000 0.500000 0.000000 )
reciprocal axes: (cart. coord. in units 2 pi/alat)
b(1) = ( -1.000000 -1.000000 1.000000 )
b(2) = ( 1.000000 1.000000 1.000000 )
b(3) = ( -1.000000 1.000000 -1.000000 )
PseudoPot. # 1 for Si read from file:
/Users/giannozz/trunk/espresso/pseudo/Si.pz-vbc.UPF
MD5 check sum: 6dfa03ddd5817404712e03e4d12deb78
Pseudo is Norm-conserving, Zval = 4.0
Generated by new atomic code, or converted to UPF format
Using radial grid of 431 points, 2 beta functions with:
l(1) = 0
l(2) = 1
atomic species valence mass pseudopotential
Si 4.00 28.08600 Si( 1.00)
24 Sym. Ops. (no inversion) found
(note: 24 additional sym.ops. were found but ignored
their fractional transations are incommensurate with FFT grid)
Cartesian axes
site n. atom positions (alat units)
1 Si tau( 1) = ( 0.0000000 0.0000000 0.0000000 )
2 Si tau( 2) = ( 0.2500000 0.2500000 0.2500000 )
number of k points= 2
cart. coord. in units 2pi/alat
k( 1) = ( 0.2500000 0.2500000 0.2500000), wk = 0.5000000
k( 2) = ( 0.2500000 0.7500000 0.7500000), wk = 1.5000000
Dense grid: 1459 G-vectors FFT dimensions: ( 15, 15, 15)
Largest allocated arrays est. size (Mb) dimensions
Kohn-Sham Wavefunctions 0.01 Mb ( 186, 4)
NL pseudopotentials 0.02 Mb ( 186, 8)
Each V/rho on FFT grid 0.05 Mb ( 3375)
Each G-vector array 0.01 Mb ( 1459)
G-vector shells 0.00 Mb ( 43)
Largest temporary arrays est. size (Mb) dimensions
Auxiliary wavefunctions 0.05 Mb ( 186, 16)
Each subspace H/S matrix 0.00 Mb ( 16, 16)
Each <psi_i|beta_j> matrix 0.00 Mb ( 8, 4)
Arrays for rho mixing 0.41 Mb ( 3375, 8)
Initial potential from superposition of free atoms
starting charge 7.99901, renormalised to 8.00000
Starting wfc are 8 atomic wfcs
total cpu time spent up to now is 0.3 secs
Self-consistent Calculation
iteration # 1 ecut= 12.00 Ry beta=0.70
Davidson diagonalization with overlap
ethr = 1.00E-02, avg # of iterations = 2.0
Threshold (ethr) on eigenvalues was too large:
Diagonalizing with lowered threshold
Davidson diagonalization with overlap
ethr = 7.93E-04, avg # of iterations = 1.0
total cpu time spent up to now is 0.3 secs
total energy = -15.79104024 Ry
Harris-Foulkes estimate = -15.81239598 Ry
estimated scf accuracy < 0.06375734 Ry
iteration # 2 ecut= 12.00 Ry beta=0.70
Davidson diagonalization with overlap
ethr = 7.97E-04, avg # of iterations = 1.0
total cpu time spent up to now is 0.3 secs
total energy = -15.79409556 Ry
Harris-Foulkes estimate = -15.79442258 Ry
estimated scf accuracy < 0.00230263 Ry
iteration # 3 ecut= 12.00 Ry beta=0.70
Davidson diagonalization with overlap
ethr = 2.88E-05, avg # of iterations = 2.0
total cpu time spent up to now is 0.4 secs
total energy = -15.79447805 Ry
Harris-Foulkes estimate = -15.79450076 Ry
estimated scf accuracy < 0.00006345 Ry
iteration # 4 ecut= 12.00 Ry beta=0.70
Davidson diagonalization with overlap
ethr = 7.93E-07, avg # of iterations = 2.0
total cpu time spent up to now is 0.4 secs
total energy = -15.79449509 Ry
Harris-Foulkes estimate = -15.79449681 Ry
estimated scf accuracy < 0.00000455 Ry
iteration # 5 ecut= 12.00 Ry beta=0.70
Davidson diagonalization with overlap
ethr = 5.69E-08, avg # of iterations = 2.5
total cpu time spent up to now is 0.4 secs
End of self-consistent calculation
k = 0.2500 0.2500 0.2500 ( 180 PWs) bands (ev):
-4.8701 2.3792 5.5371 5.5371
k = 0.2500 0.7500 0.7500 ( 186 PWs) bands (ev):
-2.9165 -0.0653 2.6795 4.0355
! total energy = -15.79449593 Ry
Harris-Foulkes estimate = -15.79449595 Ry
estimated scf accuracy < 0.00000005 Ry
The total energy is the sum of the following terms:
one-electron contribution = 4.83378704 Ry
hartree contribution = 1.08428992 Ry
xc contribution = -4.81281432 Ry
ewald contribution = -16.89975858 Ry
convergence has been achieved in 5 iterations
entering subroutine stress ...
total stress (Ry/bohr**3) (kbar) P= -30.30
-0.00020598 0.00000000 0.00000000 -30.30 0.00 0.00
0.00000000 -0.00020598 -0.00000000 0.00 -30.30 -0.00
0.00000000 -0.00000000 -0.00020598 0.00 -0.00 -30.30
Writing output data file pwscf.save
init_run : 0.09s CPU 0.10s WALL ( 1 calls)
electrons : 0.12s CPU 0.17s WALL ( 1 calls)
stress : 0.02s CPU 0.02s WALL ( 1 calls)
Called by init_run:
wfcinit : 0.01s CPU 0.01s WALL ( 1 calls)
potinit : 0.00s CPU 0.00s WALL ( 1 calls)
Called by electrons:
c_bands : 0.08s CPU 0.11s WALL ( 6 calls)
sum_band : 0.02s CPU 0.02s WALL ( 6 calls)
v_of_rho : 0.01s CPU 0.01s WALL ( 6 calls)
mix_rho : 0.00s CPU 0.01s WALL ( 6 calls)
Called by c_bands:
init_us_2 : 0.00s CPU 0.00s WALL ( 28 calls)
cegterg : 0.07s CPU 0.10s WALL ( 12 calls)
Called by *egterg:
h_psi : 0.06s CPU 0.07s WALL ( 35 calls)
g_psi : 0.00s CPU 0.00s WALL ( 21 calls)
cdiaghg : 0.01s CPU 0.01s WALL ( 31 calls)
Called by h_psi:
add_vuspsi : 0.00s CPU 0.00s WALL ( 35 calls)
General routines
calbec : 0.00s CPU 0.01s WALL ( 37 calls)
fft : 0.01s CPU 0.01s WALL ( 28 calls)
fftw : 0.06s CPU 0.07s WALL ( 332 calls)
davcio : 0.00s CPU 0.01s WALL ( 40 calls)
Parallel routines
PWSCF : 0.35s CPU 0.51s WALL
This run was terminated on: 18:40: 9 29Aug2011
=------------------------------------------------------------------------------=
JOB DONE.
=------------------------------------------------------------------------------=