Class: Chem::TinkerNucleic

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmd_line) ⇒ TinkerNucleic

Returns a new instance of TinkerNucleic.



22
23
24
# File 'lib/chem/appl/tinker/nucleic.rb', line 22

def initialize(cmd_line)
  @cmd_line = cmd_line + ' -stdout'
end

Instance Attribute Details

#ioObject (readonly)

Returns the value of attribute io.



35
36
37
# File 'lib/chem/appl/tinker/nucleic.rb', line 35

def io
  @io
end

#resultObject (readonly)

Returns the value of attribute result.



35
36
37
# File 'lib/chem/appl/tinker/nucleic.rb', line 35

def result
  @result
end

Instance Method Details

#execObject



26
27
28
29
30
31
32
33
34
# File 'lib/chem/appl/tinker/nucleic.rb', line 26

def exec
  begin
	@io = IO.popen(@cmd_line, "w+")
	@result = @io.read
	return @result
  ensure
	@io.close
  end
end