ihmwg / python-modelcif

Python package for handling ModelCIF mmCIF and BinaryCIF files
MIT License
9 stars 1 forks source link

not_modeled_residue_ranges in python-ihm #37

Open gtauriello opened 10 hours ago

gtauriello commented 10 hours ago

@benmwebb I ran into a new issue as I updated with the latest python-ihm (related to https://github.com/ihmwg/python-ihm/issues/150)...

There is now a required not_modeled_residue_ranges attribute for models which is not set by default for modelcif.model.Model and its subclasses (which makes it fail in the dumper afterwards).

Basically I was expected it to "just work" without any changes on my end: i.e. I didn't think I would need to add not_modeled_residue_ranges to my model classes and I expected to have default behaviour which checks which residues were covered by coordinates and fills that table automatically (e.g. as I think is done in _get_not_modeled_residues in ihm/util/make_mmcif.py?). For the current model set I am working on, I will work around it of course, but just wondering if this can be handled automatically...

Also @brindakv: I was not aware of _pdbx_poly_seq_scheme needing that behaviour for missing residues. We had such cases in ModelArchive so far and will need to remediate them (e.g. ma-fesnov-nov003nm with "UNK" in entity sequence which are not covered by coordinates). Are there any other fields which need to be considered when residues are missing?

gtauriello commented 10 hours ago

Forgot to attach my example code: test_model.py.zip

So basically I would have expected this to work without me having to add not_modeled_residue_ranges in MyModel and that it would be auto-filled based on what residues actually have coordinates...

benmwebb commented 6 hours ago

This is surely a bug, as the not-modeled-residues table is for IHMCIF, not ModelCIF. It's not supposed to be usable (or required) here. I will fix.