Psi4
opt_params.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
35 #ifndef _opt_opt_params_h_
36 #define _opt_opt_params_h_
37 
38 #include <string>
39 #include <vector>
40 
41 namespace opt {
42 
43 struct OPT_PARAMS {
44 
45  // convergence criteria
48  double conv_max_DE;
49  double conv_max_disp;
50  double conv_rms_disp;
53  bool i_max_DE;
54  bool i_max_disp;
55  bool i_rms_disp;
57  std::string general_conv;
58 
60  double interfragment_scale_connectivity; // scaling distance to start connecting fragments
61 
63 
65 
67 
68  bool rfo_follow_root; // whether to do root following
69  int rfo_root; // which root to follow
70  double rfo_normalization_max; // small threshold for rfo normalization
71  double rsrfo_alpha_max; // absolute maximum val
72 
74  // Newton-Raphson (NR), rational function optimization step, steepest descent step
76 
77  // Coordinates for optimization
79 
80  // Hessian guess
81  // Note the Lindh "intrafragment" option is cartesian so it applies to all coordinates.
84 
87 
90 
91  int dynamic; // tracks dynamic optimization mode level
92  double sd_hessian; // steepest-descent second derivative guess
93 
94  bool freeze_intrafragment; // freeze all fragments
95  bool freeze_interfragment; // freeze all interfragment modes
97  double auxiliary_bond_factor; // covalent length times this to add extra-redundant stretches
98  bool H_guess_every; // re-estimate the hessian every step
99 
100  // related to step taken
101  double intrafragment_step_limit; // current step limit
102  double intrafragment_step_limit_orig; // store original user-specified or default value
103  double intrafragment_step_limit_min; // the smallest trust radius is allowed to go
104  double intrafragment_step_limit_max; // the largest trust radius is allowed to go
105 
107 
108  double symm_tol; // for atom making, symmetry checking
109 
110  bool simple_step_scaling; // do stupid, linear scaling of internal coordinates to step limit (not RS-RFO);
111 
112  // whether to limit changes in Hessian due to update
114  // changes in H are limited to H_update_limit_scale * the previous value
115  // if they exceed that, then they are limited to H_update_limit_max
118 
119  // whether to use 1/R as the distance coordinate in interfragment stretching modes
121 
122  // By default, optking prints and saves the last (previous) geometry at the end of an
123  // optimization, i.e., the one at which a gradient was computed.
124  // If true, then the structure obtained from the last anticipated step is printed and saved instead.
127 
129 
131 
134 
136 
137  // string of atoms for frozen [unchanging] bonds, angles, dihedrals provided by user in input
138  std::string frozen_distance_str;
139  std::string frozen_bend_str;
140  std::string frozen_dihedral_str;
141  std::string frozen_cartesian_str;
142 
143  // string of atoms for fixed [user-specified equilibrium] bonds, angles, dihedrals provided by user in input
144  std::string fixed_distance_str;
145  std::string fixed_bend_str;
146  std::string fixed_dihedral_str;
147 
148  // For each fragment, for each reference atom, list of component atoms defining it
149  std::vector<std::vector<std::vector<int> > > frag_ref_atoms;
150 
151 // ** Unlikely to need modified **
152 
153  // how close to pi should a torsion be to assume it may have passed through 180
155 
156  // torsional angles will not be computed if the contained bond angles are within
157  // this fraction of pi from 0 or from pi
159 
160  // as above, how fractionally close to 0 or pi counts as linear when deciding which
161  // atoms to avoid using in interfragment coordinates
163 
164  double tors_cos_tol; // cos(angle) must be this close to -1/+1 for angle to count as 0/pi
165 
166  double linear_bend_threshold; // if bend exceeds this value, then also add linear bend complement
167 
168  // if bend is smaller than this, then never fix its associated vectors
170 
171  // threshold for which entries in diagonalized redundant matrix are kept and inverted
172  // while computing a generalized inverse of a matrix
174 
175  // maximum number of allowed iterations in backtransformation to cartesian coordinates
176  double bt_max_iter;
178 
179  double geom_maxiter;
180 
181  // rms and max change in cartesian coordinates in backtransformation
182  double bt_dx_conv;
183 
184  // give up on backtransformation iterations if change rms from one iteration to the
185  // next is below this value
187 
188  //1=default; 2=medium; 3=lots
190 
192 
193  // Hessian update is avoided if the denominators (Dq*Dq) or (Dq*Dg) are smaller than this
195  // Hessian update is avoided if any internal coordinate has changed by more than this amount
196  // in radians / au
198 
199 
200  bool test_B; // whether to test B matrices
201  bool test_derivative_B; // whether to test derivative B matrices
203  bool keep_intcos; // don't delete intco.dat
204 
205  // for coordinates with user-specified equilibrium values - this is the starting force constant
207 
208  // If a static line search is being done (which currently just outputs N geometries)
209  // these control the min and the max of the largest internal coordinate displacement.
213 };
214 
215 }
216 
217 #endif
double interfrag_collinear_tol
Definition: opt_params.h:162
Definition: opt_params.h:89
std::string frozen_distance_str
Definition: opt_params.h:138
std::string frozen_bend_str
Definition: opt_params.h:139
double redundant_eval_tol
Definition: opt_params.h:173
enum opt::OPT_PARAMS::INTERFRAGMENT_MODE interfragment_mode
Definition: opt_params.h:82
double conv_max_disp
Definition: opt_params.h:49
int H_update_use_last
Definition: opt_params.h:86
double conv_rms_disp
Definition: opt_params.h:50
int print_lvl
Definition: opt_params.h:189
int dynamic
Definition: opt_params.h:91
Definition: opt_params.h:85
std::string frozen_dihedral_str
Definition: opt_params.h:140
double H_update_limit_max
Definition: opt_params.h:117
bool test_B
Definition: opt_params.h:200
double geom_maxiter
Definition: opt_params.h:179
double fixed_coord_force_constant
Definition: opt_params.h:206
bool intcos_generate_exit
Definition: opt_params.h:66
std::string fixed_distance_str
Definition: opt_params.h:144
COORDINATES
Definition: opt_params.h:78
STEP_TYPE
Definition: opt_params.h:75
double H_update_dq_tol
Definition: opt_params.h:197
enum opt::OPT_PARAMS::STEP_TYPE step_type
bool H_guess_every
Definition: opt_params.h:98
OPT_TYPE
Definition: opt_params.h:73
bool fb_fragments
Definition: opt_params.h:132
enum opt::OPT_PARAMS::COORDINATES coordinates
Definition: opt_params.h:82
FRAGMENT_MODE
Definition: opt_params.h:62
bool freeze_interfragment
Definition: opt_params.h:95
Definition: opt_params.h:85
bool i_max_force
Definition: opt_params.h:51
Definition: opt_params.h:73
Definition: opt_params.h:82
double conv_max_DE
Definition: opt_params.h:48
Definition: opt_params.h:62
Definition: opt_params.h:88
Definition: opt_params.h:83
bool simple_step_scaling
Definition: opt_params.h:110
bool interfragment_distance_inverse
Definition: opt_params.h:120
Definition: opt_params.h:75
double bt_max_iter
Definition: opt_params.h:176
Definition: opt_params.h:85
int consecutive_backsteps_allowed
Definition: opt_params.h:135
IRC_STOP
Definition: opt_params.h:89
double linear_bend_threshold
Definition: opt_params.h:166
bool add_auxiliary_bonds
Definition: opt_params.h:96
Definition: opt_params.h:64
enum opt::OPT_PARAMS::INTRAFRAGMENT_HESSIAN intrafragment_H
double interfragment_step_limit
Definition: opt_params.h:106
Definition: opt_params.h:78
IRC_DIRECTION
Definition: opt_params.h:88
std::string fixed_bend_str
Definition: opt_params.h:145
INTERFRAGMENT_MODE
Definition: opt_params.h:64
Definition: opt_params.h:75
bool ensure_bt_convergence
Definition: opt_params.h:177
Definition: opt_params.h:62
bool rfo_follow_root
Definition: opt_params.h:68
bool i_max_disp
Definition: opt_params.h:54
double fix_tors_near_pi
Definition: opt_params.h:154
double sd_hessian
Definition: opt_params.h:92
double maximum_H_bond_distance
Definition: opt_params.h:128
Definition: opt_params.h:85
double symm_tol
Definition: opt_params.h:108
double rsrfo_alpha_max
Definition: opt_params.h:71
std::string fixed_dihedral_str
Definition: opt_params.h:146
Definition: opt_params.h:75
INTERFRAGMENT_HESSIAN
Definition: opt_params.h:83
bool i_rms_disp
Definition: opt_params.h:55
enum opt::OPT_PARAMS::OPT_TYPE opt_type
Definition: opt_params.h:88
double rfo_normalization_max
Definition: opt_params.h:70
int linesearch_static_N
Definition: opt_params.h:210
Definition: opt_params.h:82
bool H_update_limit
Definition: opt_params.h:113
Definition: opt_params.h:78
bool print_params
Definition: opt_params.h:191
std::vector< std::vector< std::vector< int > > > frag_ref_atoms
Definition: opt_params.h:149
double intrafragment_step_limit_orig
Definition: opt_params.h:102
Definition: opt_params.h:83
bool i_max_DE
Definition: opt_params.h:53
double interfragment_scale_connectivity
Definition: opt_params.h:60
double conv_max_force
Definition: opt_params.h:46
enum opt::OPT_PARAMS::INTERFRAGMENT_HESSIAN interfragment_H
bool fb_fragments_only
Definition: opt_params.h:133
enum opt::OPT_PARAMS::IRC_DIRECTION IRC_direction
double tors_cos_tol
Definition: opt_params.h:164
double intrafragment_step_limit
Definition: opt_params.h:101
double bt_dx_conv_rms_change
Definition: opt_params.h:186
double intrafragment_step_limit_max
Definition: opt_params.h:104
int rfo_root
Definition: opt_params.h:69
enum opt::OPT_PARAMS::H_UPDATE H_update
Definition: opt_params.h:73
bool print_trajectory_xyz_file
Definition: opt_params.h:126
bool test_derivative_B
Definition: opt_params.h:201
enum opt::OPT_PARAMS::IRC_STOP IRC_stop
std::string frozen_cartesian_str
Definition: opt_params.h:141
Definition: opt_params.h:89
double conv_rms_force
Definition: opt_params.h:47
bool keep_intcos
Definition: opt_params.h:203
Definition: opt_params.h:75
double linesearch_static_max
Definition: opt_params.h:212
bool i_rms_force
Definition: opt_params.h:52
double scale_connectivity
Definition: opt_params.h:59
double small_bend_fix_threshold
Definition: opt_params.h:169
Definition: opt_params.h:73
enum opt::OPT_PARAMS::FRAGMENT_MODE fragment_mode
double intrafragment_step_limit_min
Definition: opt_params.h:103
double bt_dx_conv
Definition: opt_params.h:182
bool write_final_step_geometry
Definition: opt_params.h:125
H_UPDATE
Definition: opt_params.h:85
double H_update_limit_scale
Definition: opt_params.h:116
double tors_angle_lim
Definition: opt_params.h:158
Definition: opt_params.h:85
Definition: opt_params.h:64
bool read_cartesian_H
Definition: opt_params.h:130
double IRC_step_size
Definition: opt_params.h:202
Definition: opt_params.h:43
double linesearch_static_min
Definition: opt_params.h:211
std::string general_conv
Definition: opt_params.h:57
Definition: opt_params.h:78
double H_update_den_tol
Definition: opt_params.h:194
Definition: opt_params.h:82
Definition: opt_params.h:78
Definition: opt_params.h:75
Definition: opt_params.h:89
Definition: opt_params.h:78
bool freeze_intrafragment
Definition: opt_params.h:94
bool i_untampered
Definition: opt_params.h:56
double auxiliary_bond_factor
Definition: opt_params.h:97
INTRAFRAGMENT_HESSIAN
Definition: opt_params.h:82