An Interface between SchNetPack and SHARC for performing Machine Learning-accelerated Photodynamics Simulations
SPaiNN is a Python package that provides a flexible and efficient interface to the SchNetPack 2.01 package a toolbox for the development and application of deep neural networks to the prediction of potential energy surfaces and other quantum-chemical properties of molecules and materials. SPaiNN allows users to predict energies, forces, dipoles, and non-adiabatic couplings for multiple electronic states, and additionally provides an interface to the SHARC2 (Surface Hopping including Arbitrary Couplings) software for running excited-state dynamics simulations. SPaiNN is an extension to the SchNarc3 software, i.e., a python software that combines SchNetPack 1.04-7 and SHARC2.
- Predict potential energy surfaces of multiple electronic states (SchNet4-7, PaiNN8)
- Predict vector-properties of multiple electronic states, such as non-adiabatic couplings or dipole moments (SchNet4-7, PaiNN8)
- Interface to the SHARC2 software for running excited state dynamics simulations
- Flexible implementation in Python
- python 3.8
- SchNetPack 2.0
- Atomic Simulation Environment (ASE) 3.21
- NumPy
- PyTorch 1.9
- PyTorch Lightning 1.9.0
- Hydra 1.1
- SHARC 2.1
For a quick start, see the tutorials directory, which contains Jupyter Notebooks showing the workflow for predicting PES for multiple electronic states or NACs as vectorial property. You can also consult the documentation for detailed information about the workflows, API and general usage of SPaiNN.
src/
├── spainn/
│ ├── __init__.py
│ ├── calculator.py
│ ├── cli.py
│ ├── loss.py
│ ├── metric.py
│ ├── model.py
│ ├── multidatamodule.py
│ ├── plotting.py
│ ├── properties.py
│ ├── asetools/
│ │ ├── __init__.py
│ │ ├── aseutils.py
│ │ ├── convert_db.py
│ │ └── generate_db.py
│ ├── configs/
│ │ ├── __init__.py
│ │ └── train.yaml
│ └── interface/
│ ├── __init__.py
│ ├── aseinterface.py
│ └── sharcinterface.py
└── scripts/
├── aselen
├── spainn-db
└── spainn-train
tutorials/
├── tut_01_preparing_data.ipynb
├── tut_02_MLFF.ipynb
├── tut_03_MLFF_phase_prop.ipynb
├── tut_04_predictions.ipynbNNpot_butene.ipynb
└── data/
├── schnarc_ch2nh2+.db
└── spainn_ch2nh2+.db
SPaiNN can be installed using pip in two ways, either directly
pip install spainn
or from the source code (cloning the repository):
git clone https://github.com/CompPhotoChem/SPaiNN.git
cd SPaiNN
pip install .
Install SHARC with pysharc (see SHARC manual; version 2.1.1)
IMPORTANT
Currently there is a not yet fixed bug in pySHARC.
Open source/input_list.f90
and change line 96 from
read(nunit,'(A)', iostat=io) line
to
read(nunit,'(A)', iostat=stat) line
Then open pysharc/sharc/__init__.py
there and make the following changes:
#import sharc as sharc
Contributions to SPaiNN are welcome! Please refer to the contributing guidelines for more information.
SPaiNN is released under the MIT License.
- [1] K.T. Schütt, S. S. P. Hessmann, N. W. A. Gebauer, J. Lederer, M. Gastegger, Journal of Chemical Physics 2023, 158, 144801–144801, 10.1063/5.0138367
- [2] S. Mai, M. Richter, M. Heindl, M. F. S. J. Menger, A. Atkins, M. Ruckenbauer, F. Plasser, L.M. Ibele, S. Kropf, M. Oppel, P. Marquetand, L. González, SHARC2.1: Surface Hopping Including Arbitrary Couplings – Program Package for Non-Adiabatic Dynamics 2019, SHARC 2.1
- [3] J. Westermayr, M. Gastegger, P. Marquetand, Phys. Chem. Lett. 2020, 11, 10, 3828–3834, 10.1021/acs.jpclett.0c00527
- [4] K.T. Schütt, P. Kessel, M. Gastegger, K. Nicoli, A. Tkatchenko, K.-R. Müller, J. Chem. Theory Comput. 2019, 15, 1, 448–455, 10.1021/acs.jctc.8b00908
- [5] K.T. Schütt. F. Arbabzadah. S. Chmiela, K.-R. Müller, A. Tkatchenko, Nat. Comm. 2017, 8, 13890, 10.1038/ncomms13890
- [6] K.T. Schütt. P.-J. Kindermans, H. E. Sauceda, S. Chmiela, A. Tkatchenko, K.-R. Müller, Advances in Neural Information Processing Systems 2017, 30, 992-1002, Paper
- [7] K.T. Schütt. P.-J. Kindermans, H. E. Sauceda, S. Chmiela, A. Tkatchenko, K.-R. Müller, J. Chem. Phys. 2018, 148, 24, 241722, 10.1063/1.5019779
- [8] K. T. Schütt, O. T. Unke, M. Gastegger, Proceedings of the 38th International Conference on Machine Learning 2021, PMLR 139:9377-9388, Paper