torchref.cli.add_metadata module

Standalone CLI tool to add deposition metadata to PDB or mmCIF files.

Reads an existing structure file, applies metadata from CLI arguments and/or a JSON file, and writes the output in PDB or mmCIF format (determined by the output file extension).

Examples

# Add title and authors to a PDB file
torchref.add-metadata -i input.pdb -o output.pdb --title "My Structure" --authors "A. Person"

# Convert PDB to mmCIF with metadata
torchref.add-metadata -i input.pdb -o output.cif --title "My Structure"

# Apply metadata from a JSON file
torchref.add-metadata -i input.pdb -o output.pdb --metadata stats.json

# JSON overrides + CLI overrides (CLI takes precedence)
torchref.add-metadata -i input.cif -o output.cif --metadata stats.json --title "Override Title"
torchref.cli.add_metadata.main()[source]