Output Files
After running a simulation with NextGenPB, the program generates several output files depending on the chosen input options. These files contain the results of the electrostatic calculations and are useful for visualization and analysis.
What Output Files Are Generated?
-
.vtu
files:
These are one file per MPI process (rank). Each contains data like the dielectric map and the electrostatic potential values on a 3D grid. These files are in VTK format, which is common for scientific visualization. -
.pvtu
file:
This is a master “parallel” VTK file. It doesn’t contain data itself but references all the.vtu
files. Use this file to load the complete simulation results at once. -
phi_surf.txt
file:
Contains the 3D coordinates of surface mesh points and the electrostatic potential values calculated at those surface points. -
phi_nodes.txt
file:
Contains coordinates of boundary nodes (the edges of your computational domain) along with their potential values. -
phi_on_atoms.txt
file:
Contains the coordinates of atom centers and the electrostatic potential values computed at those positions.
Visualizing in ParaView (Recommended for VTK files)
ParaView is a free, open-source visualization software widely used for scientific data.
How to load your data in ParaView:
-
Launch ParaView on your computer.
-
In ParaView, click File > Open.
-
Select the
.pvtu
file generated by NextGenPB (e.g.,simulation.pvtu
). This file references all.vtu
parts. -
Click Apply in the Properties panel on the left to load the data.
-
To view the electrostatic potential:
- Find the Color By dropdown near the top toolbar.
- Select
Potential
from the list.
Visualizing with VMD, PyMOL, or ChimeraX (Using CUBE files)
These popular molecular visualization tools cannot directly read .vtu
or .pvtu
files.
To visualize your electrostatic potential with them, you need to convert the data into a format they understand — typically the Gaussian CUBE file format.
Step 1: Use the vtu2cube.py
script
NextGenPB provides a Python script in the scripts/ directory, that converts the .vtu
files into a .cube
file.
To run this script you need the python module
vtk
.Install it with:
pip install vtk
or, if you’re using Anaconda:
conda install vtk
Run this command in your terminal:
python path_to_ngpb_dir/scritps/vtu2cube.py <pqr_name> --scale <grid_scale>
- Replace
<pqr_name>
with the base name of your.pqr
input file. --scale
is optional and controls grid resolution; default is 2.
This will generate a CUBE file pqr_name.cube
.
You can now load the .cube file into VMD, PyMOL, or ChimeraX to visualize the electrostatic potential mapped onto the molecular surface.
Example:
python ~/NextGenPB/scripts/vtu2cube.py 6VYB.pqr --scale 3
This will produce
6VYB.cube
Step 2: Load the .cube file in VMD, PyMOL, or ChimeraX
Now open your molecular visualization software:
- In VMD, use File > Load Data Into Molecule and select the .cube file.
- In PyMOL, use File > Open to load the .cube file.
- In ChimeraX, use the command open 6VYB.cube (replace filename accordingly).
These programs will display the electrostatic potential as a volumetric map or surface coloring on your molecule.