Class: Chem::MDL::RxnAtom

Inherits:
Object
  • Object
show all
Includes:
Atom
Defined in:
lib/chem/db/mdl.rb

Constant Summary

Constants included from Atom

Atom::MDLAtomLineFormat

Instance Attribute Summary

Attributes included from Atom

#cdk_atom, #charge, #color, #label, #mass, #ob_atom, #rings, #v_pos, #visible, #z

Instance Method Summary collapse

Methods included from Atom

#atomic_number, #electro_negativity, #natural_bond_order, #to_mdl, #to_sybyl, #weight

Methods included from Transform::ThreeDimension

#z, #z=

Methods included from Transform::TwoDimension

#pos, #x=, #y=

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



280
281
282
283
284
285
286
# File 'lib/chem/db/mdl.rb', line 280

def method_missing(name, *args)
  if @representative.respond_to?(name)
    @representative.send(name, *args)
  else
    super(name, *args)
  end
end

Instance Method Details

#elementObject



296
# File 'lib/chem/db/mdl.rb', line 296

def element ; @representative.element ; end

#product=(prd) ⇒ Object



289
290
291
292
# File 'lib/chem/db/mdl.rb', line 289

def product=(prd)
  @product = prd
  @representative = prd unless @representative
end

#reactant=(rct) ⇒ Object

attr_accessor :reactant, :product



276
277
278
# File 'lib/chem/db/mdl.rb', line 276

def reactant=(rct)
  @reactant = @representative = rct
end

#xObject



294
# File 'lib/chem/db/mdl.rb', line 294

def x       ; @representative.x       ; end

#yObject



295
# File 'lib/chem/db/mdl.rb', line 295

def y       ; @representative.y       ; end