Class: Chem::Sybyl::SybylAtom

Inherits:
Object
  • Object
show all
Includes:
Atom
Defined in:
lib/chem/db/sybyl.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

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=

Methods included from Transform::TwoDimension

#pos, #x=, #y=

Constructor Details

#initialize(line) ⇒ SybylAtom

Returns a new instance of SybylAtom.



94
# File 'lib/chem/db/sybyl.rb', line 94

def initialize line ;      @line = line                             ; end

Dynamic Method Handling

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

Instance Method Details

#elementObject



90
# File 'lib/chem/db/sybyl.rb', line 90

def element ; @element ||= @line[53..60].split(".")[0].strip.intern ; end

#xObject



91
# File 'lib/chem/db/sybyl.rb', line 91

def x       ; @x       ||= @line[16..27].to_f                       ; end

#yObject



92
# File 'lib/chem/db/sybyl.rb', line 92

def y       ; @y       ||= @line[28..39].to_f                       ; end

#zObject



93
# File 'lib/chem/db/sybyl.rb', line 93

def z       ; @z       ||= @line[40..51].to_f                       ; end