Charge Fitting
- class ChargeFitting
Charge fitting calculations can be carried out using the ChargeFitting()
driver, which
expects a QM-level Theory object, e.g.:
my_frag = Fragment(coords='my_frag.xyz')
my_theory = GAMESS_UK(frag=my_frag,
method='dft',
functional='b3lyp',
basis='6-31g*')
my_fit1 = ChargeFitting(theory=my_theory,
npoints=2400,
type='shell',
vdw_scale=1.5,
nlayers=2,
vdw_incr=0.2)
The charge fitting calculation is run with:
my_job.run()
Then the resulting charges will be stored in my_frag.charges
(see: <class Fragment>).
ChemShell implements the ESP and RESP charge fitting methods, which are based on fitting point charges in the QM region such that the correct electrostatic potential is recovered far from the QM atoms. ChemShell will construct a grid of points for evaluating the electrostatic potential automatically based on the options supplied.
Methods
- ChargeFitting.run()
This will run the charge fitting optimisation, according to the supplied options.
Options
The single-point driver takes the following arguments:
- constraints
(default:
[]
) Constraint definition.
- frozen
(default:
[]
) A list of indices of atoms to freeze.
- method
Allowed values:
'resp'
: (default) Kolllman’s restrained electrostatic potential (RESP). See: C. I. Bayly, et al., J. Phys. Chem. 1993, 97, 10269'esp'
: Earlier electrostatic potential (ESP) method. See: F. A. Momany, J. Phys. Chem. 1978, 82, 592
- tolerance
(default:
1.0E-12
) Convergence tolerance for the charge fitting, applied to the norm of the gradient.
Electrostatic Grid
These options control the generation of grid points for the sampling of the electrostatic potential. Appropriate values will depend on the particular example being considered.
- type
Allowed values: *
'shell'
: (default) Uses shell-like grid points.
- nlayers
(default:
4
) Number of layers of grid points. Each layer is an individual shell of points.
- npoints
(default:
200*theory.frag.natoms
) Number of grid points to generate.
- vdw_scale
(default:
1.2
) When determining the distance from electrostatic grid point to atoms, their van der Waals radius is multiplied by this number.
- vdw_incr
(default:
0.2
) Increment of van der Waals :0.4/nlayers**0.5
Optimisation
The following options enable greater control over the optimiser, if convergence is difficult to obtain.
- alpha
(default:
1.0
) Search direction for optimisation.
- initial
(default:
[]
) Initial values for the charges being fitted. Can be given as a single value, or as a list for each atom individually.
- maxcycles
(default:
10000
) Maximum number of iterations for the charge fitting algorithm.
- maxinners
(default:
10
) Maximum number of inner iterations for the charge fitting algorithm.
- tol_inner
(default:
1.0E-5
) Convergence tolerance for inner iterations.
RESP
These options only apply to the RESP method.