-
Notifications
You must be signed in to change notification settings - Fork 0
Basic usage
TDB is designed to be used from a command line or from a script. To ease this, the default functions store a database at ~/.tmpdb.db which is considered to be the working database. This database is stored as an intermediate so that the path of the current database does not have to be repeatedly inputted / stored long term.
The following commands manipulate the database itself.
-
tdb-load filenamewill load the database atfilenameinto the working database. This will overwrite the working database, so save before calling this function. -
tdb-save filenamewill save the working database atfilename. This does not remove the working database from being active. If you wish to work on another database either load a new one or clear it. -
tdb-clear filenamewill clear the working database by deleting it.
The following commands are designed to work with data in the database.
-
tdb-add directorywill adddirectoryto the database if possible. The actual script called will determine if the directory can actually be added or not. -
tdb-add-dir directory [filter]will recursively adddirectoryto the database if possible. All directories will be added to the database withindirectoryin an attempt to find valid calculations. This works the same as piping afindcommand intotmb-add, more or less. If thefilterparameter is included, any directories containingfilterin their path will be skipped. This can be used to skip old/extended calculations if they are named in a way that allows them to be determined based on pathname. -
tdb-excelwill use XLSXWriter to write a basicOutput.xlsxfile to the current directory. This file will be lack any real formatting and is mainly useful for extracting the data to another program / running through a script to format it.
The following commands are used to change the script used to import calculations.
-
tdb-source-script scriptnameis used to set the import script to one of the builtin scripts bundled with tdb. By default the scriptvasp-basicis used. The scriptname should not include the leadingtdb-, but they are stored in thetoolsdirectory as such. To work this command MUST be run withsourceor with a leading.beforetdb-source-script. This is required because it sets the environment variable TDB_IMPORT -
tdb-source-userscript scriptnameis the same astdb-source-scriptexcept that it requires an absolute path to the script. This can be used for custom scripts and/or bundled scripts, although the other function is significantly easier to use for the bundled scripts.
The following scripts are bundled with TDB.
-
tdb-vasp-basic directory name.dbis used for basic VASP calculations and is the script thattdb-excelcurrently supports properly. It can be called manually with the name of the database following it, but typically this script should be loaded into tdb withtdb-source-scriptlike other bundled scripts. This is the default script loaded. -
tdb-vasp-slabfilm directory name.dbis used for VASP calculations set up in a Slab+Film configuration. This is tailored to work with a specific type of system and is basically an extension oftdb-vasp-basic.