Exercise Two: Use PDB file
In this exercise, we will see how to use .pdb
files in NextGenPB.
Step 1 – Prepare the Inputs
Go to the directory for the second exercise:
cd ~/ngpb_tutorial/ex2
This will be your working directory:
~/ngpb_tutorial/ex2
Copy a .pdb
file into your current directory:
cp ../NextGenPB/data/1CCM.pdb .
.pdb
files do not contain partial charges or atomic radii, which are necessary to compute the molecular surface and electrostatics. These data are included in .pqr
files.
So you must also copy the files that provide this information:
cp ../NextGenPB/data/charge.crg .
cp ../NextGenPB/data/radius.siz .
Understand the Required Input Files
.pdb
files contain atom names, coordinates, and connectivity, but they do not include atomic charges or van der Waals radii, which are required to compute electrostatic interactions and molecular surfaces.
To provide this missing information, NextGenPB uses two additional files:
charge.crg – Partial Charges
This file assigns partial charges to atoms based on their names and residue types. Each line typically follows the format:
! This file was created from amber98.prm
! file from TINKER package
! The format of this file:
! Column 1-6: atom name; column 7-9: residue name;
! column 10-12: residue number; column 14: chain name;
! column 15-23: charge magnitude. For example:
atom__resnumbc_charge_
1H 0.0906 !!! Hydrogen of CA backbone
2H 0.0906
3H 0.0906
H1 0.4240 !!! Hydrogen for N-terminal residue
H2 0.4240 !!!
H3 0.4240 !!!
N ALA -0.4157
H ALA 0.2719
CA ALA 0.0337
HA ALA 0.0823
CB ALA -0.1825
...
radius.siz – Atomic Radii
This file assigns atomic radii used to define the molecular surface and mesh discretization. The format is similar to charge.crg:
! This file was created from amber98.prm
! file from TINKER package
! The format of this file:
! Column 1-6: atom name; column 7-9: residue name;
! column 10-12: residue number; column 14: chain name;
! column 15-23: atom size. For example:
atom__resnumbc_radius_
1H 1.250
2H 1.250
3H 1.250
H1 1.250
H2 1.250
H3 1.250
OXT 1.480
N ALA 1.8240
H ALA 0.6000
CA ALA 1.9080
HA ALA 1.3870
CB ALA 1.9080
...
If you already have a
.pqr
file (which includes charges and radii), you don’t need.crg
and.siz
files. However, using.pdb
+.crg
+.siz
gives more flexibility and allows you to apply consistent parameter sets to multiple structures.
Prepare the Parameter File
Create a file named options.prm
in the current directory with the following content:
[input]
filetype = pdb
filename = 1CCM.pdb
radius_file = radius.siz
charge_file = charge.crg
write_pqr = 1
name_pqr = 1CCM_out.pqr
[../]
[mesh]
mesh_shape = 0
perfil1 = 0.95
perfil2 = 0.2
scale = 2.0
[../]
[model]
bc_type = 1
molecular_dielectric_constant = 2 # Dielectric constant inside the molecule
solvent_dielectric_constant = 80 # Dielectric constant of the solvent (e.g., water)
ionic_strength = 0.145 # Ionic strength (mol/L)
T = 298.15 # Temperature in Kelvin
calc_energy = 2
calc_coulombic = 1
[../]
Step 2 – Run the Solver
Now launch the simulation using Apptainer:
apptainer exec --pwd /App --bind .:/App ../NextGenPB.sif mpirun -np 4 ngpb --prmfile options.prm
Step 3 – Output and Results
At the end of the execution, you will see a log similar to this:
================ [ Electrostatic Energy ] =================
Net charge [e]: 1.000100072473288
Flux charge [e]: 0.9999852578120542
Polarization energy [kT]: -370.6199322776101
Direct ionic energy [kT]: -0.3187630925742346
Coulombic energy [kT]: -10069.09853443279
Sum of electrostatic energy contributions [kT]: -10440.03722980297
===========================================================
compute energy
Elapsed time : 140.616ms
Timing Report:
...
You should also see a new file called 1CCM_out.pqr
.
This is the .pqr
file automatically generated by NextGenPB from the .pdb
input.
➡️ Go to the next exercise.