howto:resp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
howto:resp [2015/11/18 12:18] – [Fitting the variance (REPEAT method)] dgolze | howto:resp [2020/08/21 10:15] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 11: | Line 11: | ||
==== Nonperiodic fitting ==== | ==== Nonperiodic fitting ==== | ||
- | The fitted potential is obtained from a set of point charges $\{q_a\}$ | + | The fitted potential is obtained from a set of point charges $\{q_a\}$ |
\begin{equation} | \begin{equation} | ||
| | ||
\end{equation} | \end{equation} | ||
For more details see: | For more details see: | ||
- | * [[ | + | [[doi>10.1021/ |
==== Periodic fitting ==== | ==== Periodic fitting ==== | ||
Line 24: | Line 24: | ||
\end{equation} | \end{equation} | ||
where $g_a$ is a Gaussian function centered at atom $a$. The periodic fitting is embedded in a Gaussian and plane waves (GPW) framework and described in detail in | where $g_a$ is a Gaussian function centered at atom $a$. The periodic fitting is embedded in a Gaussian and plane waves (GPW) framework and described in detail in | ||
- | * [[ | + | [[doi>10.1039/ |
- | In the periodic case, CP2K offers also the possibility to fit the variance of the potential instead of the absolute values, see below. | + | In the periodic case, CP2K offers also the possibility to fit the variance of the potential instead of the absolute values, see [[resp# |
===== Basic input ===== | ===== Basic input ===== | ||
- | The RESP fitting is a post-SCF step and included as a subsection of the [[http:// | + | The RESP fitting is a post-SCF step and included as a subsection of the [[inp>FORCE_EVAL/ |
<code cp2k> | <code cp2k> | ||
Line 41: | Line 41: | ||
With this basis setup, the following defaults are employed: | With this basis setup, the following defaults are employed: | ||
* All points outside the van der Waals radii (taken from the Cambridge database) of the atoms are included | * All points outside the van der Waals radii (taken from the Cambridge database) of the atoms are included | ||
- | * The total charge of the system as defined in [[http:// | + | * The total charge of the system as defined in [[inp>FORCE_EVAL/ |
- | * All atoms except the hydrogens are weakly restrained to zero, i.e. [[http:// | + | * All atoms except the hydrogens are weakly restrained to zero, i.e. [[inp>FORCE_EVAL/ |
===== Sampling of fit points ===== | ===== Sampling of fit points ===== | ||
Line 55: | Line 55: | ||
&END RESP | &END RESP | ||
</ | </ | ||
- | For better visualization it is recommended to center the coordinates of the systems using [[http:// | + | For better visualization it is recommended to center the coordinates of the systems using [[inp>FORCE_EVAL/ |
==== Sphere sampling ==== | ==== Sphere sampling ==== | ||
< | < | ||
This type of sampling is employed for isolated molecules and porous periodic structures suchs as metal-organic frameworks (MOFs). | This type of sampling is employed for isolated molecules and porous periodic structures suchs as metal-organic frameworks (MOFs). | ||
All grid points within a given spherical shell around the atom are included in the fitting, | All grid points within a given spherical shell around the atom are included in the fitting, | ||
- | For the vdW radii, the values from the Cambridge Structural Database '' | + | For the vdW radii, the values from the Cambridge Structural Database '' |
* r$_{\mathrm{min}}$ = AUTO_RMIN_SCALE $\cdot$ vdW_radius | * r$_{\mathrm{min}}$ = AUTO_RMIN_SCALE $\cdot$ vdW_radius | ||
* r$_{\mathrm{max}}$ = AUTO_RMAX_SCALE $\cdot$ vdW_radius | * r$_{\mathrm{max}}$ = AUTO_RMAX_SCALE $\cdot$ vdW_radius | ||
Line 107: | Line 107: | ||
===== Constraints ===== | ===== Constraints ===== | ||
- | A constraint on the total charge of the system is introduced by the keyword [[http:// | + | A constraint on the total charge of the system is introduced by the keyword [[inp>FORCE_EVAL/ |
<code cp2k> | <code cp2k> | ||
& | & | ||
Line 116: | Line 116: | ||
where '' | where '' | ||
The definition of more elaborate constraints is also possible. The constraints are always linear following the formula | The definition of more elaborate constraints is also possible. The constraints are always linear following the formula | ||
- | $\sum_i^{n\_list}c_iq_i=t$. The sum is running over the atoms given in '' | + | $\sum_i^{n\_list}c_iq_i=t$. The sum is running over the atoms given in '' |
<code cp2k> | <code cp2k> | ||
& | & | ||
Line 130: | Line 130: | ||
| | ||
\end{equation} | \end{equation} | ||
- | where $t_j$ is the target value for charge $q_j$ and $\beta$ is the strength of the restraint. By default, all elements except hydrogen are weakly restrained to zero, i.e. the keyword [[http:// | + | where $t_j$ is the target value for charge $q_j$ and $\beta$ is the strength of the restraint. By default, all elements except hydrogen are weakly restrained to zero, i.e. the keyword [[inp>FORCE_EVAL/ |
<code cp2k> | <code cp2k> | ||
&RESP | &RESP | ||
Line 148: | Line 148: | ||
</ | </ | ||
In this example, charges on atoms with indexes 1..3 are restrained to -0.18 and the charge on atom 4 to 0.21. The target values $t_j$ of the restraints can be, e.g., inspired from DDAPC, Mulliken charges etc. | In this example, charges on atoms with indexes 1..3 are restrained to -0.18 and the charge on atom 4 to 0.21. The target values $t_j$ of the restraints can be, e.g., inspired from DDAPC, Mulliken charges etc. | ||
- | Note the '' | + | The strength $\beta$ of the restraint is defined by [[inp>FORCE_EVAL/ |
===== Fitting the variance (REPEAT method) ===== | ===== Fitting the variance (REPEAT method) ===== | ||
- | CP2K offers also the possibility to fit the variance of the potential as proposed in * [[ | + | CP2K offers also the possibility to fit the variance of the potential as proposed in [[doi>10.1021/ |
\begin{equation} | \begin{equation} | ||
Line 170: | Line 170: | ||
</ | </ | ||
Note that '' | Note that '' | ||
- | To obtain REPEAT charges in a stricter sense, i.e. as computed by the [[https:// | + | To obtain REPEAT charges in a stricter sense, i.e. as computed by the [[https:// |
<code cp2k> | <code cp2k> | ||
&RESP | &RESP | ||
Line 179: | Line 179: | ||
&END RESP | &END RESP | ||
</ | </ | ||
- | Use the keyword '' | + | Use the keyword '' |
===== Check the quality of the fit ===== | ===== Check the quality of the fit ===== | ||
+ | |||
+ | A measure for the quality of the fit are the root-mean square (RMS) error | ||
+ | |||
+ | \begin{equation} | ||
+ | \mathrm{RMS}=\sqrt{\frac{\sum_k^N~(V_{\mathrm{QM}}(\mathbf{r}_k)-V_{\mathrm{RESP}}(\mathbf{r}_k))^2}{N}} | ||
+ | \end{equation} | ||
+ | |||
+ | and the relative root-mean square (RRMS) error | ||
+ | \begin{equation} | ||
+ | \mathrm{RRMS}=\sqrt{\frac{\sum_k^N~(V_{\mathrm{QM}}(\mathbf{r}_k)-V_{\mathrm{RESP}}(\mathbf{r}_k))^2}{\sum_k^N~V_{{\mathrm{QM}}}(\mathbf{r}_k)^2}}. | ||
+ | | ||
+ | |||
+ | Both errors are printed to the output file. They should be as small as possible. Typical values can be found here:\\ | ||
+ | * [[doi> | ||
+ | * [[doi> | ||
+ | * [[doi> | ||
+ | |||
+ | When the variance is fitted, $V_{\mathrm{RESP}}$ is shifted by $\delta$ with respect to $V_{\mathrm{QM}}$. Thus, $V_{\mathrm{RESP}}$ is replaced by $\tilde{V}_{\mathrm{RESP}}=V_{\mathrm{RESP}}+\delta$ in the formulas for the RMS and RRMS values.\\ | ||
+ | The RESP potential can be printed in cube file format using the following option: | ||
+ | <code cp2k> | ||
+ | &RESP | ||
+ | .... | ||
+ | |||
+ | & | ||
+ | &END | ||
+ | & | ||
+ | &END RESP | ||
+ | </ | ||
+ | The QM potential can be as well printed as cube file using | ||
+ | [[inp> | ||
===== Example input files ===== | ===== Example input files ===== | ||
+ | |||
+ | * Isolated methanol molecule - nonperiodic fit: {{: | ||
+ | * Metal-organic framework IRMOF-1 - periodic fit using REPEAT : {{: | ||
+ | * Metal-organic framework MIL-53-Al - periodic fit using REPEAT: {{: | ||
+ | * Graphene on Ru(0001) - periodic fit: {{: |
howto/resp.txt · Last modified: 2024/01/15 09:24 by oschuett