Skip to content

Commit

Permalink
N scaling is a go... like 90 percent sure
Browse files Browse the repository at this point in the history
  • Loading branch information
mazeau committed Apr 2, 2019
1 parent 1e71dba commit f6354b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
17 changes: 10 additions & 7 deletions rmgpy/data/thermo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,19 +1272,19 @@ def setDeltaAtomicAdsorptionEnergies(self, bindingEnergies):
# this depends on the two metal surfaces, the reference one
# used in the database of adsorption energies, and the desired surface
# These are the reference ones, Ni(111), from Blaylock's supplementary material
deltaAtomicAdosrptionEnergy = {
'C': rmgpy.quantity.Energy(-5.997, 'eV/molecule'),
'H': rmgpy.quantity.Energy(-2.778, 'eV/molecule'),
'O': rmgpy.quantity.Energy(-4.485, 'eV/molecule')
}
# deltaAtomicAdosrptionEnergy = {
# 'C': rmgpy.quantity.Energy(-5.997, 'eV/molecule'),
# 'H': rmgpy.quantity.Energy(-2.778, 'eV/molecule'),
# 'O': rmgpy.quantity.Energy(-4.485, 'eV/molecule')
# }
# These are for Pt, from Katrin
deltaAtomicAdosrptionEnergy = {
'C': rmgpy.quantity.Energy(-6.750, 'eV/molecule'),
'H': rmgpy.quantity.Energy(-2.479, 'eV/molecule'),
'O': rmgpy.quantity.Energy(-3.586, 'eV/molecule'),
'N': rmgpy.quantity.Energy(-4.352, 'eV/molecule'),
}
for element in 'CHO':
for element in 'CHON':
deltaAtomicAdosrptionEnergy[element].value_si = bindingEnergies[element].value_si - deltaAtomicAdosrptionEnergy[element].value_si
self.deltaAtomicAdsorptionEnergy = deltaAtomicAdosrptionEnergy

Expand Down Expand Up @@ -1332,7 +1332,7 @@ def correctBindingEnergy(self, thermo, species):
findCp0andCpInf(species, thermo)

## now edit the adsorptionThermo using LSR
for element in 'CHO':
for element in 'CHON':
changeInBindingEnergy = self.deltaAtomicAdsorptionEnergy[element].value_si * normalizedBonds[element]
thermo.H298.value_si += changeInBindingEnergy
thermo.comment += " Binding energy corrected by LSR."
Expand Down Expand Up @@ -1381,6 +1381,9 @@ def getThermoDataForSurfaceSpecies(self, species):
elif bond.isTriple():
bondedAtom.incrementRadical()
bondedAtom.incrementLonePairs()
elif bond.isQuadruple():
bondedAtom.incrementRadical()
bondedAtom.incrementLonePairs()

This comment has been minimized.

Copy link
@rwest

rwest Apr 17, 2019

Collaborator

Wrong number of electrons?
If you're making up for a quadruple bond, shouldn't it be either two LonePairs or a LonePair and two Radicals? or some combination that gives four?

This comment has been minimized.

Copy link
@mazeau

mazeau Apr 17, 2019

Author Owner

I don't remember why or when I added this in, but that makes sense. I think it was when I was going around and adding in quadruples to everything and I missed this one in a commit

This comment has been minimized.

Copy link
@mazeau

mazeau Apr 17, 2019

Author Owner

fixed in branch cat-label

else:
raise NotImplementedError("Can't remove surface bond of type {}".format(bond.order))

Expand Down
11 changes: 6 additions & 5 deletions rmgpy/rmg/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,15 @@ def convertBindingEnergies(bindingEnergies):
:return: the processed and checked dictionary
"""
if bindingEnergies is None:
bindingEnergies = { # default values for Ni(111)
'C':(-5.997, 'eV/molecule'),
'H':(-2.778, 'eV/molecule'),
'O':(-4.485, 'eV/molecule'),
bindingEnergies = { # default values for Pt(111)
'C':(-6.750, 'eV/molecule'),
'H':(-2.479, 'eV/molecule'),
'O':(-3.586, 'eV/molecule'),
'N':(-4.352, 'eV/molecule'),
}
if not isinstance(bindingEnergies, dict): raise InputError("bindingEnergies should be None (for default) or a dict.")
newDict = {}
for element in 'CHO':
for element in 'CHON':
try:
newDict[element] = Energy(bindingEnergies[element])
except KeyError:
Expand Down

0 comments on commit f6354b0

Please sign in to comment.