[BioRuby-cvs] bioruby/lib/bio/db/pdb chain.rb, 1.8, 1.9 model.rb, 1.9, 1.10 pdb.rb, 1.23, 1.24 residue.rb, 1.13, 1.14

Naohisa Goto ngoto at dev.open-bio.org
Tue Dec 18 13:48:45 UTC 2007


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

Modified Files:
	chain.rb model.rb pdb.rb residue.rb 
Log Message:
* lib/bio/db/pdb/pdb.rb

  Bio::PDB#inspect is added to prevent memory exhaust problem.
  ([BioRuby] Parse big PDB use up all memory)

* lib/bio/db/pdb/model.rb

  Added Bio::PDB::Model#inspect.

* lib/bio/db/pdb/chain.rb

  Added Bio::PDB::Chain#inspect.

* lib/bio/db/pdb/residue.rb

  Added Bio::PDB::Residue#inspect.
  This also affects Bio::PDB::Heterogen#inspect.



Index: residue.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/pdb/residue.rb,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** residue.rb	23 Apr 2007 16:03:25 -0000	1.13
--- residue.rb	18 Dec 2007 13:48:42 -0000	1.14
***************
*** 130,133 ****
--- 130,139 ----
        end
  
+       # returns a string containing human-readable representation
+       # of this object.
+       def inspect
+         "#<#{self.class.to_s} resName=#{resName.inspect} id=#{residue_id.inspect} chain.id=#{(chain ? chain.id : nil).inspect} resSeq=#{resSeq.inspect} iCode=#{iCode.inspect} atoms.size=#{atoms.size}>"
+       end
+ 
        # Always returns false.
        #

Index: model.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/pdb/model.rb,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** model.rb	5 Apr 2007 23:35:41 -0000	1.9
--- model.rb	18 Dec 2007 13:48:42 -0000	1.10
***************
*** 135,138 ****
--- 135,144 ----
          return string
        end
+ 
+       # returns a string containing human-readable representation
+       # of this object.
+       def inspect
+         "#<#{self.class.to_s} serial=#{serial.inspect} chains.size=#{chains.size}>"
+       end
        
      end #class Model

Index: pdb.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/pdb/pdb.rb,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** pdb.rb	10 Jul 2007 10:44:46 -0000	1.23
--- pdb.rb	18 Dec 2007 13:48:42 -0000	1.24
***************
*** 1877,1880 ****
--- 1877,1886 ----
      end
  
+     # returns a string containing human-readable representation
+     # of this object.
+     def inspect
+       "#<#{self.class.to_s} entry_id=#{entry_id.inspect}>"
+     end
+ 
    end #class PDB
  

Index: chain.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/pdb/chain.rb,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** chain.rb	5 Apr 2007 23:35:41 -0000	1.8
--- chain.rb	18 Dec 2007 13:48:42 -0000	1.9
***************
*** 173,176 ****
--- 173,182 ----
        end
  
+       # returns a string containing human-readable representation
+       # of this object.
+       def inspect
+         "#<#{self.class.to_s} id=#{chain_id.inspect} model.serial=#{(model ? model.serial : nil).inspect} residues.size=#{residues.size} heterogens.size=#{heterogens.size} aaseq=#{aaseq.inspect}>"
+       end
+ 
        # gets an amino acid sequence of this chain from ATOM records
        def aaseq




More information about the bioruby-cvs mailing list