[DFTB-Plus-User] How DFTB+ manages atomic charges?
Bálint Aradi
aradi at uni-bremen.de
Tue Nov 22 15:02:55 CET 2022
On 22.11.22 14:48, giacomo buccella wrote:
> I'll with default mixer then, but what about the temperature? Why should
> I increase it up to 1000 K when I want reaction dynamics at 300K?
Because, this is the electronic temperature, not the ionic one, so its
OK to have a different value from the actual ambient temperature.
Consider it more as a tool to help you accelerating convergence. As long
as it is not too high, the results should be OK. Your system will also
converge with 300 K electronic temperature, but will need much more
SCC-cycles. I doubt, that there will be a significant difference in the
trajectories, though, but you should maybe test it.
By the way, the convergence may become smoother, when the system has
done a few steps already. If you are concerned about the high electronic
temperature, do a few steps with it and restart then the MD with a lower
one from there.
One more remark: on my laptop the optimal nr. of threads is 2, I finish
the same calculation in less than 4 minutes then. Your system is just
too small to scale beyond 2 threads, so make sure, you do not run it on
too many threads/cores. Make sure to set OMP_NUM_THREADS and/or the
'mpirun -n' parameter correctly.
Best regards,
Bálint
>
> Il giorno mar 22 nov 2022 alle ore 14:44 Bálint Aradi
> <aradi at uni-bremen.de <mailto:aradi at uni-bremen.de>> ha scritto:
>
>
> > 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>
> <mailto: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>>
> > <mailto: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>>
> > <mailto: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>>
> > <mailto: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>>
> > >
> <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
> <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>> <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/>>
> > >
> <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>>
> > >
> <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
> <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>> <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>>
> > > <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
> <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>> <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>>
> > > <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
> <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>> <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>>
> >
> > --
> > 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>
> >
> 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/ee1dea81/attachment.sig>
More information about the DFTB-Plus-User
mailing list