[MMTK] problem with findTransformation

khinsen at cea.fr khinsen at cea.fr
Mon Nov 28 13:06:50 CET 2005

On Nov 24, 2005, at 23:00, Jaroslaw Kalinowski wrote:

> I tried to align two structures but I could not obtain proper fit.  
> I did:
> import MMTK
> import MMTK.PDB
> import MMTK.Proteins
> pdb_u = MMTK.PDB.PDBConfiguration('U.pdb').peptide_chains[0]
> pdb_b = MMTK.PDB.PDBConfiguration('B.pdb').peptide_chains[0]
> p = MMTK.Proteins.PeptideChain(pdb_b, model='no_hydrogens',  
> c_terminus=0)
> u = MMTK.InfiniteUniverse()
> u.addObject(p)
> cb = MMTK.copy(u.configuration())
> pdb_u.applyTo(p)
> transformation, rms = p.findTransformation(cb)
> p.applyTransformation(transformation)
> MMTK.PDB.PDBOutputFile('UonB.pdb').write(p)
> print 'RMS = %.3f [nm]' % rms

At first I found this a bit puzzling, as I got a very good fit. Then  
I tried it on my development machine and got a pretty bad one as  
well... Further analysis showed that this was due to an incorrect  
tensor-vector product with the new Pyrex implementation of the Vector  
class in ScientificPython 2.5.x. I will have to look into that in  
more detail, according to my understanding it should raise an  
exception rather than returning a wrong result...

Assuming that you are using ScientificPython 2.5.x, I suggest  
temporarily disabling the Pyrex Vector module. The simplest way is to  
delete the corresponding compiled module, which is called  
Scientific_vector.so on Unix platforms. You then use the old Python  
version, which is a bit slower but tried and tested.

Konrad Hinsen
Laboratoire Léon Brillouin, CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr

More information about the mmtk mailing list