Class: ViennaRna::Package::Heat

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

Instance Attribute Summary collapse

Attributes inherited from Base

#data, #flags, #response, #runtime

Instance Method Summary collapse

Methods inherited from Base

bootstrap, #debugger, #initialize, #inspect, #serialize

Methods included from Global::ChainExtensions

included

Methods included from Global::RunExtensions

included

Constructor Details

This class inherits a constructor from ViennaRna::Package::Base

Instance Attribute Details

#specific_heatsObject (readonly)

Returns the value of attribute specific_heats.



4
5
6
# File 'lib/vienna_rna/package/heat.rb', line 4

def specific_heats
  @specific_heats
end

Instance Method Details

#post_processObject



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

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