getAtomTypeCounts: Get AtomType Counts

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

Description

Counts the number of AtomTypes within the provided string.

Usage

1
getAtomTypeCounts(atom.types)

Arguments

atom.types

A vector of strings containing a combination of the 167 AtomTypes.

Details

This is a wrapper using the base::table() function. The vector of AtomTypes (strings) are passed to the function, non-standard AtomTypes are removed, the AtomTypes are counted, and the counts are ordered based on the names.AtomTypes constant.

NOTE: This is a non-public function.

Value

a vector of numbers indicating the counts of each AtomType. The vector is ordered based on the names.AtomTypes with AtomTypes not included assigned a value of zero (0).

Author(s)

Emilio Xavier Esposito emilio@exeResearch.com

See Also

Other utilities: ConservationSet, DetermineChainsOfInterest, ExtractFileTimeStamp, ExtractPDBids, FileTimeStamp, HasXWaters, Nearby, ProtHetWatIndices, RescaleValues, RetainChainsOfInterest, ReturnPDBfullPath, StandardizeAsparticAcidNames, StandardizeCysteineNames, StandardizeGlutamicAcidNames, StandardizeHistidineNames, StandardizeLysineNames, TimeSpan, UniqueAtomHashes, aaStandardizeNames, 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
  ## Not run: 
  set.seed(13)
  num.AtomTypes <- sample(1:10, 30, replace = TRUE)
  atom.types <- rep(sample(names.res.AtomTypes, 30), num.AtomTypes)
  getAtomTypeCounts(atom.types)
  # [1]  0  0  0  0  0  0  0  0  0  0  0  0  0  7  1  0  0  0  0
  #      0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  0
  #      0  0  0  4  0  0  0  0  4  3  6  0  0  0  0  0  0  0  0
  #      0  0 10  0  8  0  0  0  0  0  0  0  0  0  0  0  0  0  6
  #      4  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  #      0  5  0  0  0  0  0  0  0  7  0  0  0  0  0  0  0  7  0
  #      3  0  0  5  3  0  5  0  0  5  8  0  8  0  8  0  0  0  0
  #      0  0  2  0  0  1  0  0  0  3  0  0  6  0  0  0  0  0  3
  #      0  0  0  0 10  0  0  0  0  0  0  1  0  0  0
  
## End(Not run)

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