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 299
299:     def each_residue(&x) #:yields: residue
300:       self.each_chain { |chain| chain.each(&x) }
301:     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 290
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

returns all residues

[Source]

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

[Validate]