.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. .TH ASE-DB "1" "July 2017" "ase-db 3.14.1" "User Commands" .SH NAME ase-db \- Put stuff into or query database .SH DESCRIPTION Please use "ase db" instead of "ase\-db" usage: ase db [\-h] [\-v] [\-q] [\-n] [\-l] [\-i db\-name] [\-a filename] .IP [\-k key1=val1,key2=val2,...] [\-L N] [\-\-offset N] [\-\-delete] [\-\-delete\-keys key1,key2,...] [\-y] [\-\-explain] [\-c col1,col2,...] [\-s column] [\-\-cut CUT] [\-p x,y1,y2,...] [\-P name] [\-\-csv] [\-w] [\-\-no\-lock\-file] [\-\-analyse] [\-j] [\-m] [\-\-set\-metadata something.json] [\-M something.py] [\-\-unique] database [query [query ...]] .PP Selection is a comma\-separated list of selections where each selection is of the type "ID", "key" or "key=value". Instead of "=", one can also use "<", "<=", ">=", ">" and "!=" (these must be protected from the shell by using quotes). Special keys: id, user, calculator, age, natoms, energy, magmom, and charge. Chemical symbols can also be used to select number of specific atomic species (H, He, Li, ...). Selection examples: 'calculator=nwchem', 'age<1d', \&'natoms=1', 'user=alice', '2.2=10' .SS "positional arguments:" .IP database query .SS "optional arguments:" .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .HP \fB\-v\fR, \fB\-\-verbose\fR .HP \fB\-q\fR, \fB\-\-quiet\fR .TP \fB\-n\fR, \fB\-\-count\fR Count number of selected rows. .TP \fB\-l\fR, \fB\-\-long\fR Long description of selected row .TP \fB\-i\fR db\-name, \fB\-\-insert\-into\fR db\-name Insert selected rows into another database. .TP \fB\-a\fR filename, \fB\-\-add\-from\-file\fR filename Add results from file. .TP \fB\-k\fR key1=val1,key2=val2,..., \fB\-\-add\-key\-value\-pairs\fR key1=val1,key2=val2,... Add key\-value pairs to selected rows. Values must be numbers or strings and keys must follow the same rules as keywords. .TP \fB\-L\fR N, \fB\-\-limit\fR N Show only first N rows (default is 20 rows). Use \fB\-\-limit\fR=\fI\,0\/\fR to show all. .TP \fB\-\-offset\fR N Skip first N rows. By default, no rows are skipped .TP \fB\-\-delete\fR Delete selected rows. .TP \fB\-\-delete\-keys\fR key1,key2,... Delete keys for selected rows. .TP \fB\-y\fR, \fB\-\-yes\fR Say yes. .TP \fB\-\-explain\fR Explain query plan. .TP \fB\-c\fR col1,col2,..., \fB\-\-columns\fR col1,col2,... Specify columns to show. Precede the column specification with a "+" in order to add columns to the default set of columns. Precede by a "\-" to remove columns. Use "++" for all. .TP \fB\-s\fR column, \fB\-\-sort\fR column Sort rows using column. Use \fB\-column\fR for a descendin sort. Default is to sort after id. .TP \fB\-\-cut\fR CUT Cut keywords and key\-value columns after CUT characters. Use \fB\-\-cut\fR=\fI\,0\/\fR to disable cutting. Default is 35 characters .TP \fB\-p\fR x,y1,y2,..., \fB\-\-plot\fR x,y1,y2,... Example: "\-p x,y": plot y row against x row. Use "\-p a:x,y" to make a plot for each value of a. .TP \fB\-P\fR name, \fB\-\-plot\-data\fR name Show plot from data['name'] from the selected row. .TP \fB\-\-csv\fR Write comma\-separated\-values file. .TP \fB\-w\fR, \fB\-\-open\-web\-browser\fR Open results in web\-browser. .TP \fB\-\-no\-lock\-file\fR Don't use lock\-files .TP \fB\-\-analyse\fR Gathers statistics about tables and indices to help make better query planning choices. .TP \fB\-j\fR, \fB\-\-json\fR Write json representation of selected row. .TP \fB\-m\fR, \fB\-\-show\-metadata\fR Show metadata as json. .TP \fB\-\-set\-metadata\fR something.json Set metadata from a json file. .TP \fB\-M\fR something.py, \fB\-\-metadata\-from\-python\-script\fR something.py Use metadata from a Python file. .TP \fB\-\-unique\fR Give rows a new unique id when using \fB\-\-insert\-into\fR.