Class: Chem::TINKER::TinkerMol
- Inherits:
-
Object
- Object
- Chem::TINKER::TinkerMol
- Defined in:
- lib/chem/db/tinker.rb
Instance Attribute Summary collapse
-
#atoms ⇒ Object
readonly
Returns the value of attribute atoms.
-
#bonds ⇒ Object
readonly
Returns the value of attribute bonds.
Instance Method Summary collapse
- #construct ⇒ Object
-
#initialize ⇒ TinkerMol
constructor
A new instance of TinkerMol.
Constructor Details
#initialize ⇒ TinkerMol
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
#atoms ⇒ Object (readonly)
Returns the value of attribute atoms.
38 39 40 |
# File 'lib/chem/db/tinker.rb', line 38 def atoms @atoms end |
#bonds ⇒ Object (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
#construct ⇒ Object
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 |