Skip to content

Commit

Permalink
Uploaded scripts for calculating TOF.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyamdeokr authored Jan 22, 2025
1 parent 98c4dcf commit 9bdb34b
Show file tree
Hide file tree
Showing 27 changed files with 4,911 additions and 0 deletions.
568 changes: 568 additions & 0 deletions systems2atoms/materials/HCOOH_decomposition_111.log

Large diffs are not rendered by default.

85 changes: 85 additions & 0 deletions systems2atoms/materials/HCOOH_decomposition_111.mkm
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#
#Microkinetic model parameters
#

scaler = 'ThermodynamicScaler'

rxn_expressions = [
'2*_s + HCOOH_g <-> HCOO-H* + *_s <-> HCOO* + H*',
'HCOO* <-> H-COO* -> CO2_g + H*',
'HCOO* <-> HCOO-* <-> HCOO&*',
'HCOO&* <-> H-COO&* <-> CO2_g + H*',
'2H* <-> H-H* + *_s <-> H2_g + 2*',
'2*_s + HCOOH_g <-> H-COOH* + *_s <-> COOH* + H*',
'COOH* <-> COO-H* <-> CO2_g + H*',
'COOH* + *_s <-> CO-OH* + *_s <-> CO* + OH*',
'CO* -> CO_g + *',
'OH*+H* <-> H-OH* +*_s -> H2O_g + 2*',
]


surface_names = ['Pd'] #surfaces to include in scaling (need to have descriptors defined for each)

descriptor_names= ['temperature','pressure'] #descriptor names

descriptor_ranges = [[300,400], [1, 100.0]]

#descriptor_names= ['O_s','CO_s'] #descriptor names

#descriptor_ranges = [[-1,3],[-0.5,4]]

resolution = 20

#temperature = 500 #Temperature of the reaction

species_definitions = {}
species_definitions['HCOOH_g'] = {'concentration':1.}
species_definitions['H2O_g'] = {'concentration':0.}
species_definitions['H2_g'] = {'concentration':0.}
species_definitions['CO2_g'] = {'concentration':0.} #define the gas pressures
species_definitions['CO_g'] = {'concentration':0.}

species_definitions['s'] = {'site_names': ['111'], 'total':1} #define the sites

data_file = 'HCOOH_decomposition_111.pkl'

#
#Parser parameters
#

input_file = 'energies_111.txt' #input data

#
#Scaler parameters
#

gas_thermo_mode = "shomate_gas"
#gas_thermo_mode = "ideal_gas" #Ideal gas approximation
#gas_thermo_mode = "zero_point_gas" #uses zero-point corrections only
#gas_thermo_mode = "fixed_entropy_gas" #assumes entropy of 0.002 eV/K for all gasses except H2 (H2 is 0.00135 eV/K)
#gas_thermo_mode = "frozen_gas" #neglect thermal contributions

#adsorbate_thermo_mode = "frozen_adsorbate"
adsorbate_thermo_mode = "harmonic_adsorbate"
#adsorbate_thermo_mode = "hindered_adsorbate"
#adsorbate_thermo_mode = "zero_point_adsorbate"

scaling_constraint_dict = {
'H_s':['+',0,None],
'H2_s':[0,'+',None],
'HCOO-H_s':'initial_state',
'H-H_s':'final_state',
}


#
#Solver parameters
#

decimal_precision = 100 #precision of numbers involved

tolerance = 1e-50 #all d_theta/d_t's must be less than this at the solution

max_rootfinding_iterations = 100

max_bisections = 3
Binary file not shown.
568 changes: 568 additions & 0 deletions systems2atoms/materials/HCOOH_decomposition_211.log

Large diffs are not rendered by default.

85 changes: 85 additions & 0 deletions systems2atoms/materials/HCOOH_decomposition_211.mkm
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#
#Microkinetic model parameters
#

scaler = 'ThermodynamicScaler'

rxn_expressions = [
'2*_s + HCOOH_g <-> HCOO-H* + *_s -> HCOO* + H*',
'HCOO* <-> CO2_g + H*',
'HCOO* <-> HCOO-* <-> HCOO&*',
'HCOO&* <-> H-COO&* <-> CO2_g + H*',
'2H* <-> H-H*+*_s <-> H2_g + 2*_s',
'2*_s + HCOOH_g <-> H-COOH* + *_s -> COOH* + H*',
'COOH* <-> COO-H* <-> CO2_g + H*',
'COOH* + *_s <-> CO-OH* + *_s -> CO* + OH*',
'CO* <-> CO_g + *_s',
'OH*+H* <-> H-OH* +*_s <-> H2O_g + 2*_s',
]


