Module: Chem::Bond
- Included in:
- GSpanBond, MDL::MDLBond, MDL::RxnBond, SmilesBond, Sybyl::SybylBond, TINKER::TinkerBond
- Defined in:
- lib/chem/model.rb,
lib/chem/db/mdl.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
set [r, g, b] for visualization.
-
#v ⇒ Object
Returns valency of bond use bond_type.
Instance Method Summary collapse
-
#bond_type ⇒ Object
- Returns Bond Type this method may be overridden by concrete class :single
- Single bond :double
- Double bond :triple
- Triple bond :aromatic
- Aromatic Bond :single_or_double
- Single or Double bond :single_or_aromatic
- Single or Aromatic bond :double_or_aromatic
- Double or Aromatic bond :any
-
Any bond.
-
#stereo ⇒ Object
- Returns Bond Stereo this method may be overridden by concrete class :not_stereo
- Not Stereo :up
- Up :down
- Down :cis_trans
- Cis or Trans :either
-
Either.
- #to_mdl(from, to) ⇒ Object
-
#topology ⇒ Object
- Returns Topology of bond this method may be overridden by concrete class :either
- Either :ring
- Ring :chain
-
Chain.
Instance Attribute Details
#color ⇒ Object
set [r, g, b] for visualization
87 88 89 |
# File 'lib/chem/model.rb', line 87 def color @color end |
#v ⇒ Object
Returns valency of bond use bond_type
57 58 59 |
# File 'lib/chem/model.rb', line 57 def v @v end |
Instance Method Details
#bond_type ⇒ Object
Returns Bond Type this method may be overridden by concrete class
- :single
-
Single bond
- :double
-
Double bond
- :triple
-
Triple bond
- :aromatic
-
Aromatic Bond
- :single_or_double
-
Single or Double bond
- :single_or_aromatic
-
Single or Aromatic bond
- :double_or_aromatic
-
Double or Aromatic bond
- :any
-
Any bond
78 |
# File 'lib/chem/model.rb', line 78 def bond_type ; :any ; end |
#stereo ⇒ Object
Returns Bond Stereo this method may be overridden by concrete class
- :not_stereo
-
Not Stereo
- :up
-
Up
- :down
-
Down
- :cis_trans
-
Cis or Trans
- :either
-
Either
66 |
# File 'lib/chem/model.rb', line 66 def stereo ; :either ; end |
#to_mdl(from, to) ⇒ Object
41 42 43 |
# File 'lib/chem/db/mdl.rb', line 41 def to_mdl from, to "%3d%3d%3d%3d " % [from, to, v, 0] end |
#topology ⇒ Object
Returns Topology of bond this method may be overridden by concrete class
- :either
-
Either
- :ring
-
Ring
- :chain
-
Chain
85 |
# File 'lib/chem/model.rb', line 85 def topology ; :either ; end |