module Bio::PDB::ResidueFinder
methods to access residues
XXX#each_chain must be defined.
Bio::PDB::ResidueFinder
is included by Bio::PDB::PDB, Bio::PDB::Model
, and Bio::PDB::Chain
.
Public Instance Methods
each_residue() { |residue| ... }
click to toggle source
iterates over each residue
# File lib/bio/db/pdb/utils.rb 299 def each_residue(&x) #:yields: residue 300 self.each_chain { |chain| chain.each(&x) } 301 end
find_residue() { |residue| ... }
click to toggle source
returns an array containing all residues for which given block is not false
(similar to Enumerable#find_all).
# File lib/bio/db/pdb/utils.rb 290 def find_residue 291 array = [] 292 self.each_residue do |residue| 293 array.push(residue) if yield(residue) 294 end 295 return array 296 end
residues()
click to toggle source
returns all residues
# File lib/bio/db/pdb/utils.rb 304 def residues 305 array = [] 306 self.each_chain { |chain| array.concat(chain.residues) } 307 return array 308 end