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 331
    331:     def atoms
    332:       array = []
    333:       self.each_residue { |residue| array.concat(residue.atoms) }
    334:       return array
    335:     end

each_atom() {|atom| ...}

iterates over each atom

[Source]

         # File lib/bio/db/pdb/utils.rb, line 326
    326:     def each_atom(&x) #:yields: atom
    327:       self.each_residue { |residue| residue.each(&x) }
    328:     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 317
    317:     def find_atom
    318:       array = []
    319:       self.each_atom do |atom|
    320:         array.push(atom) if yield(atom)
    321:       end
    322:       return array
    323:     end

[Validate]