class Bio::PDB::Coordinate
Bio::PDB::Coordinate
is a class to store a 3D coordinate. It inherits Vector (in bundled library in Ruby).
Public Class Methods
Source
# File lib/bio/db/pdb/atom.rb 33 def self.[](x,y,z) 34 super 35 end
same as Vector.
Calls superclass method
Source
# File lib/bio/db/pdb/atom.rb 38 def self.elements(array, *a) 39 raise 'Size of given array must be 3' if array.size != 3 40 super 41 end
same as Vector.elements
Calls superclass method
Public Instance Methods
Source
# File lib/bio/db/pdb/atom.rb 70 def distance(object2) 71 Utils::convert_to_xyz(object2) 72 (self - object2).r 73 end
distance between object2.
Source
# File lib/bio/db/pdb/atom.rb 64 def to_ary; self.to_a; end
Implicit conversion to an array.
Note that this method would be deprecated in the future.