The modelcif.associated
Python module¶
Classes to associate extra files with the system.
Typically, one or more Repository
objects are created and
added to modelcif.System.repositories
.
- class modelcif.associated.Repository(url_root, files)[source]¶
An online location where associated files can be found. These objects are typically added to
modelcif.System.repositories
.- Parameters:
- class modelcif.associated.File(path, details=None, data=None)[source]¶
A single associated file. These objects can be added to a
Repository
or aZipFile
.
- class modelcif.associated.CIFFile(path, details=None, categories=[], copy_categories=[], entry_id='model', entry_details=None, local_path=None, binary=False, data=None)[source]¶
An associated file in mmCIF or BinaryCIF format. See
File
for more details.- Parameters:
path (str) – File name that will be used to construct URLs in the main mmCIF file (see
Repository
orZipFile
).details (str) – Any additional information about the file.
data (
Data
) – If available, the data (e.g. sequence, structure, alignment) that are stored in the file.categories (list) – If given, any mmCIF category names in this list are written out to
local_path
bymodelcif.dumper.write()
instead of to the primary file handle.copy_categories (list) – If given, any mmCIF category names in this list are written out to both
local_path
bymodelcif.dumper.write()
and the primary file handle.entry_id (str) – Unique identifier for the associated file, if written (by specifying
categories
orcopy_categories
).entry_details (str) – A comment to be added to the associated file, if written (by specifying
categories
orcopy_categories
).local_path (str) – File name that will be used for
categories
orcopy_categories
. If not given, it defaults to the same aspath
. (The file is always written directly to the local disk, even if this object is placed inside aZipFile
.)binary (bool) – If False (the default), any output file is written in mmCIF format; if True, the file is written in BinaryCIF.
- property file_format¶
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- class modelcif.associated.LocalPairwiseQAScoresFile(path, details=None, categories=[], copy_categories=[], entry_id='model', entry_details=None, local_path=None, binary=False, data=None)[source]¶
An associated file in CIF format containing local pairwise QA scores. See
CIFFile
for more details.