Class: Rafflesia::LigandContact
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::LigandContact
- 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
-
#closest_ligand_atom_name ⇒ Object
Returns the value of attribute closest_ligand_atom_name.
-
#closest_residue_atom_name ⇒ Object
Returns the value of attribute closest_residue_atom_name.
-
#contact_atom_pair_count ⇒ Object
Returns the value of attribute contact_atom_pair_count.
-
#interaction ⇒ Object
Returns the value of attribute interaction.
-
#ligand ⇒ Object
Returns the value of attribute ligand.
-
#ligand_id ⇒ Object
Returns the value of attribute ligand_id.
-
#min_distance_angstrom ⇒ Object
Returns the value of attribute min_distance_angstrom.
-
#residue ⇒ Object
Returns the value of attribute residue.
-
#residue_plddt ⇒ Object
Returns the value of attribute residue_plddt.
Instance Method Summary collapse
-
#initialize(json) ⇒ LigandContact
constructor
A new instance of LigandContact.
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_name ⇒ Object
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_name ⇒ Object
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_count ⇒ Object
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 |
#interaction ⇒ Object
Returns the value of attribute interaction.
20 21 22 |
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20 def interaction @interaction end |
#ligand ⇒ Object
Returns the value of attribute ligand.
20 21 22 |
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20 def ligand @ligand end |
#ligand_id ⇒ Object
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_angstrom ⇒ Object
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 |
#residue ⇒ Object
Returns the value of attribute residue.
20 21 22 |
# File 'lib/rafflesia/proteins/ligand_contact.rb', line 20 def residue @residue end |
#residue_plddt ⇒ Object
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 |