Opt'n Path

French version : WikiFrench

Following elements came from official page project of CBP [[http://www.cbp.ens-lyon.fr/tiki-index.php?page=CarteOpenSource&bl=y]]

Keywords: Reaction path construction and optimization, Mechanism determination, "chemical" coordinates.


Computational chemistry has now become a standard tool to evaluate energy (and free energy) differences along a reaction path. However, when dealing with chemical reactions, one often relies on ab initio programs. This leads in turn to simulation costs much higher than for classical force fields. As a consequence, one must look for ways to i) generate initial path as close as possible to the unknown actual path, and ii) efficient ways to optimize this path.
Many methods already exist for the optimization of reaction path such as the Nudged Elastic Band (NEB) method and the String method. In both approaches, the reaction path is discretized as an ensemble of intermediate structures (called images) describing the transformation of the reactants into the products. The originality of our approach is to use different sets of coordinates to describe the system. This is implemented in this program.


I have been working on chemical reactivity and reaction path construction and optimization for many years. After joining the Laboratoire de Chimie at the ENS de Lyon, I started to improve the user interface of my routines. This shortly became a task in the SIRE ANR project under the name CARTE that meant: Chemins Automatisés pour la Réactivité chimique incluant la Température, la pression et l'Environnement. This version was distributed to the persons involved in the SIRE project, but not publicly.
When the SIRE project was completed, I decided to release it publicly under the name OpenPath. This was done with the help of Emmanuel Quemener at the Centre Blaise Pascal.
However, we soon discovered that this name was already used by many projects so that it is now distributed under the name Opt'n Path.

Why this name ?

On top of being a project name not already used, Opt'n Path was chosen because it describe what our code can do: Optimization and reaction Path.
More, at least to me, Opt'n still sounds a bit like Open, and I like the idea of releasing an Opensource code. On top of it, I hope that this program will help its users to open some new path in their research :).
Last, Opt'n Path also came from the name of a wonderful arcade game: Ghost'n Goblins

Downloading Opt'n Path software

The latest Opt'n Path archive source can be downloaded from the Files tab.

The path folder contains, in the repository, all sources of software.

A subversion client can also be used to download the sources.

svn checkout http://forge.cbp.ens-lyon.fr/svn/optnpath


On the Open Source architecture

# Change path to openpath
cd optnpath/src
# Launch compilation

The default compiler is gfortran. This can be changed by editing the Makefile.
The compilation starts and shows something like this:

Path.exe has been created.
gfortran -g  -Wall -fbounds-check -o ../utils/xyz2scan ../utils/Xyz2Scan.f
gfortran -g  -Wall -fbounds-check -o ../utils/xyz2path ../utils/Xyz2Path.f

Utilities have been created.
Make sure that they are in your PATH environment
rm m_mrgrnk.mod

As of August 2012 (v 1.43), gfortran should not print warning messages about unused variables.
Even if it does, these warnings do not impede the compilation and execution of the program.


Alone, to retrieve online documentation

Launch the command :

# In compilation folder
./Path.exe -help

