Module: Chem::Bond
- Included in:
- CDK::CDKBond, CMLBond, GSpanBond, MDL::MDLBond, MDL::RxnBond, PDB::PDBBond, 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
90 91 92 |
# File 'lib/chem/model.rb', line 90 def color @color end |
#v ⇒ Object
Returns valency of bond use bond_type
60 61 62 |
# File 'lib/chem/model.rb', line 60 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
81 |
# File 'lib/chem/model.rb', line 81 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
69 |
# File 'lib/chem/model.rb', line 69 def stereo ; :either ; end |
#to_mdl(from, to) ⇒ Object
56 57 58 |
# File 'lib/chem/db/mdl.rb', line 56 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
88 |
# File 'lib/chem/model.rb', line 88 def topology ; :either ; end |