rs-station / matchmaps

https://rs-station.github.io/matchmaps/
Other
2 stars 0 forks source link

Support `.cif` inputs as alternatives to `.pdb` #23

Closed dennisbrookner closed 12 months ago

dennisbrookner commented 12 months ago

This PR allows all three matchmaps utilities to take accept input starting models in either .pdb. or .cif formats. The .cif format is increasingly common / preferred as the file type for macromolecular structures, so this is good to support going forward.

In order to preserve as much existing code as possible, this change is implemented via a _cif_or_pdb_to_pdb() helper function. When given a .pdb input file, this function simply copies that file over to the output directory. When given a .cif input file, this function reads the file into python (via gemmi) and then writes out an analogous .pdb-formatted file into the output directory.

Structure factor .cifs are not yet supported.