Class: Rafflesia::GnmFluctuationsData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/gnm_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,
  residue_count: :residue_count,
  residues: :residues,
  structure_id: :structure_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ GnmFluctuationsData

Returns a new instance of GnmFluctuationsData.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/proteins/gnm_fluctuations_data.rb', line 29

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]
  @residue_count = hash[:residue_count]
  @residues = (hash[:residues] || []).map { |item| item ? Rafflesia::GnmResidueFluctuation.new(item) : nil }
  @structure_id = hash[:structure_id]
end

Instance Attribute Details

#b_factor_correlationObject

Returns the value of attribute b_factor_correlation.



19
20
21
# File 'lib/rafflesia/proteins/gnm_fluctuations_data.rb', line 19

def b_factor_correlation
  @b_factor_correlation
end

#chainObject

Returns the value of attribute chain.



19
20
21
# File 'lib/rafflesia/proteins/gnm_fluctuations_data.rb', line 19

def chain
  @chain
end

#component_countObject

Returns the value of attribute component_count.



19
20
21
# File 'lib/rafflesia/proteins/gnm_fluctuations_data.rb', line 19

def component_count
  @component_count
end

#contact_countObject

Returns the value of attribute contact_count.



19
20
21
# File 'lib/rafflesia/proteins/gnm_fluctuations_data.rb', line 19

def contact_count
  @contact_count
end

#cutoff_angstromObject

Returns the value of attribute cutoff_angstrom.



19
20
21
# File 'lib/rafflesia/proteins/gnm_fluctuations_data.rb', line 19

def cutoff_angstrom
  @cutoff_angstrom
end

#residue_countObject

Returns the value of attribute residue_count.



19
20
21
# File 'lib/rafflesia/proteins/gnm_fluctuations_data.rb', line 19

def residue_count
  @residue_count
end

#residuesObject

Returns the value of attribute residues.



19
20
21
# File 'lib/rafflesia/proteins/gnm_fluctuations_data.rb', line 19

def residues
  @residues
end

#structure_idObject

Returns the value of attribute structure_id.



19
20
21
# File 'lib/rafflesia/proteins/gnm_fluctuations_data.rb', line 19

def structure_id
  @structure_id
end