[Biopython] Fwd: PBD SuperImpose

Carlos Ríos Vera crosvera at gmail.com
Sat Aug 29 17:03:55 UTC 2009


2009/8/29 Rodrigo faccioli <rodrigo_faccioli at uol.com.br>

> Please,
>
> Could you inform the PDBIDs or PDB files that you are using?
>
>
trimero_r308A_600_ps2.pdb
wt_600ps_trim.pdb

These are the PDBs that I'm 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
>>
>>
>


-- 
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




More information about the Biopython mailing list