[Biopython] Fwd: PBD SuperImpose

Rodrigo faccioli rodrigo_faccioli at uol.com.br
Sat Aug 29 13:17:25 UTC 2009


Please,

Could you inform the PDBIDs or PDB files that you are using?

Cheers,

--
Rodrigo Antonio Faccioli
Ph.D Student in Electrical Engineering
University of Sao Paulo - USP
Engineering School of Sao Carlos - EESC
Department of Electrical Engineering - SEL
Intelligent System in Structure Bioinformatics
http://laips.sel.eesc.usp.br
Phone: 55 (16) 3373-9366 Ext 229
Curriculum Lattes - http://lattes.cnpq.br/1025157978990218


2009/8/28 Carlos Ríos Vera <crosvera at gmail.com>

> Hello people,
>
> I'm trying to use the superimpose() method from the Bio.PBD module, but
> when
> I use the set_atoms() method with two atoms list, I got this:
>
> "Bio.PDB.PDBExceptions.PDBException: Fixed and moving atom lists differ in
> size"
>
> So, my question is: How can I superimpose to structures with different size
> ??
>
> Cheers and Thanks.
>
> PS: I paste the code that I'm using.
>
> -------code.py------
> #!/usr/bin/env python
>
> import sys
> from Bio.PDB import *
>
> #get the PDB's path from user command line
> struct_path1 = sys.argv[1]
> name_struct1 = struct_path1.split('/')[-1].split('.')[0]
>
> struct_path2 = sys.argv[2]
> name_struct2 = struct_path2.split('/')[-1].split('.')[0]
>
> #parsing the PDBs
> parser = PDBParser()
>
> struct1 = parser.get_structure(name_struct1, struct_path1)
> struct2 = parser.get_structure(name_struct2, struct_path2)
>
> #get atoms list
> atoms1 = struct1.get_atoms()
> atoms2 = struct2.get_atoms()
>
> latoms1 = []
> latoms2 = []
>
> for a in atoms1:
>    latoms1.append( a )
> for a in atoms2:
>    latoms2.append( a )
>
> print latoms1
> print latoms2
>
> #SuperImpose
> sup = Superimposer()
> # Specify the atom lists
> # ""fixed"" and ""moving"" are lists of Atom objects
> # The moving atoms will be put on the fixed atoms
> sup.set_atoms(latoms1, latoms2)
> # Print rotation/translation/rmsd
> print "ROTRAN: "+ sup.rotran
> print "RMS: " + sup.rms
> # Apply rotation/translation to the moving atoms
> sup.apply(moving)
>
>
>
> --
> http://crosvera.blogspot.com
>
> Carlos Ríos V.
> Estudiante de Ing. (E) en Computación e Informática.
> Universidad del Bío-Bío
> VIII Región, Chile
>
> Linux user number 425502
>
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>
>




More information about the Biopython mailing list