[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IMP-users] IMP.algebra.get_transformation_aligning_first_to_second



Hi,

we just stumbled across the same problem Ben had last year:

get_transformation_aligning_first_to_second doesn't give the correct results. Can the resulting transformation be applied with get_transformed, like in the example?

Or does anybody have an idea how we could get the transformation between two point sets in a different way?

Thanks a lot!

Carsten & Pia


    Date: Thu, 20 Oct 2011 10:29:14 +0200
    From: Benjamin SCHWARZ <>
Reply-To: Help and discussion for users of IMP <>
Subject: [IMP-users] does IMP.algebra.get_transformation_aligning_first_to_second minimize RMSD ?
      To: Help and discussion for users of IMP <>

Hi list,

Just confronted to something that looks like a bug, either in IMP or in my reading of the IMP manual. I'd expect the alignment of two sets of particles or vectors to minimize the RMD between the two sets, but in my case it appears the alignment produces a worse RMSD. See output underneath, and sample script attached.

Considering  30 3D vectors
natural rmsd between v1 and v2: 209.651290894
aligning v1 on v2... with resulting rmsd 220.458206177
running IMP version  kernel SVN 10177 with Boost.FileSystem






'''
Created on 20 oct. 2011

@author: schwarz


IMP::algebra::Transformation3D get_transformation_aligning_first_to_second     (     
        IMP_RESTRICT const Vector3DsOrXYZs0 &      from,
        IMP_RESTRICT const Vector3DsOrXYZs1 &      to 
    ) 


'''


import IMP
import IMP.atom
import IMP.algebra




v1 = [IMP.algebra.Vector3D(r) for r in [(-4.8651, -103.889, -76.3372), (-17.6107, -109.622, -53.712), (-7.98459, -99.5632, -38.7659), (-8.27411, -78.2731, -38.5622), (-3.12019, -51.3744, -23.9791), (-2.41167, -18.6717, -20.8077), (111.161, 160.815, 36.6068), (87.3027, 175.722, 46.5187), (74.8534, 183.96, 19.3358), (37.1186, 159.992, -17.6009), (48.8595, 190.428, -26.8594), (74.6236, 195.314, -10.4768), (89.387, 219.024, -12.3344), (90.0632, 245.393, -12.5956), (78.0319, 251.186, -41.077), (20.3405, 184.599, -49.3769), (85.1963, 216.776, 28.5105), (61.4308, 109.249, 41.1318), (69.0532, 105.067, 72.8991), (78.5351, 141.205, 48.9855), (39.7696, 83.3127, 24.4885), (23.0888, 57.7028, 18.5618), (6.64284, 56.4182, -18.4283), (12.1468, 89.1981, -22.0712), (109.643, 185.989, 9.88275), (12.3992, 27.9214, 14.4396), (0, 0, 0), (0.189872, 23.6042, -14.8732), (19.4217, 122.6, -32.6764), (16.3624, 157.46, -46.4995)]]
v2 = [IMP.algebra.Vector3D(r) for r in [(-61.2357, 118.156, -86.7347), (-54.0592, 93.5593, -79.6042), (-45.149, 76.6654, -71.5415), (-36.3433, 59.6175, -61.24), (-23.0455, 38.1736, -42.6791), (-10.3035, 16.8551, -20.2263), (9.04697, -21.3708, 158.52), (-1.77525, -44.2478, 174.238), (-11.0126, -71.7094, 184.364), (64.8338, 107.185, 152.688), (57.1274, 74.5284, 154.02), (39.2568, 49.1887, 155.111), (24.6546, 25.2255, 155.09), (15.9905, 2.87662, 143.511), (6.8985, 2.74462, 113.46), (118.892, 135.653, 97.617), (-5.01075, -106.275, 187.531), (-24.5406, -36.4006, 124.037), (-1.82296, -50.8689, 143.369), (-31.3048, -52.6977, 156.713), (-20.2762, -20.5159, 90.4359), (-15.4951, -13.6531, 60.7782), (7.49323, 14.3338, 55.8124), (8.51393, 9.43813, 87.5174), (-43.5966, -86.0402, 184.71), (-10.1799, -14.065, 28.8764), (0, 0, 0), (6.33766, 13.3962, 22.9723), (87.9036, 120.225, 118.189), (118.884, 107.982, 101.771)]]

print "Considering ",len(v1),"3D vectors"

print "natural rmsd between v1 and v2:", IMP.atom.get_rmsd(v1,v2)

print "aligning v1 on v2...",
transfo = IMP.algebra.get_transformation_aligning_first_to_second(v1,v2)
v3=[transfo.get_transformed(v) for v in v1]
print "with resulting rmsd",IMP.atom.get_rmsd(v2,v3)

print "running IMP version ",IMP.get_module_version_info()
_______________________________________________
IMP-users mailing list

https://salilab.org/mailman/listinfo/imp-users