Class: Rafflesia::LigandNeighbor

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

Constant Summary collapse

HASH_ATTRS =
{
  distance_angstrom: :distance_angstrom,
  interaction: :interaction,
  ligand: :ligand,
  ligand_atom_name: :ligand_atom_name,
  ligand_atom_serial: :ligand_atom_serial,
  ligand_id: :ligand_id,
  radius_angstrom: :radius_angstrom,
  residue: :residue,
  residue_atom_name: :residue_atom_name,
  residue_atom_serial: :residue_atom_serial,
  residue_neighbor_count: :residue_neighbor_count,
  residue_plddt: :residue_plddt
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ LigandNeighbor

Returns a new instance of LigandNeighbor.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 37

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @distance_angstrom = hash[:distance_angstrom]
  @interaction = hash[:interaction]
  @ligand = hash[:ligand] ? Rafflesia::Ligand.new(hash[:ligand]) : nil
  @ligand_atom_name = hash[:ligand_atom_name]
  @ligand_atom_serial = hash[:ligand_atom_serial]
  @ligand_id = hash[:ligand_id]
  @radius_angstrom = hash[:radius_angstrom]
  @residue = hash[:residue] ? Rafflesia::ResiduePointer.new(hash[:residue]) : nil
  @residue_atom_name = hash[:residue_atom_name]
  @residue_atom_serial = hash[:residue_atom_serial]
  @residue_neighbor_count = hash[:residue_neighbor_count]
  @residue_plddt = hash[:residue_plddt]
end

Instance Attribute Details

#distance_angstromObject

Returns the value of attribute distance_angstrom.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def distance_angstrom
  @distance_angstrom
end

#interactionObject

Returns the value of attribute interaction.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def interaction
  @interaction
end

#ligandObject

Returns the value of attribute ligand.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def ligand
  @ligand
end

#ligand_atom_nameObject

Returns the value of attribute ligand_atom_name.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def ligand_atom_name
  @ligand_atom_name
end

#ligand_atom_serialObject

Returns the value of attribute ligand_atom_serial.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def ligand_atom_serial
  @ligand_atom_serial
end

#ligand_idObject

Returns the value of attribute ligand_id.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def ligand_id
  @ligand_id
end

#radius_angstromObject

Returns the value of attribute radius_angstrom.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def radius_angstrom
  @radius_angstrom
end

#residueObject

Returns the value of attribute residue.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def residue
  @residue
end

#residue_atom_nameObject

Returns the value of attribute residue_atom_name.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def residue_atom_name
  @residue_atom_name
end

#residue_atom_serialObject

Returns the value of attribute residue_atom_serial.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def residue_atom_serial
  @residue_atom_serial
end

#residue_neighbor_countObject

Returns the value of attribute residue_neighbor_count.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def residue_neighbor_count
  @residue_neighbor_count
end

#residue_plddtObject

Returns the value of attribute residue_plddt.



23
24
25
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23

def residue_plddt
  @residue_plddt
end