Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hprats committed Mar 9, 2025
1 parent edcc64a commit 21fbabe
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/source/reading_output_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,33 @@ for stype in kmc_output.site_types:
avg_cov = kmc_output.av_coverage_per_site_type[stype][sps]
print(f"Average coverage of {sps} on {stype} sites: {avg_cov:.3f} %")
```


### Complete example

```python
from zacrostools.kmc_output import KMCOutput

# Read simulation output
kmc_output = KMCOutput(
path='temp_600K',
analysis_range=[50, 100],
range_type='time',
weights='time')

# Print TOF of all gas-phase species
for gas_spec in kmc_output.gas_specs_names:
tof = kmc_output.tof[gas_spec]
print(f"{gas_spec}: {tof:.3e} molec·s⁻¹·Å⁻²")

# Compute selectivity of CH4 vs CO2 and CH3OH
select_ch4 = kmc_output.get_selectivity(
main_product='CH4',
side_products=['CO2', 'CH3OH'])
print(f"Selectivity of CH4: {select_ch4:.2f}%")

# Print average coverage of all surface species
for surf_spec in kmc_output.surf_specs_names:
avg_cov = kmc_output.av_coverage[surf_spec]
print(f"{surf_spec}: {avg_cov:.2f}%")
```

0 comments on commit 21fbabe

Please sign in to comment.