ZacrosIO
===========
This project is a collective of tools for the preparation of input files for Zacros.
## Installation
`pip install zacrosio`
`git clone https://github.com/hprats/ZacrosIO.git`
## Dependencies
Pandas, Scipy
## Example
In this example, we create the ZACROS input files for many KMC simulations scanning a wide range of partial pressures and temperatures for the CO oxidation.
import numpy as np
import pandas as pd
from zacrosio.kmc_job import NewKMCJob
job = NewKMCJob(df_gas=pd.read_csv(f'gas_data.csv', index_col=0),
df_mechanism=pd.read_csv(f'mechanism.csv', index_col=0),
df_energetics=pd.read_csv(f'energetics.csv', index_col=0),
lattice_path="lattice_input.dat")
for T in np.linspace(500, 1000, 6):
for pCO in np.logspace(-4, 0, 10):
for pO in np.logspace(-4, 0, 10):
job.create_job_dir(path=f"./co_oxidation_T_{T}_pCO_{pCO}_pO_{pO}",
T=T,
dict_pressure={'CO': pCO, 'O': pO},
reporting='on time 5.0e-1',
stopping={'max_steps': 'infinity', 'max_time': 'infinity', 'wall_time': 36000},
repeat_cell=[10, 10],
list_auto_scaling=['O_diffusion'])
## Dataframes required
The user must prepare three following Pandas dataframes in advance:
### 1. df_gas.csv
This dataframe contains information about the gas-phase species. Each row corresponds to a gas-phase species, and the following columns are required:
- type (str): 'linear' or 'non_linear'
- gas_molec_weight (float): molecular weight in g/mol, e.g. 16.04
- sym_number (int): symmetry number, e.g. 1
- degeneracy (int): degeneracy of the ground state, for the calculation of the electronic partition function, e.g. 1
- inertia_list (list of floats): moments of intertia in amu*Å2 (1 or 3 elements for linear or non-linear molecules, respectively), e.g. [8.9] # can be obtained from ase.Atoms.get_moments_of_inertia()
- gas_energy (float): formation energy in eV, e.g. -0.42
### 2. df_mechanism.csv
This dataframe contains information about the steps included in the reaction model, where each row of corresponds to a reversible elementary step. The following columns are required:
- site_types (str): type of adsorption sites, e.g. tM tC
- neighboring (str): connectivity between sites involved, e.g. 1-2. Optional (default: None)
- initial (list): initial configuration, e.g. ['1 * 1','2 CH3** 1','2 CH3** 2']
- final (list): final configuration, e.g. ['1 H_tC* 1','2 CH2** 1','2 CH2** 2']
- activ_eng (float): activation energy in eV, e.g. 1.02
- prox_factor (float): proximity factor, e.g. 0.2. Optional (default: 0.5)
- angles (str): angle between sites, e.g. 1-2-3:180. Optional (default: None)
- vib_list_is (list of floats): list of vibrational modes in meV for the initial state in meV, e.g. [332.7, 196.2, 70.5]
- vib_list_ts (list of floats): list of vibrational modes in meV for the transition state in meV, e.g. [332.7, 196.2]. For non-activated adsorption, define this as an empty list i.e. []
- vib_list_fs (list of floats): list of vibrational modes in meV for the final state in meV, e.g. [332.7, 196.2, 70.5]
Additional required columns for adsorption steps:
- molecule (str): gas-phase molecule involved, e.g. CO
- A_site (float): area of the adsoption site in Å, e.g. 4.28
### 3. df_energetics.csv
This dataframe contains information about the clusters included in the cluster expansion, where each row of corresponds to a cluster. The entries corresponding to point clusters and pairwise lateral interactions must end in '_point' and '_pair', respectively (e.g. CH3_point, CH2+H_pair) and the following columns are required:
- cluster_eng (float): cluster formation energy, e.g. -1.23
- site_types (str): type of adsorption sites, e.g. top top
- neighboring (str): connectivity between sites involved, e.g. 1-2
- lattice_state (list): cluster configuration, e.g. ['1 CO* 1','2 CO* 1']
- angles (str): angle between sites, e.g. 1-2-3:180. Optional (default: None)
- graph_multiplicity (int): symmetry number of the cluster, e.g. 2. Optional (default: None)
### 4. lattice_path (str)
Path were the lattice_input.dat file is located. This file has to be generated manually in advance.
## Contributors
Hector Prats Garcia
Raw data
{
"_id": null,
"home_page": "https://github.com/hprats/ZacrosIO",
"name": "zacrosio",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, chemistry, KMC, ZACROS",
"author": "Hector Prats Garcia",
"author_email": "hpratsgarcia@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d2/67/7b8776522fe294e594860771fcbe8c5966499b14fe8733038a5fb2e56cdd/zacrosio-1.0.tar.gz",
"platform": null,
"description": "ZacrosIO\n===========\n\nThis project is a collective of tools for the preparation of input files for Zacros.\n\n## Installation\n\n`pip install zacrosio`\n\n`git clone https://github.com/hprats/ZacrosIO.git`\n\n## Dependencies\n\nPandas, Scipy\n \n## Example\n\nIn this example, we create the ZACROS input files for many KMC simulations scanning a wide range of partial pressures and temperatures for the CO oxidation.\n\n import numpy as np\n import pandas as pd\n from zacrosio.kmc_job import NewKMCJob\n\n job = NewKMCJob(df_gas=pd.read_csv(f'gas_data.csv', index_col=0),\n df_mechanism=pd.read_csv(f'mechanism.csv', index_col=0),\n df_energetics=pd.read_csv(f'energetics.csv', index_col=0),\n lattice_path=\"lattice_input.dat\")\n \n for T in np.linspace(500, 1000, 6):\n for pCO in np.logspace(-4, 0, 10):\n for pO in np.logspace(-4, 0, 10):\n job.create_job_dir(path=f\"./co_oxidation_T_{T}_pCO_{pCO}_pO_{pO}\",\n T=T,\n dict_pressure={'CO': pCO, 'O': pO},\n reporting='on time 5.0e-1',\n stopping={'max_steps': 'infinity', 'max_time': 'infinity', 'wall_time': 36000},\n repeat_cell=[10, 10],\n list_auto_scaling=['O_diffusion'])\n\n\n## Dataframes required\n\nThe user must prepare three following Pandas dataframes in advance:\n\n### 1. df_gas.csv \n\nThis dataframe contains information about the gas-phase species. Each row corresponds to a gas-phase species, and the following columns are required:\n- type (str): 'linear' or 'non_linear'\n- gas_molec_weight (float): molecular weight in g/mol, e.g. 16.04\n- sym_number (int): symmetry number, e.g. 1\n- degeneracy (int): degeneracy of the ground state, for the calculation of the electronic partition function, e.g. 1\n- inertia_list (list of floats): moments of intertia in amu*\u00c52 (1 or 3 elements for linear or non-linear molecules, respectively), e.g. [8.9] # can be obtained from ase.Atoms.get_moments_of_inertia()\n- gas_energy (float): formation energy in eV, e.g. -0.42\n\n### 2. df_mechanism.csv\n\nThis dataframe contains information about the steps included in the reaction model, where each row of corresponds to a reversible elementary step. The following columns are required:\n- site_types (str): type of adsorption sites, e.g. tM tC\n- neighboring (str): connectivity between sites involved, e.g. 1-2. Optional (default: None)\n- initial (list): initial configuration, e.g. ['1 * 1','2 CH3** 1','2 CH3** 2']\n- final (list): final configuration, e.g. ['1 H_tC* 1','2 CH2** 1','2 CH2** 2']\n- activ_eng (float): activation energy in eV, e.g. 1.02\n- prox_factor (float): proximity factor, e.g. 0.2. Optional (default: 0.5)\n- angles (str): angle between sites, e.g. 1-2-3:180. Optional (default: None)\n- vib_list_is (list of floats): list of vibrational modes in meV for the initial state in meV, e.g. [332.7, 196.2, 70.5]\n- vib_list_ts (list of floats): list of vibrational modes in meV for the transition state in meV, e.g. [332.7, 196.2]. For non-activated adsorption, define this as an empty list i.e. []\n- vib_list_fs (list of floats): list of vibrational modes in meV for the final state in meV, e.g. [332.7, 196.2, 70.5]\n\nAdditional required columns for adsorption steps:\n- molecule (str): gas-phase molecule involved, e.g. CO\n- A_site (float): area of the adsoption site in \u00c5, e.g. 4.28\n\n### 3. df_energetics.csv\n\nThis dataframe contains information about the clusters included in the cluster expansion, where each row of corresponds to a cluster. The entries corresponding to point clusters and pairwise lateral interactions must end in '_point' and '_pair', respectively (e.g. CH3_point, CH2+H_pair) and the following columns are required:\n- cluster_eng (float): cluster formation energy, e.g. -1.23\n- site_types (str): type of adsorption sites, e.g. top top\n- neighboring (str): connectivity between sites involved, e.g. 1-2\n- lattice_state (list): cluster configuration, e.g. ['1 CO* 1','2 CO* 1']\n- angles (str): angle between sites, e.g. 1-2-3:180. Optional (default: None)\n- graph_multiplicity (int): symmetry number of the cluster, e.g. 2. Optional (default: None)\n\n### 4. lattice_path (str)\n\nPath were the lattice_input.dat file is located. This file has to be generated manually in advance. \n\n## Contributors\n\nHector Prats Garcia\n",
"bugtrack_url": null,
"license": null,
"summary": "A collective of tools for the preparation of input files for ZACROS",
"version": "1.0",
"project_urls": {
"Download": "https://github.com/hprats/ZacrosIO/archive/refs/tags/v1.0.tar.gz",
"Homepage": "https://github.com/hprats/ZacrosIO"
},
"split_keywords": [
"python",
" chemistry",
" kmc",
" zacros"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "90919f633f34e148192c85a64ac561056d1277a1de431fbd505662cb11f6731f",
"md5": "653b7d5da3f65cfe8992f94142619b76",
"sha256": "8c304bd84d43dca3b4d87bbb5324d6af41c926865c3a8c59ca58bd972b90887e"
},
"downloads": -1,
"filename": "zacrosio-1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "653b7d5da3f65cfe8992f94142619b76",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6884,
"upload_time": "2024-04-12T14:34:51",
"upload_time_iso_8601": "2024-04-12T14:34:51.162872Z",
"url": "https://files.pythonhosted.org/packages/90/91/9f633f34e148192c85a64ac561056d1277a1de431fbd505662cb11f6731f/zacrosio-1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d2677b8776522fe294e594860771fcbe8c5966499b14fe8733038a5fb2e56cdd",
"md5": "786a7c7fc45d727c7446144ee37b1dbe",
"sha256": "c51151938173400e85694d6a2c95652caec01f5938e7f9ce72112e9830f216b5"
},
"downloads": -1,
"filename": "zacrosio-1.0.tar.gz",
"has_sig": false,
"md5_digest": "786a7c7fc45d727c7446144ee37b1dbe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6225,
"upload_time": "2024-04-12T14:34:52",
"upload_time_iso_8601": "2024-04-12T14:34:52.743612Z",
"url": "https://files.pythonhosted.org/packages/d2/67/7b8776522fe294e594860771fcbe8c5966499b14fe8733038a5fb2e56cdd/zacrosio-1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-12 14:34:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hprats",
"github_project": "ZacrosIO",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "setuptools",
"specs": [
[
"~=",
"69.2.0"
]
]
},
{
"name": "pandas",
"specs": [
[
"~=",
"2.2.1"
]
]
},
{
"name": "scipy",
"specs": [
[
"~=",
"1.13.0"
]
]
},
{
"name": "numpy",
"specs": [
[
"~=",
"1.26.4"
]
]
}
],
"lcname": "zacrosio"
}