pHmap software for generating multi pH-profile pictures of your protein surface electrostatics/charges

Multi protein pH-profile surface charge maps

Erik Breslmayr
4 min readNov 5, 2021

In a lot of scientific papers visualization of surface charges or surface electrostatics is a common feature for the interpretation of protein-protein, protein-ligand interactions.

Representation of protein surface charges

However, in many cases the surface electrostatics are calculated at one pH value, because to calculate more pH values is quite time intensity. Therefore, the program pHmap available from Github, is an automation tool, which uses pdb2pqr, abps, PyMol and Imagemagick for running die programs pdb2pqr for calculation of the protonation state of the protein, abps to solve the equations of continuum electrostatics, Pymol for visualize the surface charges based on the matrix generated by abps and Imagemagick for combining all pictures to one big pH-profile.

pHmap pH-profile of protein and two variants

Hence, pHmap can read data in the format of xydy…ydy or xy…y from a measured pH-profile, it allows to compare relative activity or binding data (or any other data measured over a pH range) with surface electrostatics.

first column -> x data -> pH values; second column -> y data -> relative data in % of first protein structure; third column -> dy data -> stdev or error bar data of first protein; fourth column -> y data -> relative data of second protein; fifth column -> dy data -> stdev or error bar data second protein; …
Example of relative activity data in |x y dy y dy y dy| format, which can be read by pHmap

The user just has to provide a text file with the necessary data (relative in %) in a tab separated format. First column has to be pH values, which will directly be used to calculate surface charges. Second column, relative data in % and third column are optionally error bar data, such as standard deviation of multiple measurements. For each pdb file or protein a y (and dy) column must exist.

pHmap relative activity or binding data visualization to compare with surface charges

This makes pHmap a very useful tool for studying and comparing electrostatics of proteins, protein-protein interactions or protein-ligand interactions together with wet-lab generated data.

The program is written in bash, so it is executable for any OS (Windows by using Subsystem for Linux), however works best by using Linux. Before using the pHmap program all necessary tools (pdb2pqr, abps, pymol, imagemagick) have to be installed.

Installation guides for necessary tools

pdb2pqr and abps

click here

Open Source PyMol (requires version 2.x)

no license required, because pymol runs in batch mode

sudo apt install pymol (Ubuntu 20) | brew install brewsci/bio/pymol (Mac)

ImageMagick

sudo apt install imagemagick (Ubuntu)|brew install imagemagick (Mac)

Installation of pHmap

No installation is necessary for pHmap, the program has to be made executable, a auto-completion file can be copied to the necessary location to autocomplete argument flags and all tools must be executable by adding the location to the system path.

  • Download pHmap and pHmap.m4
  • Add pHmap e.g. to local path directory /usr/bin/ or add the path to your .bashrc file (Ubuntu).
  • Add pHmap.m4 to bash_completion location /etc/bash_completion.d/ (Ubuntu)

pHmap tutorial

After installation try to run the examples.

  • Extract the example.zip and you find three .pdb, a set_view.txt, a activityData.txt and a ligand.mol2 file

Quick start

  • For visualizing only surface charges you can type: pHmap *.pdb -r '5 6 0.5' -s set_view.txt -l ligand.mol2
  • This will use all pdb files within the folder and calculates charges for a pH range from 5 to 6 with 0.5 steps (pH values: 5.0 5.5 6.0).
  • Type: pHmap -h which shows also some other examples…
  • This is in principle all you have to do, however before you start with your own proteins you need some prerequisites…

Setup view

  • To position your protein in a way you would like to represent it (e.g. so that the cofactor looks into your direction) you have to open your pdb files in PyMol and superimpose all structures, to have the same coordinates.
  • Finally, you type get_view and copy the set_view screen output from pymol into a text file.

Prepare ligand

  • If your protein contains a cofactor or ligand, which is located close to the surface, it will change the surface electrostatics. Therefore, you have to provide a .mol2 file with the coordinates and atom types.
  • Click in PyMol on the ligand or cofactor and export it as .mol2 file. It is very important that you export the .mol2 file from the .pdb file you also load to pHmap, otherwise the ligand has other coordinates.
  • Limitation: Hence, the ligand within the .pdb file will be ignored, you can only run one ligand file, because pdb2pqr and abps only support one ligand file. If you have different proteins with different ligands, you have to run pHmap for each individual structure.

Re-run pHmap

Update view settings

  • If you have successfully run pHmap, however, the view settings are not optimal, you don’t have to run all calculation again. pHmap can skip different parts of the script, such as the calculation of the electrostatic matrix.
  • For that you run the same command again, however with an additional flag argument: pHmap *.pdb -r '5 6 0.5' -s set_view.txt -l ligand.mol2 --update_rendering
  • This will skip pdb2pqr and abps calculations and only runs pymol rendering and imagemagick again.

Update axis and style

  • If you only want to update the axis, because you changed the font size for instance, this is possible by only running imagemagick again:pHmap *.pdb -r '5 6 0.5' -s set_view.txt -l ligand.mol2 --update_axis
  • This will skip pdb2pqr, abps and pymol rendering, only collects all pictures and generates the final picture, so you can easily change the axis settings or font settings for example.

--

--

Erik Breslmayr

During my PhD, I worked in the field of bioinformatics (protein modelling/simulation). Now, I want to share my experience with you.