RxnNet is a reaction network based python package for property prediction in solids.
Install from source:
git clone https://github.com/rasmusfr/rxnnet.git
cd rxnnet
pip install .Using the default database, RxnNet can generate a reaction network (i.e. a series of balanced reactions). At the moment, reactions with up to 4 compounds are supported.
from rxnnet.generate_reactions import GenerateRN
target_id = 'mp-23193' # target compound materials project id (mp-23193 is KCl)
reaction_network_gen = GenerateRN(target_id)
rn_data = reaction_network_gen.balanced_reactions(save=True)
print(rn_data[:50].to_markdown())From the generated reaction network we can obtain a prediction for the formation enthalpy.
import pandas as pd
from rxnnet.evaluate_reactions import EvaluateRN
target_id = 'mp-23193'
preferred_method = 'e_r2scan' # preferred method; r^2SCAN electronic energy
fallback_method = 'e_gga_gga_u' # fallback method; GGA/GGA+U electronic energy
reference_method = 'hf_ref' # reference method; NBS enthalpy of formation
mode = 'ssw+cf' # calculation mode; structural similarity weighting + chemistry filter
reaction_network_eval = EvaluateRN(target_id=target_id, preferred_method=preferred_method, reference_method=reference_method,
rn=rf'user_reactions/{target_id}.pkl.gz', mode=mode, fallback_method=fallback_method)
results = reaction_network_eval.rn_evaluate()
print(pd.DataFrame(results)[:50].to_markdown())| Notebook | Description |
|---|---|
| Intro | Introduction to reaction generation and prediction |
Datasets and results related to RxnNet can be found here.
This repository is licensed under the MIT license
Please cite this paper if you use RxnNet:
@article{Fromsejer2024,
author = {Rasmus Fromsejer and Bjørn Maribo-Mogensen and Georgios M. Kontogeorgis and Xiaodong Liang},
doi = {10.1038/s41524-024-01404-5},
issue = {1},
journal = {npj Computational Materials},
pages = {244},
title = {Accurate formation enthalpies of solids using reaction networks},
volume = {10},
year = {2024},
}The author wishes to thank the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation program (Grant Agreement no. 832460), ERC Advanced Grant project “New Paradigm in Electrolyte Thermodynamics” and the Department of Chemical Engineering at the Technical University of Denmark for funding this research.