Class: Chem::Sybyl::SybylAtom
- Inherits:
-
Object
- Object
- Chem::Sybyl::SybylAtom
- Includes:
- Atom
- Defined in:
- lib/chem/db/sybyl.rb
Constant Summary
Constants included from Atom
Instance Attribute Summary
Attributes included from Atom
#cdk_atom, #charge, #color, #label, #mass, #ob_atom, #rings, #v_pos, #visible
Instance Method Summary collapse
- #element ⇒ Object
-
#initialize(line) ⇒ SybylAtom
constructor
A new instance of SybylAtom.
- #x ⇒ Object
- #y ⇒ Object
- #z ⇒ Object
Methods included from Atom
#atomic_number, #electro_negativity, #method_missing, #natural_bond_order, #to_mdl, #to_sybyl, #weight
Methods included from Transform::ThreeDimension
Methods included from Transform::TwoDimension
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
#element ⇒ Object
90 |
# File 'lib/chem/db/sybyl.rb', line 90 def element ; @element ||= @line[53..60].split(".")[0].strip.intern ; end |
#x ⇒ Object
91 |
# File 'lib/chem/db/sybyl.rb', line 91 def x ; @x ||= @line[16..27].to_f ; end |
#y ⇒ Object
92 |
# File 'lib/chem/db/sybyl.rb', line 92 def y ; @y ||= @line[28..39].to_f ; end |
#z ⇒ Object
93 |
# File 'lib/chem/db/sybyl.rb', line 93 def z ; @z ||= @line[40..51].to_f ; end |