Class: Wrnap::Package::Fftbor

Inherits:
Xbor
  • Object
show all
Defined in:
lib/wrnap/package/fftbor.rb

Direct Known Subclasses

Ffthairpin, Fftmultiloop

Instance Attribute Summary

Attributes inherited from Base

#data, #flags, #response, #runtime

Instance Method Summary collapse

Methods inherited from Xbor

#expected_k, #full_distribution, #inspect, #k_p_points, parse, #quick_plot, #run_command, #to_csv, #to_csv!

Methods inherited from Base

bootstrap, #debugger, #initialize, #inspect

Methods included from Global::Yaml

#deserialize, #serialize

Methods included from Global::Chainer

included

Methods included from Global::Runner

included

Constructor Details

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

Instance Method Details

#distributionObject



14
15
16
# File 'lib/wrnap/package/fftbor.rb', line 14

def distribution
  self.class.parse(response).map { |row| BigDecimal.new(row[1]) }
end

#partitionObject



4
5
6
7
# File 'lib/wrnap/package/fftbor.rb', line 4

def partition
  response.split(/\n/).find { |line| line =~ /^Scaling factor.*:\s+(\d+\.\d+)/ }
  BigDecimal.new($1)
end

#total_countObject



9
10
11
12
# File 'lib/wrnap/package/fftbor.rb', line 9

def total_count
  response.split(/\n/).find { |line| line =~ /^Number of structures: (\d+)/ }
  $1.to_i
end