Wiki

Version 1 (Paul Fleurat-Lessard, 02/12/2011 21:37)

1 1 Paul Fleurat-Lessard
h1. Opt'n Path
2 1 Paul Fleurat-Lessard
3 1 Paul Fleurat-Lessard
Following elements came from official page project of CBP  [[http://www.cbp.ens-lyon.fr/tiki-index.php?page=CarteOpenSource&bl=y]]
4 1 Paul Fleurat-Lessard
5 1 Paul Fleurat-Lessard
*Keywords:* Reaction path construction and optimization, Mechanism determination, "chemical" coordinates.
6 1 Paul Fleurat-Lessard
7 1 Paul Fleurat-Lessard
h2. Introduction
8 1 Paul Fleurat-Lessard
9 1 Paul Fleurat-Lessard
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.
10 1 Paul Fleurat-Lessard
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.
11 1 Paul Fleurat-Lessard
12 1 Paul Fleurat-Lessard
h2. History
13 1 Paul Fleurat-Lessard
I have been working on chemical reactivity and reaction path construction and optimization for many years. After joining the
14 1 Paul Fleurat-Lessard
 "Laboratoire de Chimie":http://www.ens-lyon.fr/CHIMIE at the 
15 1 Paul Fleurat-Lessard
"ENS de Lyon":http://www.ens-lyon.eu, 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.
16 1 Paul Fleurat-Lessard
When the SIRE project was completed, I decided to release it publicly under the name OpenPath. 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.
17 1 Paul Fleurat-Lessard
18 1 Paul Fleurat-Lessard
h2. Why this name ?
19 1 Paul Fleurat-Lessard
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.
20 1 Paul Fleurat-Lessard
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 :).
21 1 Paul Fleurat-Lessard
Last, Opt'n Path also came from the name of a wonderful arcade game: "Ghost'n Goblins":http://en.wikipedia.org/wiki/Ghosts%27n_Goblins
22 1 Paul Fleurat-Lessard
23 1 Paul Fleurat-Lessard
h2. Downloading Opt'n Path software
24 1 Paul Fleurat-Lessard
25 1 Paul Fleurat-Lessard
Following link to download Opt'n Path archive source : http://forge.cbp.ens-lyon.fr/redmine/attachments/download/xx/optnpath_1.42.tgz
26 1 Paul Fleurat-Lessard
27 1 Paul Fleurat-Lessard
The @path@ folder contains, in the repository, all sources of software.
28 1 Paul Fleurat-Lessard
29 1 Paul Fleurat-Lessard
A @subversion@ client can also be used to download the sources.
30 1 Paul Fleurat-Lessard
31 1 Paul Fleurat-Lessard
<pre>
32 1 Paul Fleurat-Lessard
svn checkout http://forge.cbp.ens-lyon.fr/svn/optnpath
33 1 Paul Fleurat-Lessard
</pre>
34 1 Paul Fleurat-Lessard
35 1 Paul Fleurat-Lessard
h2. Compilation
36 1 Paul Fleurat-Lessard
37 1 Paul Fleurat-Lessard
h3. On the Open Source architecture
38 1 Paul Fleurat-Lessard
39 1 Paul Fleurat-Lessard
<pre>
40 1 Paul Fleurat-Lessard
# Change path to openpath
41 1 Paul Fleurat-Lessard
cd optnpath/src
42 1 Paul Fleurat-Lessard
# Launch compilation
43 1 Paul Fleurat-Lessard
make
44 1 Paul Fleurat-Lessard
</pre>
45 1 Paul Fleurat-Lessard
46 1 Paul Fleurat-Lessard
The default compiler is @gfortran@. This can be changed by editing the @Makefile@.
47 1 Paul Fleurat-Lessard
The compilation starts and shows something like this:
48 1 Paul Fleurat-Lessard
<pre>
49 1 Paul Fleurat-Lessard
...
50 1 Paul Fleurat-Lessard
Path.exe has been created.
51 1 Paul Fleurat-Lessard
gfortran -g  -Wall -fbounds-check -o ../utils/xyz2scan ../utils/Xyz2Scan.f
52 1 Paul Fleurat-Lessard
gfortran -g  -Wall -fbounds-check -o ../utils/xyz2path ../utils/Xyz2Path.f
53 1 Paul Fleurat-Lessard
54 1 Paul Fleurat-Lessard
Utilities have been created.
55 1 Paul Fleurat-Lessard
Make sure that they are in your PATH environment
56 1 Paul Fleurat-Lessard
rm m_mrgrnk.mod
57 1 Paul Fleurat-Lessard
</pre>
58 1 Paul Fleurat-Lessard
59 1 Paul Fleurat-Lessard
As of February 2011, @gfortran@ will print warning messages about unused variables. These warnings do not impede the compilation and execution of the program.
60 1 Paul Fleurat-Lessard
61 1 Paul Fleurat-Lessard
h2. Execution
62 1 Paul Fleurat-Lessard
63 1 Paul Fleurat-Lessard
h3. Alone, to retrieve online documentation
64 1 Paul Fleurat-Lessard
65 1 Paul Fleurat-Lessard
Launch the command : 
66 1 Paul Fleurat-Lessard
<pre>
67 1 Paul Fleurat-Lessard
# In compilation folder
68 1 Paul Fleurat-Lessard
./Path.exe -help
69 1 Paul Fleurat-Lessard
</pre>
70 1 Paul Fleurat-Lessard
71 1 Paul Fleurat-Lessard
Output prints _shell_ :
72 1 Paul Fleurat-Lessard
<pre>
73 1 Paul Fleurat-Lessard
 Path mini-help
74 1 Paul Fleurat-Lessard
 --------------
75 1 Paul Fleurat-Lessard
 
76 1 Paul Fleurat-Lessard
 Use: Path Input_file Output_file
77 1 Paul Fleurat-Lessard
 Input_file starts with a Namelist called path
78 1 Paul Fleurat-Lessard
 
79 1 Paul Fleurat-Lessard
 Compulsory variables are:
80 1 Paul Fleurat-Lessard
 NGeomi: Number of geometries defining the Initial path
81 1 Paul Fleurat-Lessard
 NGeomf: Number of geometries defining the Final path
82 1 Paul Fleurat-Lessard
 Nat   : Number of atoms
83 1 Paul Fleurat-Lessard
 
84 1 Paul Fleurat-Lessard
 Other options
85 1 Paul Fleurat-Lessard
 Input: string that indicates the type of the input geometries.
86 1 Paul Fleurat-Lessard
 Accepted values are: Cart (or Xmol or Xyz) or Vasp
87 1 Paul Fleurat-Lessard
 Prog: string that indicates the program that will be used for energy and gradient calculations.
88 1 Paul Fleurat-Lessard
       Accepted values are: Gaussian, Vasp, Mopac or Ext
89 1 Paul Fleurat-Lessard
       In case of a Gaussian or Mopac calculations, input must be set to Cart.
90 1 Paul Fleurat-Lessard
       One example of a gaussian/mopac input should be added at the end of the
91 1 Paul Fleurat-Lessard
       input file.See example file Test_G03.path or Test_Mopac.path
92 1 Paul Fleurat-Lessard
       In the case of a VASP calculation, if input is set to Cart, then
93 1 Paul Fleurat-Lessard
     the preamble of a VASP calculation should be added at the end of
94 1 Paul Fleurat-Lessard
     the input file. See example file Test_VASP_cart.path
95 1 Paul Fleurat-Lessard
     In the case of a VASP calculation, one should also give value of the 
96 1 Paul Fleurat-Lessard
     Runmode variable
97 1 Paul Fleurat-Lessard
 Runmode: This indicates wether one should use VASP routine to calculate the energy
98 1 Paul Fleurat-Lessard
        and gradient of the whole path or not. If one wants to use VASP,
99 1 Paul Fleurat-Lessard
        Runmode must be set to PARA.
100 1 Paul Fleurat-Lessard
 PathName: Prefix used to save the path. Default is Path
101 1 Paul Fleurat-Lessard
 Poscar: string that will be used as the prefix for the different 
102 1 Paul Fleurat-Lessard
         POSCAR files in a VASP calculations. Usefull only if PathOnly=.TRUE.,
103 1 Paul Fleurat-Lessard
         not used for internal calculations.
104 1 Paul Fleurat-Lessard
  CalcName: Prefix for the files used for the energy and gradient calculations
105 1 Paul Fleurat-Lessard
  ISuffix: Suffix for the input file.
106 1 Paul Fleurat-Lessard
  OSuffix: suffix for the output file.
107 1 Paul Fleurat-Lessard
 IGeomRef: Index of the geometry used to construct the internal coordinates.
108 1 Paul Fleurat-Lessard
       Valid only for Coord=Zmat, Hybrid or Mixed
109 1 Paul Fleurat-Lessard
 Fact: REAL used to define if two atoms are linked.
110 1 Paul Fleurat-Lessard
       If d(A,B)<=fact*(rcov(A)+rcov(B)), then A and B are considered Linked.
111 1 Paul Fleurat-Lessard
 debugFile: Name of the file that indicates which subroutine should print debug info.
112 1 Paul Fleurat-Lessard
 Coord: System of coordinates to use. Possible choices are:
113 1 Paul Fleurat-Lessard
        - CART (or Xyz): works in cartesian
114 1 Paul Fleurat-Lessard
        - Zmat: works in internal coordinates (Zmat)
115 1 Paul Fleurat-Lessard
        - Mixed: frozen atoms, as well as atoms defined by the 
116 1 Paul Fleurat-Lessard
        'cart' array(see below) are describe in CARTESIAN, whereas the
117 1 Paul Fleurat-Lessard
        others are described in Zmat
118 1 Paul Fleurat-Lessard
        - Baker: use of Baker coordinates, also called delocalized internal coordinates
119 1 Paul Fleurat-Lessard
        - Hybrid: geometries are described in zmat, but the gradient are used in cartesian
120 1 Paul Fleurat-Lessard
 Step_method: method to compute the step for optimizing a geometry; choices are:
121 1 Paul Fleurat-Lessard
        - RFO: Rational function optimization
122 1 Paul Fleurat-Lessard
        - GDIIS: Geometry optimization using direct inversion in the iterative supspace
123 1 Paul Fleurat-Lessard
  HesUpd: method to update the hessian. By default, it is Murtagh-Sargent
124 1 Paul Fleurat-Lessard
       Except for geometry optimization where it is BFGS.
125 1 Paul Fleurat-Lessard
 MaxCyc: maximum number of iterations for the path optimization
126 1 Paul Fleurat-Lessard
 Smax: Maximum length of a step during path optimization
127 1 Paul Fleurat-Lessard
 SThresh: Step Threshold to consider that the path is stationary
128 1 Paul Fleurat-Lessard
 GThresh: Gradient Threshold to consider that the path is stationary, only orthogonal part is taken
129 1 Paul Fleurat-Lessard
 FTan: We moving the path, this gives the proportion of the displacement tangent to the path
130 1 Paul Fleurat-Lessard
       that is kept. FTan=1. corresponds to the full displacement, 
131 1 Paul Fleurat-Lessard
       whereas FTan=0. gives a displacement orthogonal to the path.
132 1 Paul Fleurat-Lessard
 IReparam: The path is not reparameterised at each iteration. This gives the frequency of reparameterization.
133 1 Paul Fleurat-Lessard
 ISpline: By default, a linear interpolation is used to generate the path.
134 1 Paul Fleurat-Lessard
          This option indicates the first step where spline interpolation is used.
135 1 Paul Fleurat-Lessard
 
136 1 Paul Fleurat-Lessard
 Arrays:
137 1 Paul Fleurat-Lessard
 Rcov: Array containing the covalent radii of the first 80 elements.
138 1 Paul Fleurat-Lessard
       You can modify it using, rcov(6)=0.8.
139 1 Paul Fleurat-Lessard
 Mass: Array containing the atomic mass of the first 80 elements.
140 1 Paul Fleurat-Lessard
 AtTypes: Name of the different atoms used in a VASP calculations.
141 1 Paul Fleurat-Lessard
 If not given, Path will read the POTCAR file.
142 1 Paul Fleurat-Lessard
 
143 1 Paul Fleurat-Lessard
 Flags:
144 1 Paul Fleurat-Lessard
 MW:  Flag. True if one wants to work in Mass Weighted coordinates. Default=.TRUE.
145 1 Paul Fleurat-Lessard
 Renum: Flag. True if one wants to reoder the atoms in the initial order. default is .TRUE. most of the time.
146 1 Paul Fleurat-Lessard
 OptProd: True if one wants to optimize the geometry of the products.
147 1 Paul Fleurat-Lessard
 OptReac: True if one wants to optimize the geometry of the reactants.
148 1 Paul Fleurat-Lessard
 PathOnly:TRUE if one wants to generate the initial path, and stops.
149 1 Paul Fleurat-Lessard
 Hinv: if True, then Hessian inversed is used.
150 1 Paul Fleurat-Lessard
 IniHup: if True, then Hessian inverse is extrapolated using the initial path calculations.
151 1 Paul Fleurat-Lessard
 HupNeighbour: if True, then Hessian inverse is extrapolated using the neighbouring points of the path.
152 1 Paul Fleurat-Lessard
 FFrozen: True if one wants to freeze the positions of some atoms.
153 1 Paul Fleurat-Lessard
          If True, a &frozenlist namelist containing the list of frozen atoms must be given.
154 1 Paul Fleurat-Lessard
           If VASP is used, and frozen is not given
155 1 Paul Fleurat-Lessard
  here, the program will use the F flags of the input geometry
156 1 Paul Fleurat-Lessard
 FCart:  True if one wants to describe some atoms using cartesian coordinates. 
157 1 Paul Fleurat-Lessard
         *** Only used in 'mixed' calculations. ***
158 1 Paul Fleurat-Lessard
       If True, a &cartlist namelist containing the list of cart atoms must be given.
159 1 Paul Fleurat-Lessard
       By default, only frozen atoms are described in cartesian coordinates.
160 1 Paul Fleurat-Lessard
 
161 1 Paul Fleurat-Lessard
 DynMaxStep: if TRUE, the maximum allowed step is updated at each step, for each geometry.
162 1 Paul Fleurat-Lessard
         If energy goes up, Smax=Smax*0.8, if not Smax=Smax*1.2. 
163 1 Paul Fleurat-Lessard
        It is ensured that the dynamical Smax is within [0.5*SMax_0,2*Smax_0]
164 1 Paul Fleurat-Lessard
 Autocart: True if you want to let the program choosing the cartesian atoms.
165 1 Paul Fleurat-Lessard
 VMD: TRUE if you want to use VMD to look at the Path. Used only for VASP for now
166 1 Paul Fleurat-Lessard
 WriteVASP: TRUE if you want to print the images coordinates in POSCAR files.
167 1 Paul Fleurat-Lessard
 See also the POSCAR option. This can be used only if prog or input=VASP.
168 1 Paul Fleurat-Lessard
</pre> 
169 1 Paul Fleurat-Lessard
170 1 Paul Fleurat-Lessard
h3. Execution of a complete example Test_HCN_zmat_test
171 1 Paul Fleurat-Lessard
172 1 Paul Fleurat-Lessard
<pre>
173 1 Paul Fleurat-Lessard
# Change folder
174 1 Paul Fleurat-Lessard
cd ../examples/Test/Zmat
175 1 Paul Fleurat-Lessard
# Launch path on HCN_zmat.path with HCN_zmat.out
176 1 Paul Fleurat-Lessard
../../../src/Path.exe HCN_zmat.path HCN_zmat.out
177 1 Paul Fleurat-Lessard
</pre>
178 1 Paul Fleurat-Lessard
179 1 Paul Fleurat-Lessard
Output prints @Test_HCN_zmat_test.out@ (available in @Files@) starts and ends with following lines :
180 1 Paul Fleurat-Lessard
<pre>
181 1 Paul Fleurat-Lessard
 Path v4.1793 (c) PFL/PD 2007-2010
182 1 Paul Fleurat-Lessard
 Input has been set to the default: XYZ                             
183 1 Paul Fleurat-Lessard
 Working in MW coordinates
184 1 Paul Fleurat-Lessard
 Prog=TEST
185 1 Paul Fleurat-Lessard
 EGrad.f90, L73, IOpt=           0
186 1 Paul Fleurat-Lessard
 EGrad.f90, L73, IOpt=           0
187 1 Paul Fleurat-Lessard
 EGrad.f90, L73, IOpt=           0
188 1 Paul Fleurat-Lessard
 EGrad.f90, L73, IOpt=           0
189 1 Paul Fleurat-Lessard
 EGrad.f90, L73, IOpt=           0
190 1 Paul Fleurat-Lessard
 EGrad.f90, L73, IOpt=           0
191 1 Paul Fleurat-Lessard
 EGrad.f90, L73, IOpt=           0
192 1 Paul Fleurat-Lessard
 EGrad.f90, L73, IOpt=           0
193 1 Paul Fleurat-Lessard
 EGrad.f90, L73, IOpt=           0
194 1 Paul Fleurat-Lessard
 EGrad.f90, L73, IOpt=           0
195 1 Paul Fleurat-Lessard
 GeomTmp=
196 1 Paul Fleurat-Lessard
  1.053  1.113  2.832
197 1 Paul Fleurat-Lessard
 GeomCart=
198 1 Paul Fleurat-Lessard
  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
199 1 Paul Fleurat-Lessard
--- snip snip ---
200 1 Paul Fleurat-Lessard
 Extrapol_int u,xgeom(NGeomI),s,dist,s-dist   11.000000000000000        11.000000000000000        1.3530023123052950        1.3530023123053081      -1.31006316905768472E-014
201 1 Paul Fleurat-Lessard
</pre>