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

Instance Method Summary collapse

Instance Attribute Details

#colorObject

set [r, g, b] for visualization



87
88
89
# File 'lib/chem/model.rb', line 87

def color
  @color
end

#vObject

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_typeObject

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

#stereoObject

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

#topologyObject

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