Class: Rafflesia::LigandNeighbor
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::LigandNeighbor
- 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
-
#distance_angstrom ⇒ Object
Returns the value of attribute distance_angstrom.
-
#interaction ⇒ Object
Returns the value of attribute interaction.
-
#ligand ⇒ Object
Returns the value of attribute ligand.
-
#ligand_atom_name ⇒ Object
Returns the value of attribute ligand_atom_name.
-
#ligand_atom_serial ⇒ Object
Returns the value of attribute ligand_atom_serial.
-
#ligand_id ⇒ Object
Returns the value of attribute ligand_id.
-
#radius_angstrom ⇒ Object
Returns the value of attribute radius_angstrom.
-
#residue ⇒ Object
Returns the value of attribute residue.
-
#residue_atom_name ⇒ Object
Returns the value of attribute residue_atom_name.
-
#residue_atom_serial ⇒ Object
Returns the value of attribute residue_atom_serial.
-
#residue_neighbor_count ⇒ Object
Returns the value of attribute residue_neighbor_count.
-
#residue_plddt ⇒ Object
Returns the value of attribute residue_plddt.
Instance Method Summary collapse
-
#initialize(json) ⇒ LigandNeighbor
constructor
A new instance of LigandNeighbor.
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_angstrom ⇒ Object
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 |
#interaction ⇒ Object
Returns the value of attribute interaction.
23 24 25 |
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23 def interaction @interaction end |
#ligand ⇒ Object
Returns the value of attribute ligand.
23 24 25 |
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23 def ligand @ligand end |
#ligand_atom_name ⇒ Object
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_serial ⇒ Object
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_id ⇒ Object
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_angstrom ⇒ Object
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 |
#residue ⇒ Object
Returns the value of attribute residue.
23 24 25 |
# File 'lib/rafflesia/proteins/ligand_neighbor.rb', line 23 def residue @residue end |
#residue_atom_name ⇒ Object
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_serial ⇒ Object
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_count ⇒ Object
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_plddt ⇒ Object
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 |