[Biopython] writing a PDB----PLEASEEEE HELP

martin djokovic martin.djokovic at gmail.com
Mon Oct 25 15:26:45 UTC 2010


Hi Peter,
I want a new PDB with structures A and B superimposed so that I can see them
both at the same in the same file

So at the end of the simulation/run  I would have A and B (original) and the
'ans.pdb' with A as it was but B rotated and translated to be superimposed
on A in the same PDB
I want to try this first simple superimposition but actually I want to
connect A and B together to make a longer strand
The last residue of A and first residue of B are the same so I can use those
coordinates to rotate/translate B then connect to A
I can do that manually using SWISS PDB but I want to do it for many
structures and its time consuing.

On Mon, Oct 25, 2010 at 11:21 AM, Peter Cock <p.j.a.cock at googlemail.com>wrote:

> 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