A fast and precise DFT wavelet code

Nudge Elastic Band method

A fast and precise DFT wavelet code
Jump to: navigation, search

Doing a path minimization: NEB

A NEB implementation is present in the BigDFT package, thanks to the initial routines provided by Carlos Sbraccia. This implementation is launched with the help of the NEB executable. This program is responsible for initialising the path from the two minima and then to run the path minimisation, using BigDFT to compute the forces. Each replica is launched by an instance of bigdft and not in the same program NEB. This allows to run the NEB algorithm on a super computer with a queue system, each replica going separately in the queue. The process of running the different bigdft instances, in different directories and wait for their completions is done by two shell scripts: NEB_driver.sh and NEB_include.sh. The first one is very generic and should not be touched by users. It is provided in the src/ directory of the package. The second one must be adapted by users to suit to their running machine. One example is provided in the tests/NEB/ directory of the package.

The NEB executable can be run from everywhere but the scripts NEB_driver.sh and NEB_include.sh must be in the same directory. It takes arguments from the command line, using a redirection from a file is good practice. See the tests/NEB directory of the package:

./NEB < input

The file input contains a list of variables relevant to the NEB algorithm. Some of them are explained here:

  • scratch_dir is where the NEB_driver.sh script will create the directories where to run the bigdft instances. It is usually on a local disk.
  • job_name a name that will be used to named all generated files and directories.
  • climbing when set to .TRUE., the highest replica follow opposite parallel forces in addition to the usual perpendicular ones.
  • optimization when set to .TRUE., tries to optimize the geometry of the first and last replicas (if not local minima already).
  • minimization_scheme specifies the scheme used to minimze the NEB. The possible values are ‘steepest_descent’, ‘fletcher-reeves’, ‘polak-ribiere’, ‘quick-min’, ‘damped-verlet’ and ‘sim-annealing’.
  • tolerance is a criterion not to take into account in the list of moving atoms the ones that move less than this value between the first and the last replica.
  • convergence is the stop criterion on perpendicular forces, in eV/Å.
  • num_of_images is the number of desired replicas.
  • *_config the file describing the first and the last replica (in BigDFT 1.3, the file extension .xyz must be omitted).

At each NEB iteration, the driver script is run. It creates the directories for forces calculations if needed, creates the input files using the include script, runs the jobs, greps the energy and the forces and returns. The script file NEB_include.sh must contain the following shell functions:

  • init_jobs(), run once after directory creation. It can be used.
  • finalise_jobs(), run once after all jobs have finished.
  • wait_jobs(), run each time the script poll all replicas for completion.
  • make_input(), run once in each scratch directories to create the file ‘posinp.xyz’ from the NEB restart file and the initial ones.
  • run_job(), run once in each scratch directories to start the force calculations. In the example, it runs the replicas directly on the host machine, but in this shell function, a submission file may be created instead and submitted to the queue system for later run.
  • check_job() is used periodically by the driver system to check if a job is finished or not. It must return different values: -1 if the job is still not started (maybe be still in the queue for instance), 0 if the job is running but not finished yet, 1 if it exited with success and 2 if it exited with a failure.
  • grep_forces() is run once after job termination to get the energy and the forces. Energy must be in Hartree and forces in Hartree per Bohr.

For NEB purposes, users of BigDFT usually have only to modify the run_job() functions from the examples to adapt it to their machine.

The output files are:

  • job_name.NEB.dat: A three column file containing for each replica a reaction coordinate, the energy in eV and the maximum value of remaining perpendicular forces. This file is updated at each iteration.
  • job_name.NEB.log: A file, giving for each NEB iteration the value of the highest replica in eV and the value of the maximum perpendicular forces on all atoms and replicas.
  • job_name.NEB.restart: A file with the coordinates of each replicas. This file is generated by the NEB executable at each iteration and used by the driver script to generate the ‘posinp’ files.
Personal tools