[ase-users] how to avoid calculator reset when generating a SumCalculator
Rochus Schmid
rochus.schmid at rub.de
Wed Mar 17 15:48:20 CET 2021
dear michael,
On 3/17/21 3:15 PM, Michael Walter wrote:
> Dear Rochus,
>
> Am Mi., 17. März 2021 um 15:01 Uhr schrieb Rochus Schmid via ase-users
> <ase-users at listserv.fysik.dtu.dk
> <mailto:ase-users at listserv.fysik.dtu.dk>>:
>
> dear ase experts,
>
> i am trying to use the SumCalculator from ase.calculators.mixing
> to add
> dispersion corrections from Stefan Grimmes DFTD4 calculator to a GPaw
> calculator. The problem is that the DFT part converges very slowly. I
> have a restart file with wavefkts and can restart.
>
> so if i do something like this
>
> dft = GPAW('restart.gpw')
> system = dft.get_atoms()
> e_dft = system.get_potential_energy()
>
> all is fine. but then i generate a new calculator like this
>
> d4 = DFTD4(method='pbe')
> sumcalc = SumCalculator([dft, d4], atoms=system)
> e_total = system.get_potential_energy()
>
> then the wavefktd from the dft calculator seems to be reset and
> starts
> from scratch. how can i prevent this?
>
> i can not see that the reset() method of the mixing calculator is
> directly called, but i assume that in the process of setting the
> SumCalculator, the atoms object is "reattached" to both
> calculators dft
> and d4, and that attaching a "new" atoms object triggers a reset.
> this
> makes sense but in my case i know that the atoms are identical and
> i do
> not want the info from the SCF to be discarded. what can i do to
> prevent
> this to happen?
>
> i also guess that it might be possible to "update" the wavefunctions
> from the info stored in restart.gpw, but this is probably a
> question for
> the gpaw-users mailing list.
>
> any help/input highliy appreciated.
>
>
> There is no need for a SumCalculator.
> Please see
> https://wiki.fysik.dtu.dk/gpaw/documentation/xc/vdwcorrection.html
> where the D4_model is applied in the script given.
>
> Regards,
> Michael
thanks a lot for your quick reply. i am using the dftd4-python from
conda-forge. but i also could not see a "D4_model" class on the github
repo. is it possible that the script refers to an older API? to me it
looks like in
cc = D4_model(xc='PBE', calc=c)
s.calc = cc
the D4_model takes a calculator c and attaches D4 by returning a new
calculator cc, right? however, it seems that this python API is not in
the current D4 version any more. there is a regular ASE calculator
interface as well as a raw python API and a QCSchema interface.
https://github.com/dftd4/dftd4/tree/main/python
is it possible that the script refers to an older version of the D4 code
or am i missing something here?
best regards,
rochus
>
> greetings,
>
> rochus schmid
>
> --
>
>
> Prof. Dr. Rochus Schmid
> Lehrstuhl für Anorganische Chemie II
> Computational Materials Chemistry Group
> Ruhr-Universität Bochum
> Room NC02/30 (Postbox 9)
> D-44780 Bochum
> Tel.: ++49(234) 32 24166
> Fax: ++49(234) 32 14174
> Email: rochus.schmid at rub.de <mailto:rochus.schmid at rub.de>
> http://www.rochusschmid.de
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> <mailto:ase-users at listserv.fysik.dtu.dk>
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>
>
>
> --
> ------------------------------------------
> PD Dr Michael Walter
> Addresses:
> - Fraunhofer IWM, Wöhlerstrasse 11, D-79108 Freiburg i. Br., Germany
> Tel.: +49 761 5142 296
> - FIT Freiburg Centre for Interactive Materials and Bioinspired
> Technologies, Georges-Köhler-Allee 105, 79110 Freiburg, Germany
> Tel: +49 761 203 95072
> email: Michael.Walter at fmf.uni-freiburg.de
> <mailto:Michael.Walter at fmf.uni-freiburg.de>
> www:
> http://www.functional-nanosystems.uni-freiburg.de/People/PDWalter/group
> publications: http://scholar.google.com/citations?user=vlmryKEAAAAJ&hl=en
--
Prof. Dr. Rochus Schmid
Lehrstuhl für Anorganische Chemie II
Computational Materials Chemistry Group
Ruhr-Universität Bochum
Room NC02/30 (Postbox 9)
D-44780 Bochum
Tel.: ++49(234) 32 24166
Fax: ++49(234) 32 14174
Email: rochus.schmid at rub.de
http://www.rochusschmid.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20210317/64408e4b/attachment.htm>
More information about the ase-users
mailing list