Class: Chem::KEGG::KCFAtom

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

Instance Attribute Summary collapse

Attributes included from Atom

#kcf_prop

Instance Method Summary collapse

Methods included from Atom

#kcf_line

Constructor Details

#initialize(line) ⇒ KCFAtom

Returns a new instance of KCFAtom.



24
25
26
27
# File 'lib/chem/db/kcf.rb', line 24

def initialize line
  @line = line
  @next_atom = {}
end

Instance Attribute Details

#atom_idObject

Returns the value of attribute atom_id.



22
23
24
# File 'lib/chem/db/kcf.rb', line 22

def atom_id
  @atom_id
end

#kcf_typeObject

Returns the value of attribute kcf_type.



22
23
24
# File 'lib/chem/db/kcf.rb', line 22

def kcf_type
  @kcf_type
end

#next_atomObject

Returns the value of attribute next_atom.



22
23
24
# File 'lib/chem/db/kcf.rb', line 22

def next_atom
  @next_atom
end

Instance Method Details

#elementObject



33
# File 'lib/chem/db/kcf.rb', line 33

def element ; @element || @element = @line[19...22].strip.intern ; end

#xObject



29
# File 'lib/chem/db/kcf.rb', line 29

def x ; @x || @x = @line[22...32].to_f ; end

#yObject



30
# File 'lib/chem/db/kcf.rb', line 30

def y ; @y || @y = @line[32...42].to_f ; end