module Bio::PDB::HetatmFinder
methods to access HETATMs
XXX#each_heterogen must be defined.
Bio::PDB::HetatmFinder
is included by Bio::PDB::PDB, Bio::PDB::Model
, Bio::PDB::Chain
, and Bio::PDB::Heterogen
.
Public Instance Methods
each_hetatm() { |hetatm| ... }
click to toggle source
iterates over each HETATM
# File lib/bio/db/pdb/utils.rb 357 def each_hetatm(&x) #:yields: hetatm 358 self.each_heterogen { |heterogen| heterogen.each(&x) } 359 end
find_hetatm() { |hetatm| ... }
click to toggle source
returns an array containing all HETATMs for which given block is not false
(similar to Enumerable#find_all).
# File lib/bio/db/pdb/utils.rb 348 def find_hetatm 349 array = [] 350 self.each_hetatm do |hetatm| 351 array.push(hetatm) if yield(hetatm) 352 end 353 return array 354 end
hetatms()
click to toggle source
returns all HETATMs
# File lib/bio/db/pdb/utils.rb 362 def hetatms 363 array = [] 364 self.each_heterogen { |heterogen| array.concat(heterogen.hetatms) } 365 return array 366 end