Closed aozalevsky closed 1 year ago
Personally, I think it's a little odd to create an mmCIF file this way - if you have no linked model group, there's no way programatically to figure out which are the deposited models in that ensemble. But of course we have no control over what depositors create. We can certainly read num_ensemble_models_deposited
from the input file and use that if the model group is not provided.
raise exception if those numbers are inconsistent.
That is asking for trouble since the dictionary does not require any consistency here. The policy in python-ihm has always been to read a compliant file without raising exceptions, and to make a best effort to do the same for noncompliant files. If you want to check a file for issues, run it through a validator. If there are issues with the file but it is still compliant, this should be addressed in the dictionary or by the archive team.
Here is an example of the PDBDEV_00000018:
which has a minimalistic definition:
since
_ihm_ensemble_info.model_group_id
isn't required by the dictionary,python-ihm
should be able to use_ihm_ensemble_info.num_ensemble_models_deposited
and, ideally, raise exception if those numbers are inconsistent.