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

methods to access chains

XXX#each_model must be defined.

Bio::PDB::ChainFinder is included by Bio::PDB::PDB and Bio::PDB::Model.

### Methods

chains each_chain find_chain

### Public Instance methods

chains()

returns all chains

[Source]

         # File lib/bio/db/pdb/utils.rb, line 272
    272:     def chains
    273:       array = []
    274:       self.each_model { |model| array.concat(model.chains) }
    275:       return array
    276:     end

each_chain() {|chain| ...}

iterates over each chain

[Source]

         # File lib/bio/db/pdb/utils.rb, line 267
    267:     def each_chain(&x) #:yields: chain
    268:       self.each_model { |model| model.each(&x) }
    269:     end

find_chain() {|chain| ...}

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

[Source]

         # File lib/bio/db/pdb/utils.rb, line 258
    258:     def find_chain
    259:       array = []
    260:       self.each_chain do |chain|
    261:         array.push(chain) if yield(chain)
    262:       end
    263:       return array
    264:     end

[Validate]