lib/PDB.rb
# active_set array of atoms that are in use
#
# :molecule => holds a hash, key is chain and value is Molecule class
#
active_set array of atoms that are in use
:molecule => holds a hash, key is chain and value is Molecule class
active_set array of atoms that are in use : molecule = > holds a hash key is chain and value is Molecule class
def checkIfExtrema(atom)
      if !atom.atom_type.include?("H")
        x = atom.xpos
        y = atom.ypos
        z = atom.zpos
        if (x > @extrema[0].xpos)
          @extrema[0] = atom
        elsif (x < @extrema[1].xpos)
          @extrema[1] = atom
        elsif (y > @extrema[2].ypos)
          @extrema[2] = atom
        elsif (y < @extrema[3].ypos)
          @extrema[3] = atom
        elsif (z > @extrema[4].zpos)
          @extrema[4] = atom
        elsif (z < @extrema[5].zpos)
          @extrema[5] = atom
        end
        if (x-y+z) > @abcdefgh[0]
          @extrema[6] = atom
          @abcdefgh[0] = (x-y+z)
        end
        if (x-y-z) > @abcdefgh[1]
          @extrema[7] = atom
          @abcdefgh[1] = (x-y-z)
        end
        if (x+y+z) > @abcdefgh[2]
          @extrema[8] = atom
          @abcdefgh[2] = (x+y+z)
        end
        if (x+y-z) > @abcdefgh[3]
          @extrema[9] = atom
          @abcdefgh[3] = (x+y-z)
        end
        if (x-y+z) < @abcdefgh[4]
          @extrema[10] = atom
          @abcdefgh[4] = (x-y+z)
        end
        if (x-y-z) < @abcdefgh[5]
          @extrema[11] = atom
          @abcdefgh[5] = (x-y-z)
        end
        if (x+y+z) < @abcdefgh[6]
          @extrema[12] = atom
          @abcdefgh[6] = (x+y+z)
        end
        if (x+y-z) < @abcdefgh[7]
          @extrema[13] = atom
          @abcdefgh[7] = (x+y-z)
        end
      end
    end
def checkIfExtrema ( atom ) if ! atom . atom_type . include? ( "H" ) x = atom . xpos y = atom . ypos z = atom . zpos if ( x > @extrema [ 0 ] . xpos ) @extrema [ 0 ] = atom elsif ( x < @extrema [ 1 ] . xpos ) @extrema [ 1 ] = atom elsif ( y > @extrema [ 2 ] . ypos ) @extrema [ 2 ] = atom elsif ( y < @extrema [ 3 ] . ypos ) @extrema [ 3 ] = atom elsif ( z > @extrema [ 4 ] . zpos ) @extrema [ 4 ] = atom elsif ( z < @extrema [ 5 ] . zpos ) @extrema [ 5 ] = atom end if ( x - y + z ) > @abcdefgh [ 0 ] @extrema [ 6 ] = atom @abcdefgh [ 0 ] = ( x - y + z ) end if ( x - y - z ) > @abcdefgh [ 1 ] @extrema [ 7 ] = atom @abcdefgh [ 1 ] = ( x - y - z ) end if ( x + y + z ) > @abcdefgh [ 2 ] @extrema [ 8 ] = atom @abcdefgh [ 2 ] = ( x + y + z ) end if ( x + y - z ) > @abcdefgh [ 3 ] @extrema [ 9 ] = atom @abcdefgh [ 3 ] = ( x + y - z ) end if ( x - y + z ) < @abcdefgh [ 4 ] @extrema [ 10 ] = atom @abcdefgh [ 4 ] = ( x - y + z ) end if ( x - y - z ) < @abcdefgh [ 5 ] @extrema [ 11 ] = atom @abcdefgh [ 5 ] = ( x - y - z ) end if ( x + y + z ) < @abcdefgh [ 6 ] @extrema [ 12 ] = atom @abcdefgh [ 6 ] = ( x + y + z ) end if ( x + y - z ) < @abcdefgh [ 7 ] @extrema [ 13 ] = atom @abcdefgh [ 7 ] = ( x + y - z ) end end end
active_set array of atoms that are in use
:molecule => holds a hash, key is chain and value is Molecule class
active_set array of atoms that are in use : molecule = > holds a hash key is chain and value is Molecule class
# maximizes # minimizes
atom
<not_specific>