The modelcif.reader Python module¶
Utility classes to read in information in mmCIF or BinaryCIF format
- modelcif.reader.read(fh, model_class=<class 'modelcif.model.Model'>, format='mmCIF', handlers=[], warn_unknown_category=False, warn_unknown_keyword=False, reject_old_file=False, variant=<class 'modelcif.reader.ModelCIFVariant'>, add_to_system=None)[source]¶
Read data from the file handle fh.
See
ihm.reader.read()for more information. The function here behaves similarly but reads in files compliant with the ModelCIF extension directory rather than IHM.Note that if a custom
model_classis provided, any models present in the file will be returned as that type, regardless of their type stated in the mmCIF file (e.g. homology model, ab initio model). (However, themodel_typeattribute will be set appropriately.)If the input file references any associated files, they will be listed in
modelcif.System.repositories. The files will not be automatically downloaded or read in, but it is straightforward to do this in Python; see the associated files example.- Returns:
A list of
modelcif.Systemobjects.
- class modelcif.reader.ModelCIFVariant[source]¶
Used to select typical PDBx/ModelCIF file input. See
read()andihm.reader.Variant.