[BioRuby-cvs] bioruby/lib/bio/db/pdb atom.rb,1.4,1.5

Naohisa Goto ngoto at pub.open-bio.org
Sun Dec 18 12:33:34 EST 2005


Update of /home/repository/bioruby/bioruby/lib/bio/db/pdb
In directory pub.open-bio.org:/tmp/cvs-serv29972

Modified Files:
	atom.rb 
Log Message:
removed Bio::PDB::Atom (and Bio::PDB::HetAtm)


Index: atom.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/pdb/atom.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** atom.rb	18 Dec 2005 15:09:46 -0000	1.4
--- atom.rb	18 Dec 2005 17:33:32 -0000	1.5
***************
*** 56,113 ****
      end #class Coordinate
  
-     # Bio::PDB::Atom is a class for atom data.
-     # Each ATOM line is parsed into an Atom object.
-     Atom = Struct.new(:serial, :element, :alt_loc, :x, :y, :z,
-                       :occ, :bfac, :residue)
-     class Atom
-       include Utils
-       include Comparable
- 
-       #Returns a Coordinate class instance of the xyz positions
-       def xyz
-         Coordinate[ x, y, z ]
-       end
- 
-       #Returns an array of the xyz positions
-       def to_a
-         [ x, y, z ]
-       end
-       
-       #Sorts based on serial numbers
-       def <=>(other)
-         return serial <=> other.serial
-       end
-       
-       #Stringifies to PDB format
-       def to_s
-         if element.length < 4
-           elementOutput = sprintf(" %-3s", element)
-         else
-           elementOutput = element
-         end
-         sprintf("%-6s%5s %s%1s%3s %1s%4s%1s   %8.3f%8.3f%8.3f%6.2f%6.2f",
-                 record_type,
-                 serial, elementOutput, alt_loc, residue.resName,
-                 residue.chain.id, residue.resSeq, residue.iCode,
-                 x, y, z, occ, bfac)
-       end
- 
-       def record_name
-         'ATOM'
-       end
-       def record_type
-         record_name
-       end
-     end #class Atom
- 
-     # Bio::PDB::HetAtm is a class for HETATM data.
-     # Each HETATM line is parsed into an HetAtm object.
-     # Since HetAtm inherits Atom class, please refer Atom class for usage.
-     class HetAtm < Atom
-       def record_name
-         'HETATM'
-       end
-     end #class HetAtm
- 
    end #class PDB
  end #class Bio
--- 56,60 ----
      end #class Coordinate
  
    end #class PDB
  end #class Bio
+ 



More information about the bioruby-cvs mailing list