User Tools

Site Tools


exercises:2014_ethz_mmm:ls_scf

Linear Scaling Self Consistent Field Methods

In this exercise we will compare linear scaling with normal SCF methods. We will run simulations on a 2D polymer system containing up to 2400 atoms. The 2D polymer system is described in more detail in this recent publication 10.1002/adma.201304705. To make this exercise computationally feasible, will us the efficient Density Functional based Tight Binding (DFTB) method. It requires only a minima basis, but delivers nevertheless reasonable results due to an empirical correction term called repulsion potential.

You should run these calculations on 4 nodes with bsub -n 4.

1. Task: Scaling Behavior

Calculate the energy of the 2D-polymer for three different system sizes, by using NREP=1, 2, and 3. Perform each calculations with the linear scaling and the normal SCF method. Plot the time required for the last SCF cycle of each calculation vs. the system size. Extrapolate the time required for an SCF cycle of a system containing 10×10 unit cells.

The number of seconds required of each SCF cycle is printed as part of the regular output.

For the normal SCF it's the 4th column in the following table:

  Step     Update method      Time    Convergence         Total energy    Change
  ------------------------------------------------------------------------------
     1 P_Mix/Diag. 0.40E+00    3.7     0.15459443      -957.7477897329 -9.58E+02
     2 P_Mix/Diag. 0.40E+00    5.6     0.06222675      -957.8604155443 -1.13E-01
     3 DIIS/Diag.  0.11E-01    5.6     0.02839814      -957.9170257078 -5.66E-02
     4 DIIS/Diag.  0.11E-01    5.6     0.02966521      -957.9973636669 -8.03E-02
     5 DIIS/Diag.  0.22E-01    5.6     0.01746285      -957.9863069368  1.11E-02

For the linear scaling SCF it's the last column in lines like these:

 SCF     1      -957.747786827      -957.747786827   12.559000
...
 SCF     2      -957.970635063        -0.222848235   11.204000
...
 SCF     3      -957.994490590        -0.023855528   11.233000

2. Task: Filter Threshold

Calculate the energy of the single unit-cell with the linear scaling method at different filter thresholds, by changing EPS_FILTER. Plot the time required for the calculation and the obtained total energy vs the threshold. How does this compare with the total energy obtained from the normal SCF method?

Input File

2d_polymer.inp
&GLOBAL
  PROJECT 2d_polymer
  RUN_TYPE ENERGY
&END GLOBAL

&FORCE_EVAL
  &DFT
    &LS_SCF
      EPS_FILTER 1E-5  ! threshold used to determine sparsity
      MU         -0.15 ! chemical potential, an energy from within in the HOMO-LUMO gap
    &END

    &QS
      LS_SCF  ! Turns on linear scaling DFT. Comment this line to run with normal SCF.

! =============================================================================================
! === Description of Hamiltonian (Density Functional Tight Binding + Particle Meshed Ewald) ===
      METHOD DFTB
      &DFTB
        HB_SR_GAMMA 
        SELF_CONSISTENT    T
        DO_EWALD           T
        DISPERSION         T
        &PARAMETER
          PARAM_FILE_PATH  ./dftb_params/scc
          PARAM_FILE_NAME  scc_parameter
          UFF_FORCE_FIELD  uff_table
        &END PARAMETER
      &END DFTB
    &END QS
    &POISSON
      &EWALD
       EWALD_TYPE SPME
       GMAX 160
       O_SPLINE 5
      &END EWALD
    &END POISSON
! ==============================End of Hamiltonian Description ================================
! =============================================================================================
  &END DFT

! Number of unit cell replications, increase this to create a large polymer.
@SET NREP 1
  
  &SUBSYS
    &CELL
      ABC 23.577999 40.8383 30
      MULTIPLE_UNIT_CELL 1 ${NREP} 1
    &END CELL
    &TOPOLOGY
      MULTIPLE_UNIT_CELL 1 ${NREP} 1
    &END
    &COORD
@INCLUDE '2d_polymer.coord' 
    &END COORD
  &END SUBSYS
&END FORCE_EVAL

Additional Files

Download the following files into your project directory:

You can unpack them with the following commands:

$ tar -xvzf dftb_params.tgz
$ gunzip 2d_polymer.coord.gz
exercises/2014_ethz_mmm/ls_scf.txt · Last modified: 2014/10/15 15:33 by oschuett