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

methods to access atoms

XXX#each_residue must be defined.

### Methods

atoms each_atom find_atom

### Public Instance methods

atoms()

returns all atoms

[Source]

         # File lib/bio/db/pdb/utils.rb, line 329
    329:     def atoms
    330:       array = []
    331:       self.each_residue { |residue| array.concat(residue.atoms) }
    332:       return array
    333:     end

each_atom() {|atom| ...}

iterates over each atom

[Source]

         # File lib/bio/db/pdb/utils.rb, line 324
    324:     def each_atom(&x) #:yields: atom
    325:       self.each_residue { |residue| residue.each(&x) }
    326:     end

find_atom() {|atom| ...}

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

[Source]

         # File lib/bio/db/pdb/utils.rb, line 315
    315:     def find_atom
    316:       array = []
    317:       self.each_atom do |atom|
    318:         array.push(atom) if yield(atom)
    319:       end
    320:       return array
    321:     end

[Validate]