Module Bio::PDB::ResidueFinder
In: lib/bio/db/pdb/utils.rb

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.

Methods

Public Instance methods

iterates over each residue

[Source]

     # File lib/bio/db/pdb/utils.rb, line 297
297:     def each_residue(&x) #:yields: residue
298:       self.each_chain { |chain| chain.each(&x) }
299:     end

returns an array containing all residues for which given block is not false (similar to Enumerable#find_all).

[Source]

     # File lib/bio/db/pdb/utils.rb, line 288
288:     def find_residue
289:       array = []
290:       self.each_residue do |residue|
291:         array.push(residue) if yield(residue)
292:       end
293:       return array
294:     end

returns all residues

[Source]

     # File lib/bio/db/pdb/utils.rb, line 302
302:     def residues
303:       array = []
304:       self.each_chain { |chain| array.concat(chain.residues) }
305:       return array
306:     end

[Validate]