mmcql(1)

πŸ“¦ version 2.0.0, in ubuntu stonking

πŸ’– mmcql β€” the mmCIF glow-up era πŸ’–

okay bestie, this is a page from the User Commands part of the manual, and it's called mmcql(1). buckle up, it's giving database but make it crystallography 🌸

✨ NAME ✨

mmcql β€” an SQL-like tool to manipulate mmCIF files πŸ¦‹

✨ SYNOPSIS ✨

mmcql [OPTION] cif-file

✨ DESCRIPTION ✨

so here's the tea: mmCIF is a structured format, and if you pair it up with a proper dictionary it literally starts looking like a database, with relations between categories that act like tables. it's giving relational, no cap πŸ‘‘

and when you're running mmCIF files through pipelines, you're constantly like "bestie I just need to change ONE field" or "add some data" or "delete it", and for all of that, mmcql offers a SQL-like language. so convenient, honestly obsessed πŸ’…

the actual SQL interface implementation is handled by the iconic, well-known sqlite3 library. which means almost all of sqlite3's functionality is available, with just a few exceptions 🫢

and the exceptions are lowkey important so listen up:

  • most notably, the ALTER TABLE option is not working. periodt, it just isn't.
  • and if you create new tables, they will not be recorded in the mmCIF file you're manipulating. yeah. that's something that still needs to be implemented 😭

the command should be started with a single file as argument:

mmcql file

the file you specify gets opened, and the first datablock gets selected as the current datablock to manipulate. if you didn't specify any other option, the program shows you a prompt and then you can type SQL commands or backslash commands. main character energy fr fr ✨


✨ BACKSLASH COMMANDS ✨

commands that start with a backslash are treated as backslash commands πŸ’œ these are the ones that manipulate how the mmcql application itself works.

to see the full list of available backslash commands, type this and hit ENTER:

\?

other commands include:

  • \file <file> β€” close whatever file is currently open (if any) and load the specified file. swapping files like it's nothing 🌈
  • \db <datablock> β€” select the specified datablock as the current one. choose your fighter πŸŽ€
  • \dict <dictionary> β€” use the specified dictionary instead of the default one.
  • \format <spec> β€” use the specified format for the output of tabulated results. the available options are: cif, csv, tsv, list, column, markdown, table and box. that's a whole aesthetic menu πŸ’…
  • \dd β€” show a list of all the datablocks in the file.
  • \dc β€” show a list of all the categories in the current datablock.
  • \dc+ β€” show a list of all the categories in the entire file. plus sign, extra power ⭐
  • \d <category> β€” show a list of all items in the specified category.
  • \d+ <category> β€” show a list of all items in the specified category, including a column with aliased names. the aliases are the whole point πŸ¦‹

✨ OPTIONS ✨

  • --help, -h β€” write out some help and the available options. when in doubt, ask for help, that's self care πŸ’–
  • --version β€” write out the current version (with --verbose more info is displayed). versions, but make it extra πŸ”₯
  • --verbose, -v β€” be more verbose, useful to diagnose validation errors. turn the volume UP πŸ”₯
  • --datablock=datablockname, -D datablockname β€” load the datablock as specified instead of the first one. pick your datablock, bestie πŸ‘‘
  • --dict=dictionary, -d dictionary β€” load the dictionary as specified instead of the default one.
  • --file=<file>, -f <file> β€” read and execute the commands from the specified file and then exit. script girlies rise 🧚
  • --command=<SQL-statement>, -c <SQL-statement> β€” execute the specified command and then exit. one and done, slay πŸ’…
  • --format=<fmt> β€” use the specified output format for printing out tabulated results. the format glow-up ✨

✨ AUTHOR ✨

written by Maarten L. Hekkelman <maarten@hekkelman.com> β€” thank you for your service king 🫢


✨ REPORTING BUGS ✨

found a bug? report it at https://github.com/PDB-REDO/cif-tools/issues β€” do NOT suffer in silence, tell the devs, that's the vibe check πŸ’€


✨ SEE ALSO ✨

cif-diff, cif-grep, cif-merge, cif2pdb, mmcql, pdb2cif. the whole friend group 🌸


and that's literally it bestie β€” <rainbow>version 2.0.0, dated 2022-11-20`, mmcql section of the manual, done and dusted. go manipulate some mmCIF files, you've got this πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from