README.md
1QFITLIB
2===
3
4This is an API intended to be used to fit partial atomic charges to a molecular electrostatic potential (MEP or molecular ESP) that is evaluated on a grid. The charges can be determined using constraints on the total charge and the total permanent dipole moment.
5
6This library includes code to generate a simple [Connolly surface](http://en.wikipedia.org/wiki/Accessible_surface_area).
7
8If you use it, please cite it: [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.14949.svg)](http://dx.doi.org/10.5281/zenodo.14949)
9
10## Basic usage
11
12Basic usage is carried out through the `qfit` module which you can include in your own project using invoking
13
14 use qfit
15
16Then, given a set of atomic coordinates `R` and atomic nuclear charges `Z` the workflow to determine the set of potential derived charges is as follows
17
18 call qfit_initialize( R, Z )
19
20which will initialize the charge fitting library with the default settings. When one has the electron density matrix in AO basis `DAO`, fitting the charges to the ESP is done through
21
22 call qfit_fit( DAO )
23
24which will generate the grid, evaluate the ESP and solve the set of linear equations. To extract the results one simply has to invoke
25
26 call qfit_get_results( Q )
27
28where `Q` is a vector with the length of the number of atoms in the molecule. This will hold the potential derived charges fitted to the ESP. Finally, to free the memory allocated by the `qfit`-library, it is important to invoke
29
30 call qfit_finalize
31