Class: Chem::TINKER::TinkerReader

Inherits:
Object
  • Object
show all
Defined in:
lib/chem/db/tinker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ TinkerReader

Returns a new instance of TinkerReader.



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/chem/db/tinker.rb', line 61

def initialize input
  puts input.readline
  @mol = TinkerMol.new
  input.each_line do |line|
    number, ff, x, y, z, unknown, ary = line.split
    atom = TinkerAtom.new(ff, x, y, z, ary)
    @mol.atoms[number] = atom
  end

  @mol.construct
end

Instance Attribute Details

#molObject (readonly)

Returns the value of attribute mol.



59
60
61
# File 'lib/chem/db/tinker.rb', line 59

def mol
  @mol
end