Tutorial 5: Get A Better PDB File

In this tutorial, we will show you how to use pdbtop to treat PDB and XYZ files to a better format.

Using PSF Information

Sometime you have an XYZ file (maybe obtained from a MD simulation) that does not have information like atom names, residue names, etc. You can use the PSF file to correct them. The following example will show you how to do that.

$ pdbtop pdb -i d5-final.xyz -t d5.psf -o d5-final

Then, in d5-final.pdb, you will see correct atom names etc. It also works for PDB files.

Wrapping Molecules into a box

In a MD simulation with periodic boundary condition, the coordinates of a molecule may be outside the box. You can use the following command to wrap them into a box.

$ pdbtop pdb -i d5-final.xyz -t d5.psf -o d5-pbc --box "70 70 70" # or "-i d5-final.pdb", both works

A good point is that a residue will NOT be split into two parts. The results are shown below:

_images/p13.png