Class: Chem::MDL::MDLAtom
Constant Summary
collapse
- Stereo =
{
0 => :not_stereo,
1 => :odd,
2 => :even,
3 => :either
}
Constants included
from Atom
Atom::MDLAtomLineFormat
Instance Attribute Summary collapse
Attributes included from Atom
#color, #mass, #v_pos, #visible
Instance Method Summary
collapse
#z=
#pos, #x=, #y=
Methods included from Atom
#atomic_number, #electro_negativity, #natural_bond_order, #to_mdl, #to_sybyl, #weight
Constructor Details
#initialize(line) ⇒ MDLAtom
Returns a new instance of MDLAtom.
89
|
# File 'lib/chem/db/mdl.rb', line 89
def initialize line ; @line = line ; end
|
Instance Attribute Details
#number ⇒ Object
Returns the value of attribute number.
87
88
89
|
# File 'lib/chem/db/mdl.rb', line 87
def number
@number
end
|
Instance Method Details
#charge ⇒ Object
99
|
# File 'lib/chem/db/mdl.rb', line 99
def charge ; @charge ||= @line[36..38].to_i ; end
|
#element ⇒ Object
92
|
# File 'lib/chem/db/mdl.rb', line 92
def element ; @element ||= @line[30..32].strip.intern ; end
|
#exact_charge ⇒ Object
110
|
# File 'lib/chem/db/mdl.rb', line 110
def exact_charge ; @exact_charge ||= @line[66..68].to_i ; end
|
#h0_designator ⇒ Object
105
|
# File 'lib/chem/db/mdl.rb', line 105
def h0_designator ; @h0_designator ||= @line[51..53].to_i ; end
|
#hydrogen_count ⇒ Object
101
|
# File 'lib/chem/db/mdl.rb', line 101
def hydrogen_count ; @hydrogen_count ||= @line[42..44].to_i ; end
|
#inversion ⇒ Object
109
|
# File 'lib/chem/db/mdl.rb', line 109
def inversion ; @inversion ||= @line[63..65].to_i ; end
|
#mapping ⇒ Object
54..56 Not used 57..59 Not used
108
|
# File 'lib/chem/db/mdl.rb', line 108
def mapping ; @mapping ||= @line[60..62].to_i ; end
|
#mass_difference ⇒ Object
Difference from mass in periodic table.
98
|
# File 'lib/chem/db/mdl.rb', line 98
def mass_difference ; @mass_difference ||= @line[33..35] ; end
|
#stereo_care_box ⇒ Object
102
|
# File 'lib/chem/db/mdl.rb', line 102
def stereo_care_box ; @stereo_care_box ||= @line[45..47].to_i ; end
|
#stereo_parity ⇒ Object
100
|
# File 'lib/chem/db/mdl.rb', line 100
def stereo_parity ; @stereo_parity ||= @line[39..41].to_i ; end
|
#valence ⇒ Object
104
|
# File 'lib/chem/db/mdl.rb', line 104
def valence ; @valence ||= @line[48..50].to_i ; end
|
#x ⇒ Object
93
|
# File 'lib/chem/db/mdl.rb', line 93
def x ; @x ||= @line[0..9].to_f ; end
|
#y ⇒ Object
94
|
# File 'lib/chem/db/mdl.rb', line 94
def y ; @y ||= @line[10..19].to_f ; end
|
#z ⇒ Object
96
|
# File 'lib/chem/db/mdl.rb', line 96
def z ; @z ||= @line[20..29].to_f ; end
|