double rmsd = Calc.rmsd(atoms1, atoms2c); if (rmsd > aParams.getMaxRmsd()) { logger.debug(String.format("Subunit matching %d "
/** * Return the rmsd of the CAs between the input pro and this protein, at * given positions. quite similar to transPdb but while that one transforms * the whole ca2, this one only works on the res1 and res2 positions. * * Modifies the coordinates in the second set of Atoms (pro). * * @return rmsd of CAs */ private static double calCaRmsd(Atom[] ca1, Atom[] pro, int resn, int[] res1, int[] res2) throws StructureException { Atom[] cod1 = getAtoms(ca1, res1, resn, false); Atom[] cod2 = getAtoms(pro, res2, resn, false); if (cod1.length == 0 || cod2.length == 0) { logger.info("length of atoms == 0!"); return 99; } Matrix4d transform = SuperPositions.superpose(Calc.atomsToPoints(cod1), Calc.atomsToPoints(cod2)); for (Atom a : cod2) Calc.transform(a.getGroup(), transform); return Calc.rmsd(cod1, cod2); }
return Calc.rmsd(catmp1,catmp2);
rmsd = Calc.rmsd(atoms1, atoms2); tmScore = Calc.getTMScore(atoms1, atoms2, ca1.length, ca2len);
rmsd = Calc.rmsd(tmp1,tmp2);
this.rms = Calc.rmsd(ca1subset,ca2subset);
/** 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); }
/** * Get the RMS of the JointFragments pair frag * * @param ca1 the array of all atoms of structure1 * @param ca2 the array of all atoms of structure1 * @param frag the JointFragments object that contains the list of identical positions * @return the rms */ public static double getRMS(Atom[] ca1, Atom[]ca2,JointFragments frag) throws StructureException { // now svd ftmp and check if the rms is < X ... AlternativeAlignment ali = new AlternativeAlignment(); ali.apairs_from_idxlst(frag); double rms = 999; int[] idx1 = ali.getIdx1(); int[] idx2 = ali.getIdx2(); Atom[] ca1subset = AlignUtils.getFragmentFromIdxList(ca1, idx1); Atom[] ca2subset = AlignUtils.getFragmentFromIdxList(ca2,idx2); ali.calculateSuperpositionByIdx(ca1,ca2); Matrix rot = ali.getRotationMatrix(); Atom atom = ali.getShift(); for (Atom a : ca2subset) { Calc.rotate(a, rot); Calc.shift(a, atom); } rms = Calc.rmsd(ca1subset,ca2subset); return rms; }
return Calc.rmsd(cod1, cod2);
double rmsd = Calc.rmsd(ca1aligned, ca2aligned); double tmScore = Calc.getTMScore(ca1aligned, ca2aligned, ca1.length, ca2.length); afpChain.setTotalRmsdOpt(rmsd); double rmsdb = Calc.rmsd(ca1block, ca2block); double tmScoreb = Calc.getTMScore(ca1block, ca2block, ca1.length, ca2.length); blockRMSD[k] = rmsdb;