ihmwg / python-ihm

Python package for handling IHM mmCIF and BinaryCIF files
MIT License
14 stars 7 forks source link

Citation with ID `primary` #72

Closed bienchen closed 2 years ago

bienchen commented 2 years ago

mmCIF allows for non-numerical IDs and suggests that the most pertinent citation gets the ID "primary" (https://mmcif.wwpdb.org/dictionaries/mmcif_pdbx_v50.dic/Items/_citation.id.html). I can't set the ID for ihm.Citation, which I think is good, so I can't mess up IDs... however, having ID 'primary" is still something we want in ModelCIF. So it would be nice to either give the first citation in system.citations that ID or allow to set the ID manually (with a big warning about messing up IHM's own ID scheme).

Thanks,

Stefan

bienchen commented 2 years ago

For the workflow in ModelArchive it may be good to have a is_primary flag, since the primary citation is not always included at the start of deposition. That would mean that at some point the first citation in system.citations may change.

benmwebb commented 2 years ago

I think you're right, a is_primary flag makes most sense. I'll add this with some sanity checks (e.g. it would be an error to have two such citations).

bienchen commented 2 years ago

Just checked the new option in my code, works as expected. Thanks a lot!