Class: Rafflesia::PocketLigandDistance

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

Constant Summary collapse

HASH_ATTRS =
{
  closest_ligand_atom_name: :closest_ligand_atom_name,
  closest_ligand_atom_serial: :closest_ligand_atom_serial,
  distance_angstrom: :distance_angstrom,
  distance_threshold_angstrom: :distance_threshold_angstrom,
  is_threshold_hit: :is_threshold_hit,
  is_within_top_n: :is_within_top_n,
  is_within_top_n_plus_extra: :is_within_top_n_plus_extra,
  ligand: :ligand,
  ligand_id: :ligand_id,
  pocket_center_angstrom: :pocket_center_angstrom,
  pocket_id: :pocket_id,
  pocket_method: :pocket_method,
  pocket_rank: :pocket_rank
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ PocketLigandDistance

Returns a new instance of PocketLigandDistance.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @closest_ligand_atom_name = hash[:closest_ligand_atom_name]
  @closest_ligand_atom_serial = hash[:closest_ligand_atom_serial]
  @distance_angstrom = hash[:distance_angstrom]
  @distance_threshold_angstrom = hash[:distance_threshold_angstrom]
  @is_threshold_hit = hash[:is_threshold_hit]
  @is_within_top_n = hash[:is_within_top_n]
  @is_within_top_n_plus_extra = hash[:is_within_top_n_plus_extra]
  @ligand = hash[:ligand] ? Rafflesia::Ligand.new(hash[:ligand]) : nil
  @ligand_id = hash[:ligand_id]
  @pocket_center_angstrom = (hash[:pocket_center_angstrom] || [])
  @pocket_id = hash[:pocket_id]
  @pocket_method = hash[:pocket_method]
  @pocket_rank = hash[:pocket_rank]
end

Instance Attribute Details

#closest_ligand_atom_nameObject

Returns the value of attribute closest_ligand_atom_name.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def closest_ligand_atom_name
  @closest_ligand_atom_name
end

#closest_ligand_atom_serialObject

Returns the value of attribute closest_ligand_atom_serial.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def closest_ligand_atom_serial
  @closest_ligand_atom_serial
end

#distance_angstromObject

Returns the value of attribute distance_angstrom.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def distance_angstrom
  @distance_angstrom
end

#distance_threshold_angstromObject

Returns the value of attribute distance_threshold_angstrom.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def distance_threshold_angstrom
  @distance_threshold_angstrom
end

#is_threshold_hitObject

Returns the value of attribute is_threshold_hit.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def is_threshold_hit
  @is_threshold_hit
end

#is_within_top_nObject

Returns the value of attribute is_within_top_n.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def is_within_top_n
  @is_within_top_n
end

#is_within_top_n_plus_extraObject

Returns the value of attribute is_within_top_n_plus_extra.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def is_within_top_n_plus_extra
  @is_within_top_n_plus_extra
end

#ligandObject

Returns the value of attribute ligand.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def ligand
  @ligand
end

#ligand_idObject

Returns the value of attribute ligand_id.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def ligand_id
  @ligand_id
end

#pocket_center_angstromObject

Returns the value of attribute pocket_center_angstrom.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def pocket_center_angstrom
  @pocket_center_angstrom
end

#pocket_idObject

Returns the value of attribute pocket_id.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def pocket_id
  @pocket_id
end

#pocket_methodObject

Returns the value of attribute pocket_method.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def pocket_method
  @pocket_method
end

#pocket_rankObject

Returns the value of attribute pocket_rank.



24
25
26
# File 'lib/rafflesia/proteins/pocket_ligand_distance.rb', line 24

def pocket_rank
  @pocket_rank
end