User Tools

Site Tools


howto:resp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
howto:resp [2015/12/04 14:56] – use special DOI-links oschuetthowto:resp [2020/08/21 10:15] – external edit 127.0.0.1
Line 16: Line 16:
 \end{equation} \end{equation}
 For more details see: For more details see:
-[[doi>10.1021/j100142a004 | J. Phys. Chem., 97 , 10269-10280 (1993).]]+ [[doi>10.1021/j100142a004 | J. Phys. Chem., 97 , 10269-10280 (1993).]]
  
 ==== 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/C4CP04638B | Phys. Chem. Chem. Phys., 17 , 14307-14316 (2015).]]\\ + [[doi>10.1039/C4CP04638B | Phys. Chem. Chem. Phys., 17 , 14307-14316 (2015).]] 
-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#Fitting the variance (REPEAT method)|below]].
  
 ===== Basic input ===== ===== Basic input =====
-The RESP fitting is a post-SCF step and included as a subsection of the [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES.html|''PROPERTIES'']] section.+The RESP fitting is a post-SCF step and included as a subsection of the [[inp>FORCE_EVAL/PROPERTIES|PROPERTIES]] section.
  
 <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://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT.html#CHARGE|''CHARGE'']] is   retained, i.e. [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP.html#INTEGER_TOTAL_CHARGE|''INTEGER_TOTAL_CHARGE'']] is set to ''.TRUE.'' by default. +  * The total charge of the system as defined in [[inp>FORCE_EVAL/DFT#CHARGE|CHARGE]] is   retained, i.e. [[inp>FORCE_EVAL/PROPERTIES/RESP#INTEGER_TOTAL_CHARGE|INTEGER_TOTAL_CHARGE]] is set to ''.TRUE.'' by default. 
-  * All atoms except the hydrogens are weakly restrained to zero, i.e. [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP.html#RESTRAIN_HEAVIES_TO_ZERO|''RESTRAIN_HEAVIES_TO_ZERO'']] is set to ''.TRUE.'' by default.+  * All atoms except the hydrogens are weakly restrained to zero, i.e. [[inp>FORCE_EVAL/PROPERTIES/RESP#RESTRAIN_HEAVIES_TO_ZERO|RESTRAIN_HEAVIES_TO_ZERO]] is set to ''.TRUE.'' by default.
  
 ===== Sampling of fit points ===== ===== Sampling of fit points =====
Line 55: Line 55:
 &END RESP &END RESP
 </code> </code>
-For better visualization it is recommended to center the coordinates of the systems using [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/SUBSYS/TOPOLOGY/CENTER_COORDINATES.html|''CENTER_COORDINATES'']].+For better visualization it is recommended to center the coordinates of the systems using [[inp>FORCE_EVAL/SUBSYS/TOPOLOGY/CENTER_COORDINATES|CENTER_COORDINATES]].
 ==== Sphere sampling ==== ==== Sphere sampling ====
 <imgcaption fig:sphere_samp |Methanol molecule and fitting points (gray) sampled.>{{ ch3oh_fitpoints.png?200x200}}</imgcaption> <imgcaption fig:sphere_samp |Methanol molecule and fitting points (gray) sampled.>{{ ch3oh_fitpoints.png?200x200}}</imgcaption>
 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,  see <imgref fig:sphere_samp>. The spherical shells are defined by a minimal radius r$_{\mathrm{min}}$ and a maximal radius r$_{\mathrm{max}}$. The paramters r$_{\mathrm{min}}$ and r$_{\mathrm{max}}$ can be defined specifically for each element and are, by default, based on the van der Waals (vdW) radii.  All grid points within a given spherical shell around the atom are included in the fitting,  see <imgref fig:sphere_samp>. The spherical shells are defined by a minimal radius r$_{\mathrm{min}}$ and a maximal radius r$_{\mathrm{max}}$. The paramters r$_{\mathrm{min}}$ and r$_{\mathrm{max}}$ can be defined specifically for each element and are, by default, based on the van der Waals (vdW) radii. 
