Hi,
I am trying to to do an aligment of two structures ( mol1 and mol2 ) and
I want to superimpose both structures on the original position of mol1
( thus I do not want the translation of the center of mass to the
origin! ).
I thougt it would be enough to modify the rotateAtomContainer method of
KabschAligment.
public void rotateAtomContainer(IAtomContainer ac) {
Point3d[] p = getPoint3dArray( ac.getAtoms() );
for (int i = 0; i < ac.getAtomCount(); i++) {
// translate the the origin we have calculated
// p[i].x = p[i].x - this.cm2.x;
// p[i].y = p[i].y - this.cm2.y;
// p[i].z = p[i].z - this.cm2.z;
// do the actual rotation
ac.getAtomAt(i).setX3d( U[0][0]*p[i].x + U[0][1]*p[i].y +
U[0][2]*p[i].z );
ac.getAtomAt(i).setY3d( U[1][0]*p[i].x + U[1][1]*p[i].y +
U[1][2]*p[i].z );
ac.getAtomAt(i).setZ3d( U[2][0]*p[i].x + U[2][1]*p[i].y +
U[2][2]*p[i].z );
}
}
I just deleted the translation part where all the atoms of mol2 become
translated arround the origin depending on the center of mass. The
strange thing is, that doesn't seem to change anything for me.
Do I overlook anything here?
Thanks for any help,
Alex
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user