Class: Rafflesia::StructureAxisProfileBin

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/structure_axis_profile_bin.rb

Constant Summary collapse

HASH_ATTRS =
{
  atom_count: :atom_count,
  axial_center_fraction: :axial_center_fraction,
  axial_end_angstrom: :axial_end_angstrom,
  axial_end_fraction: :axial_end_fraction,
  axial_start_angstrom: :axial_start_angstrom,
  axial_start_fraction: :axial_start_fraction,
  index: :index,
  mean_radius_angstrom: :mean_radius_angstrom,
  min_radius_angstrom: :min_radius_angstrom,
  radius_percentiles_angstrom: :radius_percentiles_angstrom
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ StructureAxisProfileBin

Returns a new instance of StructureAxisProfileBin.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 33

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @atom_count = hash[:atom_count]
  @axial_center_fraction = hash[:axial_center_fraction]
  @axial_end_angstrom = hash[:axial_end_angstrom]
  @axial_end_fraction = hash[:axial_end_fraction]
  @axial_start_angstrom = hash[:axial_start_angstrom]
  @axial_start_fraction = hash[:axial_start_fraction]
  @index = hash[:index]
  @mean_radius_angstrom = hash[:mean_radius_angstrom]
  @min_radius_angstrom = hash[:min_radius_angstrom]
  @radius_percentiles_angstrom = (hash[:radius_percentiles_angstrom] || []).map { |item| item ? Rafflesia::StructureAxisProfileRadiusPercentile.new(item) : nil }
end

Instance Attribute Details

#atom_countObject

Returns the value of attribute atom_count.



21
22
23
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 21

def atom_count
  @atom_count
end

#axial_center_fractionObject

Returns the value of attribute axial_center_fraction.



21
22
23
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 21

def axial_center_fraction
  @axial_center_fraction
end

#axial_end_angstromObject

Returns the value of attribute axial_end_angstrom.



21
22
23
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 21

def axial_end_angstrom
  @axial_end_angstrom
end

#axial_end_fractionObject

Returns the value of attribute axial_end_fraction.



21
22
23
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 21

def axial_end_fraction
  @axial_end_fraction
end

#axial_start_angstromObject

Returns the value of attribute axial_start_angstrom.



21
22
23
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 21

def axial_start_angstrom
  @axial_start_angstrom
end

#axial_start_fractionObject

Returns the value of attribute axial_start_fraction.



21
22
23
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 21

def axial_start_fraction
  @axial_start_fraction
end

#indexObject

Returns the value of attribute index.



21
22
23
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 21

def index
  @index
end

#mean_radius_angstromObject

Returns the value of attribute mean_radius_angstrom.



21
22
23
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 21

def mean_radius_angstrom
  @mean_radius_angstrom
end

#min_radius_angstromObject

Returns the value of attribute min_radius_angstrom.



21
22
23
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 21

def min_radius_angstrom
  @min_radius_angstrom
end

#radius_percentiles_angstromObject

Returns the value of attribute radius_percentiles_angstrom.



21
22
23
# File 'lib/rafflesia/proteins/structure_axis_profile_bin.rb', line 21

def radius_percentiles_angstrom
  @radius_percentiles_angstrom
end