#Test strain perturbation. Si crystal, finite difference and response #function 2DTE wrt strain are compared. ndtset 12 #First dataset : self-consistent run with limited convergence tolvrs1 1.0d-12 #Datasets 2-6 : finite-difference runs with strain component 1 (xx) # increment 0.00002 getwfk2 1 rprim2 0.000000 0.500000 0.500000 0.499980 0.000000 0.500000 0.499980 0.500000 0.000000 getwfk3 1 rprim3 0.000000 0.500000 0.500000 0.499990 0.000000 0.500000 0.499990 0.500000 0.000000 getwfk4 1 rprim4 0.000000 0.500000 0.500000 0.500000 0.000000 0.500000 0.500000 0.500000 0.000000 getwfk5 1 rprim5 0.000000 0.500000 0.500000 0.500010 0.000000 0.500000 0.500010 0.500000 0.000000 getwfk6 1 rprim6 0.000000 0.500000 0.500000 0.500020 0.000000 0.500000 0.500020 0.500000 0.000000 #Datasets 7-11 : finite-difference runs with strain component 4 (yz) # increment 0.00002 getwfk7 1 rprim7 0.000000 0.499990 0.499990 0.500000 -0.000010 0.500000 0.500000 0.500000 -0.000010 getwfk8 1 rprim8 0.000000 0.499995 0.499995 0.500000 -0.000005 0.500000 0.500000 0.500000 -0.000005 getwfk9 1 rprim9 0.000000 0.500000 0.500000 0.500000 0.000000 0.500000 0.500000 0.500000 0.000000 getwfk10 1 rprim10 0.000000 0.500005 0.500005 0.500000 0.000005 0.500000 0.500000 0.500000 0.000005 getwfk11 1 rprim11 0.000000 0.500010 0.500010 0.500000 0.000010 0.500000 0.500000 0.500000 0.000010 #Dataset 12 : response function strain perturbation calculation rfstrs12 3 rfdir12 1 0 0 nqpt12 1 qpt12 0 0 0 kptopt12 2 getwfk12 4 #Common input variables acell 3*10.244431285 #previously optimized diemac 12.0 ecut 6.0 ecutsm 0.5 kptopt 1 natom 2 nband 4 ngkpt 2 2 2 nloc_alg 3 nshiftk 4 nstep 30 ntypat 1 prtvol 1 rprim 0.000 0.500 0.500 0.500 0.000 0.500 0.500 0.500 0.000 shiftk 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.5 0.0 0.0 0.0 0.5 tolvrs 1.0d-20 typat 1 1 xred 0.0 0.0 0.0 0.25 0.25 0.25 znucl 14 pp_dirpath "$ABI_PSPDIR" pseudos "PseudosTM_pwteter/14si.pspnc" #%% #%% [setup] #%% executable = abinit #%% [files] #%% files_to_test = #%% t61.out, tolnlines = 0, tolabs = 9.984e-09, tolrel = 6.000e-04, fld_options = -medium #%% [paral_info] #%% max_nprocs = 2 #%% [extra_info] #%% authors = D. R. Hamann #%% keywords = NC, DFPT #%% description = #%% Test of the strain perturbation. #%% Si in the usual diamond structrure using a Troullier-Martins #%% potential including a model core charge. The datasets #%% include an initial ground state run, 2 pairs of 5 ground #%% state runs with incrementally strained lattice vectors rprim #%% (xx and yz strains -0.00004, -0.00002, 0, 0.00002, 0.00004), #%% and one response function run for the strain 2nd derivatives. #%% This set is illustrative of the kind of testing used extensively #%% in developing the strain perturbation portions of the code. #%% The numerical 2nd derivatives of the energy wrt strains were #%% computed by applying a 5-point derivative formula to ucvol*sigma(i,j), #%% where the sigmas are the stresses calculated in the series #%% of ground state calculations. These agree with the analytic #%% 2nd derivatives calculated in the response function run to ~1.E-7 #%% for the data given here. The cartesian internal strain (mixed #%% second derivative wrt strain and atomic coordinate) agrees to ~1E-8. #%% Note that such numerical tests of the internal strain are only valid #%% if the forces are zero (relaxed or by symmetry). Otherwise, the #%% reduced-coordinate 2nd derivatives must be used for such tests #%% because the conversion to cartesian coordinates is itself strain- #%% dependent and will introduce changes in the computed derivatives. #%% In the actual development tests, stricter converence criteria were #%% used (tolvrs=1.E-24) as well as larger cutoffs, and agreement was #%% obtained at the 1.E-9 level. The model core charge contributes the #%% largest component of the error. #%% ADDITIONAL NOTE : #%% It should be noted that numerical derivative tests of the internal #%% strain should be done by comparing the "2nd-order matrix" with numerical #%% strain derivatives of the gradients wrt reduced atomic coordinates. #%% These are not normally part of the GS output, but can be obtained by #%% uncommenting the DEBUG section at the end of prtxf.F90. #%% Comparisons between numerical strain derivatives of the cartesian #%% forces and the cartesian internal strain tensor will be incorrect #%% unless the coordinates have been relaxed and the forces are zero #%% within a tight tolerance. #%%