Class: Rafflesia::Ligand

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

Constant Summary collapse

HASH_ATTRS =
{
  assembly_id: :assembly_id,
  atom_count: :atom_count,
  auth_chain_id: :auth_chain_id,
  auth_position: :auth_position,
  chain_id: :chain_id,
  entity_id: :entity_id,
  insertion_code: :insertion_code,
  label_chain_id: :label_chain_id,
  label_position: :label_position,
  ligand_id: :ligand_id,
  model_id: :model_id,
  position: :position,
  residue: :residue,
  x: :x,
  y: :y,
  z: :z
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Ligand

Returns a new instance of Ligand.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/rafflesia/proteins/ligand.rb', line 45

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @assembly_id = hash[:assembly_id]
  @atom_count = hash[:atom_count]
  @auth_chain_id = hash[:auth_chain_id]
  @auth_position = hash[:auth_position]
  @chain_id = hash[:chain_id]
  @entity_id = hash[:entity_id]
  @insertion_code = hash[:insertion_code]
  @label_chain_id = hash[:label_chain_id]
  @label_position = hash[:label_position]
  @ligand_id = hash[:ligand_id]
  @model_id = hash[:model_id]
  @position = hash[:position]
  @residue = hash[:residue]
  @x = hash[:x]
  @y = hash[:y]
  @z = hash[:z]
end

Instance Attribute Details

#assembly_idObject

Returns the value of attribute assembly_id.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def assembly_id
  @assembly_id
end

#atom_countObject

Returns the value of attribute atom_count.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def atom_count
  @atom_count
end

#auth_chain_idObject

Returns the value of attribute auth_chain_id.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def auth_chain_id
  @auth_chain_id
end

#auth_positionObject

Returns the value of attribute auth_position.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def auth_position
  @auth_position
end

#chain_idObject

Returns the value of attribute chain_id.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def chain_id
  @chain_id
end

#entity_idObject

Returns the value of attribute entity_id.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def entity_id
  @entity_id
end

#insertion_codeObject

Returns the value of attribute insertion_code.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def insertion_code
  @insertion_code
end

#label_chain_idObject

Returns the value of attribute label_chain_id.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def label_chain_id
  @label_chain_id
end

#label_positionObject

Returns the value of attribute label_position.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def label_position
  @label_position
end

#ligand_idObject

Returns the value of attribute ligand_id.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def ligand_id
  @ligand_id
end

#model_idObject

Returns the value of attribute model_id.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def model_id
  @model_id
end

#positionObject

Returns the value of attribute position.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def position
  @position
end

#residueObject

Returns the value of attribute residue.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def residue
  @residue
end

#xObject

Returns the value of attribute x.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def x
  @x
end

#yObject

Returns the value of attribute y.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def y
  @y
end

#zObject

Returns the value of attribute z.



27
28
29
# File 'lib/rafflesia/proteins/ligand.rb', line 27

def z
  @z
end