Automated workflow tools for reproducible electrostatic calculations on biological nanopore membrane proteins. This toolkit streamlines the process of preparing, parameterizing, and running electrostatics simulations using PDB2PQR (for structure protonation) and APBS (for Poisson-Boltzmann electrostatics), with a focus on membrane-embedded nanopores.
It provides a fully scripted, parameter-sweepable pipeline and example configurations to support computational biophysics research and nanopore engineering. The toolkit is modular and can be adapted for other membrane protein systems by copying and editing the example workflow directory.
Note: The default example targets MspA. For other proteins, copy
examples/apbs_mspa and adjust input files and parameters as needed.
Warning: This is an early-stage project under active development. Use at your own risk. The workflows and scripts may change as we optimize the implementation. Feedback and contributions are welcome!
- Automated three-stage pipeline: PDB → PDB2PQR → APBS (with membrane modeling)
- Parameter sweep capabilities (pH, ionic strength, grid resolutions)
- Modular: easily adapt workflows for new proteins or membrane systems
- Fully scripted and reproducible: all steps are automated and tracked
- Output validation and troubleshooting tools included
Assuming an Ubuntu system with git, gcc, and bash installed, follow these steps to set up and run the example workflow. (For other systems, see the documentation links below.)
# 1. Clone repository
git clone https://github.com/willemsk/nanopore-simulation-tools.git
cd nanopore-simulation-tools
# 2. Install dependencies
sudo apt-get install just pdb2pqr apbs
# 3. Fetch and compile draw_membrane2 utility
cd bin/
wget https://raw.githubusercontent.com/Electrostatics/apbs/main/examples/helix/draw_membrane2.c
gcc -O3 -o draw_membrane2 draw_membrane2.c -lm
cd ..
# 4. Run example workflow
cd examples/apbs_mspa
just allThis will generate protonated structures (.pqr files) and electrostatic
potential maps (.dx files) for several MspA-D118R mutant nanopores at pH 7.0
and ionic strength 0.15 M.
Note: The default grid spacings are set to coarse values (15 Å and 5 Å) for
demonstration purposes. For production runs, increase these values for higher
accuracy. Memory and disk requirements grow rapidly with grid size (
This toolkit requires these main dependencies:
just(command runner): see installation guidePDB2PQR(structure protonation tool): see installation guideAPBS(electrostatics solver): see installation guide or build from sourcedraw_membrane2(membrane drawing utility): compile from APBShelixexample (see above)
After installation, verify dependencies:
just --version # Should show just version
pdb2pqr30 --version # Should show PDB2PQR version
apbs --version # Should show APBS version
./bin/draw_membrane2 # Should show usage messageNavigate to an example directory and run the automated pipeline:
cd examples/apbs_mspa
just all # Run complete workflowThis executes three stages:
- PQR generation (
just pqrs) - Protonate structures at specified pH values - Input preparation (
just inputs) - Create APBS run directories with templated inputs - APBS calculations (
just apbs) - Execute electrostatics calculations with membrane
Edit params.env to configure:
- pH values:
PH_VALUES="6.0 7.0 8.0" - Ionic strength:
IONC_VALUES="0.05 0.10 0.15" - Grid settings:
DIME_L,GRID_Lfor coarse grid;DIME_S,GRID_Sfor fine grid - Membrane geometry:
ZMEM(center),LMEM(thickness),R_TOP/R_BOTTOM(radii)
Override from command line:
just PH_VALUES="7.4" pqrs # Single pH
just IONC_VALUES="0.10 0.20" inputs # Custom ion concentrationsCheck that outputs are complete and correct:
just validate # Verify all expected files exist and calculations succeededSuccessful runs produce:
OUTPUT/
├── pqr/
│ └── {protein}_pH{pH}.pqr # Protonated structures
└── apbs_runs/
└── {protein}_pH{pH}_{ionc}M/
├── apbs_dummy.in, apbs_solv.in # APBS input files
├── draw_membrane.in # Membrane parameters
├── TM.pqr # Symlinked structure
├── dielx_L.dx, dielx_Lm.dx # Dielectric maps (before/after membrane)
├── kappa_L.dx, kappa_Lm.dx # Ion accessibility maps
├── charge_L.dx, charge_Lm.dx # Charge distribution maps
├── pot_Lm.dx, pot_Sm.dx # Electrostatic potentials (coarse/fine)
└── apbs_*.out # APBS output logs
See examples/apbs_mspa/README.md for complete
output structure and validation details.
just clean # Remove all generated outputsnanopore-simulation-tools/
├── bin/ # Compiled binaries
├── scripts/
│ └── electrostatics/ # Electrostatics workflow automation
│ ├── workflow_helpers.sh # Shared helper functions
│ ├── run_pdb2pqr.sh # PQR generation script
│ ├── run_apbs.sh # APBS orchestration script
│ └── validate_output.sh # Output validation script
└── examples/
└── apbs_mspa/ # MspA electrostatics workflow
├── justfile # Workflow orchestration recipes
├── params.env # Configuration parameters
├── apbs_templates/ # APBS input templates
├── pdb/ # Input PDB structures
└── pdb2pqr_forcefield/ # Custom CHARMM force fields
Scripts in scripts/electrostatics/ automate the
three-stage pipeline and are typically invoked via just recipes:
cd examples/apbs_mspa/
just pqrs # Creates .pqr files from input PDBs target pH value(s)
just inputs # Prepares APBS input directories
just apbs # Executes all APBS calculations
just validate # Validates output completeness of APBS runsScripts can in principe also be called directly with command-line arguments. See
individual script help (-h flag) for usage information. All scripts source
configuration from params.env files in example directories.
"APBS binary not found"
- Ensure APBS is installed and available in your PATH
- Verify with
which apbsorapbs --version - See APBS installation guide
"Atom off the mesh" errors
- Increase grid size: edit
GRID_Land/orGRID_Sinparams.env - Verify grid center
GCENTencompasses your protein
Invalid grid dimensions
- APBS requires:
dime = c × 2^(nlev+1) + 1for some integerscandnlev(seedimedocumentation) - Use provided values in
params.envor calculate new ones following this formula just validatechecks this automatically before running
PDB2PQR protonation failures
- Check for missing atoms or non-standard residues in PDB file
- Review
.logfiles inOUTPUT/pqr/for detailed error messages - Consider using standard CHARMM force field instead of custom if issues persist
Silent calculation failures
- Run
just validateto check output completeness - Inspect
.outfiles in run directories for APBS error messages - Look for "Total electrostatic energy" in
.outfiles - absence indicates failure
For additional assistance:
- Check detailed workflow documentation in
examples/apbs_mspa/README.md - Review APBS documentation
- Review PDB2PQR documentation
- Open an issue on GitHub
If you use this toolkit in your research, please cite (see CITATION.cff for complete references):
@software{nanopore_simulation_tools,
author = {Reccia, Marco and Quilli, Francesco and Willems, Kherim and Morozzo della Rocca, Blasco and Raimondo, Domenico and Chinappi, Mauro},
title = {Bioinformatic and computational biophysics tools for nanopore engineering: a review from standard approaches to machine learning advancements},
year = {2025},
journal = {Journal of Nanobiotechnology},
url = {https://github.com/willemsk/nanopore-simulation-tools}
}And cite the underlying tools:
- APBS: see citing APBS
- PDB2PQR: see citing PDB2PQR
Main contributors:
- Kherim Willems
- Francesco Quilli
- Mauro Chinappi
Other contributors:
- Marco Reccia
- Blasco Morozzo della Rocca
- Domenico Raimondo
We welcome contributions! See CONTRIBUTING.md for guidelines on:
- Reporting issues
- Adapting workflows for new proteins
- Creating custom force fields
- Adding new workflow types
This project is licensed under the GNU GPL v3. See the LICENSE file for details.
This project builds upon and integrates several open-source tools:
- APBS and
draw_membrane2utility: Electrostatics calculations, including membrane environment - PDB2PQR: Structure preparation and protonation state assignment
- just: Workflow orchestration and task management
It is a work in progress, so any feedback is appreciated!