VMD Extension Functions
Compute distance matrices

Functions

 residueDistanceMatrix sel1 sel2
 
 residueDistanceMatrixApprox sel1 sel2 bins
 
 atomDistanceMatrix sel1 sel2
 
 distanceProfileFull lig prot ?step? ?dbins?
 
 distanceProfile lig prot ?dbins?
 

Detailed Description

Usage:

1  set tt [distanceProfileFull $b $a]; true
2 #or:
3  set tt [distanceProfile $b $a]; true

Then:

1  set ttf [open tt1.dat w]; printTable $tt "" $ttf; close $ttf
2 #or:
3  set ttf [open tt2.dat w]; printTable [reshapeToWide $tt] "" $ttf; close $ttf

Function Documentation

◆ atomDistanceMatrix()

atomDistanceMatrix   sel1 sel2  

Return the atom distance matrix (in longitudinal form: { { r1 r2 dist} ... } ) between residues in given selections. There should be only one atom per residue in the selection. Residues are taken from the ''resid'' attribute.

◆ distanceProfile()

distanceProfile   lig prot ?dbins?  

Compute the distance profile between a ligand and a protein, i.e., by timestep and residue, the minimum distance between the two. Requires two atomselections (likely from the same molecule) and an optional list of distance bins. Returns a list of { { frame resid distance } ... }.

◆ distanceProfileFull()

distanceProfileFull   lig prot ?step? ?dbins?  

Compute the distance profile between a ligand and a protein, i.e., by timestep and residue, the minimum distance between the two. Requires two atomselections (likely from the same molecule) and an optional list of distance bins. Returns a list of { { frame resid_lig resid_prot distance } ... } . Unlike distanceProfile, this can be post-processed to compute all kind of profiles and istance matrices.

◆ residueDistanceMatrix()

residueDistanceMatrix   sel1 sel2  

Given two atom selection, return the distance matrix (in longitudinal form: { { r1 r2 dist} ... } ) between residues in given selections. All selected atoms will be considered for each residue, and the minimum distance per residue pair returned. This can be slow. If using only an atom per residue (eg CA), consider using atomDistanceMatrix for speed. Residues are taken from the resid attribute.

◆ residueDistanceMatrixApprox()

residueDistanceMatrixApprox   sel1 sel2 bins  

Similar to residueDistanceMatrix, but much faster implementation which returns a discrete distance (taken from the bins list). For each residue pair, the distance will be the next higher value in {bins}. Runtime is O([llength $bins]). Returns a list of { {rid1 rid2 dist} ... }