Scientific Database Commands: database
bohr database accesses scientific databases and queries tables by database and table Access Keys. Its alias is db.
Commands
| Command | Usage | Description |
|---|---|---|
polymer | bohr database polymer [command] | Polymer literature library (domain object, no AccessKey required) |
structure | bohr database structure [command] | Crystal structure library (domain object, no AccessKey required) |
tables | bohr database tables <db_ak> | List all tables in the specified database (requires a database AccessKey) |
schema | bohr database schema <db_ak> <table_ak> | Show the schema (columns and types) of a table (requires a table AccessKey) |
query | bohr database query <db_ak> <table_ak> [flags] | Query rows from a table with optional filters, limit, and offset (requires a table AccessKey) |
For subcommands inside a command group, run bohr database <group> --help.
Common parameters
| Parameter | Description |
|---|---|
--limit <number> | Table query result limit, default 20 |
--offset <number> | Table query offset, default 0 |
--filter <json> | Table filter expression |
--query <text> | Required structure search query |
--n-results <number> | Number of structures returned, default 5 |
--output-format <cif\|poscar> | Structure output format, default cif |
--download | Download structure results as an archive |
Examples
bohr database tables db-ak-123
bohr database schema db-ak-123 table-ak-456
bohr database query db-ak-123 table-ak-456 --limit 10 --offset 20
bohr database structure search --query "TiO2 space group 136" --n-results 3
Use the database and table Access Keys returned by the platform, not their display names. --download writes a local archive.