-For the vdW radii, the values from the Cambridge Structural Database ''CAMBRIDGE'' or the Universal Force Field ''UFF'' can be specified via [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP/SPHERE_SAMPLING.html#AUTO_VDW_RADII_TABLE|''AUTO_VDW_RADII_TABLE'']]. Using the keywords '' AUTO_RMIN_SCALE '' and '' AUTO_RMAX_SCALE'', r$_{\mathrm{min}}$ and r$_{\mathrm{max}}$ are then calculated as follows:+For the vdW radii, the values from the Cambridge Structural Database ''CAMBRIDGE'' or the Universal Force Field ''UFF'' can be specified via [[inp>FORCE_EVAL/PROPERTIES/RESP/SPHERE_SAMPLING#AUTO_VDW_RADII_TABLE|AUTO_VDW_RADII_TABLE]]. Using the keywords '' AUTO_RMIN_SCALE '' and '' AUTO_RMAX_SCALE'', r$_{\mathrm{min}}$ and r$_{\mathrm{max}}$ are then calculated as follows:
     * 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://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP.html#INTEGER_TOTAL_CHARGE|''INTEGER_TOTAL_CHARGE'']], which is set by default to  ''.TRUE.''. Further explicit constraints can be given via the subsection [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP/CONSTRAINT.html|''CONSTRAINT'']]. It is possible to enforce the same charges for chemically equivalent atoms, e.g. for the hydrogen atoms of a methyl group. The corresponding input is: +A constraint on the total charge of the system is introduced by the keyword [[inp>FORCE_EVAL/PROPERTIES/RESP#INTEGER_TOTAL_CHARGE|INTEGER_TOTAL_CHARGE]], which is set by default to  ''.TRUE.''. Further explicit constraints can be given via the subsection [[inp>FORCE_EVAL/PROPERTIES/RESP/CONSTRAINT|CONSTRAINT]]. It is possible to enforce the same charges for chemically equivalent atoms, e.g. for the hydrogen atoms of a methyl group. The corresponding input is: 
 <code cp2k> <code cp2k>
 &CONSTRAINT &CONSTRAINT
Line 116: Line 116:
 where ''ATOM_LIST'' lists the indexes of the atoms that should have the same charge.\\ where ''ATOM_LIST'' lists the indexes of the atoms that should have the same charge.\\
 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 ''ATOM_LIST'' and $t$ is the target value of the constraint given by [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP/CONSTRAINT.html#TARGET|''TARGET'']]. The coefficients $\{c_i\}$ are defined by the keyword [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP/CONSTRAINT.html#ATOM_COEF|''ATOM_COEF'']]. With the following input it is achieved that the (absolute value) of the charge on atom 3 is twice as large as the charge on atom 5, i.e. $q_3=2q_5$.+$\sum_i^{n\_list}c_iq_i=t$. The sum is running over the atoms given in ''ATOM_LIST'' and $t$ is the target value of the constraint given by [[inp>FORCE_EVAL/PROPERTIES/RESP/CONSTRAINT#TARGET|TARGET]]. The coefficients $\{c_i\}$ are defined by the keyword [[inp>FORCE_EVAL/PROPERTIES/RESP/CONSTRAINT#ATOM_COEF|ATOM_COEF]]. With the following input it is achieved that the (absolute value) of the charge on atom 3 is twice as large as the charge on atom 5, i.e. $q_3=2q_5$.
 <code cp2k> <code cp2k>
 &CONSTRAINT &CONSTRAINT
Line 130: Line 130:
  R_{\mathrm{rest}} = \beta \sum_j (q_j-t_j)^2,  R_{\mathrm{rest}} = \beta \sum_j (q_j-t_j)^2,
 \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://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP.html#RESTRAIN_HEAVIES_TO_ZERO|''RESTRAIN_HEAVIES_TO_ZERO'']] is set to ''.TRUE.'' by default. The strength of this restraint is controlled by [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP.html#list_RESTRAIN_HEAVIES_STRENGTH|''RESTRAIN_HEAVIES_STRENGTH'']]. Restraints can be also defined explicitly via the subsection [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP/RESTRAINT.html''RESTRAINT'']]:+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/PROPERTIES/RESP#RESTRAIN_HEAVIES_TO_ZERO|RESTRAIN_HEAVIES_TO_ZERO]] is set to ''.TRUE.'' by default. The strength of this restraint is controlled by [[inp>FORCE_EVAL/PROPERTIES/RESP#RESTRAIN_HEAVIES_STRENGTH|RESTRAIN_HEAVIES_STRENGTH]]. Restraints can be also defined explicitly via the subsection [[inp>FORCE_EVAL/PROPERTIES/RESP/RESTRAINT|RESTRAINT]]:
 <code cp2k> <code cp2k>
 &RESP &RESP
Line 148: Line 148:
 </code>  </code> 
 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.
-The strength $\beta$ of the restraint is defined by [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/RESP/RESTRAINT.html#STRENGTH|''STRENGTH'']]. Large values for $\beta$ will limit increasingly the flexibility of the charge fitting and decrease the quality of the fit. If only the explicitly given restraints should be used, ''RESTRAIN_HEAVIES_TO_ZERO'' must be switched to ''.FALSE.''.+The strength $\beta$ of the restraint is defined by [[inp>FORCE_EVAL/PROPERTIES/RESP/RESTRAINT#STRENGTH|STRENGTH]]. Large values for $\beta$ will limit increasingly the flexibility of the charge fitting and decrease the quality of the fit. If only the explicitly given restraints should be used, ''RESTRAIN_HEAVIES_TO_ZERO'' must be switched to ''.FALSE.''.
 ===== 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 [[doi>10.1021/ct9003405 | J. Chem. Theory Comput., 5 , 2866–2878 (2009).]] This is only valid for periodic systems, since the reference state of the ESP is arbitrary in the periodic case. The modified residual reads:+CP2K offers also the possibility to fit the variance of the potential as proposed in  [[doi>10.1021/ct9003405 | J. Chem. Theory Comput., 5 , 2866–2878 (2009).]] This is only valid for periodic systems, since the reference state of the ESP is arbitrary in the periodic case. The modified residual reads:
  
 \begin{equation} \begin{equation}
Line 179: Line 179:
 &END RESP &END RESP
 </code> </code>
-Use the keyword ''AUTO_RMIN_SCALE'' and ''AUTO_RMAX_SCALE'' to scale the van der Waals radii as described above. Note that small numerical deviations compared to the REPEAT code are possible since the fitting is embedded in a GPW framwork as described in[[doi>10.1039/C4CP04638B | Phys. Chem. Chem. Phys., 17 , 14307-14316 (2015)]] , whereas the REPEAT code uses Ewald summation.+Use the keyword ''AUTO_RMIN_SCALE'' and ''AUTO_RMAX_SCALE'' to scale the van der Waals radii as described above. Note that small numerical deviations compared to the REPEAT code are possible since the fitting is embedded in a GPW framwork as described in  [[doi>10.1039/C4CP04638B | Phys. Chem. Chem. Phys., 17 , 14307-14316 (2015)]] , whereas the REPEAT code uses Ewald summation.
  
  
Line 212: Line 212:
 </code> </code>
 The QM potential can be as well printed as cube file using The QM potential can be as well printed as cube file using
-[[https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/PRINT/V_HARTREE_CUBE.html|''V_HARTREE_CUBE'']]. The cube files can be visualized with, e.g. VMD, and the RESP and the QM potential can be directly compared. Note that $\tilde{V}_{\mathrm{RESP}}$ is printed instead of $V_{\mathrm{RESP}}$ when the variance is fitted. +[[inp>FORCE_EVAL/DFT/PRINT/V_HARTREE_CUBE|V_HARTREE_CUBE]]. The cube files can be visualized with, e.g. VMD, and the RESP and the QM potential can be directly compared. Note that $\tilde{V}_{\mathrm{RESP}}$ is printed instead of $V_{\mathrm{RESP}}$ when the variance is fitted. 
 ===== Example input files ===== ===== Example input files =====
  
Line 218: Line 218:
    * Metal-organic framework IRMOF-1 - periodic fit using REPEAT : {{:howto:irmof-1_REPEAT.tar.gz|irmof-1_REPEAT.tar.gz}}\\    * Metal-organic framework IRMOF-1 - periodic fit using REPEAT : {{:howto:irmof-1_REPEAT.tar.gz|irmof-1_REPEAT.tar.gz}}\\
    * Metal-organic framework MIL-53-Al - periodic fit using REPEAT: {{:howto:mil-53-al-repeat.tar.gz|mil-53-al-repeat.tar.gz}}\\    * Metal-organic framework MIL-53-Al - periodic fit using REPEAT: {{:howto:mil-53-al-repeat.tar.gz|mil-53-al-repeat.tar.gz}}\\
-   * Graphene on Ru(0001) - periodic fit:+   * Graphene on Ru(0001) - periodic fit: {{:howto:graphene_Ru.tar.gz|graphene_Ru.tar.gz}}
howto/resp.txt · Last modified: 2024/01/15 09:24 by oschuett