<div dir="ltr"><div>Dear Dorothea,</div><div>Thank you for your answer. </div><div><br></div><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div>I am not sure if I understand your question correctly </div></div></blockquote><div> </div><div>On the longer run, we are interested in describing an electrolyte above a
metal surface and using a charge imbalance to create a potential drop
at the interface very much as one would do in a pure DFT calculation,
but then withouth the need to describe the metal quantum mechanically. I
know that this is not the original idea behind the image charge method
as implemented in cp2k, but I thought it may offer a work around. So to
understand how things work, I simply considered an H2+ molecule above a
surface. This is similar to the model system used by Siepmann and Sprik
in their 1995 publication, just that they used an MM point charge above a
metal. In principle, it should be possible to determine V_0 from the condition that the energy should be minimized, and the resulting counter charge should exactly cancel the charge in front of the metal.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div>and what your computational setup is.</div></div></blockquote><div>I paste here an example of the input that I used with MT boundary conditions. The resulting plot for the Hartree-potential (obtained using &V_HARTREE_CUBE and then averaging over x and y to get a plot over z) is shown in the third image in my original post (green line). <br></div><div>As you can see, I simply adapted the input file from the GUA example on the web, by replacing the GUA in the xyz file by H2, setting the DFT charge to 1 and changing the poisson solver in the DFT and MM part. The potential EXT_POTENTIAL was determined by running 2 calculations with changing EXT_POTENTIAL_1 and EXT_POTENTIAL_2, and then determining EXT_POTENTIAL_3 by requiring that the resulting charge should be -1 and assuming a linear relationship (which for this system is perfectly followed, giving me a total charge on the metal of -1)</div><div><br></div><div>-----------------Begin sample input file using the MT poisson solver------------------<br></div><div><div style="background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; overflow-wrap: break-word;" class="prettyprint"><code class="prettyprint"><div class="subprettyprint"><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">FORCE_EVAL<br> METHOD QMMM<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">DFT<br> CHARGE </span><span style="color: #066;" class="styled-by-prettify">1</span><span style="color: #000;" class="styled-by-prettify"><br> LSD<br> BASIS_SET_FILE_NAME BASIS_MOLOPT<br> POTENTIAL_FILE_NAME GTH_POTENTIALS<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">POISSON<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">EWALD<br> EWALD_TYPE ewald<br> ALPHA </span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #066;" class="styled-by-prettify">44</span><span style="color: #000;" class="styled-by-prettify"><br> GMAX </span><span style="color: #066;" class="styled-by-prettify">21</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> EWALD<br> POISSON_SOLVER MT<br> PERIODIC XY<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> POISSON<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">MGRID<br> COMMENSURATE<br> CUTOFF </span><span style="color: #066;" class="styled-by-prettify">300</span><span style="color: #000;" class="styled-by-prettify"><br> NGRIDS </span><span style="color: #066;" class="styled-by-prettify">5</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> MGRID<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">QS<br> METHOD GPW<br> EXTRAPOLATION ASPC<br> EXTRAPOLATION_ORDER </span><span style="color: #066;" class="styled-by-prettify">3</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> QS<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">SCF<br> MAX_SCF </span><span style="color: #066;" class="styled-by-prettify">300</span><span style="color: #000;" class="styled-by-prettify"><br> SCF_GUESS ATOMIC<br> </span><span style="color: #800;" class="styled-by-prettify"># SCF_GUESS RESTART</span><span style="color: #000;" class="styled-by-prettify"><br> EPS_SCF </span><span style="color: #066;" class="styled-by-prettify">1.0E-6</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">OT<br> PRECONDITIONER FULL_SINGLE_INVERSE<br> MINIMIZER DIIS<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> SCF<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">XC<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">XC_FUNCTIONAL PBE<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> XC_FUNCTIONAL<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">VDW_POTENTIAL<br> DISPERSION_FUNCTIONAL PAIR_POTENTIAL<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">PAIR_POTENTIAL<br> TYPE DFTD3<br> CALCULATE_C9_TERM </span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">TRUE</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify"><br> REFERENCE_C9_TERM<br> PARAMETER_FILE_NAME dftd3</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">dat<br> REFERENCE_FUNCTIONAL PBE<br> R_CUTOFF </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">angstrom</span><span style="color: #660;" class="styled-by-prettify">]</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #066;" class="styled-by-prettify">16.0</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> PAIR_POTENTIAL<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> VDW_POTENTIAL<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> XC<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">PRINT<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">V_HARTREE_CUBE<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> DFT<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">MM<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">FORCEFIELD<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">CHARGE<br> ATOM </span><span style="color: #606;" class="styled-by-prettify">Au</span><span style="color: #000;" class="styled-by-prettify"><br> CHARGE </span><span style="color: #066;" class="styled-by-prettify">0</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> CHARGE<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">CHARGE<br> ATOM H<br> CHARGE </span><span style="color: #066;" class="styled-by-prettify">0</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> CHARGE<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">SPLINE<br> EPS_SPLINE </span><span style="color: #066;" class="styled-by-prettify">1.E-5</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #800;" class="styled-by-prettify">#EMAX_SPLINE 2.0</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"><br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">NONBONDED<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">EAM<br> atoms </span><span style="color: #606;" class="styled-by-prettify">Au</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Au</span><span style="color: #000;" class="styled-by-prettify"><br> PARM_FILE_NAME </span><span style="color: #606;" class="styled-by-prettify">Au</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">pot<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> EAM<br><br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">LENNARD</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #000;" class="styled-by-prettify">JONES<br> atoms </span><span style="color: #606;" class="styled-by-prettify">Au</span><span style="color: #000;" class="styled-by-prettify"> H<br> EPSILON </span><span style="color: #066;" class="styled-by-prettify">0.0</span><span style="color: #000;" class="styled-by-prettify"><br> SIGMA </span><span style="color: #066;" class="styled-by-prettify">3.166</span><span style="color: #000;" class="styled-by-prettify"><br> RCUT </span><span style="color: #066;" class="styled-by-prettify">15</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> LENNARD</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #000;" class="styled-by-prettify">JONES<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">LENNARD</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #000;" class="styled-by-prettify">JONES<br> atoms H H<br> EPSILON </span><span style="color: #066;" class="styled-by-prettify">0.0</span><span style="color: #000;" class="styled-by-prettify"><br> SIGMA </span><span style="color: #066;" class="styled-by-prettify">3.166</span><span style="color: #000;" class="styled-by-prettify"><br> RCUT </span><span style="color: #066;" class="styled-by-prettify">15</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> LENNARD</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #000;" class="styled-by-prettify">JONES<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"><br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> FORCEFIELD<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">POISSON<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">EWALD<br> EWALD_TYPE ewald<br> ALPHA </span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #066;" class="styled-by-prettify">44</span><span style="color: #000;" class="styled-by-prettify"><br> GMAX </span><span style="color: #066;" class="styled-by-prettify">21</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> EWALD<br> POISSON_SOLVER MT<br> PERIODIC XY<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> POISSON<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> MM<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">QMMM<br> CENTER NEVER<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">CELL<br> ABC </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">angstrom</span><span style="color: #660;" class="styled-by-prettify">]</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #066;" class="styled-by-prettify">34.6055</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #066;" class="styled-by-prettify">29.9693</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #066;" class="styled-by-prettify">60.0</span><span style="color: #000;" class="styled-by-prettify"><br> PERIODIC XY<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> CELL<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">QM_KIND H<br> MM_INDEX </span><span style="color: #066;" class="styled-by-prettify">577.</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #066;" class="styled-by-prettify">578</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> QM_KIND<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">IMAGE_CHARGE<br> EXT_POTENTIAL </span><span style="color: #066;" class="styled-by-prettify">1.24534</span><span style="color: #000;" class="styled-by-prettify"><br> MM_ATOM_LIST </span><span style="color: #066;" class="styled-by-prettify">1.</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #066;" class="styled-by-prettify">576</span><span style="color: #000;" class="styled-by-prettify"><br> WIDTH </span><span style="color: #066;" class="styled-by-prettify">3.5</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> IMAGE_CHARGE<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">PRINT<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">IMAGE_CHARGE_INFO<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"><br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> QMMM<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">SUBSYS<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">CELL<br> ABC </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">angstrom</span><span style="color: #660;" class="styled-by-prettify">]</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #066;" class="styled-by-prettify">34.6055</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #066;" class="styled-by-prettify">29.9693</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #066;" class="styled-by-prettify">60.0</span><span style="color: #000;" class="styled-by-prettify"><br> PERIODIC XY<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> CELL<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">TOPOLOGY<br> COORD_FILE_NAME </span><span style="color: #606;" class="styled-by-prettify">Au_gua_image_dampFunc</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #000;" class="styled-by-prettify">opt</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">xyz<br> COORDINATE xyz<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">KIND H<br> BASIS_SET DZVP</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #000;" class="styled-by-prettify">MOLOPT</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #000;" class="styled-by-prettify">SR</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #000;" class="styled-by-prettify">GTH<br> POTENTIAL GTH</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #000;" class="styled-by-prettify">PBE</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #000;" class="styled-by-prettify">q1<br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> KIND<br><br> </span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> SUBSYS<br></span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> FORCE_EVAL<br><br></span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #000;" class="styled-by-prettify">GLOBAL<br> PROJECT </span><span style="color: #606;" class="styled-by-prettify">Au_gua_image_dampFunc</span><span style="color: #000;" class="styled-by-prettify"><br> RUN_TYPE energy<br></span><span style="color: #660;" class="styled-by-prettify">&</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> GLOBAL</span></div></code></div><br></div><div>-----------------End sample input file using the MT poisson solver------------------</div><div><br></div><div>>If you have a charged system in the QM part, then you need a solver like MT, like in a standard QM calculation.</div><div>Yes, I would have thought, that this is what I am doing, but the resulting plot for the hartree potential looks strange (shielding charges in the metal, leading to a potential gradient in the metal instead of a constant) and I cannot seem to find an energy minimum, when the potential is chosen such, that the image charge is exatly shielded, which was one of the test systems in the Siepmann Sprik paper (https://aip.scitation.org/doi/abstract/10.1063/1.469429).</div><div><br></div><div>I guess the latter is my main issue, as we will depend heavily on the energies. (Hence I need to understand what they contain)</div><div><br></div><div>Thank you for your help,</div><div>Katharina</div><div><br></div><div><br></div><br></div>