-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quantum Espresso Geometry Optimization Error Code 3 #22
Comments
There are various ways to control how remote jobs deal with errors, and this is a bit tricky. The current intended behavior is that if a remote job raises an exception, the python |
[edited] Note that if the ASE calculator refuses to try to read the QE output because the executable gave a non-zero return status, there's nothing ExPyRe/wfl can do about that. Let me look over everything it's doing, make some suggestions for your particular case, and think about whether anythin can be changed to make the overall error handling more intuitive. |
I just tracked down my script :) |
Please reread the message above, since I was editing it to give more info while you were writing your followup. |
Totally agree that this should not be an aggressive QE error code or at least there should be another flag that avoids this error code... |
If you know how to do it, I'd suggest setting up a little python script using the underlying ASE QE calculator, no expyre or wfl, to confirm that the ASE interface is even returning any useful data. Just set up a small system that you can run in serial and a tiny max steps. If it does return data but gives an error, then we can think about how to get expyre/wfl to handle that cleanly. |
It is indeed an ASE calculator issue. :/ |
I went through the ASE documentation and realized that ASE is doing optimization not like I was assuming. Instead of running one QE job with calculation='relax', the relaxation is done via the ase.optimize (e.g. applying BFGS) module stringing together several QE jobs with calculation='scf'.
|
wfl wraps the ASE optimizer (only preconlbfgs for now). In principle it can use any ASE calculator, but I don't know if it's been tested with any DFT calculator (they're slightly different because they write lots of files). |
I will do some testing on Monday 💪 |
I think the way to do DFT relaxations is to use the DFT code itself, not ASE optimiser with DFT single point evaluations. It's much more efficient. For example, for one or two examples I tested ASE-LBFGS & ORCA-single-point took over 100 steps, whereas ORCA itself took 20 steps and more efficient ones, because it re-uses some things from previous optimisation steps. Relaxing structures with ORCA directly is implemented in workflow's ORCA calculator. If there's enough interest in implementing that for QE, it might be useful to look at that? The gist: set |
There's no good reason for the number of geometry steps to be different, unless the DFT calculator's minimization algorithm is better than ASE's. If there are really so much better minimizers, they should be added to ASE. [added] With VASP I'm confident that its minimizers are not much better than PreconLBFGS, with the possible exception of being less sensitive to noisy forces. The step-to-step efficiency depends on the code, and on how the ASE interface works. For VASP it will reuse wavefunctions (if you don't turn off writing them), which helps a lot, but it won't do what I implemented for QUIP, which is to keep VASP running and just repeatedly feed it configurations, so you don't even have the program restart overhead. There's also no guarantee that any particular ASE DFT calculator will read new positions at the end. In fact, It sort of violates the concept of the ASE |
Orca could be doing wavefunction extrapolation - could that possibly change the number of steps though? Maybe it's using force field preconditioning. We have that in ASE as well but it's a bit of a hack to set it up |
Look at the example in preconlbfgs |
Yes, WF extrapolation could be making a difference (I do that, although not as well as VASP's internal algorithm, with my hacked interactive VASP driver for QUIP), but again, only changing the number of SCF steps, not geometry steps. I'm guessing for the geometry that perhaps it's doing something that makes sense for molecules, like redundant internal coordinates, which ASE indeed does not support, at least not in PreconLBFGS. |
We could wrap https://databases.fysik.dtu.dk/ase/ase/optimize.html#pyberny, if it's useful |
I think our FF preconditioner should be similar
— Gábor
Gabor Csanyi
Professor of Molecular Modelling
Engineering Laboratory
University of Cambridge
…On Wed, Jul 6, 2022 at 18:43, bernstei ***@***.***> wrote:
We could wrap https://databases.fysik.dtu.dk/ase/ase/optimize.html#pyberny, if it's useful
—
Reply to this email directly, [view it on GitHub](#22 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABIANZYM6PECA4VBQ6UCIZDVSXATTANCNFSM52ZWJPOQ).
You are receiving this because you commented.Message ID: ***@***.***>
|
It might. I wonder if the current heuristic for turning it off for small systems is too conservative. |
Hi all,
when running geometry optimization with Quantum Espresso via the calculation = 'relax' command with a small maximum number of relaxation steps (e.g. 20) the calculation will result in an error code 3.
The QE output still terminates with
as it should and includes all necessary information (i.e. energy and forces).
However, wfl will through an error and stop the iterative training.
Is it possible to prohibit certain error messages to halt the whole program?
Here is an example QE_run.tar.gz
The text was updated successfully, but these errors were encountered: