[Biopython] How to apply symmetry matrix on protein chains
Robert Campbell
robert.campbell at queensu.ca
Thu Nov 13 14:07:08 UTC 2014
Hello Fred and Bhushan,
One minor correction to what Fred wrote:
On Thu, 2014-11-13 09:59 EST, Fred Ludlow <fred.ludlow at gmail.com> wrote:
> ps. If you want to understand how it works, or write your own code to do
> it:
>
> You use the BIOMT records to create a series of 3x3 matrices. e.g. these
> three lines from the PDB file correspond to one transformation:
>
> REMARK 350 BIOMT1 2 0.500000 -0.809017 0.309017 0.00000
> REMARK 350 BIOMT2 2 0.809017 0.309017 -0.500000 0.00000
> REMARK 350 BIOMT3 2 0.309017 0.500000 0.809017 0.00000
>
> use these to make a matrix
>
> >>> import numpy as np
> >>> m = np.array([[ 0.5, -0.809017, 0.309017],
> [ 0.809017, 0.30917, -0.5 ],
> [ 0.309017, 0.5, 0.809017]])
>
> Then for each coordinate in your original PDB, e.g. the first one:
> >>> a = np.array([35.887, 31.402, 96.395])
>
> take the dot product:
> >>> np.dot(m,a)
> array([ 22.32644188, -9.45575058, 104.77588679])
While it doesn't matter in this case because there is no translation in the
BIOMT records of 1HRI, a more complete answer would be:
coord = np.array([35.887, 31.402, 96.395])
rotmat = np.array([[ 0.5, -0.809017, 0.309017, 0.0],
[ 0.809017, 0.30917, -0.5, 0.0
[ 0.309017, 0.5, 0.809017, 0.0]])
rotated_coord = np.dot(rotmat[0:3,0:3],coord) + rotmat[:3,3]
Cheers,
Rob
> On 13 November 2014 06:50, Bhushan <nagbiotech1 at gmail.com> wrote:
>
> > Hi,
> >
> > I want to apply the symmetry matrix on pdb 1HRI and output the
> > biological assembly (with rotated coordinates). Can anyone suggest me a
> > way to do this using biopython.
> >
> > Thank you for your time. I would appreciate any kind of help.
> >
> >
> > With Regards,
> > Bhushan.
> >
> > _______________________________________________
> > Biopython mailing list - Biopython at mailman.open-bio.org
> > http://mailman.open-bio.org/mailman/listinfo/biopython
> >
--
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University,
Kingston, ON K7L 3N6 Canada
Tel: 613-533-6821
<robert.campbell at queensu.ca> http://pldserver1.biochem.queensu.ca/~rlc
More information about the Biopython
mailing list