<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Matt,<div><br></div><div>Sorry  for the long delay, I realized there was also a problem with SCF with the test runs. I have fixed that as well. There still seems to be several energy discrepancies between the various methods of applying a external potential/electric field. I've also included output results for all runs with fixed SCF, both for orgin-centered and non-centered water molecules.</div><div>The energies are as follows.<br></div><div><br></div><div><b>For an off-origin water molecule:</b></div><div><div>NO FIELD</div><div>  -17.109346858835565</div><div><br></div><div>PERIODIC_EFIELD</div><div>  -17.087299531020836</div><div><br></div><div>EXTERNAL_POTENTIAL (FORCE_EVAL ONLY)</div><div>  -17.098300834804430</div><div><br></div><div>EXTERNAL_POTENTIAL (DFT ONLY)</div><div>  -17.128494982693702</div><div><br></div><div>EXTERNAL_POTENTIAL (FORCE_EVAL AND DFT)</div><div>  -17.102033317272440</div></div><div><br></div><div>It seems as if EXTERNAL_POTENTIAL (DFT) is stabilizing the molecule while the PERIODIC_EFIELD destabilizes the energy. All sections are applying a field to the water molecule in the same direction with identical strength. Any thoughts why this is happening? Shouldn't they have the same effect?</div><div><br></div><div><b>For an origin-centered water molecule:</b></div><div><div>NO FIELD</div><div>  -17.109567168504295</div><div><br></div><div>PERIODIC_EFIELD</div><div>  -17.109580046528809</div><div><br></div><div>EXTERNAL_POTENTIAL (FORCE_EVAL ONLY)</div><div>  -17.109567168504295</div><div><br></div><div>EXTERNAL_POTENTIAL (DFT ONLY)</div><div>  -17.518285260351075</div><div><br></div><div>EXTERNAL_POTENTIAL (FORCE_EVAL AND DFT)</div><div>  -17.189053596811391</div></div><div><br></div><div>Any input would be great!</div><div><br></div><div><br></div><div>Thanks,</div><div>David<br></div><div><br>On Wednesday, October 30, 2013 1:50:55 PM UTC-4, Matt W wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Before going any further - the external potential undergoes a large!!! jump at the cell boundary - AxY - so with your water molecule straddling the origin of the cell strange things may be happening. <br><br>Advantage to periodic field.<br><br>Center the molecule in the cell and see if the differences are so bad. I could reproduce polarizability (H2O molecule) and dielectric constants (Si/SiO2 slab) for non periodic systems by applying the field, so am pretty convinced the external potential works there.<br><br>Matt<br><br>On Wednesday, 30 October 2013 14:38:51 UTC, David Stelter  wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Matt and Flo,<div><br></div><div>There seem to be some descrepencies in the methods mentioned above. I've done a few tests on a single water molecule with multiple versions of EXTERNAL_POTENTIAL and PERIODIC_EFIELD as well as no efield.</div><div><br></div><div>The energies I obtained for a single water for various inputs are as follows with an inputted/ideal e-field strength of 0.1 V/angstrom</div><div>1) no field, E =   -15.902943301939017</div><div><br></div><div>2) PERIODIC_EFIELD, E =   -15.901968922615296</div><div><br></div><div>3) EXTERNAL_POTENTIAL in the FORCE_EVAL section only, E =    -15.90294330193902</div><div><br></div><div>4) EXTERNAL_POTENTIAL in the DFT section only, E =   -16.227568014660498</div><div><br></div><div>5) EXTERNAL_POTENTIAL in both sections, E =   -15.971096979028731</div><div><br></div><div>It seems there is another section of EXTERNAL_POTENTIAL that works under the FORCE_EVAL section rather than DFT. At first inspection, it seems that this section would only apply to the MM region of the cell as there is basically no difference between values 1 and 3. However, as you can see, there is a large difference between 4 and 5 where EXTERNAL_POTENTIAL is applied to both the DFT and FORCE_EVAL sections.<br></div><div><br></div><div>Additionally, it should be noted that PERIODIC_EFIELD is being used with a value of 20x10^-4 au in the Y direction, which corresponds to ~0.1V/angstrom while EXTERNAL_POTENTIAL is being used via the function Y*(A/B) with values of 0.1 [eV] and 1 [angstrom] as suggested by Matt to obtain a 0.1V/angstrom field. However, as you can clearly see, the energy values are VERY different which leads me to believe there is something wrong! I am not using ROKS or QM/MM for this sim thus PERIODIC_EFIELD should work fine; additionally the manual is very clear and explicit by saying the input is in au. This makes me fairly confident in the accuracy of this calculation for the energy of 1 QM water in a 0.1V/angstrom field</div><div><br></div><div>I am still unsure regarding the units of EXTERNAL_POTENTIAL. eV/Angstrom is a force, multiplied by Z, a unit length, brings us back to an energy of 0.1 eV which is being applied to the system. I guess I am confused regarding Matt's calculation of efield strength from 0.1 eV/Angstrom input. Any light that can be shed on how the EXTERNAL_POTENTIAL process works and how the potential is being applied would be great as I am certain that the input for EXTERNAL_POTENTIAL is resulting in a field strength much higher than 0.1 V/angstrom. </div><div><br></div><div>I've attached my input/output files of the sims. It should also be noted that these input files came from the test folder of cp2k and are identical except for the various electric field codes.</div><div><br></div><div>Thanks,</div><div>David</div><div><div><br>On Monday, October 28, 2013 9:18:29 AM UTC-4, Matt W wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi David,<br><br>On Friday, October 25, 2013 9:03:09 PM UTC+1, David Stelter wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Matt,<div><br></div><div>We have looked into EXTERNAL_POTENTIAL, some guidance on the section would be appreciated! I've read on these forums that people have put an efield value as a parameter in this section. How is this section treated? I want to apply an efield, but shouldn't I be putting in a potential multiplied by some distance of the periodic box?</div><div><br></div></div></blockquote><div><br></div><div>in the DFT section</div><div><br></div><div>     &EXTERNAL_POTENTIAL<br>        FUNCTION Z*(A/B)<br>        PARAMETERS A B<br>        VALUES [eV] 0.1  [angstrom] 1.0<br>    &END<br></div><div><br></div><div>should add a field of 0.1 V/A along the Z direction of your QM cell. This is just a classic sawtooth potential - but as your QM region has vacuum around it there should be no issues.</div><div><br></div><div>As Flo notes for the periodic_efield, I think this will only act on the QM region. Adding a similar potential over the classical region would cause issues with periodicity. </div><div><br></div><div>I haven't tried it in combination with ROKS or QMMM.</div><div><br></div><div>Maybe an easier solution is just to add some artificial charges into the MM region to generate the field? Though you'd have to take into account that their effect would get screened by solvent...</div><div><br></div><div>Matt</div><div><br></div></div></blockquote></div></div></div></blockquote></div></blockquote></div></div></div></div>