Class: ViennaRna::Heat

Inherits:
Base
  • Object
show all
Defined in:
lib/vienna_rna/modules/heat.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#data, #response, #runtime

Instance Method Summary collapse

Methods inherited from Base

batch, bootstrap, #debugger, debugger, exec_exists?, #exec_name, #exec_sequence_format, #initialize, method_added, #pre_run_check, run, #run, #run_with_hooks, #stringify_flags

Constructor Details

This class inherits a constructor from ViennaRna::Base

Instance Attribute Details

#specific_heatsObject (readonly)

Returns the value of attribute specific_heats.



3
4
5
# File 'lib/vienna_rna/modules/heat.rb', line 3

def specific_heats
  @specific_heats
end

Instance Method Details

#post_processObject



5
6
7
8
9
10
11
# File 'lib/vienna_rna/modules/heat.rb', line 5

def post_process
  @specific_heats = @response.split(/\n/).map { |line| line.split(/\s+/).map(&:to_f) }.inject({}) do |hash, (temp, specific_heat)|
    hash.tap do
      hash[temp] = specific_heat
    end
  end
end