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).



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

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