Class: Rafflesia::StructureEntityCandidate

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

Constant Summary collapse

HASH_ATTRS =
{
  candidate_id: :candidate_id,
  chain_count: :chain_count,
  chain_ids: :chain_ids,
  entity_id: :entity_id,
  sequence_sha256: :sequence_sha_256,
  source: :source
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ StructureEntityCandidate

Returns a new instance of StructureEntityCandidate.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/proteins/structure_entity_candidate.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @candidate_id = hash[:candidate_id]
  @chain_count = hash[:chain_count]
  @chain_ids = (hash[:chain_ids] || [])
  @entity_id = hash[:entity_id]
  @sequence_sha_256 = hash[:sequence_sha256]
  @source = hash[:source]
end

Instance Attribute Details

#candidate_idObject

Returns the value of attribute candidate_id.



17
18
19
# File 'lib/rafflesia/proteins/structure_entity_candidate.rb', line 17

def candidate_id
  @candidate_id
end

#chain_countObject

Returns the value of attribute chain_count.



17
18
19
# File 'lib/rafflesia/proteins/structure_entity_candidate.rb', line 17

def chain_count
  @chain_count
end

#chain_idsObject

Returns the value of attribute chain_ids.



17
18
19
# File 'lib/rafflesia/proteins/structure_entity_candidate.rb', line 17

def chain_ids
  @chain_ids
end

#entity_idObject

Returns the value of attribute entity_id.



17
18
19
# File 'lib/rafflesia/proteins/structure_entity_candidate.rb', line 17

def entity_id
  @entity_id
end

#sequence_sha_256Object

Returns the value of attribute sequence_sha_256.



17
18
19
# File 'lib/rafflesia/proteins/structure_entity_candidate.rb', line 17

def sequence_sha_256
  @sequence_sha_256
end

#sourceObject

Returns the value of attribute source.



17
18
19
# File 'lib/rafflesia/proteins/structure_entity_candidate.rb', line 17

def source
  @source
end