[BioPython] protein-ligand interactions

mitlox mitlox at op.pl
Thu Mar 19 12:55:06 UTC 2009


I wrote this code:
------------------------------------------------------------------------------------------------
import Bio.PDB
import numpy

pdb_code = "1E8W"
pdb_filename = "1E8W.pdb" #not the full cage!

structure = Bio.PDB.PDBParser().get_structure(pdb_code, pdb_filename)

backBoneAtomNames = "N","CA","C","0", "CB"

tempBackbone = [0,0,0,0,0]
Backbone = []
backboneNo = 0

for atom in structure.get_atoms():
    if (atom.get_name() == backBoneAtomNames[backboneNo]) and 
(backboneNo < len(backBoneAtomNames)):
        tempBackbone[backboneNo] = atom   
        backboneNo+=1
    elif atom.get_name() != backBoneAtomNames[backboneNo]:
        backboneNo = 0
    elif len(backBoneAtomNames) == backboneNo:
        Backbone.extend(tempBackbone)
        for a in tempBackbone:
            print a
------------------------------------------------------------------------------------------------
to identified the backbone, but unfortunately it does not work.

Maybe exist already to identified backbone in Biopython?

Thank you in advance

Peter Cock wrote:
>> Hi,
>>
>> I've got a couple of PDB examples on my personal website, and although
>> they need a little update to use NumPy instead of Numeric, I think the
>> page on doing protein contact maps would be very informative:
>> http://www.warwick.ac.uk/go/peter_cock/python/protein_contact_map/
>>     
>
> I've updated those pages to use NumPy instead of Numeric - all very
> straight forward (apart from some issue with rpy for the graphics which
> isn't relevant to Biopython):
>
> http://www.warwick.ac.uk/go/peter_cock/python/protein_contact_map/
> http://www.warwick.ac.uk/go/peter_cock/python/protein_superposition/
>
> Peter
>
>   




More information about the Biopython mailing list