mmCIF Metadata Importer — User Guide

Protein Data Bank in Europe (PDBe) · Repository

This guide explains how to extract selected metadata from an mmCIF file into a new metadata-only file, or merge that metadata into an existing model file, using the PDBe mmCIF Metadata Importer.

1. What this tool does

The importer copies metadata you select from an input mmCIF file. You can produce either a standalone metadata file or a merged file that combines imported metadata with an existing target mmCIF. Which categories are copied is controlled by specification sets (X-ray, EM, NMR, citation, authors, and others).

2. Before you start

Have ready:

  • An input file: *.cif or *.cif.V[ordinal]
  • Optionally, a merge target: another *.cif file
  • At least one specification choice: method-specific (X-ray, X-ray serial, EM, NMR) and/or optional groups (macromolecules, citation, authors, funding, keywords)

3. Streamlining depositions with OneDep

A practical workflow is to complete one fully annotated deposition first, then use the resulting annotated file as the metadata template for additional related files.

Streamlining depositions workflow

Start deposition (ORCID login, select country, select method) Upload files and enter metadata Wait for annotation and download the annotated model Use the annotated model as template in the mmCIF metadata importer Upload the merged file produced by the mmCIF metadata importer to a new deposition (prefill)
  1. Log in to OneDep with your ORCID account. OneDep ORCID login screen

    Step 1: Authenticate with ORCID to start your deposition session.

  2. Select your country in the deposition setup form. Country selection in OneDep deposition form

    Step 2: Choose the country for the deposition details.

  3. Select your experimental method. Experimental method selection in OneDep

    Step 3: Pick the method that matches your structure determination workflow.

  4. Click Start Deposition. Start Deposition button in OneDep

    Step 4: Click Start Deposition to create the deposition record.

  5. Upload your file in the deposition interface, complete all metadata fields, and submit. Enter metadata in the OneDep deposition interface

    Step 5: Complete metadata and submit your deposition.

  6. Wait for your entry to be annotated by one of our biocurators. You will receive an email when the annotation is complete.
  7. Download the metadata-rich annotated file Model (annotated) in PDBx/mmCIF format from the Download page in the deposition interface. Download page in the OneDep deposition interface

    Step 7: Download your annotated file when it is ready.

  8. Use that annotated file as the metadata source/template in this importer ("input.cif" in the importer), and copy metadata into your other files ("other_file.cif" in the importer).
  9. Upload the merged file into a new deposition. This will pre-fill almost all sections in the deposition interface, so you only need to review and complete any remaining fields.
This reduces repeated manual metadata entry and keeps metadata consistent across related submissions.

4. Run the metadata importer

  • Command line — scripting and batch runs.
  • Web app — form with uploads; good for most users.
  • Jupyter notebook — interactive widgets; no separate server.

4-a. Command line

Install from PyPI (recommended):

pip install mmcif-metadata-import

Or from source (clone the repository, then from the repo root):

pip install -r requirements.txt

Basic pattern:

mmcif-metadata-import <input_file> [flags]

From source only: use python import_metadata.py with the same arguments instead of mmcif-metadata-import.

Examples

# X-ray metadata
mmcif-metadata-import input.cif --xray

# EM plus optional metadata
mmcif-metadata-import input.cif --em --macromolecules --citation

# Custom output name
mmcif-metadata-import input.cif --nmr -o my_output.cif

# Merge into an existing file
mmcif-metadata-import input.cif --xray --merge_to_file target.cif

# Detailed log
mmcif-metadata-import input.cif --xray --log

4-b. Web app

Start the server

From the repository root (after installing dependencies):

cd web_app
pip install -r requirements.txt
python app.py

Open http://localhost:5000 in your browser.

Use the form

  1. Upload your input mmCIF file (required).
  2. Optionally upload a merge file if you want metadata merged into an existing model.
  3. Select specifications: pick method-specific options that match your experiment type, and any optional groups.
  4. Optionally set a custom output filename and enable Generate log file.
  5. Click Import metadata.

Results download as a ZIP containing the output .cif and, if requested, a .log file.

File size: the web app limits uploads to 100 MB by default (configurable in web_app/app.py).

4-c. Jupyter notebook

pip install -r requirements-notebook.txt
jupyter notebook

Open metadata_import.ipynb, run all cells, then use the widgets to upload files, choose specifications, and run the import. Outputs are written under notebook_output/.

Binder: you can run the notebook in the browser via the Binder badge in the main README; download outputs before closing the session.