/** * Create a rotation axis from a Matrix4d containing a rotational * component and a translational component. * * @param transform */ public RotationAxis(Matrix4d transform) { Matrix rot = Matrices.getRotationJAMA(transform); Atom transl = Calc.getTranslationVector(transform); init(rot,transl); }
public static Atom getTranslation(AFPChain afpChain,Atom[] ca1,Atom[] ca2) throws StructureException{ Atom[] a1 = getAlignedAtoms1(afpChain,ca1); Atom[] a2 = getAlignedAtoms2(afpChain,ca2); Matrix4d trans = SuperPositions.superpose(Calc.atomsToPoints(a1), Calc.atomsToPoints(a2)); return Calc.getTranslationVector(trans); }
Atom shift = Calc.getTranslationVector(trans);
Calc.atomsToPoints(ca2subset)); this.currentRotMatrix = Matrices.getRotationJAMA(trans); this.currentTranMatrix = Calc.getTranslationVector(trans);
Atom t = Calc.getTranslationVector(transform);
/** superimpose and get rmsd * * @param pro1 * @param pro2 * @param strLen Number of atoms from pro1 and pro2 to use * @param storeTransform Store rotation and shift matrices locally * @return RMSD * @throws StructureException */ public double calc_rmsd(Atom[] pro1, Atom[] pro2, int strLen, boolean storeTransform) throws StructureException { Atom[] cod1 = getAtoms(pro1, strLen,false); Atom[] cod2 = getAtoms(pro2, strLen,true); Matrix4d trans = SuperPositions.superpose(Calc.atomsToPoints(cod1), Calc.atomsToPoints(cod2)); Matrix matrix = Matrices.getRotationJAMA(trans); Atom shift = Calc.getTranslationVector(trans); if ( storeTransform) { r = matrix; t = shift; } for (Atom a : cod2) Calc.transform(a.getGroup(), trans); return Calc.rmsd(cod1, cod2); }
Atom shift = Calc.getTranslationVector(trans);
Atom tranMatrix = getTranslationVector(transform);
Atom shift = Calc.getTranslationVector(trans); blockShifts[k] = Calc.getTranslationVector(trans);