Codebase list votca-xtp / debian/1.5-1 manual / input / statefile.tex
debian/1.5-1

Tree @debian/1.5-1 (Download .tar.gz)

statefile.tex @debian/1.5-1raw · history · blame

\section{State file}
\label{sec:statefile}
All data structures are saved to the \sqlstate file in sqlite3 format, see http://www.sqlite.org/.
They are available in form of tables in the \sqlstate file as can be seen by the command\\
{\small \sqlite \sqlstate \texttt{" .tables "}}

An example of such a table are \sqlmolecules. The full table can be displayed using the command (similar for the other tables)\\
{\small \sqlite \sqlstate \texttt{" SELECT * FROM \sqlmolecules"}}\\
The meaning of all the entries in the table can be displayed by a command like\\
{\small \sqlite \sqlstate \texttt{" .SCHEMA \sqlmolecules"}}\\
The first and second entry are  integers for internal and regular id of the molecule and the third entry is the name. 
A single field from the table like the name of the molecule can be displayed by a command like\\
{\small \sqlite \sqlstate \texttt{" SELECT name FROM \sqlmolecules"}}\\
Besides \sqlmolecules, the following tables are stored in the \sqlstate:

\sqlconjsegproperties:\\
Conjugated segments are stored with id, name and x,y,z coordinates of the center of mass in nm.

\sqlconjsegs:\\
Reorganization energies for charging or discharging a conjugated segment are stored together with the coulomb energy and any other user defined energy contribution (in eV) and occupation probabilities.

\sqlpairs:\\
The pairs from the neighborlist are stored with the pair id, the id of the first and second segment, the rate from the first to the second , the rate from the second to the first (both in s$^-1$)  and the x,y,z coordinates in nm of the distance between the first and the second segment.

\sqlpairintegrals:\\
Transfer integrals for all pairs are stored in the following way:  The pair id , the number for counting possible different electronic overlaps (e.g if only the frontier orbitals are taken into account this is always zero, while an effective value is stored in addition to the different overlaps of e.g. HOMO-1 and HOMO-1 if more frontier orbitals are taken into account) and the integral in eV.

\sqlpairproperties:\\
The outer sphere reorganization energy of all pairs is stored by an id, the pair id, a string \texttt{lambda\_outer} and the energy in eV.

\sqlconjsegs:\\
Conjugated segments are saved in the following way: The id, the name, the type, the molecule id, the time frame, the x,y,z coordinates in nm and the occupation probability.

\sqlconjsegproperties:\\
Properties of the conjugated segments like reorganization energies for charging or discharging a charge unit or the coulomb contribution to the site energy are stored by: id, conjugated segment id, a string like \texttt{lambda\_intra\_charging}, \texttt{lambda\_intra\_discharging} or \texttt{energy\_coulomb} and a corresponding value in eV.

The tables \sqlrigidfragproperties, \sqlrigidfrags and \sqlframes offer information about rigid fragments and time frames including periodic boundary conditions.


The data in the \sqlstate file can also be modified by the user. Here is an example how to modify the transfer integral between the conjugated segments number one and two assuming that they are in the neighborlist.
Their pair id can be found by the command \\ 
{\small \texttt{pair\_ID=`}\sqlite \sqlstate \texttt{"SELECT \_id FROM pairs WHERE conjseg1=1 AND conjseg2=2"`}} \\
The old value of the transfer integral can be deleted using\\
{\small \sqlite \sqlstate \texttt{"DELETE FROM pair\_integrals WHERE pair=\$pair\_ID"}}\\
Finally the new transfer integral $J$ can be written to the \sqlstate file by the command\\
{\small \sqlite \sqlstate \texttt{"INSERT INTO pair\_integrals (pair,num,J) VALUES (\$pair\_ID,0,\$J)"}}
Here the \texttt{num=0} indicates that only the effective transfer integrals is written to the file, while other values of \texttt{num}
would correspond to overlap between other orbitals than the frontier orbitals.

In a similar way the coulomb contribution to the site energy of the first conjugated segment can be overwritten by first getting its id\\
{\small \texttt{c\_ID=`}\sqlite \sqlstate \texttt{"SELECT \_id from conjseg\_properties}}
{\small \texttt{ where conjseg=1 AND key =$\backslash$"energy\_coulomb$\backslash$""}} \\
Then deleting the old value\\
{\small \sqlite \sqlstate \texttt{"DELETE FROM from conjseg\_properties WHERE \_id=\$c\_ID"}}\\
Then the new coulomb energy $E$ can be written to this id\\
{\small \sqlite \sqlstate \texttt{"INSERT INTO conjseg\_properties (\_id,conjseg,key,value)\\ 
VALUES (\$c\_ID,1,$\backslash$"energy\_coulomb$\backslash$",\$E)"}}\\
Finally the resulting coulomb contribution to all conjugated segments can be displayed by\\
{\small \sqlite \sqlstate \texttt{"SELECT * from conjseg\_properties WHERE key=$\backslash$"energy\_coulomb$\backslash$""}}