[Biopython] writing a PDB----PLEASEEEE HELP
martin djokovic
martin.djokovic at gmail.com
Mon Oct 25 15:06:52 UTC 2010
OK I have looked at both the tutorial and the link below
http://www2.warwick.ac.uk/fac/sci/moac/students/peter_cock/python/protein_superposition/
I am pretty new so I am not sure how to do this.
I have 2 PDB files --lets call them A and B .
A = Bio.PDB.PDBParser().get_structure(pdb_code, pdb_filename)
B = Bio.PDB.PDBParser().get_structure(pdb_code2, pdb_filename2)
I pick the [CA] atoms of both these PDB's (each has 5 residues) then store
them in two lists called ref_atoms and alt_atoms respectively
super_imposer = Bio.PDB.Superimposer()
super_imposer.set_atoms(ref_atoms, alt_atoms)
super_imposer.apply(alt_atoms)
(I move the alt_atoms above)
Then write it out as follows
io=Bio.PDB.PDBIO()
io.set_structure(A)
io.save('ans.pdb')
My problem is I want a 3rd PDB called 'ans.pdb' that has two structures,
namely A and B superimposed on each other but what I get is just a copy of A
in the 'ans.pdb'
What happened to the coordinates of B that I translated and rotated ?????
What am I doing wrong??
Thanks
Martin
More information about the Biopython
mailing list