Jump to content

Mod:Hunt Research Group/Jan combined charges

From ChemWiki

combined charges

  • the script we need is compromise_cli.py which can be found in repESP/scripts directory
  • this script calculates modified esp charges based on information from NBO or other charges on the given esp fitting points
  • use "compromise_cli.py -h" to obtain more information
  • this code requires the two respin1 and respin2 files
  • and should be run on averaged or resp charges but can be run on raw charges
  • we need 3 basic arguments,
input charge type= "list" the charges are in a text file (ie from resp/average) or the name the raw charges to be extracted
intput charge file = file to extract charges from this can be a gaussian.log file or the text file if you have used resp
esp file = name of file with the esp fitting points
  • as an option you can specify an output file with "-o filename"
  • you will also likely want to use the "--save_resp_to directoryname" option
  • for this example lets assume you have run resp on the mk charges to generate resp_mk_charges.txt
  • we will use the mk mesh so the file ch3oh_mk.esp
  • we will use the averaged nbo charges in ch3oh_nbo_average.txt (assuming you have run the averaging script)
  • now you are ready to run
compromise_cli.py list ch3oh_nbo_average.txt ch3oh_mk.esp --save_resp_to compromise_mk -o ch3oh_compromise_mk.txt
  • the input charges from the mk log file, the resp fit and nbo averaged are:
 0.174709  0.056552  -0.008412  -0.008412  -0.605637  0.391179
 0.107929  0.030521   0.030521   0.030521  -0.588728  0.389236
-0.185620  0.152337  0.152337  0.152337 -0.711720  0.440330
  • the output to terminal looks line this
Evaluating ratios...

Please check if the following RESP input is what you want:

Atom  1:  C , frozen
Atom  2:  H 
Atom  3:  H , equivalenced to atom 2
Atom  4:  H , equivalenced to atom 2
Atom  5:  O , frozen
Atom  6:  H 

Optimizing fit quality...

FOUND optimal heavy ratio: 0.6902 with RRMS of 0.196694

Atom  1:  C , charge: -0.1281
Atom  2:  H , charge:  0.0900
Atom  3:  H , charge:  0.0900
Atom  4:  H , charge:  0.0900
Atom  5:  O , charge: -0.4912
Atom  6:  H , charge:  0.3494
  • the file created is ch3oh_compromise_mk.txt
 -0.128107  0.089968  0.089968  0.089968 -0.491198  0.349401
  • the directory created is compromise_mk
which contains a lot of sub-directories which span the different ratios produced
for example "ratio+0.500000" contains
charges.qout   esout          input.respin   punch
corrected.esp  input.qout     output.respout
  • input.respin
read initial charges from input file
no constraint to zero charge for the heavy atoms (qwt)
charge is frozen for O and C and averaged for the methyl H's
all H's have their charge fit independently
RESP input of type 'h' generated by the repESP program

 &cntrl

 nmol = 1,
 ihfree = 1,
 ioutopt = 1,
 qwt = 0.00000,
 iqopt = 2,

 &end
    1.0
Resp charges for organic molecule
    0    6
    6   -1
    1    0
    1    2
    1    2
    8   -1
    1    0
  • "output.respout" contains info from the restrained esp fit and some of this is preproduced in "punch"
Resp charges for organic molecule

iqopt   irstrnt  ihfree     qwt
  2     -1      1        0.000000

 rel.rms   dipole mom       Qxx      Qyy      Qzz
    0.33402   1.30130   1.21563   0.38283  -1.59846

          Point charges before & after optimization
    NO   At.No.    q0           q(opt)   IVARY  d(rstr)/dq
     1     6  -0.092810      -0.092810   -1    0.000000
     2     1   0.076169       0.065929    0    0.000000
     3     1   0.076169       0.065929    2    0.000000
     4     1   0.076169       0.065929    2    0.000000
     5     8  -0.355860      -0.355860   -1    0.000000
     6     1   0.220165       0.250883    0    0.000000

        Statistics of the fitting:
  The initial sum of squares (ssvpot)                      0.099
  The residual sum of squares (chipot)                     0.011
  The std err of estimate (sqrt(chipot/N))               0.00512
  ESP relative RMS (SQRT(chipot/ssvpot))                 0.33402

 Dipole Moment (Debye)=   1.30130