User Tools

Site Tools


exercises:2015_cecam_tutorial:basis_set_optimisation_using_optimize_basis

Basis set optimisation using OPTIMIZE_BASIS

In this exercise, we will learn how to optimise a MOLOPT basis set from molecular reference calculations using the OPTIMIZE_BASIS module which has been implemented in the CP2K code.

The relevant files can be downloaded from here.

Copy the file to your Linux machine and uncompress it by:

tar xzvf basis_set_opt.tar.gz

And then enter the directory which contains the input file (optbas.inp) for basis set optimisation:

cd basis_set_opt/dzvp

The main input file for basis set optimisation (OPTIMIZE_BASIS) looks like this:

&GLOBAL
  PROJECT optbas
  PROGRAM_NAME OPTIMIZE_BASIS
  PRINT_LEVEL HIGH
&END GLOBAL

&OPTIMIZE_BASIS
   BASIS_TEMPLATE_FILE BASIS_SET_TEMPLATE
   BASIS_WORK_FILE WORK_BASIS_STRUCTURE
   BASIS_OUTPUT_FILE Na_FIT_temp
   WRITE_FREQUENCY 10
   &OPTIMIZATION
      MAX_FUN 50000 
   &END
   &TRAINING_FILES
      DIRECTORY ../na3n
      INPUT_FILE_NAME na3n.inp
   &END
   &TRAINING_FILES
      DIRECTORY ../na2o
      INPUT_FILE_NAME na2o.inp
   &END
   &TRAINING_FILES
      DIRECTORY ../nacl
      INPUT_FILE_NAME nacl.inp
   &END
   &TRAINING_FILES
      DIRECTORY ../naf
      INPUT_FILE_NAME naf.inp
   &END
   &TRAINING_FILES
      DIRECTORY ../nah
      INPUT_FILE_NAME nah.inp
   &END
   &FIT_KIND Na
      BASIS_SET DZVP
      INITIAL_DEGREES_OF_FREEDOM COEFFICIENTS
  &END FIT_KIND
&END OPTIMIZE_BASIS

In this exercise, we want to add an additional set of d functions to the current 'DZVP-MOLOPT-SR-GTH' basis set for Na (with only s and p basis functions):

 Na DZVP-MOLOPT-SR-GTH DZVP-MOLOPT-SR-GTH-q9
 1
 2 0 1 7 3 2
     23.518800761960  0.037798268053  0.005040470618  0.037779070657 -0.041235150854 -0.005410838671
     11.135656103275  0.180415272016  0.031210048356 -0.119614429319 -0.102704065658 -0.017609338317
      4.647813820246 -0.084235489885 -0.021214584887  0.224302495702 -0.276507156374 -0.043803008653
      1.866708259982 -0.502007239468 -0.088006426680 -0.183779813212 -0.405087985600 -0.067844235623
      0.734683697196 -0.487454712994 -0.241562643580  1.641649867502 -0.345669762598 -0.085057974012
      0.275672995860 -0.088909855778  0.046069503612 -2.281564821968 -0.128294724774  0.159527770719
      0.049895108245 -0.000245624853  1.008694292400  0.801660990981 -0.002074313963  0.982149424568
      

In the 'BASIS_SET_TEMPLATE' file, I have provided the following content as an initial guess for the new basis set:

Na DZVP
 1
 2 0 2 7 3 2 1
     23.518800761960  0.037798268053  0.005040470618  0.037779070657 -0.041235150854 -0.005410838671 0.5
     11.135656103275  0.180415272016  0.031210048356 -0.119614429319 -0.102704065658 -0.017609338317 0.5
      4.647813820246 -0.084235489885 -0.021214584887  0.224302495702 -0.276507156374 -0.043803008653 0.5
      1.866708259982 -0.502007239468 -0.088006426680 -0.183779813212 -0.405087985600 -0.067844235623 0.0
      0.734683697196 -0.487454712994 -0.241562643580  1.641649867502 -0.345669762598 -0.085057974012 0.0
      0.275672995860 -0.088909855778  0.046069503612 -2.281564821968 -0.128294724774  0.159527770719 0.0
      0.049895108245 -0.000245624853  1.008694292400  0.801660990981 -0.002074313963  0.982149424568 0.0

The last column corresponds to a set of d functions with unoptimised contraction coefficients. I have also changed the third line from

2 0 1 7 3 2

to

2 0 2 7 3 2 1

It means now we have s, p as well as d basis functions in the new basis set.

In this excecise, we would like to optimise the contraction coefficients only, so I have set:

INITIAL_DEGREES_OF_FREEDOM COEFFICIENTS

in the main input file, see &FIT_KIND subsection.

I have included several molecular reference calculations (NaH, NaF, NaCl, Na2O and Na3N) that have finished already. You may refer to the &TRAINING_FILES subsections in the input. You may also add more reference calculations and update the input file for basis set optimisation.

The basis set optimisation calculation can be started with the following command (or using the parallel executable cp2k.popt):

cp2k.sopt optbas.inp > optbas.out.DZVP

The optimised basis set will be in the file 'Na_FIT_temp', see 'BASIS_OUTPUT_FILE' keyword in the main input file 'optbas.inp'.

exercises/2015_cecam_tutorial/basis_set_optimisation_using_optimize_basis.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1