ihmwg / python-modelcif

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

Don't create Entities for templates #18

Closed benmwebb closed 2 years ago

benmwebb commented 2 years ago

The ModelCIF dictionary does not require an Entity for each Template - in fact the entity ID in a template is supposed to be that of the entity in the template's own mmCIF file, not a parent-child relationship to the entity table in this file.

Replace the entity argument to Template with at least some of Entity's own arguments, namely the primary sequence and an alphabet, and add an optional entity_id argument. Either copy Entity's logic for mapping sequence to chemical components, determining poly/non-poly, etc., or create an internal Entity object to handle that logic and pass through methods/attributes as necessary.

We may also need to modify modelcif.reader to get template sequence from MA rather than PDBx categories.