Output prints shell :

 Path mini-help

 Use: Path Input_file Output_file
 Input_file starts with a Namelist called path

 Compulsory variables are:
 NGeomi: Number of geometries defining the Initial path
 NGeomf: Number of geometries defining the Final path
 Nat   : Number of atoms

 Other options
 Input: string that indicates the type of the input geometries.
 Accepted values are: Cart (or Xmol or Xyz) or Vasp
 Prog: string that indicates the program that will be used for energy and gradient calculations.
       Accepted values are: Gaussian, Vasp, Mopac or Ext
       In case of a Gaussian or Mopac calculations, input must be set to Cart.
       One example of a gaussian/mopac input should be added at the end of the
       input file.See example file Test_G03.path or Test_Mopac.path
       In the case of a VASP calculation, if input is set to Cart, then
     the preamble of a VASP calculation should be added at the end of
     the input file. See example file Test_VASP_cart.path
     In the case of a VASP calculation, one should also give value of the 
     Runmode variable
 Runmode: This indicates wether one should use VASP routine to calculate the energy
        and gradient of the whole path or not. If one wants to use VASP,
        Runmode must be set to PARA.
 PathName: Prefix used to save the path. Default is Path
 Poscar: string that will be used as the prefix for the different 
         POSCAR files in a VASP calculations. Usefull only if PathOnly=.TRUE.,
         not used for internal calculations.
  CalcName: Prefix for the files used for the energy and gradient calculations
  ISuffix: Suffix for the input file.
  OSuffix: suffix for the output file.
 IGeomRef: Index of the geometry used to construct the internal coordinates.
       Valid only for Coord=Zmat, Hybrid or Mixed
 Fact: REAL used to define if two atoms are linked.
       If d(A,B)<=fact*(rcov(A)+rcov(B)), then A and B are considered Linked.
 debugFile: Name of the file that indicates which subroutine should print debug info.
 Coord: System of coordinates to use. Possible choices are:
        - CART (or Xyz): works in cartesian
        - Zmat: works in internal coordinates (Zmat)
        - Mixed: frozen atoms, as well as atoms defined by the 
        'cart' array(see below) are describe in CARTESIAN, whereas the
        others are described in Zmat
        - Baker: use of Baker coordinates, also called delocalized internal coordinates
        - Hybrid: geometries are described in zmat, but the gradient are used in cartesian
 Step_method: method to compute the step for optimizing a geometry; choices are:
        - RFO: Rational function optimization
        - GDIIS: Geometry optimization using direct inversion in the iterative supspace
  HesUpd: method to update the hessian. By default, it is Murtagh-Sargent
       Except for geometry optimization where it is BFGS.
 MaxCyc: maximum number of iterations for the path optimization
 Smax: Maximum length of a step during path optimization
 SThresh: Step Threshold to consider that the path is stationary
 GThresh: Gradient Threshold to consider that the path is stationary, only orthogonal part is taken
 FTan: We moving the path, this gives the proportion of the displacement tangent to the path
       that is kept. FTan=1. corresponds to the full displacement, 
       whereas FTan=0. gives a displacement orthogonal to the path.
 IReparam: The path is not reparameterised at each iteration. This gives the frequency of reparameterization.
 ISpline: By default, a linear interpolation is used to generate the path.
          This option indicates the first step where spline interpolation is used.

 Rcov: Array containing the covalent radii of the first 80 elements.
       You can modify it using, rcov(6)=0.8.
 Mass: Array containing the atomic mass of the first 80 elements.
 AtTypes: Name of the different atoms used in a VASP calculations.
 If not given, Path will read the POTCAR file.

 MW:  Flag. True if one wants to work in Mass Weighted coordinates. Default=.TRUE.
 Renum: Flag. True if one wants to reoder the atoms in the initial order. default is .TRUE. most of the time.
 OptProd: True if one wants to optimize the geometry of the products.
 OptReac: True if one wants to optimize the geometry of the reactants.
 PathOnly:TRUE if one wants to generate the initial path, and stops.
 Hinv: if True, then Hessian inversed is used.
 IniHup: if True, then Hessian inverse is extrapolated using the initial path calculations.
 HupNeighbour: if True, then Hessian inverse is extrapolated using the neighbouring points of the path.
 FFrozen: True if one wants to freeze the positions of some atoms.
          If True, a &frozenlist namelist containing the list of frozen atoms must be given.
           If VASP is used, and frozen is not given
  here, the program will use the F flags of the input geometry
 FCart:  True if one wants to describe some atoms using cartesian coordinates. 
         *** Only used in 'mixed' calculations. ***
       If True, a &cartlist namelist containing the list of cart atoms must be given.
       By default, only frozen atoms are described in cartesian coordinates.

 DynMaxStep: if TRUE, the maximum allowed step is updated at each step, for each geometry.
         If energy goes up, Smax=Smax*0.8, if not Smax=Smax*1.2. 
        It is ensured that the dynamical Smax is within [0.5*SMax_0,2*Smax_0]
 Autocart: True if you want to let the program choosing the cartesian atoms.
 VMD: TRUE if you want to use VMD to look at the Path. Used only for VASP for now
 WriteVASP: TRUE if you want to print the images coordinates in POSCAR files.
 See also the POSCAR option. This can be used only if prog or input=VASP.

Execution of a complete example Test_HCN_zmat_test

# Change folder
cd ../examples/Test/Zmat
# Launch path on HCN_zmat.path with HCN_zmat.out
../../../src/Path.exe HCN_zmat.path HCN_zmat.out

Output prints Test_HCN_zmat_test.out (available in Files) starts and ends with following lines :

 Path v4.1793 (c) PFL/PD 2007-2010
 Input has been set to the default: XYZ                             
 Working in MW coordinates
 EGrad.f90, L73, IOpt=           0
 EGrad.f90, L73, IOpt=           0
 EGrad.f90, L73, IOpt=           0
 EGrad.f90, L73, IOpt=           0
 EGrad.f90, L73, IOpt=           0
 EGrad.f90, L73, IOpt=           0
 EGrad.f90, L73, IOpt=           0
 EGrad.f90, L73, IOpt=           0
 EGrad.f90, L73, IOpt=           0
 EGrad.f90, L73, IOpt=           0
  1.053  1.113  2.832
  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
--- snip snip ---
 Extrapol_int u,xgeom(NGeomI),s,dist,s-dist   11.000000000000000        11.000000000000000        1.3530023123052950        1.3530023123053081      -1.31006316905768472E-014