starling.structure.coordinates.distance_matrix_to_3d_structure_mds
- distance_matrix_to_3d_structure_mds(distance_matrix, **kwargs)[source]
Generate 3D coordinates from a distance matrix using multidimensional scaling (MDS).
NB: by default the MDS object is initialized with the following defaults, although these can be overridden by passing them in the kwargs:
n_components = 3 dissimilarity = “precomputed” n_init = configs.DEFAULT_MDS_NUM_INIT (default setting) n_jobs = configs.DEFAULT_CPU_COUNT_MDS (default setting) normalized_stress = ‘auto’
- Parameters:
distance_matrix (torch.Tensor) – A 2D tensor representing the distance matrix.
kwargs (dict) – Keyword arguments to pass to scikit-learn’s MDS algorithm.
- Returns:
A 3D tensor representing the coordinates of the atoms.
- Return type: