Class: Rafflesia::StructureInspectData

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

Constant Summary collapse

HASH_ATTRS =
{
  atom_count: :atom_count,
  attempted_refs: :attempted_refs,
  backend: :backend,
  bounds: :bounds,
  cache_status: :cache_status,
  centroid: :centroid,
  chains: :chains,
  completed_stage: :completed_stage,
  confidence_metric: :confidence_metric,
  elapsed_ms: :elapsed_ms,
  entity_candidates: :entity_candidates,
  format: :format,
  has_plddt_like_b_factor: :has_plddt_like_b_factor,
  inspect_status: :inspect_status,
  is_partial: :is_partial,
  mean_b_factor: :mean_b_factor,
  mean_confidence_value: :mean_confidence_value,
  mean_plddt: :mean_plddt,
  metadata: :metadata,
  objects: :objects,
  repeated_chain_groups: :repeated_chain_groups,
  residue_count: :residue_count,
  residue_ranges: :residue_ranges,
  residues: :residues,
  structure_id: :structure_id,
  timed_out: :timed_out,
  timeout_ms: :timeout_ms
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ StructureInspectData

Returns a new instance of StructureInspectData.



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 67

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @atom_count = hash[:atom_count]
  @attempted_refs = (hash[:attempted_refs] || [])
  @backend = hash[:backend]
  @bounds = hash[:bounds] ? Rafflesia::CartesianBounds.new(hash[:bounds]) : nil
  @cache_status = hash[:cache_status]
  @centroid = (hash[:centroid] || [])
  @chains = (hash[:chains] || []).map { |item| item ? Rafflesia::ChainSummary.new(item) : nil }
  @completed_stage = hash[:completed_stage]
  @confidence_metric = hash[:confidence_metric]
  @elapsed_ms = hash[:elapsed_ms]
  @entity_candidates = (hash[:entity_candidates] || []).map { |item| item ? Rafflesia::StructureEntityCandidate.new(item) : nil }
  @format = hash[:format]
  @has_plddt_like_b_factor = hash[:has_plddt_like_b_factor]
  @inspect_status = hash[:inspect_status]
  @is_partial = hash[:is_partial]
  @mean_b_factor = hash[:mean_b_factor]
  @mean_confidence_value = hash[:mean_confidence_value]
  @mean_plddt = hash[:mean_plddt]
  @metadata = hash[:metadata] || {}
  @objects = (hash[:objects] || []).map { |item| item ? Rafflesia::ObjectRef.new(item) : nil }
  @repeated_chain_groups = (hash[:repeated_chain_groups] || []).map { |item| item ? Rafflesia::StructureRepeatedChainGroup.new(item) : nil }
  @residue_count = hash[:residue_count]
  @residue_ranges = (hash[:residue_ranges] || []).map { |item| item ? Rafflesia::ResidueRange.new(item) : nil }
  @residues = (hash[:residues] || []).map { |item| item ? Rafflesia::ResidueSummary.new(item) : nil }
  @structure_id = hash[:structure_id]
  @timed_out = hash[:timed_out]
  @timeout_ms = hash[:timeout_ms]
end

Instance Attribute Details

#atom_countObject

Returns the value of attribute atom_count.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def atom_count
  @atom_count
end

#attempted_refsObject

Returns the value of attribute attempted_refs.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def attempted_refs
  @attempted_refs
end

#backendObject

Returns the value of attribute backend.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def backend
  @backend
end

#boundsObject

Returns the value of attribute bounds.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def bounds
  @bounds
end

#cache_statusObject

Returns the value of attribute cache_status.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def cache_status
  @cache_status
end

#centroidObject

Returns the value of attribute centroid.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def centroid
  @centroid
end

#chainsObject

Returns the value of attribute chains.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def chains
  @chains
end

#completed_stageObject

Returns the value of attribute completed_stage.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def completed_stage
  @completed_stage
end

#confidence_metricObject

Returns the value of attribute confidence_metric.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def confidence_metric
  @confidence_metric
end

#elapsed_msObject

Returns the value of attribute elapsed_ms.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def elapsed_ms
  @elapsed_ms
end

#entity_candidatesObject

Returns the value of attribute entity_candidates.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def entity_candidates
  @entity_candidates
end

#formatObject

Returns the value of attribute format.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def format
  @format
end

#has_plddt_like_b_factorObject

Returns the value of attribute has_plddt_like_b_factor.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def has_plddt_like_b_factor
  @has_plddt_like_b_factor
end

#inspect_statusObject

Returns the value of attribute inspect_status.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def inspect_status
  @inspect_status
end

#is_partialObject

Returns the value of attribute is_partial.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def is_partial
  @is_partial
end

#mean_b_factorObject

Returns the value of attribute mean_b_factor.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def mean_b_factor
  @mean_b_factor
end

#mean_confidence_valueObject

Returns the value of attribute mean_confidence_value.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def mean_confidence_value
  @mean_confidence_value
end

#mean_plddtObject

Returns the value of attribute mean_plddt.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def mean_plddt
  @mean_plddt
end

#metadataObject

Returns the value of attribute metadata.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def 
  @metadata
end

#objectsObject

Returns the value of attribute objects.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def objects
  @objects
end

#repeated_chain_groupsObject

Returns the value of attribute repeated_chain_groups.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def repeated_chain_groups
  @repeated_chain_groups
end

#residue_countObject

Returns the value of attribute residue_count.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def residue_count
  @residue_count
end

#residue_rangesObject

Returns the value of attribute residue_ranges.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def residue_ranges
  @residue_ranges
end

#residuesObject

Returns the value of attribute residues.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def residues
  @residues
end

#structure_idObject

Returns the value of attribute structure_id.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def structure_id
  @structure_id
end

#timed_outObject

Returns the value of attribute timed_out.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def timed_out
  @timed_out
end

#timeout_msObject

Returns the value of attribute timeout_ms.



38
39
40
# File 'lib/rafflesia/proteins/structure_inspect_data.rb', line 38

def timeout_ms
  @timeout_ms
end