<html>
<head>
<title>v6 : README</title>
</head>
<body>

<h5>Copyright (C) 2002-2010 ABINIT group (FJollet, MTorrent, GZerah, XGonze, DHamann, MVeithen)
<br> This file is distributed under the terms of the GNU General Public License, see
~abinit/COPYING or <a href="http://www.gnu.org/copyleft/gpl.txt">
http://www.gnu.org/copyleft/gpl.txt </a>.
<br> For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
</h5>

<pre>

This directory, v6, contains tests which
are related to the development of the various development in
version 6.x.x of Abinit
This file gives first a very brief description
of the tests, then a much longer one.

A classification of the tests is provided now. Later, each test is described
in more detail, with accompanying notes and references (some of the notes
might have to be updated, due to the small possible drift related to improvement
of the accuracy of the code).

------------------------------------------------------------------

* Tests 1-20 concern ground state (excluding PAW, to be placed in 41-60)
  also tests 31-40

* Tests 21-30 are related to geometry optimization, molecular dynamics, etc

* Tests 41-55 are related to PAW (excluding response functions, 
    and electronic excitations, both to be placed later).

* Tests 56-80 concern response functions

* Tests 81-99 concern electronic excitations.
    The slot 81-90 is reserved for GW calculations (screening and sigma part)
    Automatic tests concerning the Bethe-Salpeter solver should be placed
    between 91-99 even if they contain an initial preparatory GW run.
    This trick allows one to define a subtarget "make tests_bse" that can be used 
    to test the Bethe-Salpeter code without having to run the entire suite of GW tests.
    Note that "make tests_gw" requires tests_bse.

* Tests 100- need to be re-numbered in the final merge.

------------------------------------------------------------------
***************

To run these tests, do the following:

0. Be sure that the perl script "run-standard-tests", in the main directory,
   has been generated from the primitive file "run-standard-tests.pl",
   thanks to the command "make perl"
   issued in ~abinit (see the installation notes on the Web).

1. Submit the "run-standard-tests" script, specifying a machine, and
   the keyword "v6" (for Tests_v6) and either
   the index of a test case, i.e.
   (run-standard-tests name_of_machine v6 22) >& log_file
   or a whole range of test cases (two indices), i.e.
   (run-standard-tests name_of_machine v6 02 08) >& log_file
   or, if you want to run all the test cases of this directory
   (run-standard-tests name_of_machine v6) >& log_file
   This will send stdout and stderr to log_file.
   The script 'run-standard-tests', will create a subdirectory of ~abinit/tests/v6,
   with the name_of_machine and the
   date, where all the results will be placed.

2. In that directory, you will find for each test case that you have
   run, a log file (with the name of the test case), an output
   file, but also a 'diff.xxx' file, automatically created by making
   a 'diff' with respect to the "Refs" subdirectory output files.
   It contains output files from a recent version of the ABINIT code.
   There may be large differences in timing but there should only
   be minor differences in the output of physical quantities.

3. There is also a global report file, generated by the use of the
   fldiff script. Its name is fldiff.report . See the last
   version of the  ~abinit/doc/install_notes/install** file
   in the Infos directory for information about the use of this file.
   This file is the most convenient for a quick look at the correctness
   of results. When the results are not correct, one has often to
   rely on the 'diff.xxx' file to understand what was going wrong.


**********

Test cases:

 (Tests 1-20 concern ground state)

 01. Chain of Silicon diatomic molecules (4 Si2 molecules in the cell)
     Freeze oscillatory perturbations with different wavelengths and intensities,
     thanks to the qprtrb and vprtrb input variables.
     This should be linked with the computation of the dielectric constant,
     test v2#05, that uses directly the RF capabilities of ABINIT,
     for one diatomic molecule.

     For dataset 1, one reproduces the results obtained in Tv2#05, multiplied by 4. 
     The total energy is consistent up to more than 10 digits :
     -6.6499924738006 Ha for Tv2#05, -26.599969895203 Ha for the present calculation.

     For dataset 2, the perturbation qprtrb 0 0 1 is frozen in, with vprtrb 100.
     The total energy is -26.600317638775 Ha. The difference wrt the unperturbed situation is
     0.000348743572 Ha.

     For dataset 3, a much smaller perturbation (10 times smaller) is taken,
     giving total energy -26.599973367786 Ha. The difference wrt the unperturbed situation is
     0.3472583 microHa.

     For dataset 4, an even smaller perturbation (100 times smaller) is taken,
     giving total energy -26.599969929928 Ha. The difference wrt the unperturbed situation is
     0.000034725 microHa. With datasets 3 and 4, we are in the linear regime.
     The previous amplitude is better for such studies.

     Dataset 5 is the same as 3, with reversed amplitude. Results are similar to dataset 3.

     I had no sufficient time to analyze these data correctly and make the connection with the 
     results of Tv2#05, unfortunately. The following (also test 02 below) gives some more data, and raise questions.
     There might be some problem with the use of qprtrb and vprtrb.
 
     For dataset 2, the group of the four lowest eigenenergies (each corresponding to a different molecule) is :
     -0.47198  -0.46381  -0.46091  -0.45266 , whose spread is 0.01932 Ha.
     One might think that the maximum and minimum of the potential are separated roughly by 0.02 Ha.
     The value vprtrb 100 corresponds to a cosine wave whose amplitude is 100, divided by the volume
     of the cell, that is 5000 Bohr^3 : 0.02 Ha. The maximum
     and minimum of the potential should thus be separated by 0.04 Ha. There seems to be a factor of 2 off.

 02. Chain of Silicon diatomic molecules (4 Si2 molecules in the cell)
     Freeze oscillatory perturbations with different wavelengths and intensities,
     thanks to the qprtrb and vprtrb input variables.
     Compute the dielectric constant. Similar to test v6#01,
     but uses a more symmetric geometry, to examine invariance
     of the response with respect to shifts of potential, and also
     a shorter wavelength. I do not understand why vprtrb 0 10.0 leads to no response.
     Such a sine wave should cause similar response as for the cosine wave.
     No time presently to investigate this problem (XG090909)
     (contributed by X. Gonze)

 03. Chain of Silicon diatomic molecules (1 Si2 molecule in the cell)
    Uses different values of fftcache. Test similar to B3 of the cpu series (case with ecut=112 and ngfft=3*96).
    The default fftcache=16 seems OK : 
    With fftcache=1, the tcpu/ncalls/ndata is 0.028 on testf (the reference machine, 20090912)
    With fftcache=16 (the default), the tcpu/ncalls/ndata is 0.021
    With fftcache=128, the tcpu/ncalls/ndata is 0.021

 06. NaCl molecule in a big box. 
     Test of the computation of the polarisation with the routine berryphase_new, 
     for different k-point grids : only 1 k-point, a line of k-points, and a full mesh of k-points. 
     Results with acell 20 10 10 are : -9.727 C/m^2, -9.975 C/m^2, -9.503 C/m^2
       multiplied by the volume (in a.u.), gives -19454, -19950, -19006 
     Test provided by S. Leroux

     Going to bigger cells make these results converge to the same value :
     Results with acell 30 20 20 are : -1.771 C/m^2, -1.746 C/m^2, -1.747 C/m^2
       multiplied by the volume (in a.u.), gives -21252, -20952, -20964
     Results with acell 40 20 20 are : -1.3167C/m^2, -1.3057C/m^2, -1.3062C/m^2
       multiplied by the volume (in a.u.), gives -21067, -20891, -20899
     Results with acell 50 20 20 are : -1.0502C/m^2, -1.0444C/m^2, -1.0450C/m^2
       multiplied by the volume (in a.u.), gives -21004, -20888, -20900

 07. NiO with 4 atoms. Check of the modified self-consistent loop over electronic density for DMFT. This 
     calculation use LDA occupations for the test and is not running the DMFT part (dmftcheck2=-1).

 08. Print out CIF file for titanium bulk crystal prtcif variable. Hexagonal close packed Ti unit cell
     From M. Verstraete

 09. Print out CIF file for simple cubic Ti crystal, for reference purposes (conventional = primitive unit cell for symmetry ops)
     From M. Verstraete

 10. Read in Silane positions and znucl from an .xyz format file t10.in.xyz
     Demonstrates the use of the xyzfile input variable (from M. Verstraete)

 11. Print out geometry and eigenvalue files for analysis by the BoltzTraP code, for transport coefficients,
     Seebeck, etc... Tests the prtbltztrp input variable (from M. Verstraete)

 12. Isolated Hydrogen atom. 
     Treated with GGA C09x exchange functional (ixc=24).
     The total energy is -0.429523 Ha.
     Also additional tests concerning the kinetic energy density calculation,
     the gradient of electronic density calculation and 
     the Laplacian of electronic density calculation are performed.
     Test taken from v1/t21.in.

 13. Isolated Helium atom.
     Treated with GGA C09x exchange functional (ixc=24).
     The total energy is -2.7881 Ha.
     Test taken from v1/t10.in.

 14. MgB2, space group P6/m m m (#191); Bravais hP (primitive hexag.)
     GS calculation followed by a band structure calculation in which the
     k-path is automatically defined via the ndivsm input variable.
     The third dataset tests the calculation and the output of the Fermi surface (prtfsurf=1)
     in the Xcrysden format. Test provided by Matteo Giantomassi 

 15. Test the symmetry finder for all the Bravais lattices,
     with different input formats (rprim or angdeg), and for
     non-conventional choices of axes as well.
     Uses only one atom, placed at (0.6 0 0)
     Similar to test v2#52, except for the choice of the location

 16. Set of Hydrogen atoms in a body-centered, or face-centered tetragonal, of body-centered orthorhombic lattice.
     This is to test the scalecart input variable.

 17. Bi atom in a big supercell.
     Test the application of a Zeeman field.

 18. HI 8 molecule per cell, the cell is triclinic.
     Prepare the density for the next Bader analysis.

 19. HI 8 molecule per cell, the cell is triclinic.
     Bader analysis for the first atom.
     Previously, there was a bug, not active when the cell has symmetric axes.

 (Tests 21-40 are related to geometry optimization, molecular dynamics, etc)

 21. Bismuth, rhombohedral, two atoms per unit cell
     Scalar relativistic.
     Relax four different images, using the steepest descent algorithm.

 22. Hydrogen diatomic molecule in a cell, close to BCC.
     One hydrogen atom is at the origin. The other lies initially
     along the 1 1 1 direction, at a distance close to the one of the free dimer distance.
     The final position is the mirror with respect to the plane perpendicular to x, passing at 1/2 0 0 .
     The cell parameter is less than twice the H2 interatomic distance, so that the transition
     path come close to the x axis, although it never reaches it (the closest being in the
     mirror plane).

     Test the images : 6 images, exploring the transition path by a simple algorithm.

 23. Delocalized internals test. Si diamond bulk with displaced atom
     Unconverged in all variables (contributed by MJ Verstraete)

 24. Hydrogen diatomic molecule in a cell, close to BCC
     Test the string method : 6 images, exploring the transition
     path. Similar to test 22 (but with string).

 25. Hydrogen diatomic molecule in a cell, close to BCC
     Test the string method : 6 images, exploring the transition
     path but keeping X coordinated fixed. Similar to test 24 

 26. (TO BE MODIFIED BY GREGORY)
     Hydrogen diatomic molecule in a cell, close to BCC
     Test the string method : 6 images, exploring the transition
     path but keeping X coordinated fixed. Similar to test 24 

 (Tests 31-40 are more slots for testing the ground state)

 (Tests 41-55 are related to PAW)

 41. Test ujdet. Compute U in cells containing 2, 16 and 128 atoms.
     (contributed by DJ Adams)

 42. PAW Berrys Phase calculation of Born effective charge in AlAs by 
     finite differences (contributed by J. Zwanziger, adapted from efield 
     tutorial). 

 43. PAW Berrys Phase calculation of Born effective charge in AlAs by 
     finite electric fields (contributed by J. Zwanziger, adapted from efield
     tutorial). 

 44. Electric field gradient of indium metal, body-centered tetragonal, included to 
     check EFG symmetry in this case.
     (contributed by J. Zwanziger)

 51. DMFT tests on ferromagnetic NiO (2 atoms), check DMFT for several
     values of dmft_solv : computes occupations and energy.
     (contributed by B. Amadon)

 52. DMFT tests on Antiferromagnetic NiO (4 atoms), check DMFT loop with Hubbard I, DMFT
     self-consistency and density self-consistency : computes occupations and energy.
     (contributed by B. Amadon)

 53. DMFT on Gd (f-orbitals) without spin-orbit coupling : compute occupations and energy.
     (contributed by B. Amadon)

 (Tests 56-80 concern response functions)

 56. Computation of phonons and response to electric field within PAW (both q=0 and q/=0)
     Test on AlAs structure inspired by tutorespfn/trf2 tutorial.
     Ground state is computed.
     DDK is computed.
     Dielectric tensor is computed.
     Phonon modes at q=0 are computed.
     Phonons modes at q=(1/4,0,0) and q=(-1/4,1/2/1/4) are computed.
     For the time being mixing of electric field and atomic displacement is not allowed
     (contributed by M. Torrent)

 60. Crystalline Silicon
     Test the smearing parameter ESMEAR of the imaginary second order eigenvalues
     for Q-point (0 0 0), contained in the EIGI2D files. Parameters are far from
     convergence, nband=5 and nkpt=16.
     (contributed by P. Boulanger)

 61. H2 Molecule in a small box 
     Second-order eigenvalue calculation using a small number of bands,
     testing bdeigrf.
     (contributed by P. Boulanger)

 63. Si diatomic molecule
     Test of linear and non-linear response in the non-spin-polarized case.
     Only four bands are allowed, both spin-up and spin-down, so that
     the molecule is non spin polarized.
     However nsppol=2 for testing purposes.
     Over 1200 WARNINGS. 
     This test must give the same results of the test 64
     (contributed by F. Da Pieve)

 64. Si diatomic molecule 
     Test of linear and non-linear response in the non-spin-polarized case.
     Only four bands are allowed, both spin-up and spin-down, so that
     the molecule is non spin polarized (with nsppol=1).
     Over 1200 WARNINGS. 
     This test must give the same results of the test 63
     (contributed by F. Da Pieve)

 65. NaCl Molecule in a big box
     3DTE calculation with only one k-point
     (contributed by S. Le Roux)

 66. He dimer, with bare pseudopotential
     ixc=0
     Compute Raman intensity, showing essentially perfect agreement
     between DFPT and finite-differences, when the number of k points
     is extended to infinity.
     The present test use ngkpt 10 1 1 , giving
     DFPT : 0.039868
     Finite-differences : 1.6318415296 - 1.6216781815 = 0.0101633077
        to be divided by 0.02 (the difference in xcart) and 4pi => 0.040439
     Going to ngkpt 80 1 1 , gives :
     DFPT : 0.040052
     Finite-differences : 0.040054
     The DFPT with ngkpt 320 1 1 gives 0.040055 .
     
 67. Charged (He dimer)+, with bare pseudopotential
     ixc=7
     Compute Raman intensity, showing essentially perfect agreement
     between DFPT and finite-differences, when the number of k points
     is extended to infinity.
     The present test use ngkpt 10 1 1 , like the previous one.
     Going to ngkpt 80 1 1 gives 
     Finite-differences : 0.022275
     The DFPT with ngkpt 320 1 1 gives 0.022279 .

 70. VN in FCC. Phonon analysis using ANADDB.

 71. VN in FCC. Phonon analysis using ANADDB.
     Differs from test 70 by the modification of acell and rprim inside the DDB.

 72. Ground state and phonons of hcp Ti
     Test contributed by M. Verstraete

 73. mrgddb of test 72
     Test contributed by M. Verstraete

 74. mrggkk of test 72
     Test contributed by M. Verstraete

 75. mrggkk of test 72 to make auxiliary file finegrid_GKK
     Test contributed by M. Verstraete

 76. anaddb run using standard integration method 
     Test contributed by M. Verstraete

 77. anaddb run using alternative method for Fermi surface integration ep_alter_int_gam
     should give identical results to 75, but does not work as yet
     Test contributed by M. Verstraete

 78. ZrO2 FCC (fluorite structure).
     Compute the phonon frequencies at the X point.
     This worked correctly before 5.2.4, but then, an erroneous bug fix (correcting v5#21) was introduced.
     Final (correct) fixing in v6.0.4.
     (Contributed by I. Lukacevic, trying to reproduce results by Detraux et al 1997) 

 (Tests 81-99 concern electronic excitations)

 81. SiC in zinc-blende structure
     Calculation of the GW corrections with 4 different plasmon-pole models.
     The following variables are tested: nsheps, nshwfn, nshsigx, inclvkb=2,
     nomegasrd and omegasrd. Test contributed by M. Giantomassi
     
 82. GW calculation in Si: Hilbert transform method for the irreducible polarizability (gaussian approximant)
     and analytic continuation of sigma from imaginary- to real-axis. The spectral function is also
     obtained via Pade extrapolation. The following variables are tested spmeth=2, spbroad,
     nomegasi, and omegasimax
 
 83. Isolated H chain: GW calculation with cylindrical cutoff in the Coulomb interaction in order to
     speed up the convergence wrt the size of the super cell. The following variables are tested
     icutcoul=1, rcut, vcutgeo, gw_nqlwl and gw_qlwl. Test contributed by M. Giantomassi
 
 84. Carbon in diamond structure. Chained GW calculation: The first run produces the KSS, the SCR, the SUSC
 85. and the QPS file. These file are subsequently read and used in t537 using irdkss, irdscr, irdsuscep and irdqps
     In the second dataset of t85, the screened interaction W is approximated using the test-electron
     expression with the TDDFT ALDA kernel (gwgamma==1).

 86. Crystalline alpha-quartz
     Calculation of the GW corrections with non-symmorphic operations, PAW case.
     but with a set of translated atoms. PAW case.
     Ordered set of atoms ; 
     non-ordered set of atoms ; 
     translated atoms.
     Similar to v5#64, for PAW.

 87. Crystalline alpha-quartz
     Calculation of the GW corrections with non-symmorphic operations,
     but with a non-ordered set of atoms. Norm-conserving case.
     Similar to v6#97.

 88. Crystalline alpha-quartz
     Calculation of the GW corrections with non-symmorphic operations,
     but with a set of translated atoms. Norm-conserving case.
     Similar to v6#97.

 89. Isolated hydrogen atom
     Calculation of the HF levels with different ways to integrate the Coulomb divergence
     Test contributed by F. Bruneval

 90. Silicon
     Calculation of a band gap using the effective energy technique (EET).
     Test contributed by A. Berger.

 91. Silicon: Solution of the Bethe-Salpeter equation (BSE) with norm-conserving pseudopotentials. 
     W is calculated at the RPA level while the scissors operator is used to open the gap by 0.8 eV. 
     First the BSE is solved with the direct diagonalization of the two-particle Hamiltonian, then 
     the Haydock iterative method is employed to calculate the macroscopic dielectric function.
     The last dataset solves the BSE problem including the coupling between resonant and
     anti-resonant transition via brute force diagonalization. 
     Test contributed by M. Giantomassi.

 99. RPA correlation energy calculation in Si:
     using exact or numerication integration over the coupling constant, using extrapolar trick or not,
     using the full or long-range only Coulomb interaction
     Test contributed by F. Bruneval

100. Test prtposcar input variable. For simple SiO2 with 1 displaced atom,  output
     POSCAR and FORCES files. From M. Verstraete
</pre>

