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

AutoDock Vina protocol: For Molecular Docking

There are many softwares available for carrying out molecular docking calculations. Many of these softwares are paid, while some of them are free. AutoDock is one such freely available software. Earlier, there was AutoDock 4.0 version available. One of the problem with the software was the space it would occupy, if you attempt to do multi docking. Recently, there is another algorithm made available under autodock. It is called AutoDock Vina. This is more efficient, robust and fast algorithm. There are many tutorials available to learn AutoDock Vina including: http://autodock.scripps.edu/faqs-help/tutorial/using-autodock-4-with-autodocktools/2012_ADTtut.pdf and also a video tutorial http://vina.scripps.edu/tutorial.html    But for some reason, few changes or explanation in little detail is always required to make it understandable for a beginner to follow.  Here is a protocol designed in our group, which our Master's student follow to get acquainted to Molecular Docking s

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 to generate prmtop and inpcrd files

Now that we have the lib file with the information for all the molecules we need to include and also the corresponding combined pdb file, creating prmtop and inpcrd files should not be a difficult task. So, to begin with we have a lib file name: molecule.lib a pdb file for 4 molecules name: four.pdb The  task is to generate a prmtop and inpcrd file. Initiate xleap using: $AMBERHOME/exe/xleap -s -f $AMBERHOME/dat/leap/cmd/leaprc.ff99 In xleap window > source leaprc.gaff # load the lib file by: > loadoff molecule.lib I am not sure but some times it helps to also load the frcmod files we created for the four molecules the information of which is stored in the lib file. > loadamberparams aldehyde.frcmod # Load the pdb file: > P=loadpdb four.pdb You should see some thing like this in the xleap window now: ------------------- > P=loadpdb four.pdb Loading PDB file: ./four.pdb Warning: name change in pdb file residue 1 ;  this residue is split i