%-------------------------------------------------------------------------------------------------

      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   LICENCE   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      Copyright[c] 2018-2019, S. H. Zhang and R. F. Zhang           
                                                                    
      ADAIS - an efficient open source command-line program for Automatic Derivation of 
	      Anisotropic Ideal Strength via high-throughput first-principles computations. 
	      It is designed by Dr. S. H. Zhang and Prof. R. F. Zhang at Beihang University.

      ---------------------------------  version 1.0.0  --------------------------------
                                                                    
      This program is free software: you can redistribute it and/or modify it under the
      terms of the BSD 3-Clause License as published by the Free Software Foundation,
      either version 3 of the License, or (at your option) any later version.

      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   HISTORY   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

        1.0.0

        (2018.6.17):

	The tensile and shear ideal strengths of 3D materials via affine pure and simple deformations
	The uniaxial and biaxial tensile ideal strengths of 2D materials via affine tensile deformation
	Universal binding energy via alias tensile deformation
	Generalized stacking fault energy (-surface) via alias shear deformation
	Any crystal system of 3D and 2D materials
	Projection operation on crystal for specific crystallographic orientation parallel to three axes
	Rotation operation on crystal to specific orientation along three axes
	Redefinition of new lattice vector to specific crystallographic orientation 
	Force convergence judgement for ideal strength calculation via affine deformation
	The standardized unit cell (IEEE-format)
	Automatic determination of the possible slip system according to space group
	Automatic setups of K-points density according to the reciprocal space or atomic number
	Automatic setups of INCAR file based on the input pressure
	The variation of bond length as a function of strain for affine deformation
	Supercell building for any crystal
	Primitive cell for any crystal

	>>> Further development
	
	Disturbed method for the ideal strength calculation via affine deformation
	Surface energy of any crystallographic plane
	Analysis of phonon instability mode based on atomic displacement
	Twin structure building
	More available computer packages including VASP, QE, WIEN2K ...

      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   INSTALL   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      o Install of ADAIS

	! "cmake" is needed before installing ADAIS, and more information 
	    is in https://cmake.org/
	
	! Compiling using cmake
	! after expanding source code, and go into the source code directory:
	
	  % tar zxvf ADAIS-x.x.x.tar.gz
	  % cd ADAIS-x.x.x

	! The current directory is ADAIS_SOURCE_DIR.

	  % cd spglib-x.x.x
	  % mkdir _build; cd _build
	  % cmake ..
	  % make
	  % make install

	! The libraries are installed at ADAIS_SOURCE_DIR/spglib-1.9.9/lib and the header
 	  file is installed at ADAIS_SOURCE_DIR/spglib-1.9.9/include.
	
	  % cd ../../src
	  % make -f makefile

	! Then the executable file ADAIS will be created in the folder of ADAIS_SOURCE_DIR/bin

      o Install of slightly modified VASP

	! To calculate the ideal strength via affine pure and simple deformation for three-dimensional
          (3D) materials, both the atomic coordinates and the atomic basis vectors are relaxed by 
          modifying the five relevant strain components while remaining the applied strain component
          unchanged. The relaxation will be terminated when the five conjugate Hellmann-Feynman stresses
          reaches negligible values. While to calculate the ideal strength via affine uniaxial and 
          biaxial tensile deformation for two-dimensional (2D) materials, besides the applied strain 
          component remains unchanged, the components related to z-axis (perpendicular to the atomic 
          layers of 2D materials), i.e., e_zz, e_yz and e_zx, also remain unrelaxed.

	! In order to implement such relaxation automatically, one need to slightly modify VASP 
          optimizer with cell constraints. In ADAIS, four modified constr_cell_relax.F file are 
          provided in ADAIS_SOURCE_DIR/src/ to meet different conditions: i.e., constr_cell_relax_3d_ten.F 
          and constr_cell_relax_3d_shear.F for the calculation of the tensile and shearing ideal 
          strengths for 3D materials via affine pure and simple deformations, and constr_cell_relax_2d_uniax.F 
          and constr_cell_relax_2d_biax.F for the calculation of the uniaxial and biaxial tensile strengths 
          for 2D materials via affine tensile deformation, respectively. 

	! Before compiling the modified VASP, the original VASP source constr_cell_relax.F is needed 
          to be replaced by the one constr_cell_relax_xxx_xxx.F, by renaming it to constr_cell_relax.F.
          Then, please compile the VASP package and get the executable file vasp or vasp_std. Finally, 
          rename the executable file to vasp_xxx_xxx. Note that the original VASP is also necessary 
          for the calculation of other propertied via alias deformation obtained in ADAIS code.

      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   HOW TO RUN   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      o A short overview of all input modes currently supported in ADIAS code, together with 
        a short description. For more information of these modes, the user may refer to the 
        manual of ADAIS code in the folder of ADAIS_SOURCE_DIR/docs
	
	 1/ affine - Applying affine deformation to the structure of 3D and 2D materials
	 2/ alias - Applying alias deformation to the structure of 3D and 2D materials
	 3/ proj - Projecting the specific orientation of the given crystal to be parallel to 
            three axes x, y and z
	 4/ newlat - Redefining new right-handed lattice vectors of the current crystal
	 5/ ieee - Transforming the structure to IEEE-format for 3D and 2D materials
	 6/ super - Building the supercell of the current crystal
	 7/ output - Reading the energy and stress from the VASP output file OUTCAR after 
            first-principles calculation
	 8/ fconv - Judging whether the relaxation of the structure is convergent or not
	 9/ symm - Determining automatically the symmetry of structure and the possible slip 
            system according to space group
	10/ bond - Analyzing the variation of bond length as a function of the strain value for 
            affine deformation
	11/ incar - Creating INCAR file with a given pressure value
	12/ kpt - Creating the KPOINTS file used in VASP
	13/ help - Showing the help message, including version information, license information 
            and user-friendly options of ADAIS
	14/ clean - Cleaning all the input and output file of ADAIS code

      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   CONTENT OF ADAIS   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      o Folder <bin>

	 The folder including the executable file ADAIS after installing

      o Folder <docs>

	 1/ manual.pdf - Manual of ADAIS code

      o Folder <example>

	 1/ BarchCal.sh - Bash shell code to calculate the ideal strength, GSFE and universal binding 
            energy in batches
	 2/ example_affine.sh - Bash shell code for the calculation of ideal strength via affine 
            deformation, including the pre-processing, first-principles calculations and post-processing
	 3/ example_alias.sh - Bash shell code for the calculation of GSFE and universal binding energy via 
            alias deformation, including the pre-processing, first-principles calculations and 
            post-processing
	 4/ Folder <affine_tensile_diamond_111> - Example of the calculation of ideal tensile strength 
            via affine tensile deformation for 3D material (diamond [111])
	 5/ Folder <affine_pure_diamond_111_11-2> - Example of the calculation of ideal shearing strength 
            via affine pure shearing deformation for 3D material (diamond (111)[11-2])
	 6/ Folder <affine_simple_diamond_111_11-2> - Example of the calculation of ideal shearing strength 
            via affine simple shearing deformation for 3D material (diamond (111)[11-2])
	 7/ Folder <affine_uniaxial_graphene_X> - Example of the calculation of ideal tensile strength via 
            via uniaxial tensile deformation for 2D material (graphene uniaxial X)
	 8/ Folder <affine_biaxial_graphene> - Example of the calculation of ideal tensile strength via 
            via biaxial tensile deformation for 2D material (graphene biaxial)
	 9/ Folder <alias_Ebinding_diamond_111_unrlx> - Example of the calculation of universal binding energy via
            alais tensile deformation (diamond [111])
	10/ Folder <alias_gsfe_diamond_111_1-10_unrlx> - Example of the calculation of GSFE via alais 
            shearing deformation (diamond (111)[1-10])

      o Folder <spglib-1.9.9>

	 Spglib ia a library for finding and handling crystal symmetries

      o Folder <src>

	 1/ adhesion.f90 - Apply alias tensile deformation along z axis to the current structure for 
            calculating the universal binding energy of 3D or 2D materials
	 2/ alishear.f90 - Apply alias shearing deformation in the x-y plane to the current structure 
            for calculating the generalized stacking fault energy (GSFE) of 3D materials
	 3/ alishear2d.f90 - Apply alias shearing deformation in the x-y plane to the current structure 
            for calculating the generalized stacking fault energy (GSFE) of 2D materials
	 4/ astruc2d.f90 - Calculate the cross-sectional area of the structure from the structrue file 
            for 2D material
	 5/ biaxial2d.f90 - Apply biaxial tensile deformation to the current structure of 2D materials
	 6/ bond_len.f90 - Analyze the bond information of the structure file AFFPOS_[istr0].vasp with 
            a given value of bond_cut
	 7/ brinv.f - Solve the inverse of the matrix according the "Gauss-Jordan" method 
	 8/ cartepos.f90 - Transform fractional coordinates to cartesian coordinates
	 9/ clean.f90 - Clean all the input and output file of ADAIS code, including the results file, 
            i.e., RDAIS, RBOND and OUTFILE
	10/ constr_cell_relax_2d_biax.F - Modified constr_cell_relax.F file for biaxial tensile 
	    deformation of 2D material
	11/ constr_cell_relax_2d_uniax.F - Modified constr_cell_relax.F file for uniaxial tensile 
            deformation of 2D material
	12/ constr_cell_relax_3d_shear.F - Modified constr_cell_relax.F file for affine shearing 
            deformation of 3D material
	13/ constr_cell_relax_3d_ten.F - Modified constr_cell_relax.F file for affine tensile 
            deformation of 3D material
	14/ directpos.f90 - Transform cartesian coordinates to fractional coordinates
	15/ forceconv.f90 - Judge whether the relaxation of the structure is convergent, i.e., the 
            conjugate Hellmann-Feynman stresses reaches negligible values
	16/ help.f90 - Show the help message, including version information, license information and 
            user-friendly options of ADAIS
	17/ incarx.f90 - Create INCAR file with PSTRESS=pressure
	18/ indxproj.f90 - Crystallographic index method of projection
	19/ kpt.f90 - Create the NEWKPT file in KPOINTS format according to the user's input k_1, K_2 
            and k_3 
	20/ kpta.f90 - Create the KPOINTS file according the "K-Point Per Reciprocal Atom" (KPPRA)
	21/ kptv.f90 - Create the KPOINTS file according the "kspacing"
	22/ main.f90 - Mian function of ADAIS code
	23/ makefile - Makefile for ADAIS code
	24/ matproj.f90 - Generalized method of projection
	25/ nnumber.f90 - Get the number of element types in the structure file with format "vasp"
	26/ pureshear.f90 - Apply affine pure deformation to the current structure of 3D materials
	27/ random.f90 - Create a matrix of random number (0~1) with size of rsize1*rsize2
	28/ readoutcar.f90 - Read energy and stress of the calculated structure from the VASP output file 
            OUTCAR after first-principles calculation
	29/ readpos.f90 - Read the undeformed cell vector and atomic coordinates from the structure file 
            with format "VASP"
	30/ recell.f90 - Transform the structure to IEEE-format for 3D materials
	31/ recell2d.f90 - Transform the structure to IEEE-format for 2D materials
	32/ redefinelat.f90 - Redefine new right-handed lattice vectors "new_lat_vect" of the current 
            structure for 3D and 2D materials
	33/ rotproj.f90 - Rotation method of projection
	34/ simpleshear.f90 - Apply affine simple deformation to the current structure of 3D materials
	35/ spglib_f08.f90 - A Fortran interface in the "spglib" code
	36/ strdisp.f90 - Determine the variation of atom coordination with direct mode as a function of 
            strain value under affine pure or simple deformation for 3D materials, or uniaxial or biaxial 
            tensile deformation for 2D materials
	37/ supercell.f90 - Build the supercell of the current crystal for 3D and 2D materials
	38/ symmetry.f90 - Determine the symmetry of structure and the possible tensile crystal direction 
            and shearing slip system based on the symmetry
	39/ uniaxial2d.f90 - Apply uniaxial tensile deformation to the current structure of 2D materials
	40/ vstruc.f90 - Calculate the volume of the current structure
	41/ writebond.f90 - Analyze the variation of bond length as a function of the strain value under 
            affine pure or simple deformation for 3D materials, or uniaxial or biaxial tensile deformation 
            for 2D materials
	42/ writeout.f90 - Output the result to the file RDAIS
	43/ writepos.f90 - Write the structure file with format "VASP"
	44/ zvaluer.f90 - Determine automatically a default value of zvalue (UNIT: Ang), for which there 
            is a maximum layer spacing

%-------------------------------------------------------------------------------------------------
