diff --git a/beef-uq/reaction_families/Surface_Abstraction/rules_reference.py b/beef-uq/reaction_families/Surface_Abstraction/rules_reference.py deleted file mode 100644 index 80decc19b..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction/rules_reference.py +++ /dev/null @@ -1,233 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Abstraction/rules" -shortDesc = u"" -longDesc = u""" -""" -entry( - index = 1, - label = "Abstracting;Donating", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha = 0.84, - E0 = (44.25, 'kcal/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the general BEP are from the abstraction reaction of C-H to C. -BEP values from "Quantifying the Impact of Parametric Uncertainty on Automatic Mechanism Generation for CO2 Hydrogenation on Ni(111)", Kreitz et al., JACS Au, 2021, 1, 10, 1656-1673 DOI:10.1021/jacsau.1c00276 -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """, -) - -entry( - index = 1, - label = "Abstracting;*R-H", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha = 0.37, - E0 = (99.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Made up""", - longDesc = u""" -These numbers for the general BEP are from the abstraction reaction of C-H to C. -BEP values from "Quantifying the Impact of Parametric Uncertainty on Automatic Mechanism Generation for CO2 Hydrogenation on Ni(111)", Kreitz et al., JACS Au, 2021, 1, 10, 1656-1673 DOI:10.1021/jacsau.1c00276 -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 3, - label = "O;*C-H", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha = 0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the BEP are from the abstraction reaction of C-H to O. -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706, DOI:10.1021/jp312593u -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 4, - label = "O;*OH", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha = 0.65, - E0 = (15.4, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the BEP are from the abstraction reaction of O-H to O. -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706, DOI:10.1021/jp312593u -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 5, - label = "C;*C-H", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.37, - E0 = (99.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the general BEP are from the abstraction reaction of C-H to C. -BEP values from "Quantifying the Impact of Parametric Uncertainty on Automatic Mechanism Generation for CO2 Hydrogenation on Ni(111)", Kreitz et al., JACS Au, 2021, 1, 10, 1656-1673 DOI:10.1021/jacsau.1c00276 -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 6, - label = "O;*=CH-H", - kinetics = SurfaceArrheniusBEP( - A = (2.09e17, 'm^2/(mol*s)'), - n = 0, - alpha = 0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the BEP are from the abstraction reaction of C-H to O. -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706, DOI:10.1021/jp312593u -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -Divided by 2 because of reaction path degeneracy for CH2 (2 equivalent H atoms) - """ -) - -entry( - index = 7, - label = "O;*-CH-H", - kinetics = SurfaceArrheniusBEP( - A = (2.09e17, 'm^2/(mol*s)'), - n = 0, - alpha = 0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the BEP are from the abstraction reaction of C-H to O. -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706, DOI:10.1021/jp312593u -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -Divided by 2 because of reaction path degeneracy for CH2 (2 equivalent H atoms) - """ -) - -entry( - index = 8, - label = "C;*-CH-H", - kinetics = SurfaceArrheniusBEP( - A = (2.09e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.37, - E0 = (99.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the general BEP are from the abstraction reaction of C-H to C. -BEP values from "Quantifying the Impact of Parametric Uncertainty on Automatic Mechanism Generation for CO2 Hydrogenation on Ni(111)", Kreitz et al., JACS Au, 2021, 1, 10, 1656-1673 DOI:10.1021/jacsau.1c00276 -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -Divided by 2 because of reaction path degeneracy for CH2 (2 equivalent H atoms) -""" -) - -entry( - index = 9, - label = "C;*=CH-H", - kinetics = SurfaceArrheniusBEP( - A = (2.09e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.37, - E0 = (99.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the general BEP are from the abstraction reaction of C-H to C. -BEP values from "Quantifying the Impact of Parametric Uncertainty on Automatic Mechanism Generation for CO2 Hydrogenation on Ni(111)", Kreitz et al., JACS Au, 2021, 1, 10, 1656-1673 DOI:10.1021/jacsau.1c00276 -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -Divided by 2 because of reaction path degeneracy for CH2 (2 equivalent H atoms) - """ -) - - -entry( - index = 10, - label = "C;*-CH2-H", - kinetics = SurfaceArrheniusBEP( - A = (1.393e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.37, - E0 = (99.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the general BEP are from the abstraction reaction of C-H to C. -BEP values from "Quantifying the Impact of Parametric Uncertainty on Automatic Mechanism Generation for CO2 Hydrogenation on Ni(111)", Kreitz et al., JACS Au, 2021, 1, 10, 1656-1673 DOI:10.1021/jacsau.1c00276 -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -Divided by 3 because of reaction path degeneracy for CH3 (3 equivalent H atoms) - """ -) - -entry( - index = 11, - label = "O;*-CH2-H", - kinetics = SurfaceArrheniusBEP( - A = (1.393e17, 'm^2/(mol*s)'), - n = 0, - alpha = 0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the BEP are from the abstraction reaction of C-H to O. -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706, DOI:10.1021/jp312593u -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -Divided by 3 because of reaction path degeneracy for CH3 (3 equivalent H atoms) - """ -) diff --git a/beef-uq/reaction_families/Surface_Abstraction/script.sh b/beef-uq/reaction_families/Surface_Abstraction/script.sh deleted file mode 100644 index 7646b0319..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Abstraction -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Abstraction/uq.py b/beef-uq/reaction_families/Surface_Abstraction/uq.py deleted file mode 100755 index b67e325eb..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction/uq.py +++ /dev/null @@ -1,481 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref= 0.84 -alpha_2_ref= 0.37 -alpha_3_ref= 0.94 -alpha_4_ref= 0.65 -alpha_5_ref= 0.37 -alpha_6_ref= 0.94 -alpha_7_ref= 0.94 -alpha_8_ref= 0.37 -alpha_9_ref= 0.37 -alpha_10_ref= 0.37 -alpha_11_ref= 0.94 - -E0_1_ref=185.1 -E0_2_ref=99.3 -E0_3_ref=129.3 -E0_4_ref=15.4 -E0_5_ref=99.3 -E0_6_ref=129.3 -E0_7_ref=129.3 -E0_8_ref=99.3 -E0_9_ref=99.3 -E0_10_ref=99.3 -E0_11_ref=129.3 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,0] -E0_1=E0_1_ref+Delta_E0[:,1] -alpha_2=alpha_2_ref+Delta_alpha[:,0] -E0_2=E0_2_ref+Delta_E0[:,1] -alpha_3=alpha_3_ref+Delta_alpha[:,2] -E0_3=E0_3_ref+Delta_E0[:,3] -alpha_4=alpha_4_ref+Delta_alpha[:,4] -E0_4=E0_4_ref+Delta_E0[:,5] -alpha_5=alpha_5_ref+Delta_alpha[:,0] -E0_5=E0_5_ref+Delta_E0[:,1] -alpha_6=alpha_6_ref+Delta_alpha[:,2] -E0_6=E0_6_ref+Delta_E0[:,3] -alpha_7=alpha_7_ref+Delta_alpha[:,2] -E0_7=E0_7_ref+Delta_E0[:,3] -alpha_8=alpha_8_ref+Delta_alpha[:,0] -E0_8=E0_8_ref+Delta_E0[:,1] -alpha_9=alpha_9_ref+Delta_alpha[:,0] -E0_9=E0_9_ref+Delta_E0[:,1] -alpha_10=alpha_10_ref+Delta_alpha[:,0] -E0_10=E0_10_ref+Delta_E0[:,1] -alpha_11=alpha_11_ref+Delta_alpha[:,2] -E0_11=E0_11_ref+Delta_E0[:,3] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_2[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_2[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_3[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_3[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_4[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_4[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_5[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_5[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 6" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 6" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_6[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_6[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 7" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 7" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_7[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_7[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 8" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 8" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_8[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_8[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 9" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 9" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_9[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_9[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 10" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 10" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_10[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_10[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 11" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 11" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_11[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_11[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() diff --git a/beef-uq/reaction_families/Surface_Abstraction_Beta/rules_references.py b/beef-uq/reaction_families/Surface_Abstraction_Beta/rules_references.py deleted file mode 100644 index afe7db074..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction_Beta/rules_references.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Abstraction_Beta_vdW/rules" -shortDesc = u"" -longDesc = u""" -""" - -entry( - index = 1, - label = "Abstracting;Donating", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the general BEP are from the abstraction reaction of C-H to O. -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706, DOI:10.1021/jp312593u -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 2, - label = "O;R-C-H", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706, DOI:10.1021/jp312593u -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 3, - label = "O;R-O-H", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.65, - E0 = (15.4, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706, DOI:10.1021/jp312593u -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 4, - label = "O;R-CH3", - kinetics = SurfaceArrheniusBEP( - A = (1.393e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706, DOI:10.1021/jp312593u -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 3 because of reaction path degeneracy for CH3 (3 equivalent H atoms) -""" -) - -entry( - index = 5, - label = "Abstracting;R-CH3", - kinetics = SurfaceArrheniusBEP( - A = (1.393e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -These numbers for the general BEP are from the abstraction reaction of C-H to O. -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706, DOI:10.1021/jp312593u -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 3 because of reaction path degeneracy for CH3 (3 equivalent H atoms) -""" -) diff --git a/beef-uq/reaction_families/Surface_Abstraction_Beta/script.sh b/beef-uq/reaction_families/Surface_Abstraction_Beta/script.sh deleted file mode 100644 index da6b78e8f..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction_Beta/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Abstraction_Beta -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Abstraction_Beta/uq.py b/beef-uq/reaction_families/Surface_Abstraction_Beta/uq.py deleted file mode 100755 index 890fa9b90..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction_Beta/uq.py +++ /dev/null @@ -1,229 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction beta - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref= 0.94 -alpha_2_ref= 0.94 -alpha_3_ref= 0.65 -alpha_4_ref= 0.94 -alpha_5_ref= 0.94 - -E0_1_ref=129.3 -E0_2_ref=129.3 -E0_3_ref=15.4 -E0_4_ref=129.3 -E0_5_ref=129.3 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,6] -E0_1=E0_1_ref+Delta_E0[:,7] -alpha_2=alpha_2_ref+Delta_alpha[:,6] -E0_2=E0_2_ref+Delta_E0[:,7] -alpha_3=alpha_3_ref+Delta_alpha[:,8] -E0_3=E0_3_ref+Delta_E0[:,9] -alpha_4=alpha_4_ref+Delta_alpha[:,6] -E0_4=E0_4_ref+Delta_E0[:,7] -alpha_5=alpha_5_ref+Delta_alpha[:,6] -E0_5=E0_5_ref+Delta_E0[:,7] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_2[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_2[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_3[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_3[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_4[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_4[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_5[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_5[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() diff --git a/beef-uq/reaction_families/Surface_Abstraction_Beta_double_vdW/rules_reference.py b/beef-uq/reaction_families/Surface_Abstraction_Beta_double_vdW/rules_reference.py deleted file mode 100644 index 169455275..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction_Beta_double_vdW/rules_reference.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Abstraction_Beta_double_vdW/rules" -shortDesc = u"" -longDesc = u""" -""" - -entry( - index = 1, - label = "Abstracting;Donating", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.68, - E0 = (106.1, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from: -"Universal Brønsted-Evans-Polanyi Relations for C–C, C–O, C–N, N–O, N–N, and O–O Dissociation Reactions" by Wang, ..., Norskov/ Catal. Lett (2011) 141:370-373, DOI: 10.1007/s10562-010-0477-y -(actual value for E0 was 1.92 eV.) -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 2, - label = "OH;R-C-H", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.68, - E0 = (106.1, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706 -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 3, - label = "OH;R-O-H", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.02, - E0 = (1.9, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706 -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 4, - label = "Abstracting;R-CH3", - kinetics = SurfaceArrheniusBEP( - A = (1.393e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.68, - E0 = (106.1, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706 -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -Divided by 3 because of reaction path degeneracy for CH3 (3 equivalent H atoms) -""" -) - -entry( - index = 5, - label = "OH;R-CH3", - kinetics = SurfaceArrheniusBEP( - A = (1.393e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.68, - E0 = (106.1, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706 -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -Divided by 3 because of reaction path degeneracy for CH3 (3 equivalent H atoms) -""" -) diff --git a/beef-uq/reaction_families/Surface_Abstraction_Beta_double_vdW/script.sh b/beef-uq/reaction_families/Surface_Abstraction_Beta_double_vdW/script.sh deleted file mode 100644 index a5ec1ddc9..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction_Beta_double_vdW/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Abstraction_Beta_double_vdW -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Abstraction_Beta_double_vdW/uq.py b/beef-uq/reaction_families/Surface_Abstraction_Beta_double_vdW/uq.py deleted file mode 100755 index 7412dab01..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction_Beta_double_vdW/uq.py +++ /dev/null @@ -1,241 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction beta - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref=0.68 -alpha_2_ref= 0.68 -alpha_3_ref= 0.02 -alpha_4_ref= 0.68 -alpha_5_ref= 0.68 - -E0_1_ref=106.1 -E0_2_ref=106.1 -E0_3_ref=1.9 -E0_4_ref=106.1 -E0_5_ref=106.1 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,10] -E0_1=E0_1_ref+Delta_E0[:,11] -alpha_2=alpha_2_ref+Delta_alpha[:,10] -E0_2=E0_2_ref+Delta_E0[:,11] -alpha_3=alpha_3_ref+Delta_alpha[:,12] -E0_3=E0_3_ref+Delta_E0[:,13] -for i in range(num_pts): - if E0_3[i]<0: - E0_3[i]=0 - else: - E0_3[i]=E0_3[i] - -for i in range(num_pts): - if alpha_3[i]<0: - alpha_3[i]=0 - else: - alpha_3[i]=alpha_3[i] - -alpha_4=alpha_4_ref+Delta_alpha[:,10] -E0_4=E0_4_ref+Delta_E0[:,11] -alpha_5=alpha_5_ref+Delta_alpha[:,10] -E0_5=E0_5_ref+Delta_E0[:,11] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_2[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_2[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_3[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_3[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_4[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_4[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_5[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_5[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() diff --git a/beef-uq/reaction_families/Surface_Abstraction_Beta_vdW/rules_reference.py b/beef-uq/reaction_families/Surface_Abstraction_Beta_vdW/rules_reference.py deleted file mode 100755 index a531f157e..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction_Beta_vdW/rules_reference.py +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Abstraction_Beta_vdW/rules" -shortDesc = u"" -longDesc = u""" -""" - -entry( - index = 1, - label = "Abstracting;Donating", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706 -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 2, - label = "O;R-C-H", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706 -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 3, - label = "O;R-O-H", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.65, - E0 = (15.4, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706 -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 4, - label = "Abstracting;R-CH3", - kinetics = SurfaceArrheniusBEP( - A = (1.393e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706 -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -Divided by 3 because of reaction path degeneracy for CH3 (3 equivalent H atoms) -""" -) - -entry( - index = 5, - label = "O;R-CH3", - kinetics = SurfaceArrheniusBEP( - A = (1.393e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.94, - E0 = (129.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706 -From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -Divided by 3 because of reaction path degeneracy for CH3 (3 equivalent H atoms) -""" -) diff --git a/beef-uq/reaction_families/Surface_Abstraction_Beta_vdW/script.sh b/beef-uq/reaction_families/Surface_Abstraction_Beta_vdW/script.sh deleted file mode 100644 index 7ab2b09d5..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction_Beta_vdW/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Abstraction_Beta_vdW -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Abstraction_Beta_vdW/uq.py b/beef-uq/reaction_families/Surface_Abstraction_Beta_vdW/uq.py deleted file mode 100755 index 022b48fc1..000000000 --- a/beef-uq/reaction_families/Surface_Abstraction_Beta_vdW/uq.py +++ /dev/null @@ -1,229 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction beta - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref=0.94 -alpha_2_ref= 0.94 -alpha_3_ref= 0.65 -alpha_4_ref= 0.94 -alpha_5_ref= 0.94 - -E0_1_ref=129.3 -E0_2_ref=129.3 -E0_3_ref=15.4 -E0_4_ref=129.3 -E0_5_ref=129.3 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,14] -E0_1=E0_1_ref+Delta_E0[:,15] -alpha_2=alpha_2_ref+Delta_alpha[:,14] -E0_2=E0_2_ref+Delta_E0[:,15] -alpha_3=alpha_3_ref+Delta_alpha[:,16] -E0_3=E0_3_ref+Delta_E0[:,17] -alpha_4=alpha_4_ref+Delta_alpha[:,14] -E0_4=E0_4_ref+Delta_E0[:,15] -alpha_5=alpha_5_ref+Delta_alpha[:,14] -E0_5=E0_5_ref+Delta_E0[:,15] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_2[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_2[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_3[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_3[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_4[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_4[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_5[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_5[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() diff --git a/beef-uq/reaction_families/Surface_Adsorption_Dissociative/rules_reference.py b/beef-uq/reaction_families/Surface_Adsorption_Dissociative/rules_reference.py deleted file mode 100644 index c6d907775..000000000 --- a/beef-uq/reaction_families/Surface_Adsorption_Dissociative/rules_reference.py +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Adsorption_Dissociative/rules" -shortDesc = u"" -longDesc = u""" -Dissociative adsorption of a gas-phase species forming two adsorbates, each with a single bond to a surface site -""" -entry( - index = 1, - label = "Adsorbate;VacantSite1;VacantSite2", - kinetics = StickingCoefficientBEP( - A = 0.1, - n = 0, - alpha = 0.69, - E0 = (107.9, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u"""Universal BEP relation for all metals from Wang et al. "Universal transition state scaling relations for (de)hydrogenation over transition metals", Physical chemistry chemical physics, 2011, 13, 20760-20765, DOI:10.1039/c1cp20547a.""" -) - -entry( - index = 2, - label = "H2;VacantSite1;VacantSite2", - kinetics = StickingCoefficientBEP( - A = 0.1, - n = 0, - alpha = 0, - E0 = (3.8, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 10, - shortDesc = u"""H2 dissociative adsorption""", - longDesc = u""" - Parameters are from Carvalho et al. "Microkinetic Modeling and Reduced Rate Expression of the Water–Gas Shift Reaction on Nickel", Ind. Eng. Chem. Res. 2018, 57, 31, 10269-10280, DOI:10.1021/acs.iecr.8b01957. Metal is Ni(111). - """ -) - -entry( - index = 3, - label = "CH4;VacantSite1;VacantSite2", - kinetics = StickingCoefficientBEP( - A = 1.51, - n = 0, - alpha =0.0, - E0 = (58.0, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""CH4 dissociative adsorption""", - longDesc = u""" -Data from G.W. Cushing, J.K. Navin, S.B. Donald, L. Valdez, V. Johanek, I. Harrison "C-H Bond Activation of Light Alkanes on Pt(111): Dissociative Sticking Coefficients, Evans-Polanyi Relation, and Gas-Surface Energy Transfer" J. Phys. Chem. C, 2010, 114, 17222-17232, DOI:10.1021/jp105073. -A (6.04) divided by 4 because of surface degeneracy for CH4 -""" -) - -entry( - index = 4, - label = "C2H6;VacantSite1;VacantSite2", - kinetics = StickingCoefficientBEP( - A = 0.342, - n = 0, - alpha =0.0, - E0 = (42.7, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""C2H6 dissociative adsorption""", - longDesc = u""" -Data from G.W. Cushing, J.K. Navin, S.B. Donald, L. Valdez, V. Johanek, I. Harrison "C-H Bond Activation of Light Alkanes on Pt(111): Dissociative Sticking Coefficients, Evans-Polanyi Relation, and Gas-Surface Energy Transfer" J. Phys. Chem. C, 2010, 114, 17222-17232, DOI:10.1021/jp105073. -A (2.05) divided by 6 because of surface degeneracy for C2H6 -""" -) - -entry( - index = 5, - label = "C3H8;VacantSite1;VacantSite2", - kinetics = StickingCoefficientBEP( - A = 0.198, - n = 0, - alpha =0.0, - E0 = (33.6, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""C3H8 dissociative adsorption""", - longDesc = u""" -Data from G.W. Cushing, J.K. Navin, S.B. Donald, L. Valdez, V. Johanek, I. Harrison "C-H Bond Activation of Light Alkanes on Pt(111): Dissociative Sticking Coefficients, Evans-Polanyi Relation, and Gas-Surface Energy Transfer" J. Phys. Chem. C, 2010, 114, 17222-17232, DOI:10.1021/jp105073. -A (1.19) divided by 6 because of surface degeneracy for C3H8 -""" -) - -entry( - index = 7, - label = "C-H;VacantSite1;VacantSite2", - kinetics = StickingCoefficientBEP( - A = 0.1, - n = 0, - alpha = 0.69, - E0 = (107.9, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u"""Universal BEP relation for all metals from Wang et al. "Universal transition state scaling relations for (de)hydrogenation over transition metals", Physical chemistry chemical physics, 2011, 13, 20760-20765, DOI:10.1039/c1cp20547a.""" -) - -entry( - index = 7, - label = "O-H;VacantSite1;VacantSite2", - kinetics = StickingCoefficientBEP( - A = 0.1, - n = 0, - alpha = 0.69, - E0 = (107.9, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u"""Universal BEP relation for all metals from Wang et al. "Universal transition state scaling relations for (de)hydrogenation over transition metals", Physical chemistry chemical physics, 2011, 13, 20760-20765, DOI:10.1039/c1cp20547a.""" -) - -entry( - index = 8, - label = "CH3OH;VacantSite1;VacantSite2", - kinetics = StickingCoefficientBEP( - A = 0.033, - n = 0, - alpha =0.76, - E0 = (107.1, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""CH3OH dissociative adsorption""", - longDesc = u""" -BEP relation for all metals (but only steps) from Wang et al. "Universal transition state scaling relations for (de)hydrogenation over transition metals", Physical chemistry chemical physics, 2011, 13, 20760-20765, DOI:10.1039/c1cp20547a. -Divided by 3 because of surface degeneracy for CH3OH -""" -) - -entry( - index = 9, - label = "C2H4;VacantSite1;VacantSite2", - kinetics = StickingCoefficientBEP( - A = 0.025, - n = 0, - alpha = 0.69, - E0 = (107.9, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u"""Universal BEP relation for all metals from Wang et al. "Universal transition state scaling relations for (de)hydrogenation over transition metals", Physical chemistry chemical physics, 2011, 13, 20760-20765, DOI:10.1039/c1cp20547a. -Divided by 4 because of surface degeneracy for C2H4 -""" -) - diff --git a/beef-uq/reaction_families/Surface_Adsorption_Dissociative/script.sh b/beef-uq/reaction_families/Surface_Adsorption_Dissociative/script.sh deleted file mode 100644 index 61797c930..000000000 --- a/beef-uq/reaction_families/Surface_Adsorption_Dissociative/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Adsorption_Dissociative -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Adsorption_Dissociative/uq.py b/beef-uq/reaction_families/Surface_Adsorption_Dissociative/uq.py deleted file mode 100755 index 61c561474..000000000 --- a/beef-uq/reaction_families/Surface_Adsorption_Dissociative/uq.py +++ /dev/null @@ -1,403 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref=0.69 -alpha_2_ref= 0 -alpha_3_ref= 0 -alpha_4_ref= 0 -alpha_5_ref= 0 -alpha_6_ref=0.69 -alpha_7_ref= 0.69 -alpha_8_ref= 0.76 -alpha_9_ref=0.69 - -E0_1_ref=107.9 -E0_2_ref=3.8 -E0_3_ref=58 -E0_4_ref=42.7 -E0_5_ref=33.6 -E0_6_ref=107.9 -E0_7_ref=107.9 -E0_8_ref=107.1 -E0_9_ref=107.9 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,58] -E0_1=E0_1_ref+Delta_E0[:,59] -alpha_2=alpha_2_ref -E0_2=E0_2_ref+Delta_E0[:,60] -for i in range(num_pts): - if E0_2[i]<0: - E0_2[i]=0 - else: - E0_2[i]=E0_2[i] -alpha_3=alpha_3_ref -E0_3=E0_3_ref+Delta_E0[:,61] -alpha_4=alpha_4_ref -E0_4=E0_4_ref+Delta_E0[:,61] -alpha_5=alpha_5_ref -E0_5=E0_5_ref+Delta_E0[:,61] -alpha_6=alpha_6_ref+Delta_alpha[:,58] -E0_6=E0_6_ref+Delta_E0[:,59] -alpha_7=alpha_7_ref+Delta_alpha[:,58] -E0_7=E0_7_ref+Delta_E0[:,59] -alpha_8=alpha_8_ref+Delta_alpha[:,62] -E0_8=E0_8_ref+Delta_E0[:,63] -alpha_9=alpha_9_ref+Delta_alpha[:,58] -E0_9=E0_9_ref+Delta_E0[:,59] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_2),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_2[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_3),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_3[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_4),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_4[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_5),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_5[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 6" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 6" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_6[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_6[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 7" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 7" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_7[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_7[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 8" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 8" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_8[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_8[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 9" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 9" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_9[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_9[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() diff --git a/beef-uq/reaction_families/Surface_Bidentate_Dissociation/rules_reference.py b/beef-uq/reaction_families/Surface_Bidentate_Dissociation/rules_reference.py deleted file mode 100644 index 5b05d3f53..000000000 --- a/beef-uq/reaction_families/Surface_Bidentate_Dissociation/rules_reference.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Bidentate_Dissociation/rules" -shortDesc = u"" -longDesc = u""" -""" -entry( - index = 1, - label = "Combined", - kinetics = SurfaceArrheniusBEP( - A = (1.187E12, '1/s'), - n = 0.0, - alpha = 0.842, - E0 = (34.82, 'kcal/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -A and n factors are averages of training reactions 1-3 and the reverse direction of training reactions 4-7, -and alpha and E0 are BEP parameters from training reactions 1-3 and the reverse of training reactions 4-7. -""" -) diff --git a/beef-uq/reaction_families/Surface_Bidentate_Dissociation/script.sh b/beef-uq/reaction_families/Surface_Bidentate_Dissociation/script.sh deleted file mode 100644 index b9ea009ed..000000000 --- a/beef-uq/reaction_families/Surface_Bidentate_Dissociation/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Bidentate_Dissociation -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Bidentate_Dissociation/uq.py b/beef-uq/reaction_families/Surface_Bidentate_Dissociation/uq.py deleted file mode 100755 index e79374227..000000000 --- a/beef-uq/reaction_families/Surface_Bidentate_Dissociation/uq.py +++ /dev/null @@ -1,70 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction beta - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref= 0.842 - -E0_1_ref=145.69 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,64] -E0_1=E0_1_ref+Delta_E0[:,65] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - diff --git a/beef-uq/reaction_families/Surface_Dissociation/rules_reference.py b/beef-uq/reaction_families/Surface_Dissociation/rules_reference.py deleted file mode 100644 index 7034f4ba3..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation/rules_reference.py +++ /dev/null @@ -1,224 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Dissociation/rules" -shortDesc = u"" -longDesc = u""" -""" -entry( - index = 1, - label = "Combined;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha = 0.84, - E0 = (44.25, 'kcal/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from: -"Universal Brønsted-Evans-Polanyi Relations for C–C, C–O, C–N, N–O, N–N, and O–O Dissociation Reactions" by Wang, ..., Norskov/ Catal. Lett (2011) 141:370-373, DOI: 10.1007/s10562-010-0477-y -(actual value for E0 was 1.92 eV.) -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 2, - label = "C-O;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.77, - E0 = (142.8, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 3, - label = "C-H;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - - -entry( - index = 4, - label = "O-H;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.26, - E0 = (73.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 5, - label = "C-OH;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.58, - E0 = (117.7, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 6, - label = "C-C;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.72, - E0 = (126.4, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 7, - label = "CH2;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (2.09e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 2 because of reaction path degeneracy for CH2 -""" -) - -entry( - index = 8, - label = "CH3;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (1.39e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 3 because of reaction path degeneracy for CH3 -""" -) - -entry( - index = 9, - label = "CH2R;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (2.09e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 2 because of reaction path degeneracy for X-CH2-R (Abstraction of the alpha H atom) -""" -) - -entry( - index = 10, - label = "CHR;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 2 because of reaction path degeneracy for X-CH2-R (Abstraction of the alpha H atom) -""" -) - - -entry( - index = 11, - label = "C-H_Bidentate;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (7.250e16, 'm^2/(mol*s)'), - n = 0.0, - alpha = 0.961, - E0 = (93.60, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -A and n factors are from the average rate constant of training reactions 60-63, and alpha and E0 are BEP -parameters from training reactions 60-63. The A factor has been divided by 2 here to account for the degeneracies of the training reactions. - """ -) - diff --git a/beef-uq/reaction_families/Surface_Dissociation/script.sh b/beef-uq/reaction_families/Surface_Dissociation/script.sh deleted file mode 100644 index 62a657fbb..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Dissociation -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Dissociation/uq.py b/beef-uq/reaction_families/Surface_Dissociation/uq.py deleted file mode 100755 index 0ac735044..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation/uq.py +++ /dev/null @@ -1,475 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref=0.84 -alpha_2_ref= 0.77 -alpha_3_ref= 0.57 -alpha_4_ref= 0.26 -alpha_5_ref= 0.58 -alpha_6_ref= 0.72 -alpha_7_ref= 0.57 -alpha_8_ref= 0.57 -alpha_9_ref= 0.57 -alpha_10_ref= 0.57 -alpha_11_ref= 0.961 - -E0_1_ref=185.1 -E0_2_ref=142.8 -E0_3_ref=75.3 -E0_4_ref=73.3 -E0_5_ref=117.7 -E0_6_ref=126.4 -E0_7_ref=75.3 -E0_8_ref=75.3 -E0_9_ref=75.3 -E0_10_ref=75.3 -E0_11_ref=93.60 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,18] -E0_1=E0_1_ref+Delta_E0[:,19] -alpha_2=alpha_2_ref+Delta_alpha[:,20] -E0_2=E0_2_ref+Delta_E0[:,21] -alpha_3=alpha_3_ref+Delta_alpha[:,22] -E0_3=E0_3_ref+Delta_E0[:,23] -alpha_4=alpha_4_ref+Delta_alpha[:,24] -E0_4=E0_4_ref+Delta_E0[:,25] -alpha_5=alpha_5_ref+Delta_alpha[:,26] -E0_5=E0_5_ref+Delta_E0[:,27] -alpha_6=alpha_6_ref+Delta_alpha[:,28] -E0_6=E0_6_ref+Delta_E0[:,29] -alpha_7=alpha_7_ref+Delta_alpha[:,22] -E0_7=E0_7_ref+Delta_E0[:,23] -alpha_8=alpha_8_ref+Delta_alpha[:,22] -E0_8=E0_8_ref+Delta_E0[:,23] -alpha_9=alpha_9_ref+Delta_alpha[:,22] -E0_9=E0_9_ref+Delta_E0[:,23] -alpha_10=alpha_10_ref+Delta_alpha[:,22] -E0_10=E0_10_ref+Delta_E0[:,23] -alpha_11=alpha_11_ref+Delta_alpha[:,30] -E0_11=E0_11_ref+Delta_E0[:,31] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_2[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_2[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_3[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_3[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_4[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_4[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_5[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_5[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 6" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 6" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_6[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_6[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 7" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 7" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_7[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_7[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 8" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 8" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_8[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_8[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 9" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 9" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_9[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_9[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 10" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 10" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_10[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_10[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 11" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_11[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_11[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() diff --git a/beef-uq/reaction_families/Surface_Dissociation_Beta/rules_reference.py b/beef-uq/reaction_families/Surface_Dissociation_Beta/rules_reference.py deleted file mode 100755 index 3b27eb255..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_Beta/rules_reference.py +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Dissociation_Beta/rules" -shortDesc = u"" -longDesc = u""" -""" - -entry( - index = 1, - label = "Combined;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.84, - E0 = (185.1, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from: -"Universal Brønsted-Evans-Polanyi Relations for C–C, C–O, C–N, N–O, N–N, and O–O Dissociation Reactions" by Wang, ..., Norskov/ Catal. Lett (2011) 141:370-373, DOI: 10.1007/s10562-010-0477-y -(actual value for E0 was 1.92 eV.) -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 2, - label = "C-H;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.58, - E0 = (112.9, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 6 for oxygenates for 3x3 cell size from "A Theoretical and Computational Analysis of Linear Free Energy Relations for the Estimation of Activation Energies" Jonathan E. Sutton, Dionisios G. Vlachos, ACS Catal., 2012, 2, 1624-1634, DOI:10.1021/cs3003269. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 3, - label = "O-H;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.26, - E0 = (73.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 4, - label = "CH3;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (1.393e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.58, - E0 = (112.9, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 6 for oxygenates for 3x3 cell size from "A Theoretical and Computational Analysis of Linear Free Energy Relations for the Estimation of Activation Energies" Jonathan E. Sutton, Dionisios G. Vlachos, ACS Catal., 2012, 2, 1624-1634, DOI:10.1021/cs3003269. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 3 because of reaction path degeneracy for =R-CH3 dissociation (3 equivalent H atoms) -""" -) diff --git a/beef-uq/reaction_families/Surface_Dissociation_Beta/script.sh b/beef-uq/reaction_families/Surface_Dissociation_Beta/script.sh deleted file mode 100644 index 17ec55d81..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_Beta/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Dissociation_Beta -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Dissociation_Beta/uq.py b/beef-uq/reaction_families/Surface_Dissociation_Beta/uq.py deleted file mode 100755 index f3e8f6c63..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_Beta/uq.py +++ /dev/null @@ -1,187 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction beta - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref= 0.84 -alpha_2_ref= 0.58 -alpha_3_ref= 0.26 -alpha_4_ref= 0.58 - -E0_1_ref=185.1 -E0_2_ref=112.9 -E0_3_ref=73.3 -E0_4_ref=112.9 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,32] -E0_1=E0_1_ref+Delta_E0[:,33] -alpha_2=alpha_2_ref+Delta_alpha[:,34] -E0_2=E0_2_ref+Delta_E0[:,35] -alpha_3=alpha_3_ref+Delta_alpha[:,36] -E0_3=E0_3_ref+Delta_E0[:,37] -alpha_4=alpha_4_ref+Delta_alpha[:,34] -E0_4=E0_4_ref+Delta_E0[:,35] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_2[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_2[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_3[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_3[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_4[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_4[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() diff --git a/beef-uq/reaction_families/Surface_Dissociation_Beta_vdW/rules_reference.py b/beef-uq/reaction_families/Surface_Dissociation_Beta_vdW/rules_reference.py deleted file mode 100755 index 5743c338c..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_Beta_vdW/rules_reference.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Dissociation_Beta_vdW/rules" -shortDesc = u"" -longDesc = u""" -""" - -entry( - index = 1, - label = "Combined;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.58, - E0 = (112.9, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 6 for oxygenates for 3x3 cell size from "A Theoretical and Computational Analysis of Linear Free Energy Relations for the Estimation of Activation Energies" Jonathan E. Sutton, Dionisios G. Vlachos, ACS Catal., 2012, 2, 1624-1634, DOI:10.1021/cs3003269. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 2, - label = "C-H;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.58, - E0 = (112.9, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 6 for oxygenates for 3x3 cell size from "A Theoretical and Computational Analysis of Linear Free Energy Relations for the Estimation of Activation Energies" Jonathan E. Sutton, Dionisios G. Vlachos, ACS Catal., 2012, 2, 1624-1634, DOI:10.1021/cs3003269. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 3, - label = "O-H;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.26, - E0 = (73.3, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 4, - label = "CH3;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (1.393e17, 'm^2/(mol*s)'), - n = 0., - alpha =0.58, - E0 = (112.9, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 6 for oxygenates for 3x3 cell size from "A Theoretical and Computational Analysis of Linear Free Energy Relations for the Estimation of Activation Energies" Jonathan E. Sutton, Dionisios G. Vlachos, ACS Catal., 2012, 2, 1624-1634, DOI:10.1021/cs3003269. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 3 because of reaction path degeneracy for -R-CH3 dissociation (3 equivalent H atoms) -""" -) diff --git a/beef-uq/reaction_families/Surface_Dissociation_Beta_vdW/script.sh b/beef-uq/reaction_families/Surface_Dissociation_Beta_vdW/script.sh deleted file mode 100644 index 9e578fc9f..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_Beta_vdW/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Dissociation_Beta_vdW -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Dissociation_Beta_vdW/uq.py b/beef-uq/reaction_families/Surface_Dissociation_Beta_vdW/uq.py deleted file mode 100755 index 100e06396..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_Beta_vdW/uq.py +++ /dev/null @@ -1,187 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction beta - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref= 0.58 -alpha_2_ref= 0.58 -alpha_3_ref= 0.26 -alpha_4_ref= 0.58 - -E0_1_ref=112.9 -E0_2_ref=112.9 -E0_3_ref=73.3 -E0_4_ref=112.9 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,38] -E0_1=E0_1_ref+Delta_E0[:,39] -alpha_2=alpha_2_ref+Delta_alpha[:,38] -E0_2=E0_2_ref+Delta_E0[:,39] -alpha_3=alpha_3_ref+Delta_alpha[:,40] -E0_3=E0_3_ref+Delta_E0[:,41] -alpha_4=alpha_4_ref+Delta_alpha[:,38] -E0_4=E0_4_ref+Delta_E0[:,39] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_2[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_2[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_3[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_3[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_4[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_4[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() diff --git a/beef-uq/reaction_families/Surface_Dissociation_Double/rules_reference.py b/beef-uq/reaction_families/Surface_Dissociation_Double/rules_reference.py deleted file mode 100755 index 079ceeb00..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_Double/rules_reference.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Dissociation_Double/rules" -shortDesc = u"" -longDesc = u""" -""" -entry( - index = 1, - label = "Combined;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.84, - E0 = (185.1, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from: -"Universal Brønsted-Evans-Polanyi Relations for C–C, C–O, C–N, N–O, N–N, and O–O Dissociation Reactions" by Wang, ..., Norskov/ Catal. Lett (2011) 141:370-373, DOI: 10.1007/s10562-010-0477-y -(actual value for E0 was 1.92 eV.) -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 2, - label = "C=O;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.77, - E0 = (142.8, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for Pt from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 3, - label = "C=C;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.72, - E0 = (126.4, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for Pt from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) diff --git a/beef-uq/reaction_families/Surface_Dissociation_Double/script.sh b/beef-uq/reaction_families/Surface_Dissociation_Double/script.sh deleted file mode 100644 index 02e1cc495..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_Double/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Dissociation_Double -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Dissociation_Double/uq.py b/beef-uq/reaction_families/Surface_Dissociation_Double/uq.py deleted file mode 100755 index 4779dda94..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_Double/uq.py +++ /dev/null @@ -1,145 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction beta - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref= 0.84 -alpha_2_ref= 0.77 -alpha_3_ref= 0.72 - -E0_1_ref=185.1 -E0_2_ref=142.8 -E0_3_ref=126.4 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,42] -E0_1=E0_1_ref+Delta_E0[:,43] -alpha_2=alpha_2_ref+Delta_alpha[:,44] -E0_2=E0_2_ref+Delta_E0[:,45] -alpha_3=alpha_3_ref+Delta_alpha[:,46] -E0_3=E0_3_ref+Delta_E0[:,47] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_2[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_2[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_3[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_3[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() diff --git a/beef-uq/reaction_families/Surface_Dissociation_to_Bidentate/rules_reference.py b/beef-uq/reaction_families/Surface_Dissociation_to_Bidentate/rules_reference.py deleted file mode 100644 index e07cebbf0..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_to_Bidentate/rules_reference.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Dissociation_to_Bidentate/rules" -shortDesc = u"" -longDesc = u""" -""" - -entry( - index = 1, - label = "Combined;VacantSite1;VacantSite2", - kinetics = SurfaceArrheniusBEP( - A = (5.726E21, 'm^4/(mol^2*s)'), - n = 0.0, - alpha = 0.0824, - E0 = (50.67, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -A and n factors are from the average rates of training reactions 1-3, and alpha and E0 are BEP -parameters from training reactions 1-3 (in the Surface_Dissociation_to_Bidentate -forward direction). -The A factor has been divided by 2.33 here to account for the average degeneracy of the training reactions. -""" -) diff --git a/beef-uq/reaction_families/Surface_Dissociation_to_Bidentate/script.sh b/beef-uq/reaction_families/Surface_Dissociation_to_Bidentate/script.sh deleted file mode 100644 index d34583118..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_to_Bidentate/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Dissociation_to_Bidentate -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Dissociation_to_Bidentate/uq.py b/beef-uq/reaction_families/Surface_Dissociation_to_Bidentate/uq.py deleted file mode 100755 index 9d5df5195..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_to_Bidentate/uq.py +++ /dev/null @@ -1,70 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction beta - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref= 0.0824 - -E0_1_ref=50.67 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,66] -E0_1=E0_1_ref+Delta_E0[:,67] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - diff --git a/beef-uq/reaction_families/Surface_Dissociation_vdW/rules_reference.py b/beef-uq/reaction_families/Surface_Dissociation_vdW/rules_reference.py deleted file mode 100644 index ba7b8b7b1..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_vdW/rules_reference.py +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Dissociation_vdW/rules" -shortDesc = u"" -longDesc = u""" -""" - -entry( - index = 1, - label = "Combined;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.84, - E0 = (185.1, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from: -"Universal Brønsted-Evans-Polanyi Relations for C–C, C–O, C–N, N–O, N–N, and O–O Dissociation Reactions" by Wang, ..., Norskov/ Catal. Lett (2011) 141:370-373, DOI: 10.1007/s10562-010-0477-y -(actual value for E0 was 1.92 eV.) -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 2, - label = "H2O;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (2.09e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.51, - E0 = (97.5, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -BEP relation for all metals and facets from Wang et al. "Universal transition state scaling relations for (de)hydrogenation over transition metals", Physical chemistry chemical physics, 2011, 13, 20760-20765, DOI:10.1039/c1cp20547a. -Technically this is a relation for dissociative adsorption. -A divided by 2 because of reaction path degeneracy for H2O -""" -) - -entry( - index = 3, - label = "C-OH;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.58, - E0 = (117.7, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) - """ -) - -entry( - index = 4, - label = "C-H;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (4.18e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.25, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -""" -) - -entry( - index = 5, - label = "CH4;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (1.045e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.25, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 4 because of reaction path degeneracy for CH4 -""" -) - -entry( - index = 6, - label = "CH3R;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (1.39e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.25, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 3 because of reaction path degeneracy for 3 equivalent H atoms for bond fission (example CH3OH) -""" -) - -entry( - index = 7, - label = "CH2R;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (2.09e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.25, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 2 because of reaction path degeneracy for 2 equivalent H atoms for bond fission (example CH2O) -""" -) - -entry( - index = 8, - label = "C-C;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (2.09e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.72, - E0 = (126.39, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 2 because of reaction path degeneracy for 2 equivalent C atoms for bond fission (example CH3CH3) - """ -) - - -entry( - index = 9, - label = "C2H6;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (0.69e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.25, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 6 because of reaction path degeneracy for 6 equivalent H atoms for bond fission (example CH3CH3) -""" -) - -entry( - index = 10, - label = "C2H4;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (1.045e17, 'm^2/(mol*s)'), - n = 0, - alpha =0.57, - E0 = (75.25, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u""" -E0 and alpha are taken from Table 5 for all metals from Sutton and Vlachos, "Ethanol Activation on closed-packed surfaces", Industrial & Engineering Chemistry Research, 2015, 54, 4213-4225, DOI: 10.1021/ie5043374. -Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111) -A divided by 4 because of reaction path degeneracy for 4 equivalent H atoms for bond fission (example C2H4) -""" -) diff --git a/beef-uq/reaction_families/Surface_Dissociation_vdW/script.sh b/beef-uq/reaction_families/Surface_Dissociation_vdW/script.sh deleted file mode 100644 index d24a31dd2..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_vdW/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Dissociation_vdW -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Dissociation_vdW/uq.py b/beef-uq/reaction_families/Surface_Dissociation_vdW/uq.py deleted file mode 100755 index d2cad3606..000000000 --- a/beef-uq/reaction_families/Surface_Dissociation_vdW/uq.py +++ /dev/null @@ -1,439 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref=0.84 -alpha_2_ref= 0.51 -alpha_3_ref= 0.58 -alpha_4_ref= 0.57 -alpha_5_ref= 0.57 -alpha_6_ref= 0.57 -alpha_7_ref= 0.57 -alpha_8_ref= 0.72 -alpha_9_ref= 0.57 -alpha_10_ref= 0.57 - -E0_1_ref=185.1 -E0_2_ref=97.5 -E0_3_ref=117.7 -E0_4_ref=75.25 -E0_5_ref=75.25 -E0_6_ref=75.25 -E0_7_ref=75.25 -E0_8_ref=126.39 -E0_9_ref=75.25 -E0_10_ref=75.25 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - -alpha_1=alpha_1_ref+Delta_alpha[:,48] -E0_1=E0_1_ref+Delta_E0[:,49] -alpha_2=alpha_2_ref+Delta_alpha[:,50] -E0_2=E0_2_ref+Delta_E0[:,51] -alpha_3=alpha_3_ref+Delta_alpha[:,52] -E0_3=E0_3_ref+Delta_E0[:,53] -alpha_4=alpha_4_ref+Delta_alpha[:,54] -E0_4=E0_4_ref+Delta_E0[:,53] -alpha_5=alpha_5_ref+Delta_alpha[:,54] -E0_5=E0_5_ref+Delta_E0[:,55] -alpha_6=alpha_6_ref+Delta_alpha[:,54] -E0_6=E0_6_ref+Delta_E0[:,55] -alpha_7=alpha_7_ref+Delta_alpha[:,54] -E0_7=E0_7_ref+Delta_E0[:,55] -alpha_8=alpha_8_ref+Delta_alpha[:,56] -E0_8=E0_8_ref+Delta_E0[:,57] -alpha_9=alpha_9_ref+Delta_alpha[:,54] -E0_9=E0_9_ref+Delta_E0[:,55] -alpha_10=alpha_10_ref+Delta_alpha[:,54] -E0_10=E0_10_ref+Delta_E0[:,55] - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_2[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_2[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 3" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_3[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_3[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 4" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_4[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_4[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 5" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_5[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_5[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 6" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 6" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_6[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_6[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 7" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 7" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_7[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_7[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 8" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 8" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_8[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_8[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 9" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 9" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_9[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_9[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 10" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - s=open(file,'r') - new_file_content="" - for line in s: - if " index = 10" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_10[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_10[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() diff --git a/beef-uq/reaction_families/Surface_Monodentate_to_Bidentate/rules_reference.py b/beef-uq/reaction_families/Surface_Monodentate_to_Bidentate/rules_reference.py deleted file mode 100644 index 44c0541cc..000000000 --- a/beef-uq/reaction_families/Surface_Monodentate_to_Bidentate/rules_reference.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_Monodentate_to_Bidentate/rules" -shortDesc = u"" -longDesc = u""" -""" -entry( - index = 1, - label = "Combined;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (1.0e21, 'cm^2/(mol*s)'), - n = 0, - alpha = 0.0, - E0 = (0, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u"""These values are made up, but based on the calculation of *CCH2 --> *C*CH2 which was found to be barrierless""" -) diff --git a/beef-uq/reaction_families/Surface_Monodentate_to_Bidentate/script.sh b/beef-uq/reaction_families/Surface_Monodentate_to_Bidentate/script.sh deleted file mode 100644 index 14d9a78c6..000000000 --- a/beef-uq/reaction_families/Surface_Monodentate_to_Bidentate/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_Monodentate_to_Bidentate -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_Monodentate_to_Bidentate/uq.py b/beef-uq/reaction_families/Surface_Monodentate_to_Bidentate/uq.py deleted file mode 100755 index 706eeeba6..000000000 --- a/beef-uq/reaction_families/Surface_Monodentate_to_Bidentate/uq.py +++ /dev/null @@ -1,82 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction beta - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref= 0.0 -E0_1_ref=0 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - - -alpha_1=alpha_1_ref+Delta_alpha[:,70] -E0_1=E0_1_ref+Delta_E0[:,71] -for i in range(num_pts): - if E0_1[i]<0: - E0_1[i]=0 - else: - E0_1[i]=E0_1[i] - -for i in range(num_pts): - if alpha_1[i]<0: - alpha_1[i]=0 - else: - alpha_1[i]=alpha_1[i] - - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - diff --git a/beef-uq/reaction_families/Surface_vdW_to_Bidentate/rules_reference.py b/beef-uq/reaction_families/Surface_vdW_to_Bidentate/rules_reference.py deleted file mode 100644 index 3e8ce904b..000000000 --- a/beef-uq/reaction_families/Surface_vdW_to_Bidentate/rules_reference.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -name = "Surface_vdW_to_Bidentate/rules" -shortDesc = u"" -longDesc = u""" -""" -entry( - index = 1, - label = "Combined;VacantSite", - kinetics = SurfaceArrheniusBEP( - A = (1.838E+21, 'cm^2/(mol*s)'), - n = 0, - alpha = 0.0, - E0 = (12.203, 'kJ/mol'), - Tmin = (200, 'K'), - Tmax = (3000, 'K'), - ), - rank = 0, - shortDesc = u"""Default""", - longDesc = u"""CH2CH2-vdw to bidentate calculated by Katrin Blondal.""" -) diff --git a/beef-uq/reaction_families/Surface_vdW_to_Bidentate/script.sh b/beef-uq/reaction_families/Surface_vdW_to_Bidentate/script.sh deleted file mode 100644 index 025513f31..000000000 --- a/beef-uq/reaction_families/Surface_vdW_to_Bidentate/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name=Surface_vdW_to_Bidentate -#SBATCH --time=1:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=4 -#SBATCH --mem=60GB -#SBATCH --account=cfgoldsm-condo -#SBATCH --mail-type=END -#SBATCH --mail-user=bjarne_kreitz@brown.edu - -module load anaconda/2020.02 -source /gpfs/runtime/opt/anaconda/2020.02/etc/profile.d/conda.sh -conda activate /users/bkreitz1/anaconda/rmg_env - -python uq.py - diff --git a/beef-uq/reaction_families/Surface_vdW_to_Bidentate/uq.py b/beef-uq/reaction_families/Surface_vdW_to_Bidentate/uq.py deleted file mode 100755 index 67e253c28..000000000 --- a/beef-uq/reaction_families/Surface_vdW_to_Bidentate/uq.py +++ /dev/null @@ -1,82 +0,0 @@ - -from torch.quasirandom import SobolEngine - -import numpy as np -import matplotlib.pyplot as plt -import os - -num_pts = 2000 # the number of points to generate - -sobol=SobolEngine(dimension=80,scramble=True,seed=100) - -x_sobol=sobol.draw(num_pts) - -#Values for surface abstraction beta - -Delta_alpha=0.1 -Delta_E0=15 - -alpha_1_ref= 0.0 -E0_1_ref=12.203 - -Delta_alpha=Delta_alpha-2*x_sobol*Delta_alpha -Delta_E0=Delta_E0-2*x_sobol*Delta_E0 - - -alpha_1=alpha_1_ref+Delta_alpha[:,68] -E0_1=E0_1_ref+Delta_E0[:,69] -for i in range(num_pts): - if E0_1[i]<0: - E0_1[i]=0 - else: - E0_1[i]=E0_1[i] - -for i in range(num_pts): - if alpha_1[i]<0: - alpha_1[i]=0 - else: - alpha_1[i]=alpha_1[i] - - -Name='rules_' - -for i in range(num_pts): - file="".join((Name,str(i),".py")) - s=open("rules.py",'r') - new_file_content="" - for line in s: - if " index = 1" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - for line in s: - if line.startswith(" alpha ="): - old=line.strip() - modified="".join(("alpha =",str(np.round(float(alpha_1[i]),2)), ",")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif line.startswith(" E0 = ("): - old=line.strip() - modified="".join(("E0 = (",str(np.round(float(E0_1[i]),2)), ", 'kJ/mol'),")) - new_line=line.replace(old,modified) - new_file_content += new_line - elif " index = 2" in line: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - break - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - else: - old=line.strip() - new_line=line.replace(old,old) - new_file_content += new_line - - s.close() - writing_file = open(file, "w") - writing_file.write(new_file_content) - writing_file.close() - - diff --git a/beef-uq/reaction_families/family_list.py b/beef-uq/reaction_families/family_list.py new file mode 100644 index 000000000..1b945bd74 --- /dev/null +++ b/beef-uq/reaction_families/family_list.py @@ -0,0 +1,30 @@ +reaction_families = [ + #'Surface_Adsorption_Single', + #'Surface_Adsorption_vdW', + #'Surface_Adsorption_Dissociative', + 'Surface_Dissociation', + 'Surface_Abstraction', + 'Surface_Dissociation_Double_vdW', + 'Surface_Dissociation_vdW', + 'Surface_Abstraction_vdW', + 'Surface_Dissociation_Beta', + #'Surface_Adsorption_Bidentate', + 'Surface_Bidentate_Dissociation', + 'Surface_Monodentate_to_Bidentate', + 'Surface_Dissociation_to_Bidentate', + 'Surface_vdW_to_Bidentate', + #'Surface_Adsorption_Dissociative_Double', + 'Surface_Abstraction_Beta', + 'Surface_Abstraction_Beta_double_vdW', + 'Surface_Dissociation_Double', + 'Surface_Dissociation_Beta_vdW', + 'Surface_Abstraction_Beta_vdW', + 'Surface_Abstraction_Single_vdW', + 'Surface_Dissociation_Charge_Separation', + 'Surface_Dissociation_Charge_Double', + 'Surface_Dissociation_Charge_Single', + 'Surface_vdW_to_charged_mono', + #'Surface_Adsorption_Double_Charged', + 'Surface_Dissociation_Beta_to_Charged', + 'Surface_Charged_Bidentate_Dissociation', + ] diff --git a/beef-uq/reaction_families/functions.py b/beef-uq/reaction_families/functions.py new file mode 100644 index 000000000..02f439b8b --- /dev/null +++ b/beef-uq/reaction_families/functions.py @@ -0,0 +1,40 @@ +from torch.quasirandom import SobolEngine +import os + +def parse_rules(fam_path,reaction_families): + fam_lines, E0_list, E0_lines, a_list, a_lines = [], [], [], [], [] + for fam in reaction_families: + with open(fam_path + fam + '/rules.py','r') as f: + lines = f.readlines() + fam_lines.append(lines) + for num, line in enumerate(lines): + if line.startswith(' E0'): + E0 = float(line.split('(')[1].split(',')[0]) + unit = line.split('\'')[1] + if unit == 'kcal/mol': + E0 *= 4.184 + E0_list.append(E0) + E0_lines.append(num) + elif line.startswith(' alpha'): + a_list.append(float(line.split()[2].split(',')[0])) + a_lines.append(num) + return fam_lines, E0_list, E0_lines, a_list, a_lines + +def generate_sobol_set(a_list,E0_list,N_members): + dim = len(a_list) + len(E0_list) + sobol=SobolEngine(dimension=dim,scramble=True,seed = 100) + x_sobol=sobol.draw(N_members) + return x_sobol + +def check_lengths(list1,list2): + l1 = len(list1) + l2 = len(list2) + if l1 != l2: + raise Exception('The number of list entries found between the two lists is not equal') + +def make_directories(fams): + for fam in fams: + if not os.path.exists(fam): + os.mkdir(fam) + + diff --git a/beef-uq/reaction_families/uq.py b/beef-uq/reaction_families/uq.py new file mode 100755 index 000000000..65ea4f466 --- /dev/null +++ b/beef-uq/reaction_families/uq.py @@ -0,0 +1,42 @@ +import numpy as np +from family_list import reaction_families as fams +from functions import * + +fam_path = '/home/kirk/Projects/development/RMG/RMG-database/input/kinetics/families/' +Delta_a = 0.1 +Delta_E0 = 15 +N_members = 10 + +fam_lines, E0_list, E0_lines, a_list, a_lines = parse_rules(fam_path,fams) +make_directories(fams) +check_lengths(E0_list,a_list) +sobol = np.asarray(generate_sobol_set(a_list,E0_list,N_members)) +for k in range(N_members): + n, m = 0, 0 + for fam_num, lines in enumerate(fam_lines): + new_lines = [] + for num, line in enumerate(lines): + if n < len(E0_lines) and num == E0_lines[n] and ' E0' in line: + E0 = E0_list[n] + perturb = Delta_E0 - 2 * Delta_E0 * sobol[k,2*n] + new_E0 = E0 + perturb + newline = ' E0 = ({}, \'kJ/mol\'),\n'.format(str(new_E0)) + new_lines.append(newline) + n += 1 + elif m < len(a_lines) and num == a_lines[m] and ' alpha' in line: + a = a_list[m] + perturb = Delta_a - 2 * Delta_a * sobol[k,2*m+1] + new_a = a + perturb + newline = ' alpha = {},\n'.format(str(new_a)) + new_lines.append(newline) + m += 1 + else: + new_lines.append(line) + new_fname = fams[fam_num] +'/rules_{}.py'.format(str(k)) + with open(new_fname,'w') as f: + f.writelines(new_lines) + if k == 0: + old_fname = fams[fam_num] + '/rules.py' + with open(old_fname,'w') as f: + f.writelines(lines) +