[Biopython] writing a PDB----PLEASEEEE HELP
Peter Cock
p.j.a.cock at googlemail.com
Mon Oct 25 15:21:30 UTC 2010
On Mon, Oct 25, 2010 at 4:06 PM, martin djokovic
<martin.djokovic at gmail.com> wrote:
> 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
Hi,
Could you clarify what you want out? Maybe you want a single
PDB file containing two models (structure A and structure B)?
Otherwise you could have problems with the two structures
using clashing chain identifiers etc.
Peter
More information about the Biopython
mailing list