};
#define NFILE asize(fnm)
- if (!parse_common_args(&argc, argv, PCA_CAN_TIME | PCA_TIME_UNIT, NFILE, fnm, asize(pa), pa,
- asize(desc), desc, 0, nullptr, &oenv))
+ if (!parse_common_args(
+ &argc, argv, PCA_CAN_TIME | PCA_TIME_UNIT, NFILE, fnm, asize(pa), pa, asize(desc), desc, 0, nullptr, &oenv))
{
return 0;
}
fprintf(stderr,
"\nWARNING: number of atoms in structure file (%d) and trajectory (%d) do not "
"match\n",
- natoms, nat);
+ natoms,
+ nat);
}
gmx::throwErrorIfIndexOutOfBounds({ ifit, ifit + nfit }, nat, "fitting");
gmx::throwErrorIfIndexOutOfBounds({ index, index + natoms }, nat, "analysis");
xread[index[i]][d] = xav[i][d];
}
}
- write_sto_conf_indexed(opt2fn("-av", NFILE, fnm), "Average structure", atoms, xread, nullptr,
- PbcType::No, zerobox, natoms, index);
+ write_sto_conf_indexed(
+ opt2fn("-av", NFILE, fnm), "Average structure", atoms, xread, nullptr, PbcType::No, zerobox, natoms, index);
sfree(xread);
- fprintf(stderr, "Constructing covariance matrix (%dx%d) ...\n", static_cast<int>(ndim),
+ fprintf(stderr,
+ "Constructing covariance matrix (%dx%d) ...\n",
+ static_cast<int>(ndim),
static_cast<int>(ndim));
nframes = 0;
nat = read_first_x(oenv, &status, trxfile, &t, &xread, box);
{
for (i = 0; i < ndim; i += 3)
{
- fprintf(out, "%g %g %g\n", mat[ndim * j + i], mat[ndim * j + i + 1],
- mat[ndim * j + i + 2]);
+ fprintf(out, "%g %g %g\n", mat[ndim * j + i], mat[ndim * j + i + 1], mat[ndim * j + i + 2]);
}
}
gmx_ffclose(out);
rhi.b = 0;
out = gmx_ffopen(xpmfile, "w");
nlevels = 80;
- write_xpm3(out, 0, "Covariance", bM ? "u nm^2" : "nm^2", "dim", "dim", ndim, ndim, axis,
- axis, mat2, min, 0.0, max, rlo, rmi, rhi, &nlevels);
+ write_xpm3(out,
+ 0,
+ "Covariance",
+ bM ? "u nm^2" : "nm^2",
+ "dim",
+ "dim",
+ ndim,
+ ndim,
+ axis,
+ axis,
+ mat2,
+ min,
+ 0.0,
+ max,
+ rlo,
+ rmi,
+ rhi,
+ &nlevels);
gmx_ffclose(out);
sfree(axis);
sfree(mat2);
rhi.b = 0;
out = gmx_ffopen(xpmafile, "w");
nlevels = 80;
- write_xpm3(out, 0, "Covariance", bM ? "u nm^2" : "nm^2", "atom", "atom", ndim / DIM,
- ndim / DIM, axis, axis, mat2, min, 0.0, max, rlo, rmi, rhi, &nlevels);
+ write_xpm3(out,
+ 0,
+ "Covariance",
+ bM ? "u nm^2" : "nm^2",
+ "atom",
+ "atom",
+ ndim / DIM,
+ ndim / DIM,
+ axis,
+ axis,
+ mat2,
+ min,
+ 0.0,
+ max,
+ rlo,
+ rmi,
+ rhi,
+ &nlevels);
gmx_ffclose(out);
sfree(axis);
for (i = 0; i < ndim / DIM; i++)
if (nframes - 1 < ndim)
{
end = nframes - 1;
- fprintf(stderr,
- "\nWARNING: there are fewer frames in your trajectory than there are\n");
+ fprintf(stderr, "\nWARNING: there are fewer frames in your trajectory than there are\n");
fprintf(stderr, "degrees of freedom in your system. Only generating the first\n");
fprintf(stderr, "%d out of %d eigenvectors and eigenvalues.\n", end, static_cast<int>(ndim));
}
WriteXref = eWXR_NOFIT;
}
- write_eigenvectors(eigvecfile, natoms, mat, TRUE, 1, end, WriteXref, x, bDiffMass1, xproj, bM,
- eigenvalues);
+ write_eigenvectors(
+ eigvecfile, natoms, mat, TRUE, 1, end, WriteXref, x, bDiffMass1, xproj, bM, eigenvalues);
out = gmx_ffopen(logfile, "w");
fprintf(out, "Working directory: %s\n\n", str);
- fprintf(out, "Read %d frames from %s (time %g to %g %s)\n", nframes, trxfile,
- output_env_conv_time(oenv, tstart), output_env_conv_time(oenv, tend),
+ fprintf(out,
+ "Read %d frames from %s (time %g to %g %s)\n",
+ nframes,
+ trxfile,
+ output_env_conv_time(oenv, tstart),
+ output_env_conv_time(oenv, tend),
output_env_get_time_unit(oenv).c_str());
if (bFit)
{
{
fprintf(out, "Fit is %smass weighted\n", bDiffMass1 ? "" : "non-");
}
- fprintf(out, "Diagonalized the %dx%d covariance matrix\n", static_cast<int>(ndim),
- static_cast<int>(ndim));
+ fprintf(out, "Diagonalized the %dx%d covariance matrix\n", static_cast<int>(ndim), static_cast<int>(ndim));
fprintf(out, "Trace of the covariance matrix before diagonalizing: %g\n", trace);
fprintf(out, "Trace of the covariance matrix after diagonalizing: %g\n\n", sum);