mdciao.contacts.Residues

class mdciao.contacts.Residues(res_idxs_pair, residue_names, anchor_residue_idx=None, consensus_labels=None, top=None)

Container for mdtraj.Topology.Residues objects

__init__(res_idxs_pair, residue_names, anchor_residue_idx=None, consensus_labels=None, top=None)
Parameters
  • res_idxs_pair (iterable of len two) – two integers representing the residue serial index (residxs)

  • residue_names (iterable of len two) – two strings with the residue names

  • anchor_residue_idx

  • consensus_labels

  • top

Methods

__init__(res_idxs_pair, residue_names[, …])

param res_idxs_pair

two integers representing the residue serial index (residxs)

Attributes

anchor_index

The index [0,1] of the anchor residue

anchor_residue

returns: :rtype: str, anchor residue if anchor residue index is provided else None

anchor_residue_index

returns: :rtype: int, anchor residue index if passed else None(default)

consensus_labels

Labels derived from GPCR, CGN or other type of consensus nomenclature.

idxs_pair

serial indices of the pair of residues

names

returns: * list, for each residue index in the residue contact pair, the corresponding residue name from the topology file. * example ([‘GLU30’,’VAL212’])

names_short

returns: * list, for each residue name in the residue contact pair, the corresponding short residue name from the topology file. * example ([‘E30’, ‘V212’])

partner_index

partner_residue

returns: :rtype: str, partner residue if partner residue index is provided else None

partner_residue_index

returns: :rtype: int, partner residue if passed else (default)

property anchor_index

The index [0,1] of the anchor residue

property anchor_residue

returns: :rtype: str, anchor residue if anchor residue index is provided else None

property anchor_residue_index

returns: :rtype: int, anchor residue index if passed else None(default)

property consensus_labels

Labels derived from GPCR, CGN or other type of consensus nomenclature. They were parsed at initialization

TODO

Warning

This property can be changed externally by the method ContactGroup.relabel_consensus. This is bad practice and probably anti-pattern but ATM there’s no way around it

property idxs_pair

serial indices of the pair of residues

Returns

Return type

list of residue index pair passed

property names

returns: * list, for each residue index in the residue contact pair, the corresponding residue name from the topology file. * example ([‘GLU30’,’VAL212’])

property names_short

returns: * list, for each residue name in the residue contact pair, the corresponding short residue name from the topology file. * example ([‘E30’, ‘V212’])

property partner_index
property partner_residue

returns: :rtype: str, partner residue if partner residue index is provided else None

property partner_residue_index

returns: :rtype: int, partner residue if passed else (default)