IMP logo
IMP Reference Guide  develop.d36d3deffb,2026/11/09
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

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

Member Function Documentation

def 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.

def 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.

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

Shift r by dr and return new r.

Definition at line 53 of file jax.py.

def 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: