Wiki

Version 6 (Paul Fleurat-Lessard, 03/08/2012 23:09)

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