grimme-lab / xtb

Semiempirical Extended Tight-Binding Program Package
https://xtb-docs.readthedocs.io/
GNU Lesser General Public License v3.0
554 stars 138 forks source link

Uniform external electric fields #446

Open awvwgk opened 3 years ago

awvwgk commented 3 years ago

Is your feature request related to a problem? Please describe. Allow applying uniform external electrical fields to tight binding calculations.

Describe the solution you'd like

gabegomes commented 3 years ago

Not OP, but I must say that allowing to add an external uniform field as vector would be fantastic for my research.

cmueli commented 2 years ago

I strongly support this request, would be happy to have the option to include a homogeneuous electric field to the xTB calculations.

awvwgk commented 2 years ago

Since DFTB+ now supports the xTB Hamiltonian and has already support for electric fields I'll check whether we can use this for calculations.

awvwgk commented 2 years ago

There is now the possibility to use electric fields in DFTB+ and the standalone tblite library with the xTB Hamiltonians.

vladislavivanistsev commented 2 years ago

Will the external field be implemented in xTB package?

awvwgk commented 2 years ago

In the future, yes. We still have to decide on how those will be specified in xtb, since the input in DFTB+ is quite sophisticated (e.g. supporting time varying electric fields for dynamics).

A static, homogeneous electric field should be straight-forward to add in xtb now, if this is sufficient for most applications.

vladislavivanistsev commented 2 years ago

A homogeneous electric field is what needed to mimic electrified interface. I am testing DFTB+, which indeed has a sophisticated as well as complicated way of writing inputs. That is why I am more interested in using XTB or TBLITE directly or via ASE.

awvwgk commented 2 years ago

We are trying to improve the userfriendlyness of DFTB+, especially the input, but we probably won't get it on par with the command-line experience in xtb, it is kind of a different philosophy.

I'll look into porting the uniform fields to xtb.

longkunxuluke commented 2 years ago

Besides uniform electric field, implementing more advanced approaches (e.g., constant potential method) to model electrochemical interface would be highly desired as well. An example in LAMMPS: https://github.com/zhenxingwang/lammps-conp

JOEYIT commented 3 months ago

I have noticed that when i search the external potential in the xtb documentation. There is an example about the externel potential for the input script of water_4.pc. May I ask if it is the right way to set the externel electric field in xtb. As shown in the water_4.pc,
6 -0.69645733 2.75237178376284 -2.43247309226225 -0.01392519847964 O 0.36031084 0.93157260886974 -2.79621404458590 -0.01863384029005 H 0.33614649 3.43820531288547 -3.30583608421060 1.42134539425148 H -0.69645733 2.43247309226225 2.75237178376284 0.01392519847964 O 0.36031084 2.79621404458590 0.93157260886974 0.01863384029005 H 0.33614649 3.30583608421060 3.43820531288547 -1.42134539425148 H and PC potential true : : -> # point charges 6 : : -> sum of PC 0.0000000 e
if this 6 indicates the ev/Angstrom uniform externel electric field in the system?