[Biopython-dev] [Bug 3100] New: Bio.PDB.ResidueDepth distance calculation error

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Jun 16 12:43:07 UTC 2010


http://bugzilla.open-bio.org/show_bug.cgi?id=3100

           Summary: Bio.PDB.ResidueDepth distance calculation error
           Product: Biopython
           Version: 1.54b
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: andres.colubri at gmail.com


ResidueDepth.py in Bio.PDB contains an error at line 100:

d2=sum(d*d, 1)

This uses the built-in sum() function, which just sums all the elements of d*d,
starting at 1. But it should use numpy's sum instead:

d2=numpy.sum(d*d, 1)

To check the error, try the following code:

from Bio.PDB import
from Bio.PDB.ResidueDepth import
parser = PDBParser()
str = parser.get_structure('test', '3M38.pdb')
surf = get_surface('3M38.pdb', PDB_TO_XYZR='./pdb_to_xyzr', MSMS='./msms')
print min_dist(surf[10], surf)

3M38.pdb could be replaced by any other pdb file. The result of this
calculation printed to the console should be zero, since we are calculating the
minimum distance to the surface of a point belonging to the surface. But this
gives a value greater than zero.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list