contact_score – Contact-Based Scores¶
- class ContactEntity(ent, contact_d=5.0, contact_mode='aa')¶
Helper object for Contact-score computation
- property view¶
The structure depending on contact_mode
Full view in case of “aa”, view that only contains representative atoms in case of “repr”.
- Type:
- property contact_mode¶
The contact mode
Can either be “aa”, meaning that all atoms are considered to identify contacts, or “repr” which only considers distances between representative atoms. For peptides thats CB (CA for GLY), for nucleotides thats C3’.
- Type:
str
- property contact_d¶
Pairwise distance of residues to be considered as contacts
Given at
ContactScorerconstruction- Type:
float
- property contacts¶
Interchain contacts
Organized as
dictwith key (cname1, cname2) and values being a set of tuples with the respective residue indices. cname1 < cname2 evaluates to True.
- property hr_contacts¶
Human readable interchain contacts
Human readable version of
contacts. Simple list with tuples containing two strings specifying the residues in contact. Format: <cname>.<rnum>.<ins_code>
- property interface_residues¶
Interface residues
Residues in each chain that are in contact with any other chain. Organized as
dictwith key cname and values the respective residue indices in aset.
- property hr_interface_residues¶
Human readable interface residues
Human readable version of
interface_residues.listof strings specifying the interface residues in format: <cname>.<rnum>.<ins_code>
- class ContactScorerResultICS(n_trg_contacts, n_mdl_contacts, n_union, n_intersection)¶
Holds data relevant to compute ics
- property n_trg_contacts¶
Number of contacts in target
- Type:
int
- property n_mdl_contacts¶
Number of contacts in model
- Type:
int
- property precision¶
Precision of model contacts
The fraction of model contacts that are also present in target
- Type:
int
- property recall¶
Recall of model contacts
The fraction of target contacts that are also present in model
- Type:
int
- class ContactScorerResultIPS(n_trg_int_res, n_mdl_int_res, n_union, n_intersection)¶
Holds data relevant to compute ips
- property n_trg_int_res¶
Number of interface residues in target
- Type:
int
- property n_mdl_int_res¶
Number of interface residues in model
- Type:
int
- property precision¶
Precision of model interface residues
The fraction of model interface residues that are also interface residues in target
- Type:
int
- property recall¶
Recall of model interface residues
The fraction of target interface residues that are also interface residues in model
- Type:
int
- property ips¶
The Interface Patch Similarity score (IPS)
Jaccard coefficient of interface residues in model/target. Technically thats
intersection/union- Type:
float
- class ContactScorer(target, chem_groups, model, alns, contact_mode='aa', contact_d=5.0)¶
Helper object to compute Contact scores
Tightly integrated into the mechanisms from the chain_mapping module. The prefered way to derive an object of type
ContactScoreris through the static constructor:FromMappingResult().Usage is the same as for
ost.mol.alg.QSScorer- static FromMappingResult(mapping_result, contact_mode='aa', contact_d=5.0)¶
The preferred way to get a
ContactScorerStatic constructor that derives an object of type
ContactScorerusing aost.mol.alg.chain_mapping.MappingResult- Parameters:
mapping_result (
ost.mol.alg.chain_mapping.MappingResult) – Data source
- property cent1¶
Represents target
- Type:
- property chem_groups¶
Groups of chemically equivalent chains in target
Provided at object construction
- Type:
listoflistofstr
- property cent2¶
Represents model
- Type:
- property alns¶
Alignments between chains in
cent1andcent2Provided at object construction. Each alignment is accessible with
alns[(t_chain,m_chain)]. First sequence is the sequence of the respective chain incent1, second sequence the one fromcent2.- Type:
dictwith key:tupleofstr, value:ost.seq.AlignmentHandle
- ScoreICS(mapping, check=True)¶
Computes ICS given chain mapping
Again, the preferred way is to get mapping is from an object of type
ost.mol.alg.chain_mapping.MappingResult.- Parameters:
mapping (
listoflistofstr) – seeost.mol.alg.chain_mapping.MappingResult.mappingcheck (
bool) – Perform input checks, can be disabled for speed purposes if you know what you’re doing.
- Returns:
Result object of type
ContactScorerResultICS
- ScoreICSInterface(trg_ch1, trg_ch2, mdl_ch1, mdl_ch2)¶
Computes ICS scores only considering one interface
This only works for interfaces that are computed in
Score(), i.e. interfaces for which the alignments are set up correctly.- Parameters:
trg_ch1 (
str) – Name of first interface chain in targettrg_ch2 (
str) – Name of second interface chain in targetmdl_ch1 (
str) – Name of first interface chain in modelmdl_ch2 (
str) – Name of second interface chain in model
- Returns:
Result object of type
ContactScorerResultICS- Raises:
RuntimeErrorif no aln for trg_ch1/mdl_ch1 or trg_ch2/mdl_ch2 is available.
- ICSFromFlatMapping(flat_mapping)¶
Same as
ScoreICS()but with flat mapping- Parameters:
flat_mapping (
dictwithstras key and value) – Dictionary with target chain names as keys and the mapped model chain names as value- Returns:
Result object of type
ContactScorerResultICS
- ScoreIPS(mapping, check=True)¶
Computes IPS given chain mapping
Again, the preferred way is to get mapping is from an object of type
ost.mol.alg.chain_mapping.MappingResult.- Parameters:
mapping (
listoflistofstr) – seeost.mol.alg.chain_mapping.MappingResult.mappingcheck (
bool) – Perform input checks, can be disabled for speed purposes if you know what you’re doing.
- Returns:
Result object of type
ContactScorerResultIPS
- ScoreIPSInterface(trg_ch1, trg_ch2, mdl_ch1, mdl_ch2)¶
Computes IPS scores only considering one interface
This only works for interfaces that are computed in
Score(), i.e. interfaces for which the alignments are set up correctly.- Parameters:
trg_ch1 (
str) – Name of first interface chain in targettrg_ch2 (
str) – Name of second interface chain in targetmdl_ch1 (
str) – Name of first interface chain in modelmdl_ch2 (
str) – Name of second interface chain in model
- Returns:
Result object of type
ContactScorerResultIPS- Raises:
RuntimeErrorif no aln for trg_ch1/mdl_ch1 or trg_ch2/mdl_ch2 is available.
- IPSFromFlatMapping(flat_mapping)¶
Same as
ScoreIPS()but with flat mapping- Parameters:
flat_mapping (
dictwithstras key and value) – Dictionary with target chain names as keys and the mapped model chain names as value- Returns:
Result object of type
ContactScorerResultIPS