Class: Rafflesia::ContactPair

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_aObject

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_bObject

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_aObject

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_bObject

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_readoutObject

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_angstromObject

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

#grooveObject

Returns the value of attribute groove.



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

def groove
  @groove
end

#interactionObject

Returns the value of attribute interaction.



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

def interaction
  @interaction
end

#moiety_aObject

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_bObject

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_aObject

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_bObject

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