Manual 2019 03 27
User Manual:
Open the PDF directly: View PDF
.
Page Count: 23
| Download | |
| Open PDF In Browser | View PDF |
MANUAL for DFTBparaopt Version 1.0 Van Quan Vuong March 27, 2019 Contents 1 . . . . . 3 3 4 5 5 6 2 Overview and Installation of DFTBparaopt 2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 7 7 3 Manual for REPOPT 3.1 Required Inputs . . . . . . . . 3.1.1 $system: . . . . . . . 3.1.2 $genetic_algorithm: . 3.2 Optional Inputs . . . . . . . . 3.2.1 $element_types: . . . 3.2.2 $repulsive_potentials: 3.2.3 $compounds: . . . . . 3.2.4 $definition_reactions: . 3.2.5 $reactions: . . . . . . 3.3 Output . . . . . . . . . . . . . 3.4 Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 9 9 10 11 12 12 13 14 14 15 15 Manual for EREPOPT 4.1 Input . . . . . . . . . . . . . 4.1.1 $system: . . . . . . 4.1.2 $genetic_algorithm: 4.1.3 $element_type: . . . 4.1.4 $d3: . . . . . . . . . 4.1.5 $vorbes: . . . . . . . 4.2 Output . . . . . . . . . . . . 4.3 Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 16 16 17 18 18 18 18 18 5 Utility Tools 5.1 Convert repopt-output to skf-files . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Plot Repulsive Potentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 19 20 6 Tutorials 21 4 An Introduction to DFTB Parameterization 1.1 DFTB . . . . . . . . . . . . . . . . . . 1.2 Electronic Parameters . . . . . . . . . . 1.3 Repulsive Potentials . . . . . . . . . . . 1.4 Scoring Function . . . . . . . . . . . . 1.5 Genetic Algorithm . . . . . . . . . . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index 22 2 Chapter 1 An Introduction to DFTB Parameterization 1.1 DFTB Expansion from DFT occ E[ρ 0 (r) + ∆ρ(r)] = 1 − 2 Z Z 0 hψ |H |ψ i E BS i ∑ i i 0 0 0 ρ (r )ρ (r) |r − r0 | dr0 dr − Z vxc [ρ 0 (r)]ρ 0 (r)dr ≈ 1 rep (Rab ) = E rep Vab ∑ 2 a,b + E xc [ρ 0 (r)] + E NN Z Z δ 2 E xc [ρ(r)] 1 1 0 0 ∆ρ(r )∆ρ(r)dr dr E 2nd + + 0 0 0 2 |r − r0 | δ ρ(r0 )δ ρ(r) ρ (r )ρ (r) Z Z Z 1 δ 3 E xc [ρ(r)] + 0 (r 00 )ρ 0 (r 0 )ρ 0 (r) ρ 00 0 6 δ ρ(r )δ ρ(r )δ ρ(r) E 3rd ∆ρ(r00 )∆ρ(r0 )∆ρ(r)dr00 dr0 dr (1.1) +.... None Consistent-Charge (NCC)-DFTB occ E NCC−DFT B = ∑hψi |H 0 |ψi i + E rep . (1.2) i Eigenvalue problem: AO 0 − εi Sµν ) = 0. ∑ cνi (Hµν (1.3) ν 0 : Hamiltonian matrix elements, Hµν 0 Hµν 1 2 0 0 φµ − 2 ∇ +V [ρa + ρb ] φν = ε free atom 0 3 if a 6= b if a = b, µ = ν if a = b, µ 6= ν. (1.4) Self-Consistent-Charge (SCC)-DFTB occ E SCC−DFT B = ∑hψi |H 0 |ψi i+E rep + i 1 γab (Rab )∆qa ∆qb . 2∑ a,b (1.5) Eigenvalue problem: AO ∑ cνi (Hµν − εi Sµν) = 0, (1.6) ν Hamiltonian, Hµν : 1 0 Hµν = Hµν + Sµν ∑(γac + γbc )∆qc . 2 c (1.7) Mulliken charge, ∆q : ∆qa = 1 ni ∑ ∑(cµi cνi Sµν + cνi cµi Sν µ ) − q0a , 2∑ µ∈a ν i (1.8) ∆qc depends on MO coefficients ⇒ must be solved iteratively. 1.2 Electronic Parameters • Minimal basis set: Pure atomic orbitals (AOs) are too diffuse • Electron density ρ o : ρ is more compressed in molecule " 1 r ⇒ − ∇2 + ve f f [ρ atom ]+ 2 ro Free variables: Minimal AO basis set ⇒ row f Electron density ρ o ⇒ rodens 4 !2 # φµ = εµ φµ (1.9) 1.3 Repulsive Potentials Repulsive Potentials E rep : sum of two-center repulsions, E rep = 1 ∑ VAB (|RA − RB |), 2 A,B (1.10) Where, −a1 ∗RAB +a2 + a , RAB < RAB,0 , 3 e 4 i VAB (RAB ) = ∑i=0 aAB,n,i (RAB − RAB,n ) , RAB,n ≤ RAB < RAB,n+1 ; 4 ≤ n ≤ 6 0, RAB,cut−o f f ≤ RAB , (1.11) Free variables: RAB,n and aAB,n,i . 1.4 Scoring Function f score = ∑ re f DFT B Wat,i Eat,i − Eat,i + i∈equi + ∑ ∑ Wbar,i re f DFT B Ebar,i − Ebar,i i∈bar W f ,i i∈equi ∑ B Fi,DFT + j ∑ i∈pert j∈3Ni Wat,i ,Wbar,i ,W f ,i : Weight factors Eat : Atomization energies Ebar : Proton transfer barriers N: Number of atoms F: Forces 5 W f ,i ∑ j∈3Ni B , Fi,rej f − Fi,DFT j (1.12) 1.5 Genetic Algorithm Initialize Population Initialize confining radii for density and wave functions Encode Individuals Evaluate fitness Stop? Fitting repulsive potentials Yes Evaluate scoring function Stop? Output results Yes No No Selection Selection Crossover and mutation Crossover and mutation 6 Return the scoring function Chapter 2 Overview and Installation of DFTBparaopt 2.1 Overview DFTBparaopt[2] is a package to automatically optimize electronic, repulsive, and dispersion parameters for Density-Functional based Tight-Binding (DFTB) method. The package includes two main programs: (1) repopt for optimization of only repulsive potentials and (2) erepopt for optimization of all DFTB parameters. erepopt uses repopt for the repulsive potentials fitting. Currently, repopt is stable released version 1.0. On the other hand, erepopt is still in the betadevelopment version. In addition, the package also provide some tools to analyze or evaluate new DFTB parameters. Most of the codes were written in C++. The code required two libraries: galib247 and eigen3. A part of the repulsive fitting (repopt) uses some piece of code from a semi-automatic erepfit program originally developed by Michael Gaus.[1] This manual was prepared using same style of DFTB+ manual, making it looks similar to DFTB+ manual. ^ ¨^ ¨^ ¨ 2.2 Installation To get the code: git clone https://github.com/v2quan89/dftbparaopt.git or download compressed file wget https://github.com/v2quan89/DFTBparaopt.tar.gz Note, both links may not work at this moment. You can send an email to v2quan89@gmail.com if the links do not work. Then, extract DFTBparaopt.tar.gz using tar -xzvf DFTBparaopt.tar.gz Change to directory DFTBparaopt and type “./install.sh”. Currently, DFTBparaopt was tested for two compilers: GNU(g++) and INTEL(icpc). For MAC OS, you need a “GNU” compiler instead of “GNU” connecting with clang. You can choose the compiler by setting $CXX=“g++” or $CXX=“icpc” in the “install.sh” file. To compile “erepopt”, a MPI library is also required. The install.sh script will try to get all the 7 required library and compile the code. You might have to adjust some flags in the makefile. After the compilation, if you use bash, you can add following command to you “.bashrc” or run it before using DFTBparaopt, source path-to-DFTBparaopt-directory/DFTBparaopt_on.rc 8 Chapter 3 Manual for REPOPT “repopt” is a program to optimize DFTB repulsive potentials. To run the program, type: repopt rep.inp where repopt is program name and rep.inp is name of the input file. The input file is organized in “block” sections. Each section begins with “$blockname:” and end with “$end:”. ‘#’ is the comment character. Everything after ‘#’ will be skipped. 3.1 Required Inputs The general “block” format of required sections is showed as following $blockname: keyword_1 ... keyword_n $end value_1 ... value_n Following input block must be presented in all kind of running job. 3.1.1 $system: Keyword dftb_version idecompose ilmsfit nreplicate Type string integer integer integer Range 1:7 1:4 ≥1 dftb_version Executable dftb-program idecompose Select decomposition method from EIGEN library: 1 => ldlt 2 => partialPivLu 3 => fullPivLu 4 => householderQr 9 Default dftb+ 6 4 1 5 => colPivHouseholderQr 6 => fullPivHouseholderQr 7 => completeOrthogonalDecomposition Please check the website for more information. ilmsfit Select regression method from EIGEN library: 1 => householderQr 2 => colPivHouseholderQr 3 => fullPivHouseholderQr 4 => bdcSvd Please check the website for more information. nreplicate Number of the fitting will be replicated. nreplicate should be 1. Larger than 1 only for testing purpose to measure the effect of decomposition and regression methods on the computing time. Example: $system: dftb_version idecompose ilmsfit nreplicate $end: 3.1.2 dftb+ 6 4 1 $genetic_algorithm: Keyword ga runtest score_type read_spline popsizemax preserved_num destroy_num popsizemin ngen pmut pcross grid_update Type bool bool integer bool integer integer integer integer integer integer integer bool Range 0|1 0|1 1|2|4 0|1 ≥1 ≥0 ≥0 ≥1 ≥0 0.0:1.0 0.0:1.0 0|1 ga switch on or off genetic algorithm runtest switch on or off testing job score_type set scoring function to: 1 => sum of absolute deviation 2 => sum of squared deviation 10 Default 1 0 2 1 1000 100 10 2 1000 0.02 0.90 0 4 => sum of quartic deviation read_spline how “grid” input file would be used: 0 => only read the cutoff and count the number of knots from “grid” input file 1 => use all knots in the “grid” input file as initial guess popsizemax set the initial and maximum population size for GA. preserved_num set the number of best individuals would be kept from “n-1” to “n” generation. destroy_num set the number individuals be removed every generation. If greater than 0, the population size will be reduced generation by generation. popsizemin set the final and minimum population size for GA. popsizemin is used only if destroy_num≥1. ngen set the number of generation for GA. pmut set the mutation probability for GA. pcross set the crossover probability for GA. grid_update How “grid” input file would be updated: 0 => leave the “grid” input file untouched. 1 => the “grid” input file is updated at the end of the GA optimization using the best found knots. Example: $genetic_algorithm: ga runtest score_type read_spline popsizemax preserved_num destroy_num popsizemin ngen pmut pcross grid_update $end: 3.2 1 0 2 1 1000 100 10 2 1000 0.02 0.90 0 Optional Inputs The general “block” format of required sections is showed as following 11 $blockname: entry_name_1 ... entry_name_n $end option_1_1 ... option_n_1 ... ... ... option_1_m ... option_n_m Following input blocks in optional, depending on the desired job. 3.2.1 $element_types: String element_name_1 ... element_name_n Real(a.u.) atomic_energy_1 ... atomic_energy_n element_name name of fitting element, must be two lower case letters characters long. The underscore character ‘_’ is added if element name has only one character. atomic_energy Atomic energy in a.u. for the corresponding fitting element. Note: if element_name is provided, atomic_energy must be provided also. atomic_energy (can be calculated by DFT) is needed to fit atomization energy. If element_name is not listed, the atomic_energy will be optimized. You can interpret the meaning of atomic_energy as: If atomic_energy is provided, the absolute atomization energy will be fitted (by fitting atomization energy). If atomic_energy is optimized (not provided), the relative atomization energy (reaction energy) will be fitted (by optimization of the atomic energy). This methodology was proposed by Gaus et al. in the 3ob parameterization strategy for obtaining repulsive potentials, and their optimized atomic energies (used to generate the 3ob repulsives) were published in their supporting information.[?] Example: $element_types: h_ c_ $end: 3.2.2 -0.256789 -0.456789 $repulsive_potentials: string name_1 ... name_n Real(Å) min_r ... min_r string knot-vector ... knot-vector Real(Å) min_step ... min_step integer spline order ... spline order integer smooth ... smooth 0|1 negative? ... negative? name name of fitting potential min_r limit the small knot. The small knot must larger than or equal to shortest bond length min(Rbond ) - min_r 12 knot-vector name of the file containing division points in the format (in Å): knot_1 ... knot_n cutoff The number of knot will be counted from the not-vector min_step set the smallest difference between knot spline order the order of spline function to be used (currently only support 4th order) smooth smoothing level of that potential 0 => constrain on potential energy 1 => constrain on the first derivative of energy 2 => constrain on the second derivative of energy 3 => constrain on the third derivative of energy negative? and allowance the potential to be attractive or not. 0 => repulsive potential energy must be always positive 1 => repulsive potential energy can be negative Example: $repulsive_potentials: h_h_ c_h_ c_c_ $end 3.2.3 0.2 0.3 0.3 grids/hh.grdx grids/ch.grdx grids/cc.grdx 0.05 0.05 0.30 4 4 4 2 2 2 0 1 1 $compounds: string structure1 ... structuren Real(kcal/mol) E at ... E at string eweight ... eweight Real fweight ... fweight string dftbinp ... dftbinp 0|string forceinput ... forceinput integer placeholder ... placeholder list of filenames for geometries of the fitting molecular. name file name for geometry, the files need to be in xyz-format E at reference atomization energy of the molecule. The atomization energy is defined as: E at = −E tot + Natom ∑ Eiatom i=1 eweight weights for energy equations fweight weights for force equations dftbinp input-file to run a single point energy and force calculation using the dftb 13 forceinput for an equilibrium structure, should be a “0”, otherwise a reference force file can be specified which is formatted as (in a.u.): Ref_Force-Atom_1_X Ref_Force-Atom_1_Y Ref_Force-Atom_1_Z ... Ref_Force-Atom_n_X Ref_Force-Atom_n_Y Ref_Force-Atom_n_Z placeholder for developement only, must be ‘0’ for now Example: $compounds: path/h2.xyz path/ch4.xyz path/h3cch3.xyz path/h2_d0.1.xyz $end 3.2.4 109.9 420.1 712.0 000.0 1 1 1 0 1 1 1 1 path/dftb_inp1.hsd path/dftb_inp2.hsd path/dftb_inp2.hsd path/dftb_inp2.hsd 0 0 0 path/hh_d0.1.frc 0 0 0 0 $definition_reactions: For specifying reaction equations string abbreviation ... abbreviation string filename ... filename string dftbinp ... dftbinp abbreviation abbrev name for a geometry filename file name for the geometry, the files need to be in xyz-format dftbinp input-file to run a single point energy calculation using the DFTB Example: $definition_reactions: h2 ch4 h3cch3 $end 3.2.5 path/h2.xyz path/ch4.xyz path/h3cch3.xyz path/dftb_inp1.hsd path/dftb_inp2.hsd path/dftb_inp2.hsd $reactions: integer coeff ... coeff string abbreviation ... abbreviation ... ... ... integer coeff ... coeff string abbreviation ... abbreviation 14 string -> -> -> Real(kcal/mol) reactionenergy ... reactionenergy Real reaweight ... reaweight coeff reaction coefficient if positive => reactant if negative => product abbreviation defined in the $definition_reactions: block reactionenergy reaction energy reaweight weight for reaction energy equations Example: $reactions: +1 $end 3.3 h3cch3 +1 h2 -2 ch4 -> -18.33 1.0 Output The output of a successful repopt contains: scoring function scoring function as a function of generation input interpreted input, a list of all distances appearing within the reference geometries sorted by atom type pair. technical information a list of number of fitting equation, number of free variables. . . summary of fitting summary of the MSE, MUE, and RMS residual in detail residuals for each equation predicted by the fitted parameters in comparison to the reference are listed. fitted atomic energies fitted atomic energies if they are optimized repulsive potentials the repulsive potentials are given in a format of the “Spline” format. If there is no error, repopt ends with a statement “repopt normal termination”. Any warnings concerning the fit will appear after #ga end!. 3.4 Tips 15 Chapter 4 Manual for EREPOPT “erepopt” is a program to optimize all DFTB parameters simultaneously. To run the program, type: erepopt erep.inp where erepopt is program name and erep.inp is name of the input file. The input file is organized in “block” sections. Each section begins with “$blockname:” and end with “$end:”. ‘#’ is the comment character. Everything after ‘#’ will be skipped. 4.1 4.1.1 Input $system: Keyword nthreads dftbversion skgen onecent twocent gasrepfit power dgrid ngrid grids rep.in libdir scratchfolder skfclean outfile popinitialfile popfinalfile Type integer string string string string string integer Real integer string string string string bool string string string Range ≥1 ≥2 ≥ 0.0 ≥1 0|1 Example: 16 Default 1 dftb+ skgen hfatom_spin sktwocnt_lr repopt 2 0.1 120 grids rep4e.in libskf4e /dev/shm 0 gaserepfit.log pop.initial.dat pop.final.dat $system: nthreads dftbversion skgen onecent twocent gasrepfit power dgrid ngrid grids rep.in libdir scratchfolder skfclean outfile popinitialfile popfinalfile $end 4.1.2 1 dftb+ skgen hfatom_spin sktwocnt_lr repopt 2 0.1 120 grids rep4e.in libskf4e /dev/shm 0 gaserepfit.log pop.initial.dat pop.final.dat $genetic_algorithm: Keyword ga runtest fit_type popsize preserved_num ngen pmut pcross readr restart Type bool bool integer integer integer integer integer integer bool bool Range 0|1 0|1 1|2|4 ≥1 ≥0 ≥0 0.0:1.0 0.0:1.0 0|1 0|1 Example: $genetic_algorithm: ga runtest fit_type popsize preserved_num ngen pmut pcross readr restart $end: 1 0 0 32 3 30 0.05 0.9 1 0 17 Default 1 0 2 1000 100 1000 0.02 0.90 1 1 4.1.3 $element_type: Example: $element_types: H O N C $end 4.1.4 11 111 111 111 0 1 1 1 2.9 2.7 3.0 3.6 2.9 2.8 3.2 3.8 1.00 1.40 0.48 4.70 1.00 1.40 0.48 4.70 2.9 2.9 3.4 4.0 1 1 1 1 2.9 2.7 3.0 3.6 2.9 2.8 3.2 3.8 2.9 2.9 3.4 4.0 1 1 1 1 2.7 2.8 2.9 3.0 3.2 3.4 3.6 3.8 4.0 1 1 1 $d3: Example: $d3: s6 s8 a1 a2 $end: 4.1.5 1.00 1.40 0.48 4.70 2 1 2 1 $vorbes: Example: $vorbes: N $end: 4.2 Output 4.3 Tips 2S -0.83 -0.82 -0.81 18 3 Chapter 5 Utility Tools In the following section, some utility tools will be explained. These tools were originally developed by Michael Gaus and were later modified by the author. 5.1 Convert repopt-output to skf-files The bash-scripts rep2XabSpl and xabSpl2spl are available in the “utils” directory as well as the C++ program ord2abSpl which is called by the xabSpl2spl script. rep2XabSpl Usage: rep2XabSpl repout-output-file The rep2XabSpl extracts the Spline of repulsive potentials from the output-file and writes it in separate files. The ending of the files are XabSpl. xabSpl2spl Usage: xabSpl2spl XabSpl-file skf-electronic-file 1 The xabSpl2spl script combines one XabSpl file with skf-electronic-file into the final skf-file. ord2abSpl called by the xabSpl2spl For a short description of all options run rep2XabSpl or xabSpl2spl without any arguments. Example # doing the rep fitting repopt rep.in > rep.out # extract Spline for H-H rep2XabSpl rep.out mv h_h_.4abSpl hh.4abSpl # create the final skf-files xabSpl2spl hh.4abSpl hh_elec.skf 1 Under utils folder, a script named combine.sh can do all jobs at once. 19 5.2 Plot Repulsive Potentials SplineAnsch is a script to plot repulsive potentials and its derivatives. The script requires gnuplot and gv ghostscript interpreter. Usage one skf file: SplineAnsch -a rmin :rmax file1.skf two skf file: SplineAnsch -a rmin :rmax -v file1.skf file2.skf Note: any files in the XabSpl or spl format can be also be used. You can find all options by running SplineAnsch without arguments. Example # to plot new cc.skf zoom in on a range of 2.0-5.0 (a.u.). SplineAnsch -a 2.0:5.0 cc.skf # to compare the new cc.skf with cc.skf from mio set. SplineAnsch -a 2.0:5.0 -v cc_mio.spl cc.4abSpl 20 Chapter 6 Tutorials For repopt, there are two examples rep1.in and rep2.in under the examples folder. It is straight forward to run these examples: # cd to the examples folder and type repopt rep1.in >& rep1.out repopt rep2.in >& rep2.out For erepopt, the exmamples are under construction. 21 Bibliography [1] Michael Gaus, Chien-Pin Chou, Henryk Witek, and Marcus Elstner. Automatized Parametrization of SCC-DFTB Repulsive Potentials: Application to Hydrocarbons. J. Phys. Chem. A, 113(43):11866–11881, 2009. 7 [2] Van Quan Vuong, Jissy Akkarapattiakal Kuriappan, Maximilian Kubillus, Julian J. Kranz, Thilo Mast, Thomas A Niehaus, Stephan Irle, and Marcus Elstner. Parametrization and Benchmark of Long-Range Corrected DFTB2 for Organic Molecules. J. Chem. Theory Comput., 14(1):115– 125, 2018. 7 22
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : No Page Count : 23 Page Mode : UseOutlines Author : Title : Subject : Creator : LaTeX with hyperref package Producer : pdfTeX-1.40.18 Create Date : 2019:03:27 09:52:06-04:00 Modify Date : 2019:03:27 09:52:06-04:00 Trapped : False PTEX Fullbanner : This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) kpathsea version 6.2.3EXIF Metadata provided by EXIF.tools