Class: Wrnap::Package::Fftbor
- Defined in:
- lib/wrnap/package/fftbor.rb
Direct Known Subclasses
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
Methods included from Global::Chainer
Methods included from Global::Runner
Constructor Details
This class inherits a constructor from Wrnap::Package::Base
Instance Method Details
#distribution ⇒ Object
14 15 16 |
# File 'lib/wrnap/package/fftbor.rb', line 14 def distribution self.class.parse(response).map { |row| BigDecimal.new(row[1]) } end |
#partition ⇒ Object
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_count ⇒ Object
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 |