Fix QM/MM memory allocation error
[namd.git] / 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);
     }