[BioRuby] Bio::PDB::Residue patch

Alex Gutteridge alexg at kuicr.kyoto-u.ac.jp
Mon Apr 23 08:40:18 UTC 2007


Hmmm. Attachment didn't seem to work. Here is the patch:

--- residue.rb  2007-04-23 15:17:37.000000000 +0900
+++ residue.new.rb      2007-04-23 15:17:13.000000000 +0900
@@ -65,9 +65,9 @@
        # Now, Residue#id is an alias of residue_id.
        alias id residue_id
-      #Keyed access to atoms based on element e.g. ["CA"]
+      #Keyed access to atoms based on atom name e.g. ["CA"]
        def [](key)
-        atom = @atoms.find{ |atom| key == atom.element }
+        atom = @atoms.find{ |atom| key == atom.name }
        end
        # Updates residue id. This is a private method.

AlexG

On 23 Apr 2007, at 15:24, Alex Gutteridge wrote:

> Hi All,
>
> I've attached a tiny patch for 'bio/db/pdb/residue.rb' which fixes  
> some broken functionality. The keyed access to residue atoms was  
> using the element field rather than the name field. The element  
> field is not useful for selecting atoms and is not used in many pdb  
> files. Can someone with commit access please check and apply the  
> patch?
>
>
> Alex Gutteridge
>
> Bioinformatics Center
> Kyoto University
>
>
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby

Alex Gutteridge

Bioinformatics Center
Kyoto University





More information about the BioRuby mailing list