[BioPython] Bio.PDB phi/psi angles
Peter
biopython at maubp.freeserve.co.uk
Sat Jul 14 18:07:55 UTC 2007
Douglas Kojetin wrote:
> Hi All,
>
> I would like to print the phi/psi angles for a structure using the
> script found here:
>
> http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/
> python/ramachandran/calculate/
>
> but the script chokes on the following line:
>
> phi_psi = poly.get_phi_psi_list()
>
> error output:
>
> Traceback (most recent call last):
> File "./ramachandran_biopython.py", line 62, in <module>
> phi_psi = poly.get_phi_psi_list()
> File "/sw/lib/python2.5/site-packages/Bio/PDB/Polypeptide.py",
> line 169, in get_phi_psi_list
> res.xtra["PHI"]=phi
> NameError: global name 'res' is not defined
>
> Does anyone know what I can do to overcome this problem?
Its not your fault, it looks like an error has crept into
Bio/PDB/Polypeptide.py with revision 1.32 (shipped with biopython 1.43),
which I think I've just fixed with CVS revision 1.33
You can grab the files from here once the webpage has updated:
http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/PDB/Polypeptide.py?cvsroot=biopython
Just backup and replace the existing file here:
/sw/lib/python2.5/site-packages/Bio/PDB/Polypeptide.py
Or, you could downgrade to biopython 1.42 ;)
Peter
More information about the Biopython
mailing list