[Biopython] Error in pdb superimposer: global name Bio not defined
Sanjeev Sariya
s.sariya_work at ymail.com
Fri Nov 7 14:55:49 UTC 2014
Hi Team,
I am trying to align 2 pdb files..When I try to create an object for Bio.PDB.Superimposer(), I get a strange error.
Langauge specs:
Python version - 2.7Bio.__version__ - 1.61 ## bio python versionMy code looks like:
from Bio.PDB import *
def alignPDB_file(refPDB, samplePDB): # function to align pdb file
ref_atoms,sample_atoms=[],[]
ref_model=PDBParser(QUIET=True).get_structure("reference",refPDB)[0] # get the 0th model
sam_model=PDBParser(QUIET=True).get_structure("sample",samplePDB)[0] # get the 0th model
for ref_chain in ref_model:
for ref_res in ref_chain:
if not "CA" in ref_res:continue
else: ref_atoms.append(ref_res['CA'])
for sam_chain in sam_model:
for sam_res in sam_chain:
if not "CA" in sam_res: continue
else: sample_atoms.append(sam_res['CA'])
#super_imposer=Bio.PDB.Superimposer()
super_imposer = Bio.PDB.Superimposer()
Error: super_imposer = Bio.PDB.Superimposer()
NameError: global name 'Bio' is not defined
Kindly advise.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20141107/ec2a8f16/attachment.html>
More information about the Biopython
mailing list