IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP.jax.Space Class Reference

The space in which restraints are evaluated. More...

Inheritance diagram for IMP.jax.Space:

Detailed Description

The space in which restraints are evaluated.

See FreeSpace for the default unbounded space, or PeriodicSpace for a space that implements periodic boundary conditions.

Note
This class is only available in Python.

Definition at line 29 of file jax.py.

Public Member Functions

 displacement (dr)
 If given an array of particle-particle vectors, return an array of the corresponding displacement vectors in this space (e.g.
 distance (dr, min_dist=None)
 If given an array of particle-particle vectors, return an array of distances.
 shift (r, dr)
 Shift r by dr and return new r.
 shift_indexes (r, indexes, dr)
 Modify r[indexes] in place by adding dr.

Member Function Documentation

◆ displacement()

IMP.jax.Space.displacement ( dr)

If given an array of particle-particle vectors, return an array of the corresponding displacement vectors in this space (e.g.

the vectors between the closest periodic images of the particles). If given a single particle-particle vector, return a single displacement vector.

Definition at line 45 of file jax.py.

◆ distance()

IMP.jax.Space.distance ( dr,
min_dist = None )

If given an array of particle-particle vectors, return an array of distances.

If given a single particle-particle vector, return a single distance.

If min_dist is given, every returned distance is clamped to be no less than min_dist. The gradient is zero (rather than NaN, as for the unclamped distance of a zero-length vector) wherever the clamp applies.

Definition at line 38 of file jax.py.

◆ shift()

IMP.jax.Space.shift ( r,
dr )

Shift r by dr and return new r.

Definition at line 53 of file jax.py.

◆ shift_indexes()

IMP.jax.Space.shift_indexes ( r,
indexes,
dr )

Modify r[indexes] in place by adding dr.

Definition at line 57 of file jax.py.


The documentation for this class was generated from the following file: