starling.structure.coordinates.generate_3d_coordinates_from_distances

generate_3d_coordinates_from_distances(device, batch_size, num_cpus_mds, num_mds_init, distance_maps, progress_bar=True)[source]

Function to generate 3D coordinates from distance maps.

This is the parent function which will then choose either the fasts or most approriate method to use based on the requested device and the actual OS.

This function is called in:

  1. inference.generation, where the distance maps are tensors.

  2. From the Ensemble() object, where the distance maps are numpy arrays.

Parameters:
  • device (str) – The device to use for computation.

  • batch_size (int) – The batch size for processing the distance maps if we use the torch implementation.

  • num_cpus_mds (int) – The number of CPUs to use for MDS if we use the SciPy implementation.

  • num_mds_init (int) – The number of initializations to use for MDS if we use the SciPy implementation.

  • distance_maps (list) – Either an nd.array or a pytorch tensor of distance maps.