<div dir="ltr">Look in qs_external_potential.F for the code.<br><br>It is quite flexible. You can supply a function in analytic form in this <a href="https://manual.cp2k.org/cp2k-5_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/EXTERNAL_POTENTIAL.html">section</a>. You should be able to set up a periodic external potential without any coding, I think.<div><br></div><div>Matt  <br><br>On Saturday, June 30, 2018 at 8:00:12 PM UTC+1, NGastaPooh wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div style="word-wrap:break-word;line-break:after-white-space">Hello Matt,<div><br></div><div>Thank you very much for your answer. I want to periodically shift electronic charge density throughout a periodic solid to create a charge density "wave". The next step would be to observe the effect of such density change on a band structure of the solid. <br><div><br></div><div>As far as I understood from your answer, the only way is to go with external potential. Does it sound right? If so, could you please direct me to the source file for it?</div><div><br></div><div>Thanks in advance.</div><div><br></div><div>Best regards,</div><div>Roman Dmitriev.</div><div><blockquote type="cite"><div>On Jun 30, 2018, at 10:42 AM, Matt W <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="GyQCW2C1CQAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">matt...@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Hi,<div><br></div><div>there are, in principle, several ways of applying an electric field. The only way that makes proper sense for a periodic solid is the <a href="https://manual.cp2k.org/cp2k-5_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/PERIODIC_EFIELD.html" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fmanual.cp2k.org%2Fcp2k-5_1-branch%2FCP2K_INPUT%2FFORCE_EVAL%2FDFT%2FPERIODIC_EFIELD.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFF76P20_ZkfGSt9Uucgcbw1egaZQ';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fmanual.cp2k.org%2Fcp2k-5_1-branch%2FCP2K_INPUT%2FFORCE_EVAL%2FDFT%2FPERIODIC_EFIELD.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFF76P20_ZkfGSt9Uucgcbw1egaZQ';return true;">periodic efield</a><br>.  I would be (very) surprised if it works with k-points. The main methods are in qs_efield_berry.F. </div><div><br></div><div>See </div><div><br></div><div> Stengel, Massimiliano; Spaldin, Nicola A.; Vanderbilt, David. </div><div> NATURE PHYSICS, 5 (4), 304-308 (2009). </div><div> Ab initio molecular dynamics in a finite homogeneous electric field</div><div> Electric displacement as the fundamental variable in</div><div> electronic-structure calculations.</div><div> <a href="http://dx.doi.org/10.1038/NPHYS1185" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fdx.doi.org%2F10.1038%2FNPHYS1185\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF56CT9N5K7IbX7EfTrTyFO0Ea5Og';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fdx.doi.org%2F10.1038%2FNPHYS1185\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF56CT9N5K7IbX7EfTrTyFO0Ea5Og';return true;">http://dx.doi.org/10.1038/<wbr>NPHYS1185</a></div><div><br></div><div>and</div><div><br></div><div><span style="font-family:Arial,sans-serif">Zhang, Chao, Jürg Hutter, and Michiel Sprik. "Computing the Kirkwood g-Factor by combining constant maxwell electric field and electric displacement simulations: application to the dielectric constant of liquid water." </span><i style="font-family:Arial,sans-serif">The journal of physical chemistry letters</i><span style="font-family:Arial,sans-serif"> 7.14 (2016): 2696-2701.</span><br></div><div><br></div><div>There is also a non periodic version that might be easier to follow (efield_utils.F) and a general external potential that could be applied. Depends what you want to do.</div><div><br></div><div>Matt</div><div> <br>On Thursday, June 28, 2018 at 11:17:33 PM UTC+1, NGastaPooh wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12px">Dear All,</span><span style="font-family:Helvetica;font-size:12px"></span><div style="font-size:12px"><br></div><div style="font-size:12px">I need to utilize the ability of CP2K to subject the electrons to an externally imposed electric </div><div style="font-size:12px">field but am not sure as to exactly how this is implemented in the code. I would greatly appreciate </div><div style="font-size:12px">it, if anyone could provide me with some details or direct me to the sub-routine that accounts for the external potential implementation.</div><div style="font-size:12px"><br></div><div style="font-size:12px">I also have a separate question: what are the energy units in BAND_STRUCTURE routine output file? </div><div style="font-size:12px"><br></div><div style="font-size:12px">Thank you in advance.</div><div style="font-size:12px"><br></div><div style="font-size:12px">Best regards,</div><div style="font-size:12px">Roman Dmitriev</div></div></blockquote></div></div><div><br></div>

-- <br>
You received this message because you are subscribed to a topic in the Google Groups "cp2k" group.<br>
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/cp2k/1shC8Lc39_c/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/topic/cp2k/1shC8Lc39_c/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/cp2k/1shC8Lc39_c/unsubscribe';return true;">https://groups.google.com/d/<wbr>topic/cp2k/1shC8Lc39_c/<wbr>unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="GyQCW2C1CQAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp2k+uns...@googlegroups.<wbr>com</a>.<br>
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="GyQCW2C1CQAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a>.<br>
Visit this group at <a href="https://groups.google.com/group/cp2k" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/group/cp2k';return true;" onclick="this.href='https://groups.google.com/group/cp2k';return true;">https://groups.google.com/<wbr>group/cp2k</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/<wbr>optout</a>.<br>
</div></blockquote></div><br></div></div></blockquote></div></div>