Nearby: Nearby

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Determine the entities near the entity of interest using a distance matrix.

Usage

1
Nearby(distances, set.idc, radius = 3.6)

Arguments

distances

Vector of distance values; see above note.

set.idc

Vector of indices (as integers) indicating the entities of interest. This set of entities corresponds to the columns of the distance matrix because the provided distance matrix should be square. No check is performed on the squareness of the distance matrix because it is calculated within the ConservedWaters function.

radius

Numerical value indicating the distance to look for neighboring entities; default: 3.6

Details

Identify the entity, or entities, near an entity or collection of entites of interest. The previously calculated distance matrix, set of indicies, and a user defined radius are required.

NOTE: This function is designed to work with BoundWaterEnvironment() and the base::apply() function processing rows (the MARGIN = 1 option). For this reason it is NOT a public function.

Value

Vector of indicies.

Author(s)

Emilio Xavier Esposito emilio@exeResearch.com

See Also

Other utilities: ConservationSet, DetermineChainsOfInterest, ExtractFileTimeStamp, ExtractPDBids, FileTimeStamp, HasXWaters, ProtHetWatIndices, RescaleValues, RetainChainsOfInterest, ReturnPDBfullPath, StandardizeAsparticAcidNames, StandardizeCysteineNames, StandardizeGlutamicAcidNames, StandardizeHistidineNames, StandardizeLysineNames, TimeSpan, UniqueAtomHashes, aaStandardizeNames, getAtomTypeCounts, getResTypeCounts, res2xyz, resAtomType2AtomClass, write.basic.pdb, write.conservedWaters.pdb

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  ## 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
  
## End(Not run)

vanddraabe documentation built on June 8, 2019, 1:03 a.m.