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

methods to access heterogens (compounds or ligands)

XXX#each_chain must be defined.

Bio::PDB::HeterogenFinder is included by Bio::PDB::PDB, Bio::PDB::Model, and Bio::PDB::Chain.

### Methods

each_heterogen find_heterogen heterogens

### Public Instance methods

each_heterogen() {|heterogen| ...}

iterates over each heterogens

[Source]

         # File lib/bio/db/pdb/utils.rb, line 386
    386:     def each_heterogen(&x) #:yields: heterogen
    387:       self.each_chain { |chain| chain.each_heterogen(&x) }
    388:     end

find_heterogen() {|heterogen| ...}

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

[Source]

         # File lib/bio/db/pdb/utils.rb, line 377
    377:     def find_heterogen
    378:       array = []
    379:       self.each_heterogen do |heterogen|
    380:         array.push(heterogen) if yield(heterogen)
    381:       end
    382:       return array
    383:     end

heterogens()

returns all heterogens

[Source]

         # File lib/bio/db/pdb/utils.rb, line 391
    391:     def heterogens
    392:       array = []
    393:       self.each_chain { |chain| array.concat(chain.heterogens) }
    394:       return array
    395:     end

[Validate]