Reference manuals - CBS -‹#›Petr Kulhanek kulhanek@chemi.muni.cz National Center for Biomolecular Research, Faculty of Science Masaryk University, Kotlářská 2, CZ-61137 Brno CBS Reference manuals Reference manuals - CBS -‹#›Extrapolation to CBS Reference manuals - CBS -‹#›- Extrapolation Bx CBS AeExE − +=)( Because we have four input energies (for x=2, 3, 4, and 5) and only three unknowns (ECBS, A and B) we must use the least squares method. The aim of the method is to find the value of the parameters ECBS, A and B so that the purpose (error) function is minimal.   min!)(),,,(),,( 5 2 2 =−= =x HFCBSCBS xEBAExEBAEf We can use the fit method from the program gnuplot to find the optimal parameters. See original documentation gnuplot or: http://www.root.cz/clanky/gnuplot-prikaz-fit/ Reference manuals - CBS -‹#›- Procedure ▪ Prepare a text file data.txt, which will contain two columns: the cardinal number of the base (2, 3, 4, ...) and the energy calculated by the HF method. ▪ Run the program gnuplot and display the energy profile from the file data.txt: ▪ Define a function for extrapolation: ▪ Set the default values ​​of the parameter for optimization: ▪ Perform pre-optimization of the parameters ECBS and A and then final optimization of all parameters: gnuplot> plot './data.txt' using 1:2 with points gnuplot> E(x) = Ecbs + A * exp(-B*x) gnuplot> A = 1 gnuplot> B = 1 gnuplot> Ecbs= -80 # lower than the smallest calculated energy gnuplot> fit E(x) "./data.txt" via Ecbs, A gnuplot> fit E(x) "./data.txt" via Ecbs, A, B Reference manuals - CBS -‹#›Procedure, cont. ▪ Display the input data, E(x) function and the value of ECBS. Perform a visual inspection of the obtained results. The E(x) function must pass through all points and approach the found value of E as a CBS limit. ▪ Print the exact value of ECBS gnuplot> set xrange[2:7] gnuplot> plot './data.txt' using 1:2 with points, E(x), Ecbs gnuplot> print Ecbs