Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
geometry_optimization_optg [2023/06/12 07:25] – [Options for the PQS optimizer] wernergeometry_optimization_optg [2024/01/08 13:24] (current) – external edit 127.0.0.1
Line 19: Line 19:
 When analytical gradients are available for the optimized energy these will be used. See section [[energy gradients#analytical energy gradients|analytical energy gradients]] for a list of methods with analytical gradients. Otherwise the gradient will be computed numerically from finite energy differences. Normally, the last computed ground-state energy is used. But the ''VARIABLE'' directive or option can be used to optimize, e.g., Davidson corrected energies, excited states, or counterpoise corrected energies. When analytical gradients are available for the optimized energy these will be used. See section [[energy gradients#analytical energy gradients|analytical energy gradients]] for a list of methods with analytical gradients. Otherwise the gradient will be computed numerically from finite energy differences. Normally, the last computed ground-state energy is used. But the ''VARIABLE'' directive or option can be used to optimize, e.g., Davidson corrected energies, excited states, or counterpoise corrected energies.
  
-By default the program repeats in each geometry optimization step those commands in the input that are needed to compute the last energy. For example, for MP2 gradients the commands HF and MP2 are needed. The MP2 gradients will then be computed automatically. It is also possible to define procedures for the energy calculation, or to specify the first command from which the input should be repeated in each step (see section [[geometry optimization (OPTG)#options to select the wavefunction and energy to be optimized|options to select the wavefunction and energy to be optimized]]). The section of the input which is needed for the geometry optimization must not modify variables that are used in the geometry definition (changes of such variables are ignored, and a warning message is printed).+By default the program repeats in each geometry optimization step those commands in the input that are needed to compute the last energy //and// any ''variable=value'' assignments in between the last energy calculation and the ''OPTG'' command. For example, for MP2 gradients the commands HF and MP2 are needed. The MP2 gradients will then be computed automatically. Variables set by these programs as, e.g., ''ENERGY'', are set as usual in each optimization step. In addition, there is a variable ''OPTSTEP'', which is incremented in each optimization step. Its initial value is zero. To save the results of the initial energy calculation, one can use, e.g., 
 + 
 +''hf\\ 
 +if(optstep.eq.0) e1=energy\\ 
 +optg''\\ 
 + 
 +It is also possible to define procedures for the energy calculation, or to specify the first command from which the input should be repeated in each step (see section [[geometry optimization (OPTG)#options to select the wavefunction and energy to be optimized|options to select the wavefunction and energy to be optimized]]). The section of the input which is needed for the geometry optimization must not modify variables that are used in the geometry definition (changes of such variables are ignored, and a warning message is printed).
  
 ===== Options ===== ===== Options =====
Line 71: Line 77:
  
  
-There are many further options, but only the following may sometimes be relevant:+There are many further options, but only the following may be sometimes relevant:
  
 ''OPTC:''  ''OPTC:'' 
Line 91: Line 97:
   * ''ITYPE=0'' - standard molecular optimization (default)   * ''ITYPE=0'' - standard molecular optimization (default)
   * ''ITYPE=1'' - optimization of molecule reacting/adsorbed on model surface   * ''ITYPE=1'' - optimization of molecule reacting/adsorbed on model surface
-  * ''ITYPE=2'' - optimization of molecular clusters+  * ''ITYPE=2'' - optimization of molecular clusters (see below)
  
 ''ICONS:''  ''ICONS:'' 
   * ''ICONS=0'' - full optimization (no constraints, default)   * ''ICONS=0'' - full optimization (no constraints, default)
   * ''ICONS=1'' - constrained optimization using Lagrange multipliers (default if constraints are given see [[geometry optimization (OPTG)#Constraint optimisations using the PQS optimizer|constraint optimisations using the PQS optimizer]])   * ''ICONS=1'' - constrained optimization using Lagrange multipliers (default if constraints are given see [[geometry optimization (OPTG)#Constraint optimisations using the PQS optimizer|constraint optimisations using the PQS optimizer]])
-  * ''ICONS=2'' - constrained optimization using Penalty functions+  * ''ICONS=2'' - constrained optimization using penalty functions
  
 +''Cluster optimizations:''
 +
 +Cluster optimizations use inverse distance coordinates for intermolecular degrees of freedom.
 +
 +  * ''MOLECULES=[//n1,n2,n3,...//]'' - For cluster optimisations. The molecules must come one after the other in the geometry input. //''n1'', ''n2'',...// are the number of atoms in each molecule. The sum of these must be equal to the total number of atoms. This option sets automatically ''ITYPE=2''
 + 
 +  * ''CUTOFF=//value//'' - Distance cutoff for intermolecular coordinates in Angstrom. The program will generate inverse distance coordinates for between all atoms of different molecules, unless the distance is larger than this value. Default: 5 Angstrom.
 +
 +  * ''SCALE=//value//'' - Scaling factor for inverse distance coordinates. Typical values are between 1 and 10. Default is 1.0
 +
 +Unfortunately, according to our current limited experience, the cluster optimization in pqsopt is neither well working in the original PQS program nor in Molpro and should therefore be used with care.
 + 
 +''Optimizations with z-matrix input:''
 +
 +By default, optimizations with z-matrix geometry input are done with the old RF optimizer, and only the active variables in the z-matrix are optimised (cf. [[geometry optimization (OPTG)#Defining active geometry parameters (ACTIVE)|Defining active geometry parameters]]). It is possible, however, to force pqs optimization by giving the optg option ''PQS'' or ''METHOD=PQS''. In this case, all cartesian coordinates will be optimised, and in each iteration the new structure is back-transformed to the z-matrix. If the z-matrix contains constants, these may change and will be overwritten. If the same variable is used in several places of the z-matrix and the corresponding new parameters are not the same, the variable is only kept in the first place, and the further ones are overwritten by the new fixed parameters. The updated z-matrix is printed in the log-file in each iteration.
 ==== Constraint optimisations using the PQS optimizer ==== ==== Constraint optimisations using the PQS optimizer ====
  
Line 128: Line 149:
    
  
-{OPTG\\+''{OPTG\\
 CONSTRAINT\\ CONSTRAINT\\
 STRE,2,3,1.5\\ STRE,2,3,1.5\\
-END}\\+END}''\\
  
 ** Composite constraints:** ** Composite constraints:**
Line 137: Line 158:
 It is possible to define linear combinations of primitive internal coordinates as constraints. These must be defined after the simple constraints (if present). Each composite constraint begins with the keyword ''COMPOSITE''. The input of each primitive is as described above, but the ''weight'' (the factor in the linear combination) replaces ''value''. The value is given at the end of the first line. Angles in the linear combinations are in radians. The general structure is: It is possible to define linear combinations of primitive internal coordinates as constraints. These must be defined after the simple constraints (if present). Each composite constraint begins with the keyword ''COMPOSITE''. The input of each primitive is as described above, but the ''weight'' (the factor in the linear combination) replaces ''value''. The value is given at the end of the first line. Angles in the linear combinations are in radians. The general structure is:
  
-{OPTG,//options//\\ +''{OPTG'',//options//\\ 
-CONSTRAINT\\+''CONSTRAINT''\\
 //simple constrains// (if present)\\ //simple constrains// (if present)\\
-COMPOSITE\\+''COMPOSITE''\\
 //type atom_list weight value//\\ //type atom_list weight value//\\
 //type atom_list weight//\\ //type atom_list weight//\\
 ...\\ ...\\
-END}+''END}''\\
  
 //value// is the total value of the combined constraint. Note that the weights are normalised. Example: //value// is the total value of the combined constraint. Note that the weights are normalised. Example:
  
-COMPOSITE\\ + 
-STRE I   1.0\\ +''COMPOSITE\\ 
-STRE J   -1.0\\+STRE I J    1.0\\ 
 +STRE J K   -1.0\\
 BEND I J K  2.0\\ BEND I J K  2.0\\
-END\\+END''\\
  
-will constrain the value of 1/sqrt(6)(R_IJ R_JK + 2 A_IJK to whatever it is in the starting geometry. +will constrain the value of $6^{-1/2}(R_{IJ} R_{JK} + 2 A_{IJK})$ to whatever it is in the starting geometry. 
  
 Currently, the total number  of composite constraints is limited to 20. Note that there is no checking for incompatible or impossible constraints, and it is the user's responsibility to make correct definitions. Currently, the total number  of composite constraints is limited to 20. Note that there is no checking for incompatible or impossible constraints, and it is the user's responsibility to make correct definitions.