Learn R Programming

vanddraabe (version 1.1.1)

RetainWatersWithinX: Retain Waters Within X Angstroms of Protein

Description

Retains water oxygen atoms within a user defined distance

Usage

RetainWatersWithinX(atoms.dist, prot.het.h2o.idc, cutoff.prot.h2o.dist)

Arguments

atoms.dist

Atomic distances calculated with the stats::dist() function

prot.het.h2o.idc

List of protein, HET-atom, and water atom indices

cutoff.prot.h2o.dist

User defined maximum numerical distance, in Angstroms, between the protein and water oxygen atoms to be retained.

Value

numerical vector of water oxygen atom indicies to retain

Details

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.

See Also

Other "Clean Protein Structure": CleanProteinStructures, RemoveHydrogenAtoms, RemoveModeledAtoms, RemoveOoR.b, RemoveOoR.o

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
  ##--- 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
  
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab