From 76d34b744911641e5f40eb3b2396bec92840f872 Mon Sep 17 00:00:00 2001 From: Pierre Bhoorasingh Date: Tue, 27 May 2014 12:44:38 -0400 Subject: [PATCH 1/2] Update lone pairs and multiplicity for qm calculation before HBI The saturation of the radicals assigns the default value to the lone pairs for the new hydrogen atoms (-100), and uses the multiplicity for the radical molecule for the stable. Without updating these attributes, the adjacency list has an inconsistency and returns an error. This commit should correct that issue. --- rmgpy/data/thermo.py | 2 ++ rmgpy/rmg/model.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rmgpy/data/thermo.py b/rmgpy/data/thermo.py index 30eab72911c..7dd3e627958 100644 --- a/rmgpy/data/thermo.py +++ b/rmgpy/data/thermo.py @@ -819,6 +819,8 @@ def estimateRadicalThermoViaHBI(self, molecule, stableThermoEstimator ): saturatedStruct.updateConnectivityValues() saturatedStruct.sortVertices() saturatedStruct.updateAtomTypes() + saturatedStruct.updateLonePairs() + saturatedStruct.multiplicity = saturatedStruct.getRadicalCount() + 1 # Get thermo estimate for saturated form of structure thermoData = stableThermoEstimator(saturatedStruct) diff --git a/rmgpy/rmg/model.py b/rmgpy/rmg/model.py index 60ec90ec58f..5edadde53d1 100644 --- a/rmgpy/rmg/model.py +++ b/rmgpy/rmg/model.py @@ -129,7 +129,6 @@ def generateThermoData(self, database, thermoClass=NASA, quantumMechanics=None): thermo = [] for molecule in self.molecule: molecule.clearLabeledAtoms() - molecule.updateAtomTypes() tdata = database.thermo.estimateRadicalThermoViaHBI(molecule, quantumMechanics.getThermoData) if tdata is not None: thermo.append(tdata) From ba319ef030e7659422546f2ff3819197c571847a Mon Sep 17 00:00:00 2001 From: Pierre Bhoorasingh Date: Tue, 27 May 2014 12:51:25 -0400 Subject: [PATCH 2/2] Update lone pairs and multiplicity for solvation corrections Lone pairs and multiplicity taken from the radical, but the saturation of the radicals should change these properties. This should correct that issue. --- rmgpy/data/solvation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rmgpy/data/solvation.py b/rmgpy/data/solvation.py index 8dcdaab8de2..ea92a3c026a 100644 --- a/rmgpy/data/solvation.py +++ b/rmgpy/data/solvation.py @@ -643,6 +643,8 @@ def estimateSoluteViaGroupAdditivity(self, molecule): saturatedStruct.updateConnectivityValues() saturatedStruct.sortVertices() saturatedStruct.updateAtomTypes() + saturatedStruct.updateLonePairs() + saturatedStruct.multiplicity = saturatedStruct.getRadicalCount() + 1 # Get solute descriptor estimates for saturated form of structure soluteData = self.estimateSoluteViaGroupAdditivity(saturatedStruct)