Physics-Informed Neural Network solver for the Poisson-Boltzmann equation applied to real macromolecules in polarizable media.
- Solves the electrostatic potential for the solute and solvent domain.
- Simple molecule definition by .pdb or .pqr file.
- Different loss terms can be added to the model.
- Use of different architectures is available, very customizable.
- Loss balancing algorithm implemented.
- Build in Python/Tensorflow.
- Papers: Check this folder for relevant papers and additional project documentation.
- Tutorials: Check this folder for notebooks tutorials.
To install and run this project locally, follow these steps:
-
Clone the repository to your local machine.
git clone https://github.com/MartinAchondo/XPPBE
-
Navigate to the project directory
cd XPPBE
-
Create a virtual environment
conda create --name xppbe python=3.9
-
Activate the virtual environment
conda activate xppbe
-
Install the project
pip install .
To use this project, start by following the Tutorial.ipynb notebook. An explanation of this notebook is as follows:
- Import the simulation object, the YAML file, and initialize it:
from xppbe import Simulation simulation = Simulation(yaml_path, molecule_dir)
- Run the simulation:
simulation.create_simulation() simulation.adapt_model() simulation.solve_model() simulation.postprocessing(run_all=True)
The Simulation object import a YAML file with all the problem definitions. An explanation is as follows:
-
Define the molecule, the properties and the equation to solve:
equation: regularized_scheme_2 pbe_model: linear pinns_method: DCM domain_properties: molecule: methanol epsilon_1: 1 epsilon_2: 80 kappa: 0.125 T: 300
-
Define the number of collocation points (mesh properties):
mesh_properties: vol_max_interior: 0.04 vol_max_exterior: 0.1 density_mol: 10 density_border: 0.5 mesh_generator: msms dR_exterior: 3
-
Define the different loss terms (solute domain, solvent domain and combination of both)
losses: - R1 - R2 - D2 - Iu - Id
-
Define the architectures:
num_networks: 2 hyperparameters_in: architecture_Net: FCNN num_hidden_layers: 4 num_neurons_per_layer: 200 activation: tanh adaptive_activation: true fourier_features: true weight_factorization: false scale_input: true scale_output: true hyperparameters_out: architecture_Net: FCNN num_hidden_layers: 4 num_neurons_per_layer: 200 activation: tanh adaptive_activation: true fourier_features: true weight_factorization: false scale_input: true scale_output: true
-
Finally, specify the optimization algorithm, the weights algorithm, the batches/samples approach and the number of iterations.
adapt_weights: true adapt_w_iter: 1000 adapt_w_method: gradients alpha_w: 0.7 sample_method: random_sample optimizer: Adam lr: method: exponential_decay initial_learning_rate: 0.001 decay_steps: 2000 decay_rate: 0.9 staircase: true N_iters: 20000
Our recent work investigates the application of Physics-Informed Neural Networks (PINNs) to solve the Poisson-Boltzmann equation (PBE) using XPPBE. In this study, we highlight the impact of incorporating advanced neural network features, such as input and output scaling, random Fourier features, trainable activation functions, and a loss balancing algorithm.
- Title: An Investigation of Physics Informed Neural Networks to solve the Poisson-Boltzmann Equation in Molecular Electrostatics.
- Authors: Martín A. Achondo, Jehanzeb H. Chaudhry, Christopher D. Cooper.
- Journal/Conference: Under review.
- DOI: Pending.
All input files and scripts to reproduce the results are available in the Paper Folder.
If you find this project useful for your research or work, please consider citing it. Here is an example BibTeX entry:
@article{achondo2024investigation,
title={An Investigation of Physics Informed Neural Networks to solve the Poisson-Boltzmann Equation in Molecular Electrostatics},
author={Achondo, Martin A and Chaudhry, Jehanzeb H and Cooper, Christopher D},
journal={arXiv preprint arXiv:2410.12810},
year={2024}
}