Physics-informed machine learning for scientific computing and operator discovery
PyCOMET is a deep learning library written in Python using Keras and TensorFlow backends. PyCOMET currently includes the following algorithms:
- Solving forward and inverse partial differential equations (PDEs) using neural networks.
- Approximating nonlinear operators through Neural Operators (e.g., DeepONets).
- Multi-objective function loss optimization, supporting both data-driven and physics-informed learning with adaptive weighting.
PyCOMET boasts a range of features, including:
- Various neural network architectures such as FNN, DeepONet, ResNet, and more.
- Diverse options for losses, metrics, optimizers, learning rate schedules, initializations, and regularizations.
- Incorporation of essential techniques like dropout and batch normalization.
- Callbacks to monitor internal states and statistics of the model during training.
- A design that allows user code to be concise, closely resembling mathematical formulations.
The components of PyCOMET are loosely coupled, resulting in a well-structured and highly configurable library. Customization to meet specific requirements is made easy.
To install PyCOMET, follow these steps:
- Clone the repository:
git clone https://github.com/ivanZanardi/pycomet.git
cd pycomet- Create a Conda environment (Conda documentation is available here):
conda update --name base conda
conda config --set solver libmamba
conda env create -f conda_env.yml --force- Install the package:
conda activate pycomet
pip install .- Activate the Conda environment whenever using PyCOMET:
conda activate pycomet- Set the configuration file path for PyCOMET if you want to use a configuration different from the default one. See
exec/pcmcfg.jsonfor an example:
PYCOMET_CFGFILE=<path-to-config-file>- To use PyCOMET, run the following command with the
-hargument for help:
pycomet -h- Once you have selected the application, run it as follows:
pycomet <app-name> [OPTIONS]- For application-specific help:
pycomet <app-name> -hIf you use this code or find this work useful in your research, please cite us:
@misc{Zanardi_MENO_2025,
title = {MENO: Hybrid Matrix Exponential-based Neural Operator for Stiff ODEs. Application to Thermochemical Kinetics},
author = {Ivan Zanardi and Simone Venturi and Marco Panesi},
year = {2025},
eprint = {2507.14341},
doi = {10.48550/arXiv.2507.14341}
}
@article{Zanardi_SciRep_2023,
author = {Zanardi, Ivan and Venturi, Simone and Panesi, Marco},
title = {Adaptive physics-informed neural operator for coarse-grained non-equilibrium flows},
journal = {Scientific Reports},
year = {2023},
month = {9},
day = {19},
volume = {13},
number = {1},
issn = {2045-2322},
doi = {10.1038/s41598-023-41039-y}
}
@article{Priyadarshini_PCCP_2023,
author = {Priyadarshini, Maitreyee Sharma and Venturi, Simone and Zanardi, Ivan and Panesi, Marco},
title = {Efficient quasi-classical trajectory calculations by means of neural operator architectures},
journal = {Physical Chemistry Chemical Physics},
year = {2023},
month = {11},
day = {25},
volume = {25},
issue = {20},
publisher = {The Royal Society of Chemistry},
doi = {10.1039/D2CP05506F}
}Check out the examples provided in the repository to see PyCOMET in action.
PyCOMET is distributed under the MIT License. You are welcome to utilize, modify, and contribute to this project in accordance with the terms outlined in the license.