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