************** Charge Fitting ************** .. py:class:: ChargeFitting Charge fitting calculations can be carried out using the :py:obj:`ChargeFitting()` driver, which expects a QM-level :ref:`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(dryrun=False) Then the resulting charges will be stored in :py:obj:`my_frag.charges` (see: `\`_). .. _`\`: fragment.html Methods ======= .. py:method:: ChargeFitting.run() Options ======= The single-point driver takes the following arguments: .. py:attribute:: theory Choose the theory level by specifying a :ref:`Theory ` instance .. py:attribute:: alpha (default: ``1.0``) Search direction .. py:attribute:: a (default: ``0.0005``) Constant :py:attr:`a` (in (Ha/*e*)**2) .. py:attribute:: b (default: ``0.2``) Constant :py:attr:`b` (in elementary charge *e*) .. py:attribute:: conserve (default: ``10``) Conserves the total charge every :py:attr:`conserve` cycles .. py:attribute:: constraints :noindex: (default: ``[]``) Constraint definition .. py:attribute:: frozen (default: ``[]``) A list of indices of atoms to freeze .. py:attribute:: initial (default: ``float('nan')``) Initial values of charges .. py:attribute:: maxcycles :noindex: (default: ``10000``) Maximum cylces of iterations .. py:attribute:: maxinners (default: ``10``) Maximum cycles of inner iterations .. py:attribute:: method :noindex: Allowed values: * ``'resp'``: (default) Kolllman's restrained electrostatic potential (RESP). See: C. I. Bayly, et al., J. Phys. Chem. 1993, 97, 10269 .. py:attribute:: nlayers (default: ``4``) Number of layers of grid points .. py:attribute:: npoints (default: :py:attr:`200*theory.frag.natoms`) Number of grid points to generate .. py:attribute:: tol_inner (default: ``1.0E-5``) Tolerance of convergence for inner iterations .. py:attribute:: tolerance :noindex: (default: ``1.0E-12``) Tolerance of convergence .. py:attribute:: type Allowed values: * ``'shell'``: (default) Uses shell-like grid points .. py:attribute:: vdw_scale (default: ``1.2``) van der Waals scale .. py:attribute:: vdw_incr (default: ``0.2``) Increment of van der Waals : :py:attr:`0.4/nlayers**0.5`