Class: Chem::MDL::MDLBond
Constant Summary collapse
- Stereo =
{ 0 => :not_stereo, 1 => :up, 3 => :cis_trans, 4 => :either, 6 => :down }
- BondType =
{ 1 => :single, 2 => :double, 3 => :triple, 4 => :aromatic, 5 => :single_or_double, 6 => :single_or_aromatic, 7 => :double_or_aromatic, 8 => :any }
- ReactingCenter =
{ 0 => :unmarked, 1 => :center, -1 => :not, 2 => :no_change, 4 => :made_or_broken, 8 => :order_changes }
- Topology =
{ 0 => :either, 1 => :ring, 2 => :chain }
Instance Attribute Summary
Attributes included from Bond
Instance Method Summary collapse
- #bond_type ⇒ Object
-
#initialize(line) ⇒ MDLBond
constructor
A new instance of MDLBond.
- #reacting_center ⇒ Object
- #stereo ⇒ Object
- #topology ⇒ Object
- #v ⇒ Object
Methods included from Bond
Constructor Details
#initialize(line) ⇒ MDLBond
Returns a new instance of MDLBond.
165 |
# File 'lib/chem/db/mdl.rb', line 165 def initialize(line) ; @line = line ; end |
Instance Method Details
#bond_type ⇒ Object
172 |
# File 'lib/chem/db/mdl.rb', line 172 def bond_type ; @v ||= BondType[self.v] ; end |
#reacting_center ⇒ Object
170 |
# File 'lib/chem/db/mdl.rb', line 170 def reacting_center ; @reacting_center ||= ReactingCenter[@line[16..18].to_i] ; end |
#stereo ⇒ Object
171 |
# File 'lib/chem/db/mdl.rb', line 171 def stereo ; @stereo ||= Stereo[@line[9..11].to_i] ; end |
#topology ⇒ Object
169 |
# File 'lib/chem/db/mdl.rb', line 169 def topology ; @topology ||= Topology[@line[13..15].to_i] ; end |
#v ⇒ Object
167 |
# File 'lib/chem/db/mdl.rb', line 167 def v ; @v ||= @line[6..8].to_i ; end |