  ===========================
      SMASH user's manual
          version 2.2.0
  ===========================

  ******************
  Important settings
  ******************
  In general, the default stack size of system resources and the default
  size of the OMP_STACKSIZE environmental variable are small.
  Set new stack sizes according to your shell.

  * bash:
    Write the following two lines in the ~/.bashrc file.
      ulimit -s unlimited
      export OMP_STACKSIZE=1G

  * csh, tcsh:
    Write the following two lines in the ~/.cshrc or ~/.tcshrc file.
      unlimit
      setenv OMP_STACKSIZE 1G

  If a large calculation stops at the first SCF iteration, increase the
  size of OMP_STACKSIZE.


  Sample input and output
  -----------------------
  Sample input and output files are included in the example/ directory.


  How to run SMASH
  ----------------
  * Intra-node (OpenMP) parallel computing
    Set the OMP_NUM_THREADS environment variable to specify the number
    of threads for one process.
  
    bash: in the ~/.bashrc file
      export OMP_NUM_THEADS=(# of threads)

    csh, tcsh:  in the ~/.cshrc or ~/.tcshrc file
      setenv OMP_NUM_THEADS (# of threads)
    
    After the setting, start a calculation.

      $ bin/smash < input > output
  
  * Inter-node (MPI) parallel computing
    Use "mpirun" or "mpiexec" command to start a calculation, and specify
    the number of MPI processes by -np option.

      $ mpirun -np (# of processes) bin/smash < input > output

  * Hybrid parallel computing
    Parallel computing with MPI and OpenMP when you use cluster or
    supercomputer systems. It is recommended that the value of
    OMP_NUM_THREADS be set equal to the number of CPU cores in a node.

      e.g.) Shell: tcsh    Machine: 10nodes, 8cores/node
      Write the following line in the ~/.tcshrc file.
        setenv OMP_NUM_THREADS 8
      And then, run the MPI job.
        $ mpirun -np 10 bin/smash < input > output


  Input format
  ------------
  1. Overview
    Computational conditions are set in first several lines.
    Subsequently, molecular data, basis and effective core potential (ECP)
    functions are set.

  2. Keywords
    2.1 List of keyword Sections
      Section   Function
     -------------------------------
      job     : Basic computational condition
      control : Detailed computational condition
      scf     : Self-consistent field
      opt     : Geometry optimization
      dft     : Density functional theory
      mp2     : MP2
      geom    : Molecular data (atom type, geometry)
      basis   : Basis function
      ecp     : Effective Core Potential
      charge  : Nuclear atomic charge

    2.2 job keywords
      runtype              specifies the type of computation.
              = energy     Molecular energy (default)
              = gradient   Molecular energy and gradient
              = optimize   Molecular geometry optimization

      method               specifies the method of computation.
              = HF         Hartree-Fock (default)
              = B3LYP      B3LYP DFT with VWN3
              = B3LYP5     B3LYP DFT with VWN5
              = MP2        Second-order Moller-Plesset perturbation theory

      basis                specifies basis functions.
              = STO-3G     (default)
              = gen        Basis functions for each element are set in
                           "basis" section. See Section 2.7.
              = 6-31G
              = 6-31G(d)
              = cc-pvdz
              = cc-pvtz
              = cc-pvqz
              = d95v
              = lanl2dz

      memory               specifies the memory size per process. (default: 8GB)
                           Supported units: B, KB, MB, GB, TB
                            
      charge               specifies the total charge of the system. (default: 0.0)
                           The value does not include point charges set in Charge section.

      multi                specifies the spin multiplicity of the system.
              = 1          Singlet (default)
              = 2          Doublet
              = 3,4,...    Triplet, Quartet, ...

      scftype              specifies the type of the SCF wavefunction.
              = RHF        Restricted (closed-shell) Hartree-Fock (default)
              = UHF        Unrestricted (open-shell) Hartree-Fock

      ecp                  specifies ECP functions.
              = none       ECP functions are not used. (default)
              = Lanl2DZ    Hay-Wadt ECP function
              = gen        ECP functions for each element are set in
                           "ecp" section. See Section 2.8.

    2.2 control keywords
      precision            controls computational precision.
                           The following variables are overridden when these are specified.
              = high       cutint2=1.0D-12, dconv=5.0D-6, threshrho=1.0D-6, threshdfock=1.0D-5,
                           threshdftao=1.0D-4, nrad=150, nleb=590
              = medium     cutint2=1.0D-11, dconv=5.0D-6, threshrho=1.0D-5, threshdfock=1.0D-4,
                           threshdftao=1.0D-3, nrad=96, nleb=302 (default)
              = low        cutint2=1.0D-10, dconv=1.0D-5, threshrho=1.0D-4, threshdfock=1.0D-4,
                           threshdftao=1.0D-2, nrad=72, nleb=302

      spher                specifies spherical harmonics or Cartesian basis functions.
              = .true.     Speherical harmonics (5d, 7f, 9g, default)
              = .false.    Cartesian (6d, 10f, 15g)

      guess                specifies the guess calculation.
              = huckel     Huckel calculation (default)
              = check      checkpoint file

      check                specifies the checkpoint file. (defalut: <empty>)

      cutint2              specifies the threshold for the two-electron integral calculation.
                           (defalut: 1.0D-11)

      bohr                 specifies the unit of the input geometry.
              = .false.    Angstrom (default)
              = .true.     Atomic unit

      iprint               controls output.
              = 1          minimal printing
              = 2          normal printing (default)
              = 3          detailed information

      threshover           specifies the linear dependence threshold of basis functions.
                           (default : 1.0D-6)

      threshatom           specifies the atom distance threshold.
                           (default : 2.0D-1)

    2.3 scf keywords
      scfconv              specifies the type of SCF convergence method.
              = DIIS       Pulay's DIIS interpolation (defalut)
              = SOSCF      Approximated second-order SCF (SOSCF) method
              = QC         Quadratically convergent (QC) SCF method

      maxiter              specifies the maximum number of SCF iteration cycles.
                           (default: 150)

      dconv                specifies the SCF density convergence tolerance.
                           (default: 5.0D-6)

      maxdiis              specifies the maximum number of DIIS steps. (default: 20)

      threshdiis           specifies the threshold of DIIS start. (default: 6.0D-1)

      maxsocf              specifies the maximum number of SOSCF steps. (default: 20)

      threshsoscf          specifies the threshold of SOSCF start. (default: 2.5D-1)

      maxqc                specifies the maximum number of QC steps. (default: 15)

      maxqcdiag            specifies the maximum number of QC Davidson diagonalization.
                           (default: 100)

      maxqcdiagsub         specifies the maximum number of trial verctors of QC Davidson
                           diagonalization. (default: 10)

      threshqc             specifies the threshold of QC convergence. (default: 1.0D-5)

    2.4 opt keywords
      nopt                 specifies the maximum number of geometry optimization steps.
                           (default: 100)

      optconv              specifies the gradient convergence tolerance of geometry
                           optimization. (default: 1.0D-4)

      cartesian            specifies the type of the coordinate system.
              = .false.    Redundant coordinate (default)
              = .true.     Cartesian coordinate

    2.5 dft keywords
      nrad                 specifies the number of radial points. (default: 96) 

      nleb                 specifies the number of Lebedev angular points.
                           Possible values are 6, 14, 26, 38, 50, 86, 110,
                           146, 170, 194, 302, 350, 434, 590, 770, 974,
                           1202, and 1454. (default: 302)

      threshweight         specifies the threshold of the weight of a grid point.
                           (default: 1.0D-8)

      threshrho            specifies the threshold of the density of a grid point.
                           (default: 1.0D-5)

      threshdfock          specifies the threshold of the Fock matrix element of a grid point.
                           (default: 1.0D-4)

      threshdftao          specifies the threshold of the atomic orbital value of a grid point.
                           (default: 1.0D-3)

      bqrad(9)             specifies the radii of ghost atoms. (default: 1.06D+0)

    2.6 mp2 keywords
      ncore                specifies the number of frozen core orbitals.
                           (default: calculated automatically)

      nvfz                 specifies the number of frozen virtual orbitals.
                           (default: 0)

      maxmp2diis           specifies the maximum number of DIIS iterations for CPHF of
                           MP2 energy gradient calculation. (default: 20)

      maxmp2iter           specifies the maximum number of iterations for CPHF of
                           MP2 energy gradient calculation. (default: 100)

      threshmp2cphf        specifies the CPHF convergence tolerance of
                           MP2 energy gradient calculation. (default: 1.0D-10)

    2.7 geom
      Write "geom" to specify the starting point for the molecular geometry.
      After the line of "geom", write element symbols and their nuclear Cartesian
      coordinates. A blank line or the end of the file means the end of the
      molecular geometry section.
      To read the molecular geometry of a checkpoint file, write "geom=check"
      instead of "geom".
      To use a dummy atom for a point charge, write "X" as an element symbol.
      "Bq1"(=Bq) to "Bq9" are available as ghost atoms on which basis functions
      and ECPs can be added for BSSE calculations.

      e.g.)  geom
           O   0.0  0.0  0.0
           H   1.0  0.0  0.0
           H   0.0  1.0  0.0
           X   0.0  0.0  3.0

    2.8 basis
      To use the basis section, basis=gen in the job section is necessary.
      Write "basis" to specify the starting point for the basis functions.
      After the line of "basis", write element symbols. From the next line,
      write their basis set or basis functions. At the end of the basis set
      or functions, write "****".
      The format of basis functions is as follows.
        (element symbols)
        (angular momentum=S,P,D,F,G,H,I,SP)  (number of primitive functions) 
          (Gaussian exponent) (contraction coefficient) (P contraction coefficient if SP)
          (Gaussian exponent) (contraction coefficient) (P contraction coefficient if SP)
          ...repeat the primitive function number of times
        ...repeat functions
        ****
      A blank line or the end of the file means the end of the
      basis function section.

      e.g.1) C O
           6-31G(d)
           ****
           H
           STO-3G
           ****

      e.g.2) C
             S  6
               3047.5248800      0.0018347
                457.3695180      0.0140373
                103.9486850      0.0688426
                 29.2101553      0.2321844
                  9.2866630      0.4679413
                  3.1639270      0.3623120
             SP 3
                  7.8682723     -0.1193324   0.0689991
                  1.8812885     -0.1608542   0.3164240
                  0.5442493      1.1434564   0.7443083
             SP 1
                  0.1687145      1.0000000   1.0000000
             D  1
                  0.8000000      1.0000000
           ****
           H
             S  3
                 18.7311370      0.0334946
                  2.8253944      0.2347270
                  0.6401217      0.8137573
             S  1
                  0.1612778      1.0000000
           ****

    2.9 ecp
      To use the ecp section, ecp=gen in the job section is necessary.
      Write "ecp" to specify the starting point for the ECP functions.
      After the line of "basis", write element symbols. From the next line,
      write their ECP function name or functions.
      For ECP functions, the format is as follows.
        (element symbols)
        (name, anything OK) (maximum angular momentum) (number of removed core electrons)
        (title, anything OK)
        (number of Gaussians)
          (power of R for Gaussian) (exponent of Gaussian) (coefficient of Gaussian)
          (power of R for Gaussian) (exponent of Gaussian) (coefficient of Gaussian)
          ...repeat the Gaussian number of times
        ...repeat functions

      A blank line or the end of the file means the end of the
      ECP function section.

      e.g.1) Fe Ru
           LANL2DZ

      e.g.2) Cl
           Cl-ECP     2   10
           d-ul potential
             5
           1      94.8130000     -10.0000000
           2     165.6440000      66.2729170
           2      30.8317000     -28.9685950
           2      10.5841000     -12.8663370
           2       3.7704000      -1.7102170
           s-ul potential
             5
           0     128.8391000       3.0000000
           1     120.3786000      12.8528510
           2      63.5622000     275.6723980
           2      18.0695000     115.6777120
           2       3.8142000      35.0606090
           p-ul potential
             6
           0     216.5263000       5.0000000
           1      46.5723000       7.4794860
           2     147.4685000     613.0320000
           2      48.9869000     280.8006850
           2      13.2096000     107.8788240
           2       3.1831000      15.3439560
           Br
           Br-ECP     3   28
           f-ul potential
             4
           1     213.6143969     -28.0000000
           2      41.0585380    -134.9268852
           2       8.7086530     -41.9271913
           2       2.6074661      -5.9336420
           s-ul potential
             4
           0      54.1980682       3.0000000
           1      32.9053558      27.3430642
           2      13.6744890     118.8028847
           2       3.0341152      43.4354876
           p-ul potential
             5
           0      54.2563340       5.0000000
           1      26.0095593      25.0504252
           2      28.2012995      92.6157463
           2       9.4341061      95.8249016
           2       2.5321764      26.2684983
           d-ul potential
             5
           0      87.6328721       3.0000000
           1      61.7373377      22.5533557
           2      32.4385104     178.1241988
           2       8.7537199      76.9924162
           2       1.6633189       9.4818270

    2.10 charge
      Write "charge" to specify nuclear charges.
      A dummy atom is set using X in geom section to specify a point charge.
      The format of nuclear charges is as follows.
        (atom number in geom section) (nuclear charge)
        (atom number in geom section) (nuclear charge)

      A blank line or the end of the file means the end of the
      charge function section.

      e.g.) geom
          O   0.0   0.0   0.0
          H   1.0   0.0   0.0
          H   0.0   1.0   0.0
          X   0.0   0.0   1.5
          X   0.0   0.0   -2.0
          
          charge
          4  1.0
          5  -0.5

