[DFTB-Plus-User] How DFTB+ manages atomic charges?

Bálint Aradi aradi at uni-bremen.de
Tue Nov 22 14:43:53 CET 2022


> Being aware that charge transfer reactions should be treated with other 
> methods, I am however trying to simulate the impact of different ions 
> with a polymeric surface (at 300 K).
> Here's another issue: the runs are incredibly slow. This of course makes 
> me think I'm doing something wrong.
> Can you please take a look and provide some tips to speed them up 
> (besides increasing the core number) ?
> Please find attached an example of calculation, which performed only 
> 17-18 steps in 24h.

Your system converges quite slowly for some reaons. I've raised the 
temperature to 1000 K to ease convergence, set SccTolerance to he 
default value, used the default (Broyden) mixer with the default 
parameters. On my 6 years old laptop, I've managed so to run your system 
for 10 geometry steps within 5 minutes and 12 seconds (using 4 threads) 
with the serial Conda-binary, so I should be able to do ca. 3000 steps 
per day.

If it is considerable slower for you, you are either using too many 
threads/processes or your build is completely broken.

Best regards,

Bálint


> 
> Many thanks
> Best regards
> 
> Giacomo
> 
> Il giorno mar 22 nov 2022 alle ore 11:50 Bálint Aradi 
> <aradi at uni-bremen.de <mailto:aradi at uni-bremen.de>> ha scritto:
> 
>     Just a quick note on this. Given the rather small size of our
>     Hamiltonian (as compared to ab inito DFT calculations) and the fact,
>     that we do not need to carry out integrations during the calculations,
>     usually you don't gain much from running DFTB+ on multiple nodes with
>     only a few hundreds of atoms. So please, always check the scalability
>     (OpenMP threads or MPI processes) first and choose the number of
>     threads
>     or MPI processes accordingly. Otherwise you may end up with wasting
>     computational resources and also your precious wall clock time.
> 
>     Best regards,
> 
>     Bálint
> 
> 
>     On 17.11.22 14:19, giacomo buccella wrote:
>      > Dear Charly,
>      >
>      > my sistem is nearly 350 atoms. It is not that big, but enough to
>     be sort
>      > of unaffordable without using parallel machines, since I need to run
>      > tens of MD runs considering different starting configurations. I
>     surely
>      > can run one test with a single thread, just to check how much the
>     result
>      > is affected by using long-range corrections.
>      > Many thanks for your support
>      > Best regards
>      >
>      > Giacomo
>      >
>      > Il giorno gio 17 nov 2022 alle ore 14:13 Carlos R. Lien-Medrano
>      > <cmedrano at uni-bremen.de <mailto:cmedrano at uni-bremen.de>
>     <mailto:cmedrano at uni-bremen.de <mailto:cmedrano at uni-bremen.de>>> ha
>     scritto:
>      >
>      >     Dear Giacomo,
>      >
>      >     I don't know the dimensions of your system but is it strictly
>     needed
>      >     that you run
>      >     the calculation in parallel? Otherwise, you could give a chance
>      >     performing the
>      >     calculation just in one node using long-range corrections.
>      >
>      >     Best regards,
>      >     Charly
>      >
>      >     El jue, 17 nov 2022 a las 7:02, giacomo buccella
>      >     (<gek.buccella at gmail.com <mailto:gek.buccella at gmail.com>
>     <mailto:gek.buccella at gmail.com <mailto:gek.buccella at gmail.com>>>)
>     escribió:
>      >
>      >         Dear Bálint,
>      >         thanks for the kind reply. I've just tried to implement Long
>      >         Range corrections, but it seems that this option is not yet
>      >         available when you run with mpi threads:
>      >
>      >         **********************
>      >         ...
>      >         Starting initialization...
>      >       
>       --------------------------------------------------------------------------------
>      >         WARNING!
>      >         -> Dipole printed for a charged system : origin dependent
>     quantity
>      >         WARNING!
>      >         -> Dipole printed for extended system : value printed is not
>      >         well defined
>      >         ERROR!
>      >         -> Range separated calculations do not work with MPI yet
>      >
>      >         *********************
>      >         Do you have any other advice?
>      >
>      >         Many thanks
>      >         best regards
>      >
>      >         Giacomo
>      >
>      >         Il giorno gio 17 nov 2022 alle ore 07:54 Bálint Aradi
>      >         <aradi at uni-bremen.de <mailto:aradi at uni-bremen.de>
>     <mailto:aradi at uni-bremen.de <mailto:aradi at uni-bremen.de>>> ha scritto:
>      >
>      >             Dear Giacomo,
>      >
>      >             this not DFTB related, but is common for all DFT
>     approaches:
>      >             DFT(B)
>      >             methods tend to delocalize charges. You have one common
>      >             Fermi level in
>      >             the system, and if you have degenerated (or
>      >             quasi-degenerated) states,
>      >             such as likely the atomic level of the N atom and the
>     VBM of
>      >             your
>      >             surface, charge will be distributed between them,
>      >             independently, how far
>      >             they are spatially from each other.
>      >
>      >             Charge transfer reactions are usually calculated
>     using range
>      >             separated
>      >             functionals (which you have in DFTB as well).
>     Alternatively,
>      >             one can
>      >             also enforce a charge distribution via constraint
>     DFT, but
>      >             we don't have
>      >             constrained DFTB in the official version yet.
>      >
>      >             Best regards,
>      >
>      >             Bálint
>      >
>      >
>      >             On 16.11.22 11:16, giacomo buccella wrote:
>      >              > Hi everyone, I'm asking for help about an issue to
>     which
>      >             I don't find
>      >              > any answer in the manual.
>      >              > I'm interested in simulating a chemical system with
>      >             excess (or lack) of
>      >              > charge on certain particular atoms.
>      >              > The problem is that the after a single MD step
>      >             (timestep=0.5 fs), the
>      >              > charge is already delocalized among all atoms in the
>      >             cell. This occurs
>      >              > even if I'm simulating an ion approaching a
>     distant surface.
>      >              >
>      >              > Example:
>      >              > I want to simulate the ion N(+) approaching a
>     surface, so
>      >             I set the
>      >              > initial charge of N atom = +1.000 :
>      >              >
>      >              > InitialCharges = {
>      >              > AtomCharge = {
>      >              > Atoms = N
>      >              > ChargePerAtom = +1.0000
>      >              > }
>      >              > }
>      >              >
>      >              > therefore, I expect that at the beginning of the
>      >             simulation the number
>      >              > of electrons associated with N would be 5-1=4.
>      >              > Well, after a single MD step, its charge is
>     already about
>      >             4.9, even if
>      >              > it is still 10 AA away from other atoms in the system
>      >             with which it
>      >              > could interact.
>      >              >
>      >              > My question is: how is this possible? is it something
>      >             related to the way
>      >              > DFTB+ manages the charge distribution? Do I need a
>      >             time-dependent
>      >              > calculation for this?
>      >              > Any suggestion would be really appreciated
>      >              > Many thanks
>      >              >
>      >              > Giacomo
>      >              >
>      >              >
>      >              > _______________________________________________
>      >              > DFTB-Plus-User mailing list
>      >              > DFTB-Plus-User at mailman.zfn.uni-bremen.de
>     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de>
>      >             <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de
>     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de>>
>      >              >
>      >
>     https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user> <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user>>
>      >
>      >             --
>      >             Dr. Bálint Aradi
>      >             Bremen Center for Computational Materials Science,
>      >             University of Bremen
>      > http://www.bccms.uni-bremen.de/cms/people/b-aradi/
>     <http://www.bccms.uni-bremen.de/cms/people/b-aradi/>
>      >             <http://www.bccms.uni-bremen.de/cms/people/b-aradi/
>     <http://www.bccms.uni-bremen.de/cms/people/b-aradi/>>
>      >
>      >
>      >             _______________________________________________
>      >             DFTB-Plus-User mailing list
>      > DFTB-Plus-User at mailman.zfn.uni-bremen.de
>     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de>
>      >             <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de
>     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de>>
>      >
>     https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user> <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user>>
>      >
>      >         _______________________________________________
>      >         DFTB-Plus-User mailing list
>      > DFTB-Plus-User at mailman.zfn.uni-bremen.de
>     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de>
>      >         <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de
>     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de>>
>      >
>     https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user> <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user>>
>      >
>      >     _______________________________________________
>      >     DFTB-Plus-User mailing list
>      > DFTB-Plus-User at mailman.zfn.uni-bremen.de
>     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de>
>      >     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de
>     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de>>
>      >
>     https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user> <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user>>
>      >
>      >
>      > _______________________________________________
>      > DFTB-Plus-User mailing list
>      > DFTB-Plus-User at mailman.zfn.uni-bremen.de
>     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de>
>      >
>     https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user>
> 
>     -- 
>     Dr. Bálint Aradi
>     Bremen Center for Computational Materials Science, University of Bremen
>     http://www.bccms.uni-bremen.de/cms/people/b-aradi/
>     <http://www.bccms.uni-bremen.de/cms/people/b-aradi/>
> 
> 
>     _______________________________________________
>     DFTB-Plus-User mailing list
>     DFTB-Plus-User at mailman.zfn.uni-bremen.de
>     <mailto:DFTB-Plus-User at mailman.zfn.uni-bremen.de>
>     https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user <https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user>
> 
> 
> _______________________________________________
> DFTB-Plus-User mailing list
> DFTB-Plus-User at mailman.zfn.uni-bremen.de
> https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user

-- 
Dr. Bálint Aradi
Bremen Center for Computational Materials Science, University of Bremen
http://www.bccms.uni-bremen.de/cms/people/b-aradi/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.zfn.uni-bremen.de/pipermail/dftb-plus-user/attachments/20221122/3464f3c9/attachment.sig>


More information about the DFTB-Plus-User mailing list