Retains water oxygen atoms within a user defined distance
RetainWatersWithinX(atoms.dist, prot.het.h2o.idc, cutoff.prot.h2o.dist)
Atomic distances calculated with the
List of protein, HET-atom, and water atom indices
User defined maximum numerical distance, in Angstroms, between the protein and water oxygen atoms to be retained.
Retain water oxygen atoms within a user defined distance. This
function is a coarse grain method of removing waters beyond a predefined
distance to reduce the computational load associated with the
stats::dist() function for a collection of protein structure.
numerical vector of water oxygen atom indicies to retain
Emilio Xavier Esposito emilio@exeResearch.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
##--- determine the protein, hetatom, and water indices prot.het.h2o.idc <- ProtHetWatIndices(data=PDB.1hah.aoi.clean) ##--- calculate the distances atoms.dist <- as.matrix(dist(PDB.1hah.aoi.clean[, c("x","y","z")], method="euclidean", diag=TRUE, upper=TRUE)) diag(atoms.dist) <- NA water.idc.within.6 <- RetainWatersWithinX(atoms.dist, prot.het.h2o.idc, cutoff.prot.h2o.dist=6.0) # - 204 of the 204 water oxygen atoms are within 6 Angstroms of the protein
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.