Skip to content

CIF To PDB

Converts molecular structures from CIF (mmCIF) format to PDB format using BioPython. Accepts one or more CIF structures provided as a dictionary and returns a dictionary of PDB strings keyed by the same names. Skips empty entries and raises clear errors for invalid or unparseable inputs.
Preview

Usage

Use this node when you need PDB outputs but your upstream data is in CIF/mmCIF format (e.g., downloaded from structural databases or generated by other tools). Commonly placed after a loader node that provides CIF text and before nodes that require PDB input (visualization, sequence extraction, chain operations, etc.).

Inputs

FieldRequiredTypeDescriptionExample
cifTrueCIFDictionary of CIF structures to convert, in the form {cif_name: cif_content}. Each cif_content must be a valid mmCIF text string.{'example_structure': 'data_example\n_loop\n_atom_site.group_PDB ...\n#\n'}

Outputs

FieldTypeDescriptionExample
structure.pdbPDBDictionary of converted PDB structures, keyed by the original CIF names: {cif_name: pdb_content}.{'example_structure': 'HEADER EXAMPLE\nATOM 1 N MET A 1 ...\nEND\n'}

Important Notes

  • Input shape: The input must be a non-empty dictionary mapping names to CIF text. Empty strings are skipped; if all entries are empty or invalid, the node raises an error.
  • Parsing library: Uses BioPython's MMCIFParser for reading and PDBIO for writing; minor differences or information loss may occur due to format conversion limits.
  • Metadata propagation: Output includes Salt metadata for downstream saving/export nodes.
  • Large structures: Very large CIFs may increase memory and processing time.
  • Error handling: The node raises ValueError with a helpful message if conversion fails for any item.

Troubleshooting

  • Error: 'CIF input must be a non-empty dictionary': Ensure you pass a dictionary like {"name": ""} and that it is not empty.
  • Conversion failed for CIF '': The CIF text may be malformed or contain unsupported constructs. Validate the CIF content or try simplifying it.
  • Empty output or missing keys: Check for empty strings in the input; the node skips entries with empty content.
  • Unexpected differences in PDB: Due to mmCIF→PDB limitations, some annotations may not carry over. If critical, keep data in CIF or use nodes that accept CIF.
  • Performance issues with big files: Reduce input size, split the workload, or ensure sufficient resources.