[BioPython] hsexposure.py
Bhima A van der Molen
bav853 at bham.ac.uk
Fri Feb 6 12:42:01 EST 2009
Hi,
I am a newbe to the list.. I just started my PhD and I am trying to get
some calculations for surface accessibility for some proteins stored in
PDB format.
There is a niffty little script included with the BioPython download in
the scripts folder called hsexposure.py which is supposed to calculate
the half sphere exposure of each residue in the PDB file. However, when
I run it with the option to calculate HSE (all variations) I get 0
stored in the b-factor column of my PDB file instead of the count.. so I
tried extracting the code I want specifically.. i.e. the part to
calculate the HSEBU values and tried to get it to print on the screen..
I get the same result.. 0.0 as my HSE value.. see code below:
##code begins##
from Bio import PDB
from Bio.PDB import *
import sys
pdbfile=open('/home/aurobhima/pdb/pdb1fat.ent')
p=PDBParser()
s=p.get_structure('X', pdbfile)
m=s[0]
RADIUS=12.0
format ="4%i"
hse=PDB.HSExposureCB(m, RADIUS)
k = 'EXP_HSE_A_U'
residue_list=PDB.Selection.unfold_entities(m,'R')
for r in residue_list:
if r.xtra.has_key(k):
exposure=r.xtra[k]
if icode==' ':
icode='_'
resname=r.get_resname()
print (("%s %4i %c\t"+format) % (resname, resseq, icode, exposure))
else:
exposure=0.0
print exposure
##code ends##
if anybody has any ideas it would really help out..
I should point out that the DSSP and CN calculations work fine with the
script..
Thanks
Bhima
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bav853.vcf
Type: text/x-vcard
Size: 312 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/biopython/attachments/20090206/4d09ff3c/attachment.vcf>
More information about the BioPython
mailing list