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 calculateCenteringCoordinates
      x=0
      y=0
      z=0
      total = @active_set.size
      invCount = 1.0/total
      @active_set.each do |atom|
        x += atom.xpos
        y += atom.ypos
        z += atom.zpos
      end
      @centering_coordinates[0] = x*invCount
      @centering_coordinates[1] = y*invCount
      @centering_coordinates[2] = z*invCount
    end
def calculateCenteringCoordinates x = 0 y = 0 z = 0 total = @active_set . size invCount = 1.0 / total @active_set . each do | atom | x += atom . xpos y += atom . ypos z += atom . zpos end @centering_coordinates [ 0 ] = x * invCount @centering_coordinates [ 1 ] = y * invCount @centering_coordinates [ 2 ] = z * invCount 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