Re: [Open Babel] match atom order in two pdb files of same molecule

2012-12-05 Thread Noel O'Boyle
As you found, the --canonical solution is not at all the efficient way to do this. Here's the proper way to do this using Tim's OBIsomorphismMapper (which uses the VF2 graph matching algorithm I believe). import pybel ob = pybel.ob mol = pybel.readstring("smi", "CC(=O)Cl") molb = pybel.readstring(

[Open Babel] match atom order in two pdb files of same molecule

2012-12-05 Thread dalvarez
Hi there, I'm trying to obtain a rotation matrix between two pdb files containing the same protein. For many of them the following script works perfectly: # Load files in OBMol S = next(pybel.readfile('pdb',struc)) S.removeh() T = next(pybel.readfile('pdb',target)) T.removeh() # Align align = op