Metadata

class hippo.metadata.MetaData(_MetaData__dict: Mapping[str, str] | None)[source]

Metadata dictionary linked to a compound or pose in a HIPPO Database

Attention

Metadata objects should not be created directly. Instead use the methods Compound.metadata() and Pose.metadata()

Metadata initialisation

del self[key: str] None[source]

Set a dictionary key

self[key: str] = item None[source]

Set the value associated to a specific dictionary key

append(key: str, value, commit: bool = True) None[source]

Create or append to a list-like value with given key

Parameters:
  • key – metadata dictionary key to be modified

  • value – value to be appended to list-like metadata[key]

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

property db: Database

associated Database

property id: int

entry ID in the associated Database table

property table: str

name of the associated Database table

update(data: dict, commit: bool = True) None[source]

Wrapper for dict.update()

Parameters:
  • data – data with which to update the metadata

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

class hippo.tags.TagTable(db: Database)[source]

Object representing the ‘tag’ table in the Database.

Attention

TagTable objects should not be created directly. Instead use the HIPPO.tags() property.

TagTable initialisation

repr(self) str[source]

ANSI Formatted string representation

str(self) str[source]

Unformatted representation of this object

property db: Database

Returns a pointer to the parent database

delete(tag: str) None[source]

Delete all assignments for the given tag

rename(old: str, new: str) None[source]

Rename all instances of a tag across the database

summary(return_df: bool = False) pd.DataFrame[source]

Print a summary table of tags with compound and pose counts

property table: str

Returns the name of the Database table

property unique: set[str]

Returns a set of unique tag names contained in the table

class hippo.tags.TagSet(parent: Compound | Pose, tags: list | tuple | None = None, immutable: bool = False, commit: bool = True)[source]

Object representing a subset of the ‘tag’ table in the Database belonging to a certain Compound or Pose.

Attention

TagSet objects should not be created directly. Instead use the Compound.tags() or Pose.tags() property.

TagSet initialisation

self + other[source]

Attention

Adding sets together is not supported

tag: str in self bool[source]

Is this tag in the set?

self[key: int][source]

Get a specific element in the set by index

iter(self)[source]

Iterate through this set

len(self) int[source]

Number of tags in this set

repr(self) str[source]

ANSI Formatted string representation

str(self) str[source]

Unformatted representation of this object

add(tag: str, commit: bool = True) None[source]

Add a tag to the set

Parameters:
  • tag – tag to add

  • commit – commit the change? (Default value = True)

clear()[source]

Clear all tags

property db: Database

Returns a pointer to the parent database

discard(tag: str) None[source]

Discard an element

Parameters:

tag – tag to discard

glob(pattern: str) list[str][source]

Construct a list from tags in the set names that match a given UNIX-style pattern.

Parameters:

pattern – unix style pattern with shell-style wildcards

Returns:

list of tags

property immutable: bool

Is this set is immutable?

property parent

Returns this set of tags parent Compound or Pose.

pop() str[source]

Pop the last element

remove(tag: str) None[source]

Remove an element

Parameters:

tag – tag to remove

Raises:

ValueError – if tag is not in set

property tags: list

Returns the elements in this set

class hippo.target.Target(db: Database, id: int, name: str)[source]

Object representing a protein target

Attention

Target objects should not be created directly. Instead use HIPPO.register_target() or Pose.target().

Target initialisation

repr(self) str[source]

ANSI Formatted string representation

str(self) str[source]

Unformatted string representation

calculate_features(protein: mp.System, reference_id: int | None = None, force: bool = False) list[Feature][source]

Calculate features from a protein system

Parameters:

proteinmolparse.System object, likely from Pose.protein_system()

Returns:

a list of Feature objects

property db: Database

Returns a pointer to the parent database

property feature_ids: list[int]

Returns the target’s feature ID’s

property features: list[Feature]

Returns the target’s features

property id: int

Returns the target’s ID

property name: str

Returns the target’s name

property subsites: list[Subsite]

List of Subsite objects on this target