Custom Space

Custom functions simplifying the handling of fractional coordinates.

jax_dimenet.custom_space.init_fractional_coordinates(box)[source]

Returns a 2D box tensor and a scale function that projects positions within a box in real space to the unit-hypercube as required by fractional coordinates.

Parameters

box (Union[float, ndarray]) – A 1 or 2-dimensional box

Return type

Tuple[Union[float, ndarray], Callable]

Returns

A tuple (box, scale_fn) of a 2D box tensor and a scale_fn that scales positions in real-space to the unit hypercube.