Search Shortcut cmd + k | ctrl + k

Read and write protein structure mmcif files using SQL

Maintainer(s): sverhoeven

Installing and Loading

INSTALL mmcif FROM community;
LOAD mmcif;

Example

sql -- single table SELECT count(*) FROM mmcif_scan('https://files.rcsb.org/download/1AMB.cif.gz', 'atom_site'); -- 438 -- All tables in file ATTACH 'https://files.rcsb.org/download/1AMB.cif.gz' AS mmcifdb (TYPE mmcif); USE mmcifdb; SELECT count(*) FROM information_schema.tables WHERE table_catalog = 'mmcifdb'; -- 43 SELECT count(*) FROM atom_site; -- 438 -- Positions of Zinc atoms SELECT Cartn_x, Cartn_y, Cartn_z FROM atom_site WHERE type_symbol = 'ZN'; -- Write mode ATTACH '1amb_updated.cif' AS wdb (TYPE mmcif, READ_WRITE TRUE); USE wdb; BEGIN; INSERT INTO atom_site (label_atom_id, Cartn_x, type_symbol) VALUES ('O1', 3.5, 'O'); UPDATE atom_site SET type_symbol='ZZ' WHERE label_atom_id='O1'; DELETE FROM atom_site WHERE label_atom_id='O1'; COMMIT; -- writes the mutated tables back to the attached file

Added Functions

function_name function_type description comment examples
mmcif_relationships table NULL NULL  
mmcif_scan table NULL NULL  
mmcif_tables table NULL NULL  

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

This extension does not add any settings.