build.contacts: Determine the Contact Map and Distance Matrices
Description
Computation of a binary matrix specifying the contacts between each two amino acids $i$ and $j$ in respect to their spatial distance defined by their coordinates. Distance matrices for $\Delta x$, $\Delta y$ and $\Delta z$ are computed as well as the matrix containing the squared distances for all amino acid pairs.
Usage
build.contacts(n, cuts, xyz)
Arguments
n
length of the amino acid sequence
cuts
squared cutoff
xyz
matrix with the x-, y- and z-coordinates of all $C_{\alpha}$ atoms of the protein
Value
Return value is a list with the following components:
$cm
contact map
$deltas
list with distance matrices for x-, y- and z-direction as well as for the squared distance between all pairs of $C_{\alpha}$ atoms
$cnr
number of contacts
Details
If the squared distance between two $C_{\alpha}$ atoms of amino acids $i$ and $j$ is smaller than or equal to cuts, we assume a contact. In the contact map the value at indices $[i,j]$ and $[j,i]$ is set to $1$. Otherwise, the two $C_{\alpha}$ atoms are not in contact, and the value is set to $0$. Per definition an atom is not in contact with itself. The contact map is a symmetric matrix. The matrices in $deltas ($dx, $dy and $dz and $ds) are symmetric matrices as well. The number of contacts between distinct amino acids is stored in $cnr.