Interactions

Feature: protein interaction feature

class hippo.feature.Feature(id: int, family: str, target: Target, chain_name: str, residue_name: str, residue_number: int, atom_names: str)[source]

Pharmocophoric feature in a protein

id

Database ID

Type:

int

family

Feature family

Type:

str

chain_name

Protein chain name/letter

Type:

str

residue_name

Protein residue name

Type:

str

residue_number

Protein residue number

Type:

int

atom_names

Protein atom names (whitespace-delimited)

Type:

str

repr(self) str[source]

ANSI Formatted string representation

str(self) str[source]

Unformatted string representation

property backbone: bool

Are any of the atoms referenced by this feature on the backbone?

property chain_res_name_number_str: str

Return a string representation of the feature

property res_name_number_family_str: str

Return a string representation of the feature

property res_name_number_str: str

Return a string representation of the feature

property res_number_name_tuple: str

Return a tuple representation of the feature

property sidechain: bool

Are any of the atoms referenced by this feature on the sidechain?

Interaction: between atom(s) on a Pose and a Feature

class hippo.interaction.Interaction(db: Database, id: int, feature_id: int, pose_id: int, type: str, family: str, atom_ids: str, prot_coord: str, lig_coord: str, distance: float, angle: float, energy: float | None, table: str = 'interaction')[source]

A Interaction represents an interaction between an rdkit Feature on a Pose and a Feature on the protein Target.

Attention

Interaction objects should not be created directly. Instead use Pose.interactions(), or PoseSet.interactions() methods.

Interaction initialisation

repr(self) str[source]

ANSI Formatted string representation

str(self) str[source]

Plain string representation

property angle: float | None

Returns the interaction angle (only defined for π-stacking and π-cation interactions)

property atom_ids: list[int]

Returns the indices of atoms making up the ligand feature

property db: Database

Returns a pointer to the parent database

property description: str

One line description of this interaction

property distance: float

Returns the euclidian distance of the interaction

property energy: float | None

Returns the interaction energy, if defined

property family: str

The Feature family

property family_str: str

String of the two feature families

property feature: Feature

Returns the associated Feature’s object

property feature_id: int

Returns the associated Feature’s database ID

property id: int

Returns the interaction’s database ID

property lig_coord: list[float]

Returns the cartesian position of the ligand feature

property pose: Pose

Returns the associated Pose’s object

property pose_id: int

Returns the associated Pose’s database ID

property prot_coord: list[float]

Returns the cartesian position of the protein Feature

property residue_name: str

Returns the associated Feature’s residue name

property residue_number: int

Returns the associated Feature’s residue number

summary() None[source]

Print a summary of this interaction’s properties

property table: str

Returns the name of the Database table

property type: str

Interaction type string

InteractionTable: All Interactions

class hippo.iset.InteractionTable(db: Database, table: str = 'interaction')[source]

Class representing all Interaction objects in the ‘interaction’ table of the Database.

Attention

InteractionTable objects should not be created directly. Instead use the HIPPO.interactions() property.

InteractionTable initialisation

len(self) int[source]

The total number of interactions

repr(self) str[source]

ANSI formatted command-line representation

str(self) str[source]

Unformatted command-line representation

property db: Database

Returns the associated Database

property df: pandas.DataFrame

DataFrame representation of the interactions

Returns:

a pandas.Dataframe of the interactions

property table: str

Returns the name of the Database table

InteractionSet: Subset of interactions

class hippo.iset.InteractionSet(db: Database, indices: list = None, table: str = 'interaction')[source]

Class representing a subset of the Interaction objects in the ‘interaction’ table of the Database.

Attention

InteractionSet objects should not be created directly. Instead use Pose.interactions(), or PoseSet.interactions() methods.

InteractionSet initialisation

self[key] Interaction | InteractionSet[source]

Get interaction or subsets thereof from this set

iter(self)[source]

Iterate through interactions in this set

len(self) int[source]

The number of interactions in this set

repr(self) str[source]

ANSI formatted command-line representation

str(self) str[source]

Unformatted command-line representation

classmethod all(db: Database, table: str = 'interaction') InteractionSet[source]

Construct a InteractionSet for all interactions in the table.

Returns:

an InteractionSet

property avg_num_interaction_type_residue_pairs_per_pose: list[tuple]

Get a list of (residue_number, chain_name) tuples

property avg_num_interactions_per_feature: float

Average number of interactions formed with each protein Feature

property avg_num_interactions_per_pose: list[tuple]

Get a list of (residue_number, chain_name) tuples

property avg_num_residues_per_pose: list[tuple]

Get a list of (residue_number, chain_name) tuples

property classic_fingerprint: dict

Classic HIPPO fingerprint dictionary, mapping protein Feature ID’s to the number of corresponding ligand features (from any Pose)

property db: Database

The associated HIPPO Database

property df: pandas.DataFrame

DataFrame representation of the interactions

Returns:

a pandas.Dataframe of the interactions

classmethod from_pose(pose: Pose | PoseSet, table: str = 'interaction') InteractionSet[source]

Construct a InteractionSet from one or more poses.

Parameters:

pose – a Pose or PoseSet object

Returns:

an InteractionSet

classmethod from_residue(db: Database, residue_number: int, chain: None | str = None, target: Target | int = 1) InteractionSet[source]

Get the set of interactions for a given residue number (and chain)

Parameters:
  • db – HIPPO Database

  • residue_number – the residue number

  • chain – the chain name / letter, defaults to any chain

  • target – the protein Target object or ID, defaults to first target in database

Returns:

a InteractionSet object

get_classic_fingerprint() dict[source]

Classic HIPPO fingerprint dictionary, mapping protein Feature ID’s to the number of corresponding ligand features (from any Pose)

property ids: list[int]

Returns the ids of interactions in this set

property indices: list[int]

Returns the ids of interactions in this set

property num_features: int

Count the funmber of protein :class:`.Feature`s with which interactions are formed

property per_feature_count_hirsch: float

A measure for how evenly protein :class:`.Feature`s are being interacted with

property residue_number_chain_pairs: list[tuple]

Get a list of (residue_number, chain_name) tuples

resolve(debug: bool = False, commit: bool = True) InteractionSet[source]

Resolve into predicted key interactions. In place modification.

Parameters:
  • debug – Increased verbosity for debugging (Default value = False)

  • commit – commit the changes (Default value = True)

Returns:

a filtered InteractionSet

property str_ids: str

Return an SQL formatted tuple string of the Interaction IDs

summary(families: bool = False) None[source]

Print a summary of this InteractionSet

property table: str

Get the name of the database table

property type_residue_number_chain_triples: list[tuple]

Get a list of (interaction_type, residue_number, chain_name) tuples

property types: list[str]

Returns the ids of interactions in this set