surface_names = ['Pd'] #surfaces to include in scaling (need to have descriptors defined for each)

descriptor_names= ['temperature','pressure'] #descriptor names

descriptor_ranges = [[300,400], [1, 100.0]]

#descriptor_names= ['O_s','CO_s'] #descriptor names

#descriptor_ranges = [[-1,3],[-0.5,4]]

resolution = 20

#temperature = 500 #Temperature of the reaction

species_definitions = {}
species_definitions['HCOOH_g'] = {'concentration':1.}
species_definitions['H2O_g'] = {'concentration':0.}
species_definitions['H2_g'] = {'concentration':0.}
species_definitions['CO2_g'] = {'concentration':0.} #define the gas pressures
species_definitions['CO_g'] = {'concentration':0.}

species_definitions['s'] = {'site_names': ['211'], 'total':1} #define the sites

data_file = 'HCOOH_decomposition_211.pkl'

#
#Parser parameters
#

input_file = 'energies_211.txt' #input data

#
#Scaler parameters
#

gas_thermo_mode = "shomate_gas"
#gas_thermo_mode = "ideal_gas" #Ideal gas approximation
#gas_thermo_mode = "zero_point_gas" #uses zero-point corrections only
#gas_thermo_mode = "fixed_entropy_gas" #assumes entropy of 0.002 eV/K for all gasses except H2 (H2 is 0.00135 eV/K)
#gas_thermo_mode = "frozen_gas" #neglect thermal contributions

#adsorbate_thermo_mode = "frozen_adsorbate"
adsorbate_thermo_mode = "harmonic_adsorbate"
#adsorbate_thermo_mode = "hindered_adsorbate"
#adsorbate_thermo_mode = "zero_point_adsorbate"

scaling_constraint_dict = {
'H_s':['+',0,None],
'H2_s':[0,'+',None],
'HCOO-H_s':'initial_state',
'H-H_s':'final_state',
}


#
#Solver parameters
#

decimal_precision = 100 #precision of numbers involved

tolerance = 1e-50 #all d_theta/d_t's must be less than this at the solution

max_rootfinding_iterations = 100

max_bisections = 3
Binary file not shown.
51 changes: 51 additions & 0 deletions systems2atoms/materials/NN_list_fn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#Depends on ASAP3 - check out https://wiki.fysik.dtu.dk/asap/Neighbor%20lists
#By Joakim Halldin Stenlid SUNCAT center, SLAC/Stanford Uni 2020
# syntax python2 structure-file
# make sure to set equillibrium distance for metal in your system!
from ase import Atoms
from ase import geometry
from ase.build import bulk, make_supercell
from ase.io import read, write
import numpy as np
import sys, math
from ase import neighborlist
from asap3 import *


# loop over all atoms
def NN_list_fn(infile):
#INPUT
#infile=sys.argv[1] # Name of structure input file
eq_dist=2.772 # Metal equilibrium distance in favored coordination environment, 2.772 for Pt
tol=0.1 # Max tolerated bond strain. Note: strain model not tested beyond 8%
eq_dist_tol=eq_dist*(1+tol) # Max bond distance to be considered a bond
#read structure and basic analysis
atoms=read(infile)
N = atoms.get_number_of_atoms()
nblist = FullNeighborList(eq_dist_tol, atoms, driftfactor=0.05)
pos=atoms.get_positions()
cell=atoms.get_cell()
elements=atoms.get_chemical_symbols()
cn_site_record=[]
for i in range(len(atoms)):
nb, dvec, d2 = nblist.get_neighbors(i) #neigborlist, pairwise distance vector, and squared norm of distance vectors
# print("\n", nb,"for atom",i)
#print(dvec,"for atom",i)
cn_site = len(nb)
# print(cn_site)
cn_nb = []
alpha = np.zeros(12,dtype='int') #change to 12
alpha[np.arange(cn_site)] = alpha[np.arange(cn_site)] + 1
for ii in range(cn_site):
neighbor = nb[ii]
cn_neighbor = len(nblist.get_neighbors(neighbor)[0])
cn_nb.append(cn_neighbor)
alpha[cn_neighbor-1] = alpha[cn_neighbor-1] + 1
alpha = np.delete(alpha,[1,2])
# print(i, cn_site, alpha)
cn_site_record.append(cn_site)
#print(cn_site_record)
unique, counts = np.unique(cn_site_record, return_counts=True)

# print("\n", dict(zip(unique, counts)))
return dict(zip(unique, counts))
Loading

0 comments on commit 9bdb34b

Please sign in to comment.