Coverage for /builds/kinetik161/ase/ase/optimize/precon/__init__.py: 100.00%
10 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-12-10 11:04 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-12-10 11:04 +0000
1"""
2This module contains tools for preconditioned geometry optimisation.
4Code maintained by James Kermode <james.kermode@gmail.com>
5Parts written by John Woolley, Letif Mones and Christoph Ortner.
7The preconditioned LBFGS optimizer implemented here is described in
8the following publication:
10 D. Packwood, J. R. Kermode, L. Mones, N. Bernstein, J. Woolley,
11 N. Gould, C. Ortner, and G. Csanyi, A universal preconditioner for
12 simulating condensed phase materials, J. Chem. Phys. 144, 164109 (2016).
13 DOI: https://doi.org/10.1063/1.4947024
15A preconditioned version of FIRE is also included, this is less well tested.
17Optional dependencies
18---------------------
20 - scipy, `pip install scipy` for efficient sparse linear algebra,
21 important for large systems (>1000 atoms).
22 - PyAMG, `pip install pyamg`, for iterative adaptive multi grid
23 inversion of the preconditioner, again important for large systems.
24"""
26from ase.optimize.ode import ODE12r
27from ase.optimize.precon.fire import PreconFIRE
28from ase.optimize.precon.lbfgs import PreconLBFGS
29from ase.optimize.precon.precon import (C1, FF, Exp, Exp_FF, Pfrommer, Precon,
30 PreconImages, SplineFit, make_precon)
33class PreconODE12r(ODE12r):
34 """
35 Subclass of ase.optimize.ode.ODE12r with 'Exp' preconditioning on by default
36 """
38 def __init__(self, *args, **kwargs):
39 if 'precon' not in kwargs:
40 kwargs['precon'] = 'Exp'
41 ODE12r.__init__(self, *args, **kwargs)
44__all__ = ['make_precon', 'PreconImages', 'SplineFit',
45 'Precon', 'Exp', 'C1', 'Pfrommer', 'FF', 'Exp_FF',
46 'PreconLBFGS', 'PreconFIRE', 'PreconODE12r']