Class: Chem::TINKER::TinkerMol

Inherits:
Object
  • Object
show all
Defined in:
lib/chem/db/tinker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTinkerMol

Returns a new instance of TinkerMol.


40
41
42
43
# File 'lib/chem/db/tinker.rb', line 40

def initialize
  @atoms = {}
  @bonds = []
end

Instance Attribute Details

#atomsObject (readonly)

Returns the value of attribute atoms


38
39
40
# File 'lib/chem/db/tinker.rb', line 38

def atoms
  @atoms
end

#bondsObject (readonly)

Returns the value of attribute bonds


38
39
40
# File 'lib/chem/db/tinker.rb', line 38

def bonds
  @bonds
end

Instance Method Details

#constructObject


45
46
47
48
49
50
51
52
53
# File 'lib/chem/db/tinker.rb', line 45

def construct
  @atoms.each_value do |a|
    a.connection.each do |c|
      raise "unknown atom number %s" % @atoms.inspect if !@atoms.has_key?(c)
      bond = TinkerBond.new(a, @atoms[c])
      @bonds.push(bond)
    end
  end
end