*** /Users/carlo/Downloads/gromacs-4.6.5/src/tools/gmx_rmsdist.c 2013-11-08 11:09:33.000000000 +0000 --- ../src/tools/gmx_rmsdist.c 2014-04-08 15:55:05.000000000 +0100 *************** *** 327,333 **** if (bEquiv) { /* set index for matching atom */ ! noe_index[j] = groupnr; /* skip matching atom */ i = j; } --- 327,333 ---- if (bEquiv) { /* set index for matching atom */ ! noe_index[i] = groupnr; /* skip matching atom */ i = j; } *************** *** 345,351 **** This is supposed to cover all CH3 groups and the like */ anmi = *atoms->atomname[index[i]]; anmil = strlen(anmi); ! bMatch = i < isize-3 && anmi[anmil-1] == '1'; if (bMatch) { for (j = 1; j < 3; j++) --- 345,351 ---- This is supposed to cover all CH3 groups and the like */ anmi = *atoms->atomname[index[i]]; anmil = strlen(anmi); ! bMatch = i <= isize-3 && anmi[anmil-1] == '1'; if (bMatch) { for (j = 1; j < 3; j++) *************** *** 648,654 **** "equivalent atoms can be supplied ([TT]-equiv[tt]), each line containing", "a set of equivalent atoms specified as residue number and name and", "atom name; e.g.:[PAR]", ! "[TT]3 SER HB1 3 SER HB2[tt][PAR]", "Residue and atom names must exactly match those in the structure", "file, including case. Specifying non-sequential atoms is undefined." --- 648,654 ---- "equivalent atoms can be supplied ([TT]-equiv[tt]), each line containing", "a set of equivalent atoms specified as residue number and name and", "atom name; e.g.:[PAR]", ! "[TT]HB* 3 SER HB1 3 SER HB2[tt][PAR]", "Residue and atom names must exactly match those in the structure", "file, including case. Specifying non-sequential atoms is undefined." *************** *** 788,808 **** /*do a first step*/ natom = read_first_x(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &t, &x, box); ! do { calc_dist_tot(isize, index, x, ePBC, box, d, dtot, dtot2, bNMR, dtot1_3, dtot1_6); rmsnow = rms_diff(isize, d, d_r); fprintf(fp, "%g %g\n", t, rmsnow); } while (read_next_x(oenv, status, &t, natom, x, box)); fprintf(stderr, "\n"); ffclose(fp); - teller = nframes_read(status); - close_trj(status); calc_rms(isize, teller, dtot, dtot2, mean, &meanmax, rms, &rmsmax, rmsc, &rmscmax); --- 788,807 ---- /*do a first step*/ natom = read_first_x(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &t, &x, box); ! teller=0; do { calc_dist_tot(isize, index, x, ePBC, box, d, dtot, dtot2, bNMR, dtot1_3, dtot1_6); rmsnow = rms_diff(isize, d, d_r); fprintf(fp, "%g %g\n", t, rmsnow); + teller++; } while (read_next_x(oenv, status, &t, natom, x, box)); fprintf(stderr, "\n"); ffclose(fp); close_trj(status); calc_rms(isize, teller, dtot, dtot2, mean, &meanmax, rms, &rmsmax, rmsc, &rmscmax);