Jess#

class pyjess.Jess#

A handle to run Jess over a list of templates.

Added in version 0.4.0: Equality, hashing and pickle protocol support.

__init__(templates=())#

Create a new Jess database containing the given templates.

Parameters:

templates (sequence of Template) – The templates to index in the database for further querying.

Caution

The Template objects given in argument will be copied because the internal C data structure requires ownership of the data. Modification to the original Template objects will not have an effect on the newly created Jess templates.

copy()#

Create a copy of the Jess object.

Returns:

Jess – A Jess object containing the same templates.

Added in version 0.4.0.

query(molecule, rmsd_threshold, distance_cutoff, max_dynamic_distance, *, max_candidates=1000, ignore_chain=False, best_match=False, reorder=True)#

Scan for templates matching the given molecule.

Parameters:
  • molecule (Molecule) – The protein to match the templates to.

  • rmsd_threshold (float) – The RMSD threshold for reporting results.

  • distance_cutoff (float) – The global distance cutoff used to guide the search.

  • max_dynamic_distance (float) – The maximum template/query dynamic distance after adding the global distance cutoff and the individual atom distance cutoff defined for each atom of the template.

  • ignore_chain (bool) – Whether to check or ignore the chain of the atoms to match.

  • best_match (bool) – Pass True to return only the best match to each template.

  • reorder (bool) – Whether to enable template atom reordering to accelerate matching in the scanner algorithm. Pass False to reverse to the original, slower algorithm which matches atoms in the same order as they appear in the template, at the cost

Returns:

Query – An iterator over the query hits.

Caution

Since v0.6.0, this function uses an optimized variant of the Jess scanning algorithm which minimized the number of steps needed to generate matches, by re-ordering the order the template atoms are iterated upon. Because of this change, the query may return exactly the same matches but in an order that differs from the original Jess version. If you really need results in the original order, set reorder to False.

Added in version 0.6.0: The reorder argument, defaulting to True.

class pyjess.Query#

A query over templates with a given molecule.

Jess iterates over the templates and attempt matches the query molecule, so the hits can actually be generated iteratively. This class allows accessing the hits as a Python iterator.

jess#

The templates this object is currently scanning.

Type:

Jess

molecule#

The query molecule to align to the templates.

Type:

Molecule

rmsd_threshold#

The RMSD threshold for reporting results.

Type:

float

max_candidates#

The maximum number of candidate hits to report.

Type:

int

ignore_chain#

Whether to check or ignore the chain of the atoms to match.

Type:

bool

best_match#

Whether the query will return only the best match to each template.

Type:

bool

__iter__()#

Implement iter(self).

class pyjess.Hit#

A hit identified between a query molecule and a target template.

rmsd#

The RMSD between the aligned structures.

Type:

float

template#

The template that matched the query molecule.

Type:

Template

molecule#

The query molecule.

Type:

Molecule

__getstate__()#

Helper for pickle.

__new__(**kwargs)#
atoms(transform=True)#

Get the list of query atoms matching the template.

Parameters:

transform (bool) – Whether or not to transform coordinates of hits into template frame.

Returns:

list of Atom – The list of matching atoms.

molecule(transform=False)#

Get the molecule matching the template.

Parameters:

transform (bool) – Whether or not to transform coordinates of the molecule atoms into template frame.

Returns:

Molecule – The matching molecule, optionally rotated to match the template coordinate.

Added in version 0.5.0.

determinant#

The determinant of the rotation matrix.

Type:

float

evalue#

The E-value estimated for the hit.

Type:

float

log_evalue#

The logarithm of the E-value estimated for the hit.

Type:

float