Class: Rafflesia::AnmFluctuationsData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::AnmFluctuationsData
- Defined in:
- lib/rafflesia/proteins/anm_fluctuations_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ b_factor_correlation: :b_factor_correlation, chain: :chain, component_count: :component_count, contact_count: :contact_count, cutoff_angstrom: :cutoff_angstrom, modes: :modes, residue_count: :residue_count, residues: :residues, structure_id: :structure_id }.freeze
Instance Attribute Summary collapse
-
#b_factor_correlation ⇒ Object
Returns the value of attribute b_factor_correlation.
-
#chain ⇒ Object
Returns the value of attribute chain.
-
#component_count ⇒ Object
Returns the value of attribute component_count.
-
#contact_count ⇒ Object
Returns the value of attribute contact_count.
-
#cutoff_angstrom ⇒ Object
Returns the value of attribute cutoff_angstrom.
-
#modes ⇒ Object
Returns the value of attribute modes.
-
#residue_count ⇒ Object
Returns the value of attribute residue_count.
-
#residues ⇒ Object
Returns the value of attribute residues.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ AnmFluctuationsData
constructor
A new instance of AnmFluctuationsData.
Constructor Details
#initialize(json) ⇒ AnmFluctuationsData
Returns a new instance of AnmFluctuationsData.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rafflesia/proteins/anm_fluctuations_data.rb', line 31 def initialize(json) super() hash = self.class.normalize(json) @b_factor_correlation = hash[:b_factor_correlation] @chain = hash[:chain] @component_count = hash[:component_count] @contact_count = hash[:contact_count] @cutoff_angstrom = hash[:cutoff_angstrom] @modes = (hash[:modes] || []).map { |item| item ? Rafflesia::AnmModeRecord.new(item) : nil } @residue_count = hash[:residue_count] @residues = (hash[:residues] || []).map { |item| item ? Rafflesia::AnmResidueFluctuation.new(item) : nil } @structure_id = hash[:structure_id] end |
Instance Attribute Details
#b_factor_correlation ⇒ Object
Returns the value of attribute b_factor_correlation.
20 21 22 |
# File 'lib/rafflesia/proteins/anm_fluctuations_data.rb', line 20 def b_factor_correlation @b_factor_correlation end |
#chain ⇒ Object
Returns the value of attribute chain.
20 21 22 |
# File 'lib/rafflesia/proteins/anm_fluctuations_data.rb', line 20 def chain @chain end |
#component_count ⇒ Object
Returns the value of attribute component_count.
20 21 22 |
# File 'lib/rafflesia/proteins/anm_fluctuations_data.rb', line 20 def component_count @component_count end |
#contact_count ⇒ Object
Returns the value of attribute contact_count.
20 21 22 |
# File 'lib/rafflesia/proteins/anm_fluctuations_data.rb', line 20 def contact_count @contact_count end |
#cutoff_angstrom ⇒ Object
Returns the value of attribute cutoff_angstrom.
20 21 22 |
# File 'lib/rafflesia/proteins/anm_fluctuations_data.rb', line 20 def cutoff_angstrom @cutoff_angstrom end |
#modes ⇒ Object
Returns the value of attribute modes.
20 21 22 |
# File 'lib/rafflesia/proteins/anm_fluctuations_data.rb', line 20 def modes @modes end |
#residue_count ⇒ Object
Returns the value of attribute residue_count.
20 21 22 |
# File 'lib/rafflesia/proteins/anm_fluctuations_data.rb', line 20 def residue_count @residue_count end |
#residues ⇒ Object
Returns the value of attribute residues.
20 21 22 |
# File 'lib/rafflesia/proteins/anm_fluctuations_data.rb', line 20 def residues @residues end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
20 21 22 |
# File 'lib/rafflesia/proteins/anm_fluctuations_data.rb', line 20 def structure_id @structure_id end |