跳到主要内容

Scientific Database Commands: database

bohr database accesses scientific databases and queries tables by database and table Access Keys. Its alias is db.

Commands

CommandUsageDescription
polymerbohr database polymer [command]Polymer literature library (domain object, no AccessKey required)
structurebohr database structure [command]Crystal structure library (domain object, no AccessKey required)
tablesbohr database tables <db_ak>List all tables in the specified database (requires a database AccessKey)
schemabohr database schema <db_ak> <table_ak>Show the schema (columns and types) of a table (requires a table AccessKey)
querybohr 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

ParameterDescription
--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
--downloadDownload 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.