Computes the distance to the closest amino acid of the indicated type
dist2closest(pdb, res, aa, backbone = FALSE)
pdb is either a PDB id, or the path to a pdb file.
chain one letter identifier of the polypeptide chain.
res position of the residue of interest.
aa amino acid of interest.
backbone logical, when TRUE it means that we include those atoms belonging to the main chain (CA, N, O and C) beside all the side chain atoms.
Numerical value indicating the distance in ångströms (Å).
pairwise.dist(), res.dist(), ball()
The continuous formation and rupture of non-covalent bonds (intra- and intermolecular), gives rise to dynamic molecular interactions, which are cosubstantial to life. These non-covalent interactions can adopt many forms, but all of them are fundamentally electrostatic in nature, and strongly influenced by distances.
|Type of interaction||Energy dependence on the distance|
Therefore, computing spatial distances (in ångströms, Å), either between atoms or residues, is a useful task in many different contexts. A number of function from the package ptm will help us in these tasks:
What if we want to know the distance in ångströms between M222 and the closest vecinal serine?, is Ser218 the closest one? To address this issues, we shall use dist2closest() as follows:
dist2closest(pdb = '1q8k', chain = 'A', res = 222, aa = 'S')
##  5.04 ## attr(,"closest residue") ##  "CB-SER-218-A <--> CB-MET-222-A"
Note that the identities of the closest atoms are given as an attribute. Also, remember that the backbone atoms can be included in the analysis is wished:
dist2closest(pdb = '1q8k', chain = 'A', res = 222, aa = 'S', backbone = TRUE)
##  3.46 ## attr(,"closest residue") ##  "CB-SER-218-A <--> O-MET-222-A"
Just out of curiosity, what would be the closest methionine to Met222?
dist2closest(pdb = '1q8k', chain = 'A', res = 222, aa = 'M', backbone = TRUE)
##  9.19 ## attr(,"closest residue") ##  "CE-MET-236-A <--> O-MET-222-A"