Skip to content

Commit

Permalink
EVERYTHING ELSE from cat branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rwest committed Jan 25, 2019
1 parent dac978b commit 030761c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions rmgpy/molecule/adjlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import logging
import warnings
import re
import numpy as np
from .molecule import Atom, Bond, getAtomType
from .group import GroupAtom, GroupBond
from .element import getElement, PeriodicSystem
Expand Down
2 changes: 1 addition & 1 deletion rmgpy/molecule/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ def pickWildcards(self):
atom2.bonds[atom1].order = bond12.order
continue

atom1Bonds = atom1.countBonds()
atom1Bonds = atom1.countBonds() # countBonds list must match getFeatures list
atom2Bonds = atom2.countBonds()
requiredFeatures1 = [atom1Features[x][0] - atom1Bonds[x] if atom1Features[x] else 0 for x in range(len(atom1Bonds))]
requiredFeatures2 = [atom2Features[x][0] - atom2Bonds[x] if atom2Features[x] else 0 for x in range(len(atom2Bonds))]
Expand Down
6 changes: 4 additions & 2 deletions rmgpy/rmg/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ def loadDatabase(self):
#check libraries
self.checkLibraries()

if self.bindingEnergies:
self.database.thermo.setDeltaAtomicAdsorptionEnergies(self.bindingEnergies)

#set global variable solvent
if self.solvent:
global solvent
Expand Down Expand Up @@ -937,12 +940,11 @@ def execute(self, **kwargs):
self.generateCanteraFiles(os.path.join(self.outputDirectory, 'chemkin', 'chem.inp'))
self.generateCanteraFiles(os.path.join(self.outputDirectory, 'chemkin', 'chem_annotated.inp'))
except EnvironmentError:
logging.error('Could not generate Cantera files due to EnvironmentError. Check read\write privileges in output directory.')
logging.exception('Could not generate Cantera files due to EnvironmentError. Check read\write privileges in output directory.')
except Exception:
logging.exception('Could not generate Cantera files for some reason.')

self.check_model()

# Write output file
logging.info('')
logging.info('MODEL GENERATION COMPLETED')
Expand Down
1 change: 1 addition & 0 deletions rmgpy/solver/base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ cdef class ReactionSystem(DASx):

if conditions:
isConc = hasattr(self,'initialConcentrations')
# ToDo: I think this block is incompatible with surface.pyx catalyst reactors
keys = conditions.keys()
if 'T' in keys and hasattr(self,'T'):
self.T = Quantity(conditions['T'],'K')
Expand Down

0 comments on commit 030761c

Please sign in to comment.