From 98cc94bbefca1c57140dd2677e63213e451b51ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ad=C3=A1n?= <61991561+DarkAdin@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:57:39 +0200 Subject: [PATCH 1/2] Add files via upload --- src/main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 9c645c6..ede50b2 100644 --- a/src/main.c +++ b/src/main.c @@ -27,7 +27,11 @@ #define MAX(a,b) (((a)>(b))?(a):(b)) /* - * Rev 5 - February 2021 + * Patch 1 - April 2026 + * - Added a header to the _res output file with the residue number for + * better parsing + * + * Rev 5 - February 2021 * - Fixed bugs in PDB atom typing and protein typing based on dictionary * - Fixed bugs in PDB procesing (multichain systems) * - Major code refactoring @@ -673,6 +677,11 @@ main (argc, argv) fflush (stderr); } + for (j = 0; j < nres; j++) { + fprintf(f_res_step, "RES%d_Vdw;RES%d_qq;RES%d_ISM;", j+1,j+1,j+1); // Patch 1 + } + fprintf (f_res_step, "\n"); + for (i = sframe; i < eframe; i = i + iframe) { if (verbose_flag) @@ -872,6 +881,7 @@ main (argc, argv) /* Split desolvation by residue using MMres/MMall ratio */ /* and do the averages also */ + for (j = 0; j < nres; j++) { res_energies_details[j][2] += From 6a5d5d6170b173611538b676dd347435d17b33f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ad=C3=A1n?= <61991561+DarkAdin@users.noreply.github.com> Date: Tue, 28 Apr 2026 12:03:10 +0200 Subject: [PATCH 2/2] Add files via upload --- src/main.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index ede50b2..e07eaba 100644 --- a/src/main.c +++ b/src/main.c @@ -29,7 +29,9 @@ /* * Patch 1 - April 2026 * - Added a header to the _res output file with the residue number for - * better parsing + * better parsing. + * - Also include the total energy (sum of all energies) in that file + * for a direct and easy comparison of per-residue total energies. * * Rev 5 - February 2021 * - Fixed bugs in PDB atom typing and protein typing based on dictionary @@ -678,7 +680,7 @@ main (argc, argv) } for (j = 0; j < nres; j++) { - fprintf(f_res_step, "RES%d_Vdw;RES%d_qq;RES%d_ISM;", j+1,j+1,j+1); // Patch 1 + fprintf(f_res_step, "RES%d_Vdw;RES%d_qq;RES%d_ISM;RES%d_Total;", j+1,j+1,j+1,j+1); // Patch 1 } fprintf (f_res_step, "\n"); @@ -894,8 +896,12 @@ main (argc, argv) res_averages[j][1] += res_energies_details[j][0]; res_averages[j][2] += res_energies_details[j][1]; res_averages[j][3] += res_energies_details[j][2]; - fprintf (f_res_step, "%f;%f;%f;", res_energies_details[j][0], - res_energies_details[j][1], res_energies_details[j][2]); + fprintf ( + f_res_step, "%f;%f;%f;%f;", // Patch 1 + res_energies_details[j][0], res_energies_details[j][1], res_energies_details[j][2], + // Now include total energy + res_energies_details[j][0]+res_energies_details[j][1]+res_energies_details[j][2] + ); res_energies_details[j][0] = 0.0f; res_energies_details[j][1] = 0.0f; res_energies_details[j][2] = 0.0f;