Skip to main content

Rigorous method to create lib file

Sometimes you totally fail to go ahead with the prepin and frcmod files you have generated from the newly generated PDB file even after you follow the procedure given in previous two posts. And you keep wondering?
In such a case you need a more detailed procedure.
First take a look at the pdb file.
For example:
Here is one such pdb file generated from the gabedit that troubled me for some time.
---------------
HEADER    PROTEIN
COMPND    UNNAMED
AUTHOR    GENERATED BY GABEDIT 2.3.8 at Tue Jul 26 16:53:48 2011
ATOM  1      C   C    1       -2.907  -0.997  -0.385  1.00  300.00          C 0.0000  
ATOM  2      N   N    1       -2.060  -0.981  -1.189  1.00  300.00          N 0.0000  
ATOM  3      C   C    1       -1.026  -0.973  -2.172  1.00  300.00          C 0.0000  
ATOM  4      H   H    1       -0.409  -1.865  -2.044  1.00  300.00          H 0.0000  
ATOM  5      H   H    1       -0.409  -0.082  -2.038  1.00  300.00          H 0.0000  
ATOM  6      H   H    1       -1.476  -0.977  -3.165  1.00  300.00          H 0.0000  
CONECT    1    2                                                       
CONECT    2    1    3                                                  
CONECT    3    2    4    5    6                                        
CONECT    4    3                                                       
CONECT    5    3                                                       
CONECT    6    3                                                       
MASTER        0    0    0    0    0    0    0    0    6    0    6    0
END
---------------------

When you generate a prepin file for this, it appears something like this:

------------------------------
 0    0    2

This is a remark line
molecule.res
C      INT  0
CORRECT     OMIT DU   BEG
  0.0000
   1  DUMM  DU    M    0  -1  -2     0.000      .0        .0      .00000
   2  DUMM  DU    M    1   0  -1     1.449      .0        .0      .00000
   3  DUMM  DU    M    2   1   0     1.522   111.1        .0      .00000
   4  C     c1    M    3   2   1     1.540   111.208   180.000   0.43498
   5  N     n1    M    4   3   2     1.168   136.486    91.140  -0.85143
   6  C1    c3    M    5   4   3     1.427   179.534   -85.467   0.25973
   7  H     h1    E    6   5   4     1.092   108.912   -35.443   0.05222
   8  H1    h1    E    6   5   4     1.092   109.239  -154.928   0.05225
   9  H2    h1    E    6   5   4     1.090   109.171    84.306   0.05225


LOOP

IMPROPER

DONE
STOP

---------------------------------------

The unit name is bit odd. Just a "C".
It gives problem ahead where it fails to read and understand the unit name properly and therefore the atoms name and type in it. And you end up with some error.
So to move ahead, what you do is you replace the entries in the fourth column of the PDB file (which are shown in bold) by a common three letter word. Here I replace all of them by word "TSN". My PDB file now looks like:
----------------
HEADER    PROTEIN
COMPND    UNNAMED
AUTHOR    GENERATED BY GABEDIT 2.3.8 at Tue Jul 26 16:53:48 2011
ATOM  1      C   TSN    1       -2.907  -0.997  -0.385  1.00  300.00          C 0.0000  
ATOM  2      N   TSN    1       -2.060  -0.981  -1.189  1.00  300.00          N 0.0000  
ATOM  3      C   TSN    1       -1.026  -0.973  -2.172  1.00  300.00          C 0.0000  
ATOM  4      H   TSN    1       -0.409  -1.865  -2.044  1.00  300.00          H 0.0000  
ATOM  5      H   TSN    1       -0.409  -0.082  -2.038  1.00  300.00          H 0.0000  
ATOM  6      H   TSN    1       -1.476  -0.977  -3.165  1.00  300.00          H 0.0000  
CONECT    1    2                                                       
CONECT    2    1    3                                                  
CONECT    3    2    4    5    6                                        
CONECT    4    3                                                       
CONECT    5    3                                                       
CONECT    6    3                                                       
MASTER        0    0    0    0    0    0    0    0    6    0    6    0
END

-----------------
And when you generate the prepin file it appears like this:
--------------------
0    0    2

This is a remark line
molecule.res
TSN    INT  0
CORRECT     OMIT DU   BEG
  0.0000
   1  DUMM  DU    M    0  -1  -2     0.000      .0        .0      .00000
   2  DUMM  DU    M    1   0  -1     1.449      .0        .0      .00000
   3  DUMM  DU    M    2   1   0     1.522   111.1        .0      .00000
   4  C     c1    M    3   2   1     1.540   111.208   180.000   0.43498
   5  N     n1    M    4   3   2     1.168   136.486    91.140  -0.85143
   6  C1    c3    M    5   4   3     1.427   179.534   -85.467   0.25973
   7  H     h1    E    6   5   4     1.092   108.912   -35.443   0.05222
   8  H1    h1    E    6   5   4     1.092   109.239  -154.928   0.05225
   9  H2    h1    E    6   5   4     1.090   109.171    84.306   0.05225


