Class: Chem::GSpanAtom

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

Constant Summary

Constants included from Atom

Atom::MDLAtomLineFormat

Instance Attribute Summary

Attributes included from Atom

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Atom

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

Methods included from Transform::ThreeDimension

#z, #z=

Methods included from Transform::TwoDimension

#pos, #x, #x=, #y, #y=

Constructor Details

#initialize(element) ⇒ GSpanAtom

Returns a new instance of GSpanAtom.



83
84
85
# File 'lib/chem/db/gspan.rb', line 83

def initialize element
  @element = Number2Element[element]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Chem::Atom

Class Method Details

.parse_line(line) ⇒ Object



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

def self.parse_line line
  self.new(line.split[2].to_i)
end