gpytorchwrapper.src.utils.input_transformer

Functions

invdist(x)

morse(x)

xyz_to_dist_torch(x[, index, representation])

x is a tensor of shape (n, m) where m is the number of individual x, y, z coordinates and n is the number of data points.

gpytorchwrapper.src.utils.input_transformer.invdist(x: Tensor)[source]
gpytorchwrapper.src.utils.input_transformer.morse(x: Tensor)[source]
gpytorchwrapper.src.utils.input_transformer.xyz_to_dist_torch(x: Tensor, index: bool = False, representation: str = 'invdist') Tensor | tuple[Tensor, Tensor][source]

x is a tensor of shape (n, m) where m is the number of individual x, y, z coordinates and n is the number of data points.

The x, y, z coordinates must be ordered as x1, y1, z1, x2, y2, z2, … , xn, yn, zn

The final tensor containing the interatomic distances will have the shape (n, m/3) where m/3 is the number of atoms. The order of the distances is d01, d02, …, d12, d13, …, d(m/3-2)(m/3-1)

Parameters:
  • representation

  • x (torch.Tensor) – The input tensor of shape (n, m) where m is the number of individual x, y, z coordinates

  • index (bool) – returns unique atom indices per distance

Returns:

The inverse interatomic distances tensor or a tuple containing the inverse interatomic distances tensor and the unique atom indices per distance

Return type:

torch.Tensor | tuple[torch.Tensor, torch.Tensor]