Fix QM/MM memory allocation error 00/4400/1
authorDavid <dhardy@ks.uiuc.edu>
Thu, 26 Jul 2018 19:09:04 +0000 (14:09 -0500)
committerDavid <dhardy@ks.uiuc.edu>
Thu, 26 Jul 2018 19:09:04 +0000 (14:09 -0500)
Bug is due to uninitialized variable qmcSMD.  Fix is to initialize it in
prepare_qm() setup function.

Change-Id: I6da432b431b6f331227c11023499b9efbbb74756

src/MoleculeQM.C

index a00ee2b..621b23b 100644 (file)
@@ -1463,9 +1463,9 @@ charges can be defined through QMCharge or QMChargeFromPSF keywords.\n" << endi;
         }
     } 
     
-    
-    if (simParams->qmCSMD) {
-        qmcSMD = simParams->qmCSMD;
+    // Conditional SMD option
+    qmcSMD = simParams->qmCSMD;
+    if (qmcSMD) {
         read_qm_csdm_file(qmGrpIDMap);
     }