# Residue distances to coordinates

Given a distance matrix **D**, we can define a Gram matrix **M** by classical multidimensional scaling (MDS) (Young, Gale, and Aiston S. Householder. *Psychometrika* 3, no. 1 (1938): 19-22.),&#x20;

$$
\mathbf{M}*{ij} = \frac{\mathbf{D}*{1j}^2+\mathbf{D}*{i1}^2-\mathbf{D}*{ij}^2}{2}
$$

Using the following code, one can generate a set of coordinates for a given distance matrix.

```
amo dist2coord \
-jobname [JOB_NAME] \
-type 1 \
-fastx <INPUT_FASTA_FILE> \
-mat <DISTANCE_MAP_FILE> \
-output [OUTPUT_DIRECTORY] \
-hlog      
```
