Project

General

Profile

Bug #76

-nmol option in g_energy does not work all the time

Added by Paul van over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
High
Category:
analysis tools
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

The -nmol option in g_energy does not work all the time. The problem is related
to the spaces that are substituted with dashes in the names that are read from
the energy file (.edr). The following patch solves the problem for my special
case, but is not a general solution for the problem:

--- gmx_energy.c 2006-05-05 18:47:43.000000000 0200
+
+ gmx_energy.c- 2006-05-05 18:46:21.000000000 0200
@ -494,7 +494,14 @
Vaver= aver;
} else if (strstr(leg[i],"essure") != NULL) {
Pres = aver;
} else if (strstr(leg[i],"Disper.-corr.") != NULL) {
+ sprintf(leg[i], "Disper. corr.");
+ } else if (strstr(leg[i],"Coulomb-(SR)") != NULL) {
+ sprintf(leg[i], "Coulomb (SR)");
+ } else if (strstr(leg[i],"LJ-(SR)") != NULL) {
+ sprintf(leg[i], "LJ (SR)");
}
+
bIsEner = FALSE;
for (kkk=0; (kkk <= F_ETOT); kkk++)
bIsEner = bIsEner ||

History

#1 Updated by David van der Spoel over 13 years ago

I tried to fix this in CVS for 3.3 by rewriting the code for scanning in energy
terms. You can now use either strings or numbers (or a mix) and end the selction
with a zero or a newline or an EOF (Ctrl-D).

Also available in: Atom PDF