Skip to content

Commit 76d34b7

Browse files
committed
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.
1 parent 16ea910 commit 76d34b7

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

rmgpy/data/thermo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,8 @@ def estimateRadicalThermoViaHBI(self, molecule, stableThermoEstimator ):
819819
saturatedStruct.updateConnectivityValues()
820820
saturatedStruct.sortVertices()
821821
saturatedStruct.updateAtomTypes()
822+
saturatedStruct.updateLonePairs()
823+
saturatedStruct.multiplicity = saturatedStruct.getRadicalCount() + 1
822824

823825
# Get thermo estimate for saturated form of structure
824826
thermoData = stableThermoEstimator(saturatedStruct)

rmgpy/rmg/model.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ def generateThermoData(self, database, thermoClass=NASA, quantumMechanics=None):
129129
thermo = []
130130
for molecule in self.molecule:
131131
molecule.clearLabeledAtoms()
132-
molecule.updateAtomTypes()
133132
tdata = database.thermo.estimateRadicalThermoViaHBI(molecule, quantumMechanics.getThermoData)
134133
if tdata is not None:
135134
thermo.append(tdata)

0 commit comments

Comments
 (0)