Skip to main content

Creating library file (.lib)

In earlier post we saw how we create pdb files for the structures we want to consider for multi component molecular dynamics analysis.

So now we have say PDB files for four structures - an aldehyde, nitrile, amine and a phenol molecule.
Now, In the first step we generate the prepin files for all these molecules by  using:

$AMBERHOME/exe/antechamber -i sustiva.pdb -fi pdb -o sustiva.prepin -fo prepi -c bcc -s 2

Here the molecules are neutral in nature. If you are working with ionic systems you need to add -nc flag in the end followed by charge of the moelcule.
So, if the moelcule has +1 charge, the command will be:

$AMBERHOME/exe/antechamber -i sustiva.pdb -fi pdb -o sustiva.prepin -fo prepi -c bcc -s 2 -nc 1

If it is -1, command is:

$AMBERHOME/exe/antechamber -i sustiva.pdb -fi pdb -o sustiva.prepin -fo prepi -c bcc -s 2 -nc -1

If you have followed earlier preocedure properly then your prepin file should be created in no time.
You can see some lines of a prepin file as an example created for the amine molecule :

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

This is a remark line
molecule.res
MTL    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  C1    c3    M    3   2   1     1.540   111.208   180.000   0.14735
   5  H12   h1    E    4   3   2     1.071   164.526    20.274   0.04281
   6  H13   h1    E    4   3   2     1.069    63.986   -47.277   0.04290
   7  H14   h1    E    4   3   2     1.070    62.998    84.283  -0.00841
   8  N1    n3    M    4   3   2     1.009    85.966  -161.349  -0.91927
   9  H11   hn    E    8   4   3     1.011   109.459  -119.526   0.34729
  10  H2    hn    E    8   4   3     1.011   109.497     0.433   0.34733

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

What is worth noting here is the word following line "molecule.res".
The three letters "MTL" defines the unit for the molecule. When you create the prepin file for a molecule in a set of molecules to be cosidered together in a calculation, it is always suggested to open the prepin file and check this unit name.

First of all, it is better if it is a 3-letter word like here it is "MTL"
Secondly, it should be unique for each molecule.

In my case, aldehyde had the unit name "AMN"
Phenol has the unit name "BZN"
But both amine and nitrile got the same name "MTL"
This creates problem later on of repeating units.
One way to overcome the situation is to manually change  the unit name for one of the molecule. For example I changed the unit name for the nitrile molecule from "MTL" to "MTN". That takes care of all the problem.

Once your prepin files are ready, next task is to create the frcmod files corresponding to each prepin file.

Use this command:

$AMBERHOME/exe/parmchk -i sustiva.prepin -f prepi -o sustiva.frcmod

Don't forget to replace name "sustiva" by your prepin file name.

Frcmod files carry the information about the improper bond distance, angles, torsions which are not properly defined in the prepin file. So frcmod file help to rectify the original improper values.

Open xleap using the command:

$AMBERHOME/exe/xleap -s -f $AMBERHOME/dat/leap/cmd/leaprc.ff99

In the xleap window that opens follwoing above command, type

> source leaprc.gaff

(> is xleap prompt, so your command begins from source)

Now load the first molecule say aldehyde by using this command in xleap window:

> loadamberprep aldehyde.prepin

The molecule is loaded, but how will you check if it is right and properly loaded.
For this you need the unit name which you had checked in the prepin file.
I had the unit name AMN for the aldehyde
So I check it using command

> check AMN

You will get following message in the xleap window:


Checking 'AMN'....
Checking parameters for unit 'AMN'.
Checking for bond parameters.
Could not find bond parameter for: c - h4
Checking for angle parameters.
Could not find angle parameter: c3 - c - h4
Could not find angle parameter: h4 - c - o
There are missing parameters.
Unit is OK.


It shows that some of the parameters are not defined and you need to feed in those details. You do so by loading the corresponding frcmod file we generated earlier

So,

> loadamberparams aldehyde.frcmod

You get such a message:

Loading parameters: ./aldehyde.frcmod
Reading force field modification type file (frcmod)
Reading title:
remark goes here

Once again
> check AMN

This time it should be fine.

Now your molecule is ready for further action. But may be you would like to take a look at the structure.
So:

> edit AMN

A new window showing your structure  will appear.

If you have followed instructions properly, you will see proper structure, but if there is some mistake, then probably no window will pop up or else, you will see the structure in dotted form with no bonds formed.

Assuming that you followed the instructions, your structure is ready for next step.
You may close this window showing the structure by clicking on "Unit" followed by "Close".
Don't forget the "Close" click" will be active only with numlock "off".

This finishes loading one molecule.
To load another molecule follow the same procedure in the same xleap window:

> loadamberprep amine.prepin

> check MTL (The unit name for amine was MTL as checked in the prepin file)

> loadamberparams amine.frcmod

> check MTL

> edit MTL

close structure showing window by clicking on Unit --> close.

This way you can prepare as many molecules as you want and load them on the same xleap window.

This way we load xleap with four molecules- aldehyde(AMN), amine(MTL),nitrile(MTN) and phenol(BZN).

(Here nitrile also had MTL unit name mentioned in the prepin file but we changed it to MTN in the prepin file. This avoids duplicacy of the atoms from the 2 molecules)

We now save the parameters of these molecules together in a single lib file

For that we write command:

> saveoff AMN molecule.lib
> saveoff MTL molecule.lib
> saveoff MTN molecule.lib
> saveoff BZN molecule.lib

If you realise now we are using the unit names and not the file names.

So a lib file containing information of 4 molecules is created.This will be useful later.

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