Distopia

distopia.calc_bonds_idx_no_box_double(double[:, ::1] coords, size_t[::1] idx, ndarray results=None) ndarray

Calculate distances between pairs of coordinates by index

Parameters:
  • coords (float64 array) – array of coordinates

  • idx (int array) – array of integers to calculate distances for

  • results (float64 array (optional)) – array to store results in, must be half the size of idx

Returns:

distances – half the size of idx

Return type:

float64 array

distopia.calc_bonds_idx_no_box_float(float[:, ::1] coords, size_t[::1] idx, ndarray results=None) ndarray

Calculate distances between pairs of coordinates by index

Parameters:
  • coords (float32 array) – array of coordinates

  • idx (int array) – array of integers to calculate distances for

  • results (float32 array (optional)) – array to store results in, must be half the size of idx

Returns:

distances – half the size of idx

Return type:

float32 array

distopia.calc_bonds_idx_ortho_double(double[:, ::1] coords, size_t[::1] idx, double[::1] box, ndarray results=None) ndarray

Calculate distances between pairs of coordinates by index

Parameters:
  • coords (float64 array) – array of coordinates

  • idx (int array) – array of integers to calculate distances for

  • box (float64 array) – periodic boundary dimensions

  • results (float64 array (optional)) – array to store results in, must be half the size of idx

Returns:

distances – half the size of idx

Return type:

float64 array

distopia.calc_bonds_idx_ortho_float(float[:, ::1] coords, size_t[::1] idx, float[::1] box, ndarray results=None) ndarray

Calculate distances between pairs of coordinates by index

Parameters:
  • coords (float32 array) – array of coordinates

  • idx (int array) – array of integers to calculate distances for

  • box (float32 array) – periodic boundary dimensions

  • results (float32 array (optional)) – array to store results in, must be half the size of idx

Returns:

distances – half the size of idx

Return type:

float32 array

distopia.calc_bonds_no_box_double(double[:, ::1] coords0, double[:, ::1] coords1, ndarray results=None) ndarray

Calculate pairwise distances between coords0 and coords1

Parameters:
  • coords0 (float64 array) – must be same length

  • coords1 (float64 array) – must be same length

  • box (float64 array) – periodic boundary dimensions

  • results (float64 array (optional)) – array to store results in, must be same size as coords0/coords1

Returns:

distances – same size as coords0/coords1

Return type:

float64 array

distopia.calc_bonds_no_box_float(float[:, ::1] coords0, float[:, ::1] coords1, ndarray results=None) ndarray

Calculate pairwise distances between coords0 and coords1

Parameters:
  • coords0 (float32 array) – must be same length

  • coords1 (float32 array) – must be same length

  • results (float32 array (optional)) – array to store results in, must be same size as coords0/coords1

Returns:

distances – same size as coords0/coords1

Return type:

float32 array

distopia.calc_bonds_ortho_double(double[:, ::1] coords0, double[:, ::1] coords1, double[::1] box, ndarray results=None) ndarray

Calculate pairwise distances between coords0 and coords1

Parameters:
  • coords0 (float64 array) – must be same length

  • coords1 (float64 array) – must be same length

  • box (float64 array) – periodic boundary dimensions

  • results (float64 array (optional)) – array to store results in, must be same size as coords0/coords1

Returns:

distances – same size as coords0/coords1

Return type:

float64 array

distopia.calc_bonds_ortho_float(float[:, ::1] coords0, float[:, ::1] coords1, float[::1] box, ndarray results=None) ndarray

Calculate pairwise distances between coords0 and coords1

Parameters:
  • coords0 (float32 array) – must be same length

  • coords1 (float32 array) – must be same length

  • box (float32 array) – periodic boundary dimensions

  • results (float32 array (optional)) – array to store results in, must be same size as coords0/coords1

Returns:

distances – same size as coords0/coords1

Return type:

float32 array