myBFGS

class ase2sprkkr.asr.relax.myBFGS(atoms, restart=None, logfile='-', trajectory=None, append_trajectory=False, maxstep=None, master=None, alpha=None)[source]

Class hierarchy

Inheritance diagram of ase2sprkkr.asr.relax.myBFGS

Constructor

Parameters
  • atoms (Atoms) –

  • restart (Optional[str]) –

  • logfile (Optional[Union[IO, str]]) –

  • trajectory (Optional[str]) –

  • append_trajectory (bool) –

  • maxstep (Optional[float]) –

  • master (Optional[bool]) –

  • alpha (Optional[float]) –

__init__(atoms, restart=None, logfile='-', trajectory=None, append_trajectory=False, maxstep=None, master=None, alpha=None)

BFGS optimizer.

Parameters:

atoms: Atoms object

The Atoms object to relax.

restart: string

Pickle file used to store hessian matrix. If set, file with such a name will be searched and hessian matrix stored will be used, if the file exists.

trajectory: string

Pickle file used to store trajectory of atomic movement.

logfile: file object or str

If logfile is a string, a file with that name will be opened. Use ‘-’ for stdout.

maxstep: float

Used to set the maximum distance an atom can move per iteration (default value is 0.2 Å).

master: boolean

Defaults to None, which causes only rank 0 to save files. If set to true, this rank will save files.

alpha: float

Initial guess for the Hessian (curvature of energy surface). A conservative value of 70.0 is the default, but number of needed steps to converge might be less if a lower value is used. However, a lower value also means risk of instability.

Parameters
  • atoms (Atoms) –

  • restart (Optional[str]) –

  • logfile (Optional[Union[IO, str]]) –

  • trajectory (Optional[str]) –

  • append_trajectory (bool) –

  • maxstep (Optional[float]) –

  • master (Optional[bool]) –

  • alpha (Optional[float]) –

log(forces=None, stress=None)[source]

a dummy function as placeholder for a real logger, e.g. in Optimizer