Class: Rafflesia::LigandContact

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

Constant Summary collapse

HASH_ATTRS =
{
  closest_ligand_atom_name: :closest_ligand_atom_name,
  closest_residue_atom_name: :closest_residue_atom_name,
  contact_atom_pair_count: :contact_atom_pair_count,
  interaction: :interaction,
  ligand: :ligand,
  ligand_id: :ligand_id,
  min_distance_angstrom: :min_distance_angstrom,
  residue: :residue,
  residue_plddt: :residue_plddt
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ LigandContact

Returns a new instance of LigandContact.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @closest_ligand_atom_name = hash[:closest_ligand_atom_name]
  @closest_residue_atom_name = hash[:closest_residue_atom_name]
  @contact_atom_pair_count = hash[:contact_atom_pair_count]
  @interaction = hash[:interaction]
  @ligand = hash[:ligand] ? Rafflesia::Ligand.new(hash[:ligand]) : nil
  @ligand_id = hash[:ligand_id]
  @min_distance_angstrom = hash[:min_distance_angstrom]
  @residue = hash[:residue] ? Rafflesia::ResiduePointer.new(hash[:residue]) : nil
  @residue_plddt = hash[:residue_plddt]
end

Instance Attribute Details

#closest_ligand_atom_nameObject

Returns the value of attribute closest_ligand_atom_name.



20
21
22
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20

def closest_ligand_atom_name
  @closest_ligand_atom_name
end

#closest_residue_atom_nameObject

Returns the value of attribute closest_residue_atom_name.



20
21
22
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20

def closest_residue_atom_name
  @closest_residue_atom_name
end

#contact_atom_pair_countObject

Returns the value of attribute contact_atom_pair_count.



20
21
22
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20

def contact_atom_pair_count
  @contact_atom_pair_count
end

#interactionObject

Returns the value of attribute interaction.



20
21
22
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20

def interaction
  @interaction
end

#ligandObject

Returns the value of attribute ligand.



20
21
22
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20

def ligand
  @ligand
end

#ligand_idObject

Returns the value of attribute ligand_id.



20
21
22
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20

def ligand_id
  @ligand_id
end

#min_distance_angstromObject

Returns the value of attribute min_distance_angstrom.



20
21
22
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20

def min_distance_angstrom
  @min_distance_angstrom
end

#residueObject

Returns the value of attribute residue.



20
21
22
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20

def residue
  @residue
end

#residue_plddtObject

Returns the value of attribute residue_plddt.



20
21
22
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20

def residue_plddt
  @residue_plddt
end