This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
benzen_structure_optimization [2009/11/24 13:34] jelen |
benzen_structure_optimization [2018/03/08 15:43] jesus |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Here we describe how to perform structure optimization of a simple molecule using new version of Fireball. | + | Here we describe how to perform structure optimization of a simple molecule using the new version of the Fireball code. |
- | These are minimal steps required to optimize atomic structure using quenching optimization method: | + | There are minimal steps required to optimize atomic structure using quenching optimization method: |
Line 6: | Line 6: | ||
===== atomic structure ===== | ===== atomic structure ===== | ||
- | In this particular case, we are about to optimize atomic structure of [http://en.wikipedia.org/wiki/Benzene | benzene] molecule. | + | In this particular case, we are about to optimize atomic structure of [[http://en.wikipedia.org/wiki/Benzene|benzene]] molecule. |
- | An initial configuration is written in a file with an arbitrary name (e.g. //initial.bas//) | + | An initial configuration is written in a file with an arbitrary name (e.g. //initial.bas//, see text bellow) |
- | + | ||
- | 22 | + | |
- | 1 -4.9733425385 -1.5889446414 -0.6324262614 | + | |
- | 1 -3.5407118660 1.9647924939 0.0295048409 | + | |
- | 1 -1.2425048935 3.4347884406 0.1880405389 | + | |
- | 1 -0.4883657050 -0.0307476937 -1.4365138827 | + | |
- | 1 0.4883442161 -0.0307175904 1.4365127074 | + | |
- | 1 1.2424716028 3.4348261025 -0.1879964427 | + | |
- | 1 3.5407067601 1.9648329703 -0.0295429145 | + | |
- | 1 4.9733510894 -1.5889481906 0.6324807825 | + | |
- | 6 -3.2259570193 -0.1187553365 0.1227953048 | + | |
- | 6 -2.8463998459 1.1491909656 0.0196177528 | + | |
- | 6 -1.4086936247 1.3589710806 -0.0822094116 | + | |
- | 6 -0.7300575245 2.5041053928 0.0366849646 | + | |
- | 6 -0.6563976212 0.0654235722 -0.3703685714 | + | |
- | 6 0.6563995457 0.0654301045 0.3703705700 | + | |
- | 6 0.7300443321 2.5041165409 -0.0366782638 | + | |
- | 6 1.4086854525 1.3589852923 0.0821935312 | + | |
- | 6 2.8464056724 1.1492164454 -0.0196277792 | + | |
- | 6 3.2259671922 -0.1187335668 -0.1227750796 | + | |
- | 16 -1.8486925311 -1.3226946514 0.1183120883 | + | |
- | 16 1.8486919128 -1.3226609144 -0.1182720601 | + | |
- | 16 -4.9269798064 -0.6874300708 0.3778441339 | + | |
- | 16 4.9269717770 -0.6874703584 -0.3778194289 | + | |
+ | 12 | ||
+ | 6 -4.192725 -3.947918 -0.000885 | ||
+ | 6 -3.105518 -3.068150 0.003445 | ||
+ | 6 -3.324254 -1.686900 0.002294 | ||
+ | 6 -4.629983 -1.185844 0.001786 | ||
+ | 6 -5.717209 -2.065606 -0.001295 | ||
+ | 6 -5.498437 -3.446870 -0.005502 | ||
+ | 1 -6.367512 -4.151865 -0.010025 | ||
+ | 1 -4.018424 -5.053386 -0.000752 | ||
+ | 1 -2.061162 -3.470265 0.006507 | ||
+ | 1 -2.455303 -0.981710 0.003944 | ||
+ | 1 -4.804199 -0.080387 0.004380 | ||
+ | 1 -6.761568 -1.663453 -0.002176 | ||
===== input file ===== | ===== input file ===== | ||
- | The //fireball.in// input file provides control over what sort of calculation will be done. If the file is not presented, fireball run default task with predefined parameters. Complete list of all choices can be found here. | + | The **''fireball.in''** input file provides control over what sort of calculation will be done. If the file is not presented, fireball run default task with predefined parameters. Complete list of all choices can be found here. |
- | In our particular case, //fireball.in// file looks like: | + | In our particular case, **''fireball.in''** file looks like: |
Line 47: | Line 35: | ||
iquench = -1 | iquench = -1 | ||
icluster = 1 | icluster = 1 | ||
+ | iqout = 3 | ||
dt = 0.5 | dt = 0.5 | ||
&END | &END | ||
Line 55: | Line 44: | ||
where\\ | where\\ | ||
- | keyword '''basisfile''' defines name of file with an initial atomic configuration;\\ | + | keyword '''basisfile''' defines name of a file with an initial atomic configuration;\\ |
- | keyword '''nstepf''' sets maximal number of time steps; \\ | + | keyword '''nstepf''' defines the maximal number of time steps; \\ |
- | keyword '''iquench''' type of structure optimization; \\ | + | keyword '''iquench''' sets a type of structure optimization; \\ |
keyword '''icluster''' defines type of boundary conditions (here no periodicity); \\ | keyword '''icluster''' defines type of boundary conditions (here no periodicity); \\ | ||
keyword '''dt''' is time step in femtoseconds; \\ | keyword '''dt''' is time step in femtoseconds; \\ | ||
- | keyword '''iwrtxyz''' allows save history of atomic trajectories during optimization proces into xyz-format output file ''' answer.xyz''' | + | keyword '''iwrtxyz''' allows to save history of atomic trajectories during optimization proces into xyz-format output file **''answer.xyz''** |
Line 69: | Line 58: | ||
To initiate Fireball run, we need to create Fdata directory in working directory, which contains all electronic integrals | To initiate Fireball run, we need to create Fdata directory in working directory, which contains all electronic integrals | ||
to build up Hamiltonian for each geometry. These integrals has to be calculated in advance by create module. | to build up Hamiltonian for each geometry. These integrals has to be calculated in advance by create module. | ||
- | Once we have these data, usually we create //Fdata// dir via symbolic link | + | Once we have these data, usually we create **//Fdata//** dir via symbolic link |
ln -s $CURRENT_DIR_Fdata Fdata | ln -s $CURRENT_DIR_Fdata Fdata | ||
+ | or we write the path in the variable fdataLocation in the fireball.in file: | ||
+ | |||
+ | |||
+ | &OPTION | ||
+ | basisfile = initial.bas | ||
+ | nstepf = 5000 | ||
+ | iquench = -1 | ||
+ | icluster = 1 | ||
+ | iqout = 3 | ||
+ | dt = 0.5 | ||
+ | fdataLocation = '$CURRENT_DIR_Fdata' | ||
+ | &END | ||
+ | &OUTPUT | ||
+ | iwrtxyz = 1 | ||
+ | &END | ||
===== run optimization process ===== | ===== run optimization process ===== | ||
- | Initiate Fireball run we need to execute binary file //fireball.x//. Usually we do that via shell script e.g. named //run.bat//: | + | Initiate Fireball run we need to execute binary file **//fireball.x//**. Usually we do that via shell script e.g. named //run.bat//: |
Line 88: | Line 92: | ||
this command run fireball on background. | this command run fireball on background. | ||
- | |||
Line 98: | Line 101: | ||
You'll obtain on your screen comprehensive information how close optimization criteria are to used convergence tolerance:\\ | You'll obtain on your screen comprehensive information how close optimization criteria are to used convergence tolerance:\\ | ||
+ | |||
- | ++++ iter = 244 Etot= -125.75780733 Fi_max= 0.051624 | + | .... |
- | +++ Etot RES = 0.00006208 TOL = 0.00010000 CONVERGED | + | |
- | +++ Fmax RES = 0.05162403 TOL = 0.05000000 NOT CONVERGED | + | ++++ iter = 46 Etot= -83.90303173 Fi_max= 0.074447 |
- | ++++ iter = 245 Etot= -125.75783474 Fi_max= 0.050696 | + | +++ Etot RES = 0.00189182 TOL = 0.00010000 NOT CONVERGED |
- | +++ Etot RES = 0.00060299 TOL = 0.00010000 NOT CONVERGED | + | +++ Fmax RES = 0.07444720 TOL = 0.05000000 NOT CONVERGED |
- | +++ Fmax RES = 0.05069560 TOL = 0.05000000 NOT CONVERGED | + | ++++ iter = 47 Etot= -83.90304323 Fi_max= 0.071943 |
- | ++++ iter = 246 Etot= -125.75780865 Fi_max= 0.049891 | + | +++ Etot RES = 0.00013796 TOL = 0.00010000 NOT CONVERGED |
- | +++ Etot RES = 0.00057405 TOL = 0.00010000 NOT CONVERGED | + | +++ Fmax RES = 0.07194256 TOL = 0.05000000 NOT CONVERGED |
- | +++ Fmax RES = 0.04989075 TOL = 0.05000000 CONVERGED | + | ++++ iter = 48 Etot= -83.90307246 Fi_max= 0.065520 |
- | ++++ iter = 247 Etot= -125.75780503 Fi_max= 0.049054 | + | +++ Etot RES = 0.00035078 TOL = 0.00010000 NOT CONVERGED |
- | +++ Etot RES = 0.00007959 TOL = 0.00010000 CONVERGED | + | +++ Fmax RES = 0.06552009 TOL = 0.05000000 NOT CONVERGED |
- | +++ Fmax RES = 0.04905359 TOL = 0.05000000 CONVERGED | + | ++++ iter = 49 Etot= -83.90322186 Fi_max= 0.053999 |
+ | +++ Etot RES = 0.00179281 TOL = 0.00010000 NOT CONVERGED | ||
+ | +++ Fmax RES = 0.05399895 TOL = 0.05000000 NOT CONVERGED | ||
+ | ++++ iter = 50 Etot= -83.90327990 Fi_max= 0.040755 | ||
+ | +++ Etot RES = 0.00069654 TOL = 0.00010000 NOT CONVERGED | ||
+ | +++ Fmax RES = 0.04075507 TOL = 0.05000000 CONVERGED | ||
+ | ++++ iter = 51 Etot= -83.90347863 Fi_max= 0.024827 | ||
+ | +++ Etot RES = 0.00238468 TOL = 0.00010000 NOT CONVERGED | ||
+ | +++ Fmax RES = 0.02482667 TOL = 0.05000000 CONVERGED | ||
+ | ++++ iter = 52 Etot= -83.90359903 Fi_max= 0.011633 | ||
+ | +++ Etot RES = 0.00144488 TOL = 0.00010000 NOT CONVERGED | ||
+ | +++ Fmax RES = 0.01163264 TOL = 0.05000000 CONVERGED | ||
+ | ++++ iter = 53 Etot= -83.90365698 Fi_max= 0.022778 | ||
+ | +++ Etot RES = 0.00069536 TOL = 0.00010000 NOT CONVERGED | ||
+ | +++ Fmax RES = 0.02277786 TOL = 0.05000000 CONVERGED | ||
+ | ++++ iter = 54 Etot= -83.90365157 Fi_max= 0.021744 | ||
+ | +++ Etot RES = 0.00006491 TOL = 0.00010000 CONVERGED | ||
+ | +++ Fmax RES = 0.02174432 TOL = 0.05000000 CONVERGED | ||
+++++ Quenching process converged +++++ | +++++ Quenching process converged +++++ | ||
+ | History of the total energy during the optimization process can be easily plotted using [[http://www.gnuplot.info/|Gnuplot]] program as follows: | ||
+ | grep ETOT so_sp.out | cut -b22- > etot.dat | ||
+ | gnuplot | ||
+ | gnuplot> set xlabel "time step" | ||
+ | gnuplot> set xlabel "Etot [eV]" | ||
+ | gnuplot> set format y "%8.4f" | ||
+ | gnuplot> plot "etot.dat" with linespoints | ||
- | ===== final optimized structure ===== | + | optionally, we save the output into png figure format doing |
- | Current optimized structure is placed in //answer.bas// file and it can be directly used as input file for a next run. | + | gnuplot> set term png |
+ | gnuplot> set output "etot.png" | ||
- | 22 | + | {{:benzen:etot_benzen.png?700|}} |
- | 1 -4.725762 -2.015808 -0.087119 | + | |
- | 1 -3.609256 1.985578 0.023008 | + | |
- | 1 -1.250107 3.495166 0.140739 | + | |
- | 1 -0.483272 -0.086442 -1.465570 | + | |
- | 1 0.482065 -0.087248 1.464818 | + | |
- | 1 1.250232 3.495031 -0.140569 | + | |
- | 1 3.608862 1.985817 -0.022156 | + | |
- | 1 4.726247 -2.015096 0.089315 | + | |
- | 6 -3.250443 -0.108624 0.117464 | + | |
- | 6 -2.866935 1.174479 -0.002012 | + | |
- | 6 -1.446633 1.401806 -0.116652 | + | |
- | 6 -0.725770 2.542664 0.011912 | + | |
- | 6 -0.661669 0.090882 -0.382848 | + | |
- | 6 0.661445 0.090614 0.382310 | + | |
- | 6 0.725933 2.542528 -0.011857 | + | |
- | 6 1.446565 1.401528 0.116997 | + | |
- | 6 2.866829 1.174498 0.002597 | + | |
- | 6 3.250469 -0.108498 -0.117342 | + | |
- | 16 -1.881528 -1.338913 0.093151 | + | |
- | 16 1.881703 -1.339239 -0.092984 | + | |
- | 16 -4.948018 -0.711555 0.385735 | + | |
- | 16 4.947941 -0.711661 -0.386126 | + | |
+ | ===== final optimized structure & charge analysis ===== | ||
+ | |||
+ | Current optimized structure is placed in **''answer.bas''** file and it can be directly used as input file for a next run. | ||
+ | |||
+ | 12 | ||
+ | 6 -4.183507 -4.005641 -0.001142 | ||
+ | 6 -3.050800 -3.089167 0.003179 | ||
+ | 6 -3.278833 -1.650218 0.003065 | ||
+ | 6 -4.639215 -1.128095 0.001770 | ||
+ | 6 -5.771898 -2.044592 -0.001875 | ||
+ | 6 -5.543886 -3.483549 -0.004966 | ||
+ | 1 -6.427498 -4.200469 -0.008348 | ||
+ | 1 -4.006604 -5.129725 -0.002273 | ||
+ | 1 -1.988933 -3.498117 0.005219 | ||
+ | 1 -2.395194 -0.933283 0.005850 | ||
+ | 1 -4.815981 -0.004012 0.002952 | ||
+ | 1 -6.833808 -1.635777 -0.003761 | ||
+ | |||
+ | Each atomic configuration achieved during the optimization procedure is recorded into the **''answer.xyz''** file. The history can be visualized by e.g. [[http://jmol.sourceforge.net/|Jmol]] program. | ||
+ | |||
+ | {{:benzen:benzen_opt.png?700|benzene}} | ||
+ | |||
+ | |||
+ | In addition, there is a file **''CHARGES''** which contains projected Lowdin charges onto individual shells. | ||
+ | |||
+ | 12 initial0.bas 3 | ||
+ | 0.99704005 3.10168254 | ||
+ | 0.99692942 3.10180981 | ||
+ | 0.99697651 3.10173483 | ||
+ | 0.99702943 3.10168959 | ||
+ | 0.99693536 3.10181070 | ||
+ | 0.99696818 3.10179334 | ||
+ | 0.89726521 0.00398424 | ||
+ | 0.89733723 0.00398285 | ||
+ | 0.89723911 0.00398370 | ||
+ | 0.89728961 0.00398349 | ||
+ | 0.89731948 0.00398339 | ||
+ | 0.89724802 0.00398392 | ||
+ | |||
+ |