# NOT RUN {
# }
# NOT RUN {
##----- determine atom indices
ProtHetWat.idc <- ProtHetWatIndices(thrombin.1hai$atom)
prot.idc <- ProtHetWat.idc$prot.idc
het.idc <- ProtHetWat.idc$het.idc
h2o.idc <- ProtHetWat.idc$h2o.idc
##----- calculate the distances
atoms.dist <- as.matrix(dist(thrombin.1hai$atom[, c("x","y","z")],
method = "euclidean",
diag = TRUE, upper = TRUE))
diag(atoms.dist) <- NA
atom.idc <- sort(c(prot.idc, het.idc, h2o.idc))
atoms.dist <- atoms.dist[atom.idc, atom.idc]
##----- determine nearby atoms
nearby.prot.idc <- Nearby(distances = atoms.dist[h2o.idc[1], ],
set.idc = prot.idc,
radius = 3.6)
nearby.prot.idc
# [1] 571
atoms.dist[h2o.idc[1], nearby.prot]
# [1] 3.571
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab