Computing CHARMM FF energy using GMIN, MMTSB and CHARMM

From Docswiki
Jump to navigation Jump to search

Below script (compare.sh) computes the Charmm FF energy of the same structure. Useful for cross-validating force field settings in GMIN data file, CHARMM input file and MMTSB options.

ss2029@clust:~/WORK/compareCharmmEnergies> ls compare.sh 
/home/ss2029/svn/GMIN/bin/CGMIN35.serial gmin.log 
echo ============GMIN===========================
grep '1 energy'  gmin.log

echo ============MMTSB==========================
enerCHARMM.pl -psf input.psf input.crd -par gb=0,cutnb=999,cuton=979,cutoff=989,param=27 -out total dbase.1.pdb

echo ============CHARMM=========================
~/svn/CHARMM35/exec/gnu/charmm < ener.inp > charmm.log 
grep 'ENER>' charmm.log

The required input files (GMIN data file, Charmm script, Charmm psf and Charmm crd) are listed below. The psf and crd files are for dialanine.


GMIN data file

MAXERISE 1.0D-1
ACCEPTRATIO 0.3
comment CENTRE
EDIFF 0.05
UPDATES 100
TEMPERATURE 1.0
comment MAXIT 0 0 - no quenching
MAXIT 0 0
comment STEPS 0 1.0 - no hopping
STEPS 0 1.0
STEP 0.03 0.0
SAVE 50
CHARMMTYPE toph19_eef1_perm.in param19_eef1_perm.in
CHARMM
*
PRNLEV 0
BOMLev -2

set pardir "/home/ss2029/svn/CHARMM35/toppar"

! READ TOPOLOGY
open unit 1 read formatted name @pardir/"top_all27_prot_na.rtf"
read rtf card unit 1
close unit 1

! READ PARAMS
open unit 2 read formatted name @pardir/"par_all27_prot_na.prm"
read para card unit 2
close unit 2

! read psf
open unit 1 form read name input.psf
read psf card unit 1
close unit 1

! read crd
open unit 20 name input.crd read card
READ COOR UNIT 20 CARD FREE
CLOSE UNIT 20

UPDATE NBOND atom switch cdie vdw vswitch -
   ctonnb 979 ctofnb 989 cutnb 999

PRNLEV 0
WRNLEV 0

Charmm script

bomblev -2

! SET PATH to topology and parameter files 
! quotes MUST if path has both upper and lower case letters    
set pardir "/home/ss2029/svn/CHARMM35/toppar"

! READ TOPOLOGY 
open unit 1 read formatted name @pardir/"top_all27_prot_na.rtf"
read rtf card unit 1
close unit 1

! READ PARAMS 
open unit 2 read formatted name @pardir/"par_all27_prot_na.prm"
read para card unit 2
close unit 2

! READ psf from file 
open unit 1 form read name input.psf
read psf card unit 1
close unit 1

! 
! Energies are sensible only if coordinates are read from crd, not pdb 
!

! READ coord from crd 
!open unit 1 card read name dbase.1
open unit 1 card read name input.crd
read coor card unit 1 
close unit 1

! set ff parameters 
 UPDATE NBOND atom switch cdie vdw vswitch -
   ctonnb 979 ctofnb 989 cutnb 999

! energy before min 
ENERgy 

STOP 

Charmm crd

* NONE *
*  DATE:     8/10/11      5:30:23      CREATED BY USER: ss2029
*
        32  EXT
         1         1  ALA       CAY            -2.1597208496        0.5369209221        0.9299743167  DIALA     1               0.0000000000
         2         1  ALA       HY1            -2.4659539520        0.0029400500        0.0050923160  DIALA     1               0.0000000000
         3         1  ALA       HY2            -2.5618558380        1.5723870611        0.9095212950  DIALA     1               0.0000000000
         4         1  ALA       HY3            -2.5618558380        0.0014750162        1.8164877870  DIALA     1               0.0000000000
         5         1  ALA       CY             -0.6725000000        0.5824020840        1.0087500000  DIALA     1               0.0000000000
         6         1  ALA       OY             -0.1045492057        1.1279137464        1.9536039154  DIALA     1               0.0000000000
         7         1  ALA       N               0.0000000000        0.0000000000        0.0000000000  DIALA     1               0.0000000000
         8         1  ALA       HN             -0.4526285282       -0.4441667523       -0.7693193820  DIALA     1               0.0000000000
         9         1  ALA       CA              1.4592000000        0.0000000000        0.0000000000  DIALA     1               0.0000000000
        10         1  ALA       HA              1.8124541037       -0.4965229490        0.8965112935  DIALA     1               0.0000000000
        11         1  ALA       CB              1.9486982186       -0.8335550140       -1.2066493868  DIALA     1               0.0000000000
        12         1  ALA       HB1             1.5137367553       -1.8544732629       -1.1553340411  DIALA     1               0.0000000000
        13         1  ALA       HB2             1.6279547656       -0.3731122917       -2.1665648762  DIALA     1               0.0000000000
        14         1  ALA       HB3             3.0556965246       -0.9321006383       -1.2139617347  DIALA     1               0.0000000000
        15         1  ALA       C               2.0959460235        1.4010979629        0.0000000000  DIALA     1               0.0000000000
        16         1  ALA       O               1.4254835730        2.4319433404        0.0000000000  DIALA     1               0.0000000000
        17         2  ALA       N               3.4505567565        1.4578729742        0.0000000000  DIALA     2               0.0000000000
        18         2  ALA       HN              3.9535262716        0.5940316537        0.0000000000  DIALA     2               0.0000000000
        19         2  ALA       CA              4.2755116024        2.6640434399        0.0000000000  DIALA     2               0.0000000000
        20         2  ALA       HA              4.0651012609        3.2359271596       -0.8965112935  DIALA     2               0.0000000000
        21         2  ALA       CB              3.8638264508        3.5386506679        1.2066493868  DIALA     2               0.0000000000
        22         2  ALA       HB1             2.7756002095        3.7559734531        1.1553340411  DIALA     2               0.0000000000
        23         2  ALA       HB2             4.0628092381        3.0139700855        2.1665648762  DIALA     2               0.0000000000
        24         2  ALA       HB3             4.4074251611        4.5080096993        1.2139617347  DIALA     2               0.0000000000
        25         2  ALA       C               5.7914561039        2.3986507715        0.0000000000  DIALA     2               0.0000000000
        26         2  ALA       O               6.5972739840        3.3279287408        0.0000000000  DIALA     2               0.0000000000
        27         2  ALA       NT              6.1750320160        1.1095058923        0.0000000000  DIALA     2               0.0000000000
        28         2  ALA       HNT             5.5284590189        0.3505906405        0.0000000000  DIALA     2               0.0000000000
        29         2  ALA       CAT             7.5659278107        0.7773780735        0.0000000000  DIALA     2               0.0000000000
        30         2  ALA       HT1             8.0482644114        1.2005614688        0.9069664920  DIALA     2               0.0000000000
        31         2  ALA       HT2             7.6834087533       -0.3273930468        0.0000000000  DIALA     2               0.0000000000
        32         2  ALA       HT3             8.0482644114        1.2005614688       -0.9069664920  DIALA     2               0.0000000000

Charmm psf

PSF EXT CMAP CHEQ

         2 !NTITLE
* NONE *                                                                        
*  DATE:     8/10/11      5:30:23      CREATED BY USER: ss2029                  

        32 !NATOM
         1 DIALA    1        ALA      CAY        24  -0.270000       12.0110           0   0.00000     -0.301140E-02
         2 DIALA    1        ALA      HY1         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
         3 DIALA    1        ALA      HY2         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
         4 DIALA    1        ALA      HY3         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
         5 DIALA    1        ALA      CY         20   0.510000       12.0110           0   0.00000     -0.301140E-02
         6 DIALA    1        ALA      OY         70  -0.510000       15.9990           0   0.00000     -0.301140E-02
         7 DIALA    1        ALA      N          54  -0.470000       14.0070           0   0.00000     -0.301140E-02
         8 DIALA    1        ALA      HN          1   0.310000       1.00800           0   0.00000     -0.301140E-02
         9 DIALA    1        ALA      CA         22   0.700000E-01   12.0110           0   0.00000     -0.301140E-02
        10 DIALA    1        ALA      HA          6   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
        11 DIALA    1        ALA      CB         24  -0.270000       12.0110           0   0.00000     -0.301140E-02
        12 DIALA    1        ALA      HB1         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
        13 DIALA    1        ALA      HB2         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
        14 DIALA    1        ALA      HB3         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
        15 DIALA    1        ALA      C          20   0.510000       12.0110           0   0.00000     -0.301140E-02
        16 DIALA    1        ALA      O          70  -0.510000       15.9990           0   0.00000     -0.301140E-02
        17 DIALA    2        ALA      N          54  -0.470000       14.0070           0   0.00000     -0.301140E-02
        18 DIALA    2        ALA      HN          1   0.310000       1.00800           0   0.00000     -0.301140E-02
        19 DIALA    2        ALA      CA         22   0.700000E-01   12.0110           0   0.00000     -0.301140E-02
        20 DIALA    2        ALA      HA          6   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
        21 DIALA    2        ALA      CB         24  -0.270000       12.0110           0   0.00000     -0.301140E-02
        22 DIALA    2        ALA      HB1         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
        23 DIALA    2        ALA      HB2         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
        24 DIALA    2        ALA      HB3         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
        25 DIALA    2        ALA      C          20   0.510000       12.0110           0   0.00000     -0.301140E-02
        26 DIALA    2        ALA      O          70  -0.510000       15.9990           0   0.00000     -0.301140E-02
        27 DIALA    2        ALA      NT         54  -0.470000       14.0070           0   0.00000     -0.301140E-02
        28 DIALA    2        ALA      HNT         1   0.310000       1.00800           0   0.00000     -0.301140E-02
        29 DIALA    2        ALA      CAT        24  -0.110000       12.0110           0   0.00000     -0.301140E-02
        30 DIALA    2        ALA      HT1         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
        31 DIALA    2        ALA      HT2         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02
        32 DIALA    2        ALA      HT3         3   0.900000E-01   1.00800           0   0.00000     -0.301140E-02

        31 !NBOND: bonds
         5         1         5         7         1         2         1         3
         1         4         6         5        11         9         7         8
         7         9        15         9        15        17         9        10
        11        12        11        13        11        14        16        15
        21        19        17        18        17        19        25        19
        19        20        21        22        21        23        21        24
        26        25        25        27        27        28        27        29
        29        30        29        31        29        32

        54 !NTHETA: angles
         2         1         3         2         1         4         2         1         5
         3         1         4         3         1         5         4         1         5
         1         5         6         1         5         7         6         5         7
         5         7         8         5         7         9         8         7         9
         7         9        10         7         9        11         7         9        15
        10         9        11        10         9        15        11         9        15
         9        11        12         9        11        13         9        11        14
        12        11        13        12        11        14        13        11        14
         9        15        16         9        15        17        16        15        17
        15        17        18        15        17        19        18        17        19
        17        19        20        17        19        21        17        19        25
        20        19        21        20        19        25        21        19        25
        19        21        22        19        21        23        19        21        24
        22        21        23        22        21        24        23        21        24
        19        25        26        19        25        27        26        25        27
        25        27        28        25        27        29        28        27        29
        27        29        30        27        29        31        27        29        32
        30        29        31        30        29        32        31        29        32

        66 !NPHI: dihedrals
         1         5         7         8         1         5         7         9
         2         1         5         6         2         1         5         7
         3         1         5         6         3         1         5         7
         4         1         5         6         4         1         5         7
         5         7         9        10         5         7         9        11
         5         7         9        15         6         5         7         8
         6         5         7         9         7         9        11        12
         7         9        11        13         7         9        11        14
         7         9        15        16         7         9        15        17
         8         7         9        10         8         7         9        11
         8         7         9        15         9        15        17        18
         9        15        17        19        10         9        11        12
        10         9        11        13        10         9        11        14
        10         9        15        16        10         9        15        17
        11         9        15        16        11         9        15        17
        12        11         9        15        13        11         9        15
        14        11         9        15        15        17        19        20
        15        17        19        21        15        17        19        25
        16        15        17        18        16        15        17        19
        17        19        21        22        17        19        21        23
        17        19        21        24        17        19        25        26
        17        19        25        27        18        17        19        20
        18        17        19        21        18        17        19        25
        19        25        27        28        19        25        27        29
        20        19        21        22        20        19        21        23
        20        19        21        24        20        19        25        26
        20        19        25        27        21        19        25        26
        21        19        25        27        22        21        19        25
        23        21        19        25        24        21        19        25
        25        27        29        30        25        27        29        31
        25        27        29        32        26        25        27        28
        26        25        27        29        28        27        29        30
        28        27        29        31        28        27        29        32

         6 !NIMPHI: impropers
         5         1         7         6         7         5         9         8
        15         9        17        16        17        15        19        18
        27        25        29        28        25        19        27        26

         3 !NDON: donors
         7         8        17        18        27        28

         3 !NACC: acceptors
         6         5        16        15        26        25

         0 !NNB

         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0

         9         0 !NGRP NST2
         0         1         0         4         1         0         6         1         0
        10         1         0        14         1         0        16         1         0
        20         1         0        24         1         0        26         1         0

         1 !MOLNT
         1         1         1         1         1         1         1         1
         1         1         1         1         1         1         1         1
         1         1         1         1         1         1         1         1
         1         1         1         1         1         1         1         1

         0         0 !NUMLP NUMLPH

         2 !NCRTERM: cross-terms
         5         7         9        15         7         9        15        17
        15        17        19        25        17        19        25        27

--Ss2029 15:48, 7 September 2011 (UTC)