Class: Rafflesia::ContactPair
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ContactPair
- Defined in:
- lib/rafflesia/proteins/contact_pair.rb
Constant Summary collapse
- HASH_ATTRS =
{ atom_name_a: :atom_name_a, atom_name_b: :atom_name_b, atom_serial_a: :atom_serial_a, atom_serial_b: :atom_serial_b, base_readout: :base_readout, distance_angstrom: :distance_angstrom, groove: :groove, interaction: :interaction, moiety_a: :moiety_a, moiety_b: :moiety_b, residue_a: :residue_a, residue_b: :residue_b }.freeze
Instance Attribute Summary collapse
-
#atom_name_a ⇒ Object
Returns the value of attribute atom_name_a.
-
#atom_name_b ⇒ Object
Returns the value of attribute atom_name_b.
-
#atom_serial_a ⇒ Object
Returns the value of attribute atom_serial_a.
-
#atom_serial_b ⇒ Object
Returns the value of attribute atom_serial_b.
-
#base_readout ⇒ Object
Returns the value of attribute base_readout.
-
#distance_angstrom ⇒ Object
Returns the value of attribute distance_angstrom.
-
#groove ⇒ Object
Returns the value of attribute groove.
-
#interaction ⇒ Object
Returns the value of attribute interaction.
-
#moiety_a ⇒ Object
Returns the value of attribute moiety_a.
-
#moiety_b ⇒ Object
Returns the value of attribute moiety_b.
-
#residue_a ⇒ Object
Returns the value of attribute residue_a.
-
#residue_b ⇒ Object
Returns the value of attribute residue_b.
Instance Method Summary collapse
-
#initialize(json) ⇒ ContactPair
constructor
A new instance of ContactPair.
Constructor Details
#initialize(json) ⇒ ContactPair
Returns a new instance of ContactPair.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 37 def initialize(json) super() hash = self.class.normalize(json) @atom_name_a = hash[:atom_name_a] @atom_name_b = hash[:atom_name_b] @atom_serial_a = hash[:atom_serial_a] @atom_serial_b = hash[:atom_serial_b] @base_readout = hash[:base_readout] @distance_angstrom = hash[:distance_angstrom] @groove = hash[:groove] @interaction = hash[:interaction] @moiety_a = hash[:moiety_a] @moiety_b = hash[:moiety_b] @residue_a = hash[:residue_a] ? Rafflesia::ResiduePointer.new(hash[:residue_a]) : nil @residue_b = hash[:residue_b] ? Rafflesia::ResiduePointer.new(hash[:residue_b]) : nil end |
Instance Attribute Details
#atom_name_a ⇒ Object
Returns the value of attribute atom_name_a.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def atom_name_a @atom_name_a end |
#atom_name_b ⇒ Object
Returns the value of attribute atom_name_b.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def atom_name_b @atom_name_b end |
#atom_serial_a ⇒ Object
Returns the value of attribute atom_serial_a.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def atom_serial_a @atom_serial_a end |
#atom_serial_b ⇒ Object
Returns the value of attribute atom_serial_b.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def atom_serial_b @atom_serial_b end |
#base_readout ⇒ Object
Returns the value of attribute base_readout.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def base_readout @base_readout end |
#distance_angstrom ⇒ Object
Returns the value of attribute distance_angstrom.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def distance_angstrom @distance_angstrom end |
#groove ⇒ Object
Returns the value of attribute groove.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def groove @groove end |
#interaction ⇒ Object
Returns the value of attribute interaction.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def interaction @interaction end |
#moiety_a ⇒ Object
Returns the value of attribute moiety_a.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def moiety_a @moiety_a end |
#moiety_b ⇒ Object
Returns the value of attribute moiety_b.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def moiety_b @moiety_b end |
#residue_a ⇒ Object
Returns the value of attribute residue_a.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def residue_a @residue_a end |
#residue_b ⇒ Object
Returns the value of attribute residue_b.
23 24 25 |
# File 'lib/rafflesia/proteins/contact_pair.rb', line 23 def residue_b @residue_b end |