Skip to content

Instantly share code, notes, and snippets.

@mhoffman
Last active August 29, 2015 14:09
Show Gist options
  • Save mhoffman/62140400826b2d4d072a to your computer and use it in GitHub Desktop.
Save mhoffman/62140400826b2d4d072a to your computer and use it in GitHub Desktop.
CatMAP Tutorial 2 Input Files
rxn_expressions = [
'*_s + CO_g -> CO*',
'2*_s + O2_g <-> O-O* + *_s -> 2O*',
'CO* + O* <-> O-CO* + * -> CO2_g + 2*'
]
surface_names = ['Pt', 'Ag', 'Cu', 'Rh', 'Pd', 'Au', 'Ru', 'Ni']
descriptor_names = ['O_s', 'CO_s']
descriptor_ranges = [[-1, 3], [-.5, 4]]
resolution = 15
temperature = 500
species_definitions = {
'CO_g': {'presssure': 1.},
'O2_g': {'pressure': 1./3},
'CO2_g': {'pressure':0},
's': {'site_names': ['111'],
'total': 1},
}
data_file = 'CO_oxidation.pkl'
input_file = 'energies.txt'
gas_thermo_mode = 'shomate_gas'
adsorbate_thermo_mode = 'frozen_adsorbate'
scaling_constraint_dict = {
'O_s': ['+', 0, None],
'CO_s': [0, '+', None],
'O_CO_s': 'initial_state',
'O-O_s': 'final_state',
}
decimal_precision = 100
tolerance = 1e-50
max_rootfinding_iterations = 100
max_bisections = 3
surface_name site_name species_name formation_energy bulk_structure frequencies other_parameters reference
None gas CO2 2.45 None [1333,2349,667,667] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
None gas CO 2.74 None [2170] [] "Energy Environ. Sci., 3, 1311-1315 (2010)"
None gas O2 5.42 None [1580] [] "Falsig et al (2012)"
Ru 111 O -0.07 fcc [] [] "Falsig et al (2012)"
Ni 111 O 0.35 fcc [] [] "Falsig et al (2012)"
Rh 111 O 0.55 fcc [] [] "Falsig et al (2012)"
Cu 111 O 1.07 fcc [] [] "Falsig et al (2012)"
Pd 111 O 1.55 fcc [] [] "Falsig et al (2012)"
Pt 111 O 1.62 fcc [] [] "Falsig et al (2012)"
Ag 111 O 2.05 fcc [] [] "Falsig et al (2012)"
Au 111 O 2.61 fcc [] [] "Falsig et al (2012)"
Ru 111 CO 1.3 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Rh 111 CO 1.34 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Pd 111 CO 1.55 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Ni 111 CO 1.63 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Pt 111 CO 1.7 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Cu 111 CO 2.58 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Ag 111 CO 2.99 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Au 111 CO 3.04 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Ru 111 O-CO 2.53 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Rh 111 O-CO 3.1 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Ni 111 O-CO 3.25 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Pt 111 O-CO 4.04 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Cu 111 O-CO 4.18 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Pd 111 O-CO 4.2 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Ag 111 O-CO 5.05 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Au 111 O-CO 5.74 fcc [] [] "Angew. Chem. Int. Ed., 47, 4835 (2008)"
Ag 111 O-O 5.98 fcc [] [] "Falsig et al (2012)"
Au 111 O-O 7.22 fcc [] [] "Falsig et al (2012)"
Cu 111 O-O 4.74 fcc [] [] "Falsig et al (2012)"
Pt 111 O-O 5.35 fcc [] [] "Falsig et al (2012)"
Rh 111 O-O 3.79 fcc [] [] "Falsig et al (2012)"
Ru 111 O-O 3.34 fcc [] [] "Falsig et al (2012)"
Pd 111 O-O 5.34 fcc [] [] "Falsig et al (2012)"
#!/usr/bin/env python
from catmap import ReactionModel
mkm_file = 'CO_oxidation.mkm'
model = ReactionModel(setup_file=mkm_file)
model.run()
mapper_iteration_0: status - 225 points do not have valid solution.
Traceback (most recent call last):
File "./mkm_job.py", line 7, in <module>
model.run()
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/model.py", line 215, in run
self.descriptor_space_analysis()
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/model.py", line 272, in descriptor_space_analysis
self.mapper.get_output_map(self.descriptor_ranges,self.resolution)
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/mappers/mapper_base.py", line 94, in get_output_map
descriptor_ranges,resolution,*args,**kwargs)
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/mappers/min_resid_mapper.py", line 506, in get_coverage_map
isMapped = minresid_iteration(isMapped)
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/mappers/min_resid_mapper.py", line 420, in minresid_iteration
this_pt)
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/mappers/min_resid_mapper.py", line 60, in get_initial_coverage
params = self.scaler.get_rxn_parameters(descriptors)
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/scalers/generalized_linear_scaler.py", line 328, in get_rxn_parameters
params = self.get_formation_energy_parameters(descriptors)
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/scalers/generalized_linear_scaler.py", line 332, in get_formation_energy_parameters
free_energy_dict = self.get_free_energies(descriptors)
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/scalers/scaler_base.py", line 137, in get_free_energies
descriptors=descriptors,**kwargs)
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/scalers/scaler_base.py", line 131, in get_thermodynamic_energies
**kwargs)
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/thermodynamics/enthalpy_entropy.py", line 115, in get_thermodynamic_corrections
getattr(self,self.pressure_mode+'_pressure')()
File "/Users/maxjh/Library/Python/2.7/lib/python/site-packages/catmap/thermodynamics/enthalpy_entropy.py", line 551, in static_pressure
self.gas_pressures = [self.species_definitions[g]['pressure'] for g in self.gas_names]
KeyError: 'pressure'
@ajmedford
Copy link

This is an easy one - you have a typo in the word "pressure" for defining the pressure of CO_g. Nevertheless, a more verbose error would probably be helpful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment