Jump to content

Mod:Hunt Research Group/Jan generate esp

From ChemWiki

using Jan's code to generate and evaluate an esp from given partial charges on a particular mesh

introduction

  • we want to create esp cube files from given partial charges and compare these
  • to compare cube files they must have the same internal structure (ie same number of points)
  • see the wiki and gaussian website for cubegen "http://gaussian.com/cubegen/" and cubman "http://gaussian.com/cubman/" for more info on generating gaussian cubes with the same structure
  • here we will be using one cube file as a template for the one to be produced thus allowing for comparison
  • the best comparison point is the "real" esp created earlier ie the gaussian cube generated esp file

create our own ESP from given partial charges and mesh

  • the script we need is rep_esp.py
  • creates a gaussian cube file of the esp
  • for instructions run with -h argument "rep_esp.py -h"
  • required arguments are
input charge type=name the charges to be extracted options are 'mulliken', 'nbo', 'aim', 'mk', 'chelp', 'chelpg', 'hly', or 'list' if the charges are to be provided from a text file
input charge file = file to extract charges from this can be a gaussian.log file or a text file if you have used resp
template cube file = name of file with a template esp, this is necessary to compare the cube files
  • then add -o file to direct the output to a named cube file (remove the .cub extension)
  • for example creating a cube file from the gaussian mk charges, and the resp_mk charges
rep_esp.py mk ch3oh_mk.log ch3oh_esp.cub -o ch3oh_mk_esp
rep_esp.py list resp_charges_mk.txt ch3oh_esp.cub -o ch3oh_resp_mk_esp

compare our ESP files

  • we want to compare the partial charge derived esp cube files to the "proper" esp obtained from the electronic density
  • for this we use field_diff.py
  • required arguments are
input cube file=real esp cube file file.cub
input charge file = file to extract charges from this can be a gaussian.log file or a text file if you have used resp
template cube file = name of file with a template esp, this is necessary to compare the cube files
  • options include
"-o filename" (remove the .cub extension) to direct the output to a named cube file
"--absolute" to get the absolute error (ie all positive)
"--relative" to get the relative value ie the error divided by the value of the field at this point some problems here!
"--exclude density.cub iso-value distance" to exclude points lying closer than the electron density iso-surface given,
for this you need to specify an electron density cube denisty.cube, an iso-value and a distance?
field_diff.py ch3oh_esp.cub ch3oh_resp_mk_esp.cub -o ch3oh_real_vs_resp_mk_diff_esp
  • open the cub file in gaussview and play around with the iso-surface values
  • starting with 0.004 is a good option
  • here I have compared the real esp and the esp generated from the
equivalenced mk charges, remember this is a difference!
esp 0.004 difference iso-surface for ch3oh
field_diff.py --exclude ch3oh_den.cub 0.008 0.001 ch3oh_esp.cub ch3oh_resp_mk_esp.cub -o ch3oh_real_vs_resp_mk_exclude_diff_esp
  • not sure what use this is but
  • excluded within the 0.008 density sphere (this contour is shown in slightly deeper colour)
  • rest is a contour plot of the esp difference
  • and the 3D is the difference iso-surface at 0.004
esp difference with exclusion zone for ch3oh