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

Instance Method Summary collapse

Instance Attribute Details

#colorObject

set [r, g, b] for visualization



90
91
92
# File 'lib/chem/model.rb', line 90

def color
  @color
end

#vObject

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_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



81
# File 'lib/chem/model.rb', line 81

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



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

#topologyObject

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