From 26d71b66e413dfb58635597835cc0fe047510e01 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 12:41:48 -0400 Subject: [PATCH 1/2] convert bigint values for bonds/angles/dihedrals/impropers to doubles when evaluating those keywords in variable expressions --- src/thermo.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/thermo.cpp b/src/thermo.cpp index dbbeff4998..fa18b7de78 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -1145,6 +1145,22 @@ int Thermo::evaluate_keyword(char *word, double *answer) compute_atoms(); dvalue = bivalue; + } else if (strcmp(word,"bonds") == 0) { + compute_bonds(); + dvalue = bivalue; + + } else if (strcmp(word,"angles") == 0) { + compute_angles(); + dvalue = bivalue; + + } else if (strcmp(word,"dihedrals") == 0) { + compute_dihedrals(); + dvalue = bivalue; + + } else if (strcmp(word,"impropers") == 0) { + compute_impropers(); + dvalue = bivalue; + } else if (strcmp(word,"temp") == 0) { if (!temperature) error->all(FLERR,"Thermo keyword in variable requires " From 34dbf6b225acc97b1dd8a14d803d432873fd3b05 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 12:45:43 -0400 Subject: [PATCH 2/2] do not compute properties twice --- src/thermo.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/thermo.cpp b/src/thermo.cpp index fa18b7de78..18deecb1a8 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -1385,11 +1385,6 @@ int Thermo::evaluate_keyword(char *word, double *answer) else if (strcmp(word,"ylat") == 0) compute_ylat(); else if (strcmp(word,"zlat") == 0) compute_zlat(); - else if (strcmp(word,"bonds") == 0) compute_bonds(); - else if (strcmp(word,"angles") == 0) compute_angles(); - else if (strcmp(word,"dihedrals") == 0) compute_dihedrals(); - else if (strcmp(word,"impropers") == 0) compute_impropers(); - else if (strcmp(word,"pxx") == 0) { if (!pressure) error->all(FLERR,"Thermo keyword in variable requires "