From: Mark Abraham Date: Tue, 26 Oct 2021 03:01:07 +0000 (+0200) Subject: Minor improvements to gmx wham output X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=b1e716b7d7076d6e3dad7c783ad97e63e8a7c64a Minor improvements to gmx wham output --- diff --git a/docs/release-notes/2022/major/tools.rst b/docs/release-notes/2022/major/tools.rst index 5613d2f5bd..b1612a9822 100644 --- a/docs/release-notes/2022/major/tools.rst +++ b/docs/release-notes/2022/major/tools.rst @@ -38,3 +38,9 @@ different results when performing MSD calculations on a non-homogenous group of The need to add the names of custom residues to ``residuetypes.dat`` has been removed, because it served no purpose. This makes ``gmx chi`` easier to use. + +``gmx wham`` has had minor improvements to its text output +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Reporting about file handling and input-file column contents are easier to +follow. diff --git a/src/gromacs/gmxana/gmx_wham.cpp b/src/gromacs/gmxana/gmx_wham.cpp index 5da2b4d1d7..5dcf6442cd 100644 --- a/src/gromacs/gmxana/gmx_wham.cpp +++ b/src/gromacs/gmxana/gmx_wham.cpp @@ -1811,16 +1811,43 @@ static void read_pull_xf(const char* fn, } if (bFirst || opt->verbose) { + // Note the comment above about the pull file column format! printf("\nReading pull %s file %s, expecting %d columns:\n", quantity, fn, nColExpect); + printf("\tColumn for time: 1\n"); + int nextColumn = 2; for (i = 0; i < header->npullcrds; i++) { - printf("\tColumns for pull coordinate %d\n", i + 1); - printf("\t\treaction coordinate: %d\n" - "\t\tcenter-of-mass of groups: %d\n" - "\t\treference position column: %s\n", - 1, - nColCOMCrd[i], - (header->bPrintRefValue ? "Yes" : "No")); + printf("\tColumn(s) with data for pull coordinate %d are\n", i + 1); + if (nColCOMCrd[i] > 0) + { + const int firstColumnForCOM = nextColumn; + const int lastColumnForCOM = firstColumnForCOM + nColCOMCrd[i] - 1; + const int columnForThisCoordinate = lastColumnForCOM + 1; + printf("\t\treaction coordinate: %d\n" + "\t\tcenter-of-mass of groups: %d through %d\n", + columnForThisCoordinate, + firstColumnForCOM, + lastColumnForCOM); + nextColumn = columnForThisCoordinate + 1; + } + else + { + const int columnForThisCoordinate = nextColumn; + printf("\t\treaction coordinate: %d\n" + "\t\tcenter-of-mass of groups: No\n", + columnForThisCoordinate); + ++nextColumn; + } + if (header->bPrintRefValue) + { + const int columnForRefValue = nextColumn; + printf("\t\treference position column: %d\n", columnForRefValue); + ++nextColumn; + } + else + { + printf("\t\treference position column: No\n"); + } } printf("\tFound %d times in %s\n", nt, fn); bFirst = FALSE; @@ -2084,7 +2111,7 @@ static void read_tpr_pullxf_files(char** fnTprs, int i; real mintmp, maxtmp; - printf("Reading %d tpr and pullf files\n", nfiles); + printf("Reading %d tpr and pullx/pullf files\n", nfiles); /* min and max not given? */ if (opt->bAuto)