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 270
    270:     def chains
    271:       array = []
    272:       self.each_model { |model| array.concat(model.chains) }
    273:       return array
    274:     end

each_chain() {|chain| ...}

iterates over each chain

[Source]

         # File lib/bio/db/pdb/utils.rb, line 265
    265:     def each_chain(&x) #:yields: chain
    266:       self.each_model { |model| model.each(&x) }
    267:     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 256
    256:     def find_chain
    257:       array = []
    258:       self.each_chain do |chain|
    259:         array.push(chain) if yield(chain)
    260:       end
    261:       return array
    262:     end

[Validate]