Module: Bio::PDB::ModelFinder

Included in:
Bio::PDB
Defined in:
lib/bio/db/pdb/utils.rb

Overview

methods to access models

XXX#each_model must be defined.

Bio::PDB::ModelFinder is included by Bio::PDB::PDB.

Instance Method Summary collapse

Instance Method Details

#find_modelObject

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



230
231
232
233
234
235
236
# File 'lib/bio/db/pdb/utils.rb', line 230

def find_model
  array = []
  self.each_model do |model|
    array.push(model) if yield(model)
  end
  return array
end