Class: Rafflesia::ResidueRotamersData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ResidueRotamersData
- Defined in:
- lib/rafflesia/proteins/residue_rotamers_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ residues: :residues, structure_id: :structure_id, summary: :summary }.freeze
Instance Attribute Summary collapse
-
#residues ⇒ Object
Returns the value of attribute residues.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
-
#summary ⇒ Object
Returns the value of attribute summary.
Instance Method Summary collapse
-
#initialize(json) ⇒ ResidueRotamersData
constructor
A new instance of ResidueRotamersData.
Constructor Details
#initialize(json) ⇒ ResidueRotamersData
Returns a new instance of ResidueRotamersData.
19 20 21 22 23 24 25 |
# File 'lib/rafflesia/proteins/residue_rotamers_data.rb', line 19 def initialize(json) super() hash = self.class.normalize(json) @residues = (hash[:residues] || []).map { |item| item ? Rafflesia::RotamerResidueRecord.new(item) : nil } @structure_id = hash[:structure_id] @summary = hash[:summary] ? Rafflesia::RotamerSummaryData.new(hash[:summary]) : nil end |
Instance Attribute Details
#residues ⇒ Object
Returns the value of attribute residues.
14 15 16 |
# File 'lib/rafflesia/proteins/residue_rotamers_data.rb', line 14 def residues @residues end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
14 15 16 |
# File 'lib/rafflesia/proteins/residue_rotamers_data.rb', line 14 def structure_id @structure_id end |
#summary ⇒ Object
Returns the value of attribute summary.
14 15 16 |
# File 'lib/rafflesia/proteins/residue_rotamers_data.rb', line 14 def summary @summary end |