conkit.core.ContactFile module

Storage space for a contact file

class ContactFile(id)[source]

Bases: conkit.core.Entity.Entity

A contact file object representing a single prediction file

Examples

>>> from conkit.core import ContactMap, ContactFile
>>> contact_file = ContactFile("example")
>>> contact_file.add(ContactMap("foo"))
>>> contact_file.add(ContactMap("bar"))
>>> print(contact_file)
ContactFile(id="example" nseqs=2)

Attributes

author The author of the conkit.core.ContactFile
method The conkit.core.ContactFile-specific method
remark The conkit.core.ContactFile-specific remarks
target The target name
top_map The first conkit.core.ContactMap entry in conkit.core.ContactFile

Methods

add(entity) Add a child to the Entity
copy() Create a shallow copy of conkit.core.Entity
deepcopy() Create a deep copy of conkit.core.Entity
remove(id) Remove a child
sort(kword[, reverse, inplace]) Sort the conkit.core.ContactFile
author

The author of the conkit.core.ContactFile

method

The conkit.core.ContactFile-specific method

remark

The conkit.core.ContactFile-specific remarks

sort(kword, reverse=False, inplace=False)[source]

Sort the conkit.core.ContactFile

Parameters:

kword : str

The dictionary key to sort contacts by

reverse : bool, optional

Sort the contact pairs in descending order [default: False]

inplace : bool, optional

Replace the saved order of contacts [default: False]

Returns:

contact_map : conkit.core.ContactMap

The reference to the conkit.core.ContactMap, regardless of inplace

Raises:

ValueError

target

The target name

top_map

The first conkit.core.ContactMap entry in conkit.core.ContactFile

Returns:

top_map : conkit.core.ContactMap, None