LOOP

IMPROPER

DONE
STOP
---------------------
Check the change in the unit name. "TSN" here.
Once I created the prepin file followed by frcmod file, load the prepin file in xleap followed by frcmod. check the unit and save the unit as a pdb file using:

> savepdb TSN new_molecule.pdb

This will save the molecule in pdb format that is acceptable to the the xleap.
So the new_molecule.pdb file looks like:
-------------------------
ATOM      1  C   TSN     1       3.537   1.423  -0.000  1.00  0.00
ATOM      2  N   TSN     1       4.384   1.440  -0.804  1.00  0.00
ATOM      3  C1  TSN     1       5.418   1.450  -1.787  1.00  0.00
ATOM      4  H   TSN     1       6.037   0.560  -1.659  1.00  0.00
ATOM      5  H1  TSN     1       6.033   2.343  -1.653  1.00  0.00
ATOM      6  H2  TSN     1       4.968   1.446  -2.780  1.00  0.00
TER
END
--------------------------

Use this pdb file to create prepin and frcmod file. Create the prepin and frcmod files for all the molecules you are considering. Load them in xleap and create the common lib file as explained in earlier post.


Now why do we do all this jugglery?
One reason: it takes care of the unit name, which is a bottle neck while dealing with xleap.
Second reason: it brings the pdb files of all the molecules in one common format which is generally acceptable to xleap.
Third reason: We in coming steps need to create a single common pdb file including all the molecules. This single common pdb file should match the details stored in the combined lib file we create.

If that does not happen all efforts taken till now go vain and we might need to start right from scratch.

So in summary:

Generate a PDB file manually from gabedit
Check the file and change the fourth column  by a common three letter word in each row.
Create the prepin and frcmod file for the modified pdb file
load it in xleap and save the unit (the three letter word we changed in PDB file) as a new pdb file.
Use this new pdb file to create the prepin and frcmod files.
Follow the procedure for all the molecules you are considering.
load them all in the xleap and save them in a single common lib file.
The new lib file created is the one to be used further.

Comments

Popular posts from this blog

Material Studio - selective molecule movement

So, working with Material Studio is awesome. You get to handle bigger, complicated and even unimaginable system. But I am facing problems in very minute functioning. I recently faced two problems, but managed to resolve on my own. Somehow, tutorials doesn't help in resolving them and you end up doing some exercise on your own to get the solution. Among these, the problem of bringing two molecular structures in one window and then adjusting one molecule by moving it around, while other structure remains untouched, as it is. Actually, this should not be a problem to do. There is a simple way of doing this. Select the molecule to be moved and then there is a symbol (button) to select, which allows you to selectively move that molecule only. This is the same way it can be done in Material studio too.  But among all the dozens of symbols, the new person handling MS, kind of gets lost. So, what he does is check the tutorials, for any help. But the tutorials don't talk about suc...

xleap and ionic systems

An extension of earlier problem in generation of prmtop and inpcrd files follows here. After a long time I had to use xleap to generate parameter and coordinate files for a system comprising of an organic molecule, protonated methanol and Cl atom. Now, organic molecule is not an issue. antechamber tutorial clearly explains how to do that. So, any organic molecule like MEOH is also not a problem. But MEOH2 could be. I have written about how to deal with systems like MEOH2 or extra protonated oxygen systems. But if you want to bring an organic molecule, protonated methanol(MEOH2) and Cl atom together and create parameter and coordinate file for that, it may not be as easy as it appear. Since I had lost touch with xleap for sometime, I totally forgot the small tricks I found to work in xleap. I started working with: * the separate pdb files for each molecular unit. * then create a single pdb file using packmol for the whole system. * create prepin or mol2 file corresponding to combined p...

Generating a structure PDB file using Gabedit

If Gabedit is installed and functioning on your system, type gabedit  in terminal. Gabedit will open and you can find an option "Geometry" in the tool bar. Select "Geometry"--> "Draw" After some trials and playing you will finally learn how to generate a structure. Once your structure is ready, you need to set the atom types and charges. For this click on "M" button in the top left of the "Draw Geometry" window and select options as: M-->"Set"--> "Atom Type & charge using PDB template" Here if you use "Atom Types using connection types", it helps. You can check if the atom type and charge has been set according to the amber requirements by an indirect method. Try to run a quick MM calculation. Run MM calculations by clicking: "M"-->Molecular Mechanics-->optimization It may sometimes end up with a pop up window that suggests that either atom type or charge is not...