Generating psf file for any pdb


Charging the system


VMD

First, load your pdb file (say water.pdb) into vmd. This should be trivial. Next, in vmd, select Extension and Tk console. Once the console window appears, type the following one by one ( a discussion of the command can be found here):

Next we will specify the quantity absent in a pdb file: charge. In the code below, the first line selects all the atoms with resname HW1, next line sets the type to HW. What is the type? Well, this is the name of the molecule in your parameter file. Most people keep it same as the resname, however, in case different atomtypes have the same forcefield parameters it can be handy to have a similar type. Finally, in the third line we specify the charge attached with this atom.

We repeat the same for all atoms in the pdb file (HW2 and OW1): Finally, we generate the psf file:


The automator

As you can see, the above process requires you to manually type out the charge, atomtype, etc for each atom. This can be a painful task if you are working with some macromolecule, protein, or even a small compound with say 30 atoms. To automate this process, we can use python. This code generates the tcl script for any compound, system, molecule. Just specify the charges, atomtype and resnames and you are good to go. Do send me a thank you note :)


Previous Page          Main Page          Next Page