Loading...
Searching...
No Matches
ParametersOptions.h
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13
14#include "BaseStructures.h"
16#include <cstdint>
17#include <limits>
18#include <memory>
19#include <string>
20#include <vector>
21
22namespace eonc {
23
32 std::shared_ptr<bool> bit{std::make_shared<bool>(false)};
33
34 shared_flag() = default;
35 explicit shared_flag(bool value) : bit(std::make_shared<bool>(value)) {}
37 : bit(std::make_shared<bool>(static_cast<bool>(other))) {}
38 shared_flag(shared_flag &&other) noexcept : bit(std::move(other.bit)) {}
39
41 if (this != &other) {
42 *ensure() = static_cast<bool>(other);
43 }
44 return *this;
45 }
46 shared_flag &operator=(shared_flag &&other) noexcept {
47 if (this != &other) {
48 if (bit && other.bit) {
49 *bit = *other.bit;
50 } else {
51 bit = std::move(other.bit);
52 }
53 }
54 return *this;
55 }
56 shared_flag &operator=(bool value) {
57 *ensure() = value;
58 return *this;
59 }
60
61 operator bool() const { return bit && *bit; }
62
63 [[nodiscard]] std::shared_ptr<bool> share() const { return bit; }
64
65private:
66 std::shared_ptr<bool> &ensure() {
67 if (!bit) {
68 bit = std::make_shared<bool>(false);
69 }
70 return bit;
71 }
72};
73
74// Physical Constants
76 double kB{8.6173324e-5}; // eV/K
77 double timeUnit{10.1805055}; // fs
78};
79
80// [Main] //
83 long randomSeed{-1};
84 double temperature{300.0};
85 bool quiet{false};
86 bool writeLog{true};
87 bool checkpoint{false};
88 std::string iniFilename{"config.ini"};
89 std::string conFilename{"pos.con"};
90 double finiteDifference{0.01};
92 bool removeNetForce{true};
93 bool parallel{true}; // parallel force evaluation via std::jthread
100 std::string inputFormat;
103 std::string cell;
105 bool pbc{true};
108 double defaultVacuum{10.0};
109};
110
111// [Potential] //
114 double MPIPollPeriod{0.25};
115 bool LAMMPSLogging{false};
117 bool EMTRasmussen{false};
118 bool LogPotential{false};
121 bool thread_safe{true};
122 std::string extPotPath{"./ext_pot"};
123 std::string potentialsPath{
124 ""}; // colon-separated dirs for Fortran potential .so files
125
128 double pairSwitchWidth{0.0};
131 double pairCutoff{0.0};
134 std::uintptr_t MPIClientComm{0};
135};
136
137// [AMS] and [AMS_IO] //
139 std::string engine;
140 std::string forcefield;
141 std::string model;
142 std::string resources;
143 std::string xc;
144 std::string basis;
145 struct env_t {
146 std::string amshome;
147 std::string scm_tmpdir;
148 std::string scmlicense;
149 std::string scm_pythondir;
150 std::string amsbin;
151 std::string amsresources;
153};
154
155// [XTBPot] //
157 std::string paramset{"GFNFF"};
158 double elec_temperature{0.0};
159 size_t maxiter{250};
160 double acc{1.0};
161 double charge{0.0};
162 int uhf{0};
163};
164
165// [ZBLPot] //
167 double cut_inner{2.0};
168 double cut_global{2.5};
169};
170
171// [D3Pot] / [D4Pot]: rgpot 3.1 in-process Grimme DFT-D (s-dftd3 / dftd4).
173 std::string functional{"pbe"};
174 bool atm{true};
175 std::string d3_damping{"bj"};
176 double d4_charge{0.0};
177};
178
179// [ExprPot]: rgpot 3.1 Lepton algebra over named child kernels.
181 std::string expression;
182 std::string terms;
183};
184
185// [MOPACPot]: rgpot 3.2 MOPACPot (libmopacc, default AM1).
187 int charge{0};
188 int spin{0};
189 int model{4};
190 std::string engine_path;
191};
192
193// [SocketNWChemPot] //
195 std::string host{"127.0.0.1"};
196 int port{9999};
197 int mem_in_gb{2};
198 std::string nwchem_settings{"nwchem_settings.nwi"};
199 std::string unix_socket_path{"eon_nwchem"};
200 bool unix_socket_mode{false};
202};
203
204// [RgpotPot] — in-process rgpot (dlopen engines; no potserv). Packaging
205// prefers metatomic/xtb via RGPOT over fat -Dwith_metatomic / -Dwith_xtb.
208 std::string backend{"nwchemc"};
209 std::string basis{"sto-3g"};
210 std::string theory{"scf"};
211 std::string scf_type{"rhf"};
212 std::string functional{"BLYP"};
213 // [cpmd] cutOffRy wins when params_path is empty. cutoff_ry and
214 // cpmd_cut_off_ry on [cpmd] or [RgpotPot] still load.
215 double cutoff_ry{70.0};
216 int charge{0};
218 std::string engine_path{};
219 std::string engine_library{};
220 std::string engine_root{};
221 std::string title{};
222 int memory_mb{0};
223 std::string scratch_dir{};
224 // [cpmd] input_block wins over this [RgpotPot] key for a CPMD backend.
225 // The text is appended to inputBlocks and does not replace inputSections.
226 std::string input_block{};
227 std::string permanent_dir{};
228 // Serialized Cap'n Proto CPMDParams. When set, it is the method and the
229 // scalar keys above are not written over it. [cpmd] supplies those
230 // scalars when this path is empty.
231 std::string params_path{};
232 // cpmdc: split the MPI world into groups of this many ranks, one CPMD
233 // session per group, and spread NEB images over the groups. 0 keeps one
234 // session on every rank.
236 // Metatomic dlopen (backend=metatomic)
237 std::string model_path{};
238 std::string device{"cpu"};
239 std::string length_unit{"angstrom"};
240 std::string extensions_directory{};
241 bool check_consistency{false};
244 // XTB dlopen (backend=xtb); dual-read [XTBPot] when unset
245 std::string xtb_paramset{"GFN2xTB"};
246 double xtb_accuracy{1.0};
249 double xtb_charge{0.0};
250 int xtb_uhf{0};
251 std::string task_name{"omol"};
252};
253
254// [Structure Comparison] //
256
257// [Process Search] //
259 bool minimize_first{true};
260 double minimization_offset{0.2}; // resolved to optimizer_options.max_move
261 bool known_saddles{true};
262};
263
264// [Saddle Search] //
267 long max_iterations{1000};
268 std::string method{"min_mode"};
269 std::string minmode_method{"dimer"};
270 std::string displace_type{"load"};
271 std::vector<long> displace_atom_list;
272 // Rise above the reactant, in eV. A min-mode translation that crosses
273 // it is shortened until the energy is back under the limit. The
274 // default 20 is not an abort on the first crossing.
275 double max_energy{20.0};
278 double displace_radius{4.0};
279 double converged_force{0.0};
280 double perp_force_ratio{0.0};
284 bool remove_rotation{false};
286 // Intrinsic reaction coordinate from a converged saddle through rgsaddle.
287 // step_size is the mass-weighted arc per step in amu^(1/2) Angstroms.
288 struct irc_t {
289 bool after{false};
290 double step_size{0.1};
291 double converged_force{0.05};
292 long max_steps{1000};
294 struct dynamics_t {
295 double temperature{0.0};
297 double state_check_interval{0.0}; // computed: input / timeUnit
299 double record_interval{0.0}; // computed
304 bool enabled{false};
305 bool bowl_breakout{false};
306 long bowl_active{20};
307 double min_force{0.5};
308 double scale_ratio{0.9};
309 double boost{10.0};
310 long min_active{30};
317 bool enabled{false};
318 double force{1.0e-4};
319 long max_iterations{500};
321};
322
323// [Optimizer] //
329 std::string backend{"eon"};
330 std::string xtsci_method{"lbfgs"};
331 struct xtsci_t {
332 std::string method{"lbfgs"};
333 std::string qn_step{"lbfgs"};
334 std::string precon{"none"};
335 std::string accept{"none"};
336 bool highs{false};
337 std::string manifold{"euclidean"};
339 std::string convergence_metric{"norm"};
341 size_t max_iterations{1000};
342 double max_move{0.2};
343 double converged_force{0.01};
344 double time_step_input{1.0};
345 double time_step{0.0}; // computed: input / timeUnit
347 double max_time_step{0.0}; // computed: input / timeUnit
352 struct lbfgs_t {
353 long memory{20};
354 double inverse_curvature{0.01};
356 bool auto_scale{true};
357 bool angle_reset{true};
358 bool distance_reset{true};
359 // reset: wipe memory on bad s·y (ASE). skip: Li-Fukushima cautious
360 // skip of that pair. damped: Powell (1978) ŷ = θy+(1-θ)B0 s.
361 std::string curvature{"reset"};
362 // Isolated clusters: project 6 rigid-body modes out of the
363 // L-BFGS force and step. Off for PBC / frozen atoms.
364 bool project_rigid{false};
365 std::string secant{"standard"};
366 std::string precon{"none"};
367 std::string step{"lbfgs"};
368 std::string h0{"sy_yy"};
369 std::string accept{"none"};
371 double cautious_eps{1.0e-6};
372 double cautious_alpha{0.01};
373 double precon_A{3.0};
374 double precon_mu{1.0};
375 double precon_rcut{0.0};
377 struct cg_t {
378 bool no_overshooting{false};
380 bool line_search{false};
381 double line_converged{0.1};
384 } cg;
388 struct sd_t {
389 double alpha{0.1};
390 bool two_point{false};
391 } sd;
392};
393
394// [Dimer] //
396 double rotation_angle{0.005};
397 bool improved{true};
398 double converged_angle{5.0};
399 long max_iterations{1000};
403 double torque_max{1.0};
404 double torque_min{0.1};
405 bool remove_rotation{false};
406 // Mode estimation for dimer: classical rotation loop, or FD min-mode
407 // (Lanczos/Davidson) replacing constrained IDimerRot / Dimer::rotate.
409 // LOR relative residual stop: ||F_perp|| / (|C_N|+1) < max(1e-3, this).
410 // Independent of classical torque_min (angular criterion).
411 double lor_residual_tol{0.1};
412};
413
414// [GPR Dimer] //
416 double rotation_angle{0.005};
417 double converged_angle{0.08};
418 double relax_conv_angle{0.001};
424 double midpoint_max_disp{0.5};
425 std::string rot_opt_method{"lbfgs"};
426 std::string trans_opt_method{"lbfgs"};
427 double active_radius{5.0};
428 double dimer_sep{0.01};
429 double conv_step{0.1};
430 double max_step{0.1};
431 double ratio_at_limit{0.66667};
432 bool init_rot_gp{false};
433 bool init_trans_gp{false};
434 bool many_iterations{true};
436 std::string hyper_opt_method{"scg"};
437 double sigma2{1e-8};
438 double jitter_sigma2{0.0};
439 double noise_sigma2{1e-8};
440 double prior_mu{0.0};
441 double prior_sigma2{1.0};
442 long prior_nu{20};
445 bool check_derivatives{false};
447 double tol_func{1e-4};
448 double tol_sol{1e-4};
449 long lambda_limit{static_cast<long>(1e17)};
450 long lambda_init{10};
453 bool use_prune{false};
454 int begin{8};
455 int n_vals{3};
456 double threshold{0.5};
461 std::string out_dir{"output"};
462 std::string pos_file{"position"};
463 std::string energy_file{"energy"};
464 std::string grad_file{"gradient"};
465 std::string out_ext{"dat"};
466 double offset_mid_point{3.0};
467 double dy{0.1};
468 double dz{0.1};
470};
471
472// [GP Surrogate] //
480
481// [CatLearn] //
483 std::string path;
484 std::string model{"gp"};
485 std::string prior{"median"};
486 bool use_deriv{true};
487 bool use_fingerprint{false};
488 bool parallel{false};
489};
490
491// [ASE_ORCA] //
493 std::string path;
494 std::string nproc{"1"};
495 std::string simpleinput;
496 int charge{0};
498};
499
500// [ASE_NWCHEM] //
502 std::string path;
503 std::string nproc{"1"};
504 // MPI launcher for ASE NWChem command (issue #193): "mpirun" or "srun".
505 std::string mpi_launcher{"mpirun"};
506 std::string multiplicity;
507 double scf_thresh{1e-5};
508 long scf_maxiter{200};
509 std::string basis{"3-21G"};
510 std::string memory{"2 gb"};
511};
512
513// [Metatomic] //
515 std::string model_path;
516 std::string device{"cpu"};
517 std::string length_unit{"angstrom"};
519 bool check_consistency{false};
521 // Literal model output keys (issue #215). When set, bypass pick_output
522 // variant resolution and use this key if present in model capabilities.
523 std::string energy_output;
525 // Literal non-conservative force output key (issue #296); empty uses
526 // pick_output("non_conservative_force", ...) when non_conservative.
527 std::string force_output;
528 // When true, read forces from non_conservative_force (with variants)
529 // instead of autograd on energy (issue #296).
530 bool non_conservative{false};
531 // Apply a fresh random SO(3) rotation per force() call and rotate forces
532 // back (issue #287 / PET-MAD broken-symmetry mitigation).
533 bool random_rotation{false};
534 // If >0, average energy/forces over this many random rotations for
535 // approximate O(3) symmetrization (issue #292). Overrides single-shot
536 // random_rotation when both are set.
538 // PyTorch determinism (JIT profiling off, deterministic algorithms,
539 // cudnn benchmark off). See
540 // rgoswami.me/snippets/pytorch-deterministic-regression/
541 bool deterministic{true};
542 // If true, fail on nondeterministic CUDA ops (needs
543 // CUBLAS_WORKSPACE_CONFIG).
545 struct variants_t {
546 std::string base;
547 std::string energy;
549 std::string force; // non_conservative_force variant (#296)
551};
552
553// [Lanczos] //
554// phva_atoms: PHVA mobile/active set for the Krylov space (Li & Jensen).
555// Not free/fixed — that is the optimizer mask on Matter. "All" = every free
556// atom (historical default). Same polarity as [Hessian] phva_atoms.
558 double tolerance{0.01};
560 bool quit_early{true};
561 std::string phva_atoms{"All"};
562};
563
564// [Davidson] min-mode (alternative to dimer rotation / Lanczos)
566 double tolerance{0.01};
572 std::string phva_atoms{"All"};
573};
574
575// [Prefactor] //
577 double default_value{0.0};
578 double max_value{1e+21};
579 double min_value{1e+9};
580 double within_radius{3.3};
581 double min_displacement{0.25};
582 std::string rate{"htst"};
583 std::string configuration{"reactant"};
584 bool all_free_atoms{false};
585 std::string filter_scheme{"fraction"};
586 double filter_fraction{0.90};
587};
588
589// [Hessian] //
590// phva_atoms: mobile/displaced atoms for FD (hybrid/PHVA-class active set),
591// or "All" = every non-fixed atom. Intersected with free flags in HessianJob.
592// free/fixed stays the optimizer mask and is not rewritten.
594 std::string phva_atoms{"All"};
595 double zero_freq_value{1e-6};
596 // FD scheme: "one_sided" (default), "central", or "fourth"
597 // (aliases fourth_order, central4). Fourth-order is real central
598 // differences for this Hessian and for Lanczos/Davidson products.
599 // Step size is Main.finite_difference (dx).
600 std::string fd_scheme{"one_sided"};
601 // If true and checkpoint_path is set, resume FD columns from checkpoint.
602 bool resume{false};
603 // Column checkpoint file (e.g. hessian.ckpt). Cleared on successful finish.
604 std::string checkpoint_path{""};
605 // Write every normal mode to modes.con: the Cartesian mode as a
606 // readcon displacements section, its eigenvalue and hbar omega as
607 // frame metadata.
608 bool write_modes{true};
609};
610
611// [Nudged Elastic Band] //
613 long image_count{5};
614 long max_iterations{1000};
616 double force_tolerance{0.01}; // resolved to optimizer_options.converged_force
618 bool enabled{true};
619 double tolerance{0.05};
622 bool match_endpoints{false};
624 std::string match_method{"ira"};
625
627 double constant{5.0};
628 bool use_elastic_band{false};
629 bool doubly_nudged{false};
630 bool use_switching{false};
633 bool geometric{false};
634
636 bool enabled{false};
637 double trigger{10.0};
638 double k_min{0.97};
639 double k_max{9.7};
642 bool enabled{false};
643 bool optimize_k{true};
644 double k_scale{1.0};
645 double k_min{0.1};
646 double k_max{100.0};
647 } om;
649
651 bool enabled{true};
652 bool converged_only{true};
656 double band_slack{10.0};
657 bool use_old_tangent{false};
658 double trigger_force{std::numeric_limits<double>::infinity()};
659 double trigger_factor{0.0};
660
662 bool use_mmf{false};
663 double trigger_force{0.1};
664 long max_steps{1000};
666 double angle_tol{0.7071}; // 1/sqrt(2): Householder stability bound
667 double trigger_factor{0.0};
668 // Off: Frontiers / published OCINEB. On: restore CI when MMF
669 // does not improve the band force (OptBench pair 26).
670 bool restore_unhelpful{false};
673
690
706
708 bool minimize{false};
709 bool use_path_file{false};
711
715 bool enabled{false};
716 double weight{1.0};
719 double pressure{0.0};
721
727 std::string precon{"none"};
728 double precon_mu{0.0};
729 std::string stepper{"auto"};
731
735
740};
741
742// [Molecular Dynamics] //
744 double time_step_input{1.0};
745 double time_step{0.0}; // computed: input / timeUnit
746 double time_input{1000.0};
747 double time{0.0}; // computed: input / timeUnit
748 long steps{0}; // computed: time / time_step
749};
750
751// [Parallel Replica] //
754 bool auto_stop{false};
755 bool dephase_loop_stop{false};
756 double dephase_time_input{1000.0};
757 double dephase_time{0.0}; // computed: input / timeUnit
760 double state_check_interval{0.0}; // computed
762 double record_interval{0.0}; // computed
763 double corr_time_input{1000.0};
764 double corr_time{0.0}; // computed
765};
766
767// [Temperature Accelerated Dynamics] //
769 double low_temperature{300.0};
770 double min_prefactor{0.001};
771 double confidence{0.001};
772};
773
774// [Thermostat] //
776 std::string kind{"none"};
777 double andersen_alpha{1.0};
778 double andersen_tcol_input{100.0};
779 double andersen_tcol{0.0}; // computed
780 double nose_mass{1.0};
782 double langevin_friction{0.0}; // computed: input * timeUnit
783 long path_beads{8};
784 std::string path_springs{"trotter"};
786 std::string path_gle_file;
787 double path_pile_tau_input{100.0}; // fs
788 double path_pile_tau{0.0}; // input / timeUnit
789 double path_pile_scale{1.0};
790 std::uint64_t path_seed{1};
791};
792
793// [Replica Exchange] //
795 std::string temperature_distribution{"exponential"};
796 long replicas{10};
797 long exchange_trials{10}; // resolved to replicas
798 double sampling_time_input{1000.0};
799 double sampling_time{0.0}; // computed
800 double temperature_high{0.0};
801 double temperature_low{0.0};
803 double exchange_period{0.0}; // computed
804};
805
806// [Bond Boost / Hyperdynamics] //
808 std::string bias_potential{"none"};
809 std::string boost_atom_list{"All"};
810 double rmd_time_input{100.0};
811 double rmd_time{0.0}; // computed
812 double dvmax{0.0};
813 double qrr{0.2};
814 double prr{0.95};
815 double qcut{3.0};
816};
817
818// [Basin Hopping] //
820 double displacement{0.5};
823 long steps{10000};
827 std::string displacement_algorithm{"standard"};
828 std::string displacement_distribution{"uniform"};
829 double swap_probability{0.0};
830 long jump_max{10};
831 long jump_steps{0};
834 double adjust_fraction{0.05};
835 double target_ratio{0.5};
836 bool write_unique{false};
837 double stop_energy{-std::numeric_limits<double>::max()};
838};
839
840// [Global Optimization] //
842 std::string move_method{"md"};
843 std::string decision_method{"npew"};
844 long steps{10000};
845 double beta{1.05};
846 double alpha{1.02};
847 long mdmin{3};
848 double target_energy{-1.0e50};
849};
850
851// [Monte Carlo] //
853 double step_size{0.005};
854 int steps{1000};
855};
856
857// [BGSD] //
859 double alpha{10.0};
860 double beta{0.2};
863 double grad2energy_convergence{0.000001};
865};
866
867// [Serve] //
869 std::string host{"localhost"};
870 uint16_t port{12345};
871 size_t replicas{1};
872 uint16_t gateway_port{0};
873 std::string endpoints;
874};
875
876// [ARTn] //
878 double push_step_size{0.3}; // maps to pARTn "push_step_size"
879 double force_threshold{0.05}; // maps to pARTn "forc_thr"
881 int ninit{-1}; // maps to pARTn "ninit" (-1 = use pARTn default): number
882 // of initial push steps before Lanczos eigenmode
883 // estimation. 0 skips the push (eOn supplies the mode);
884 // larger values let pARTn explore further from the
885 // minimum before switching to Lanczos.
886 std::string nperp_limitation{"default"}; // maps to pARTn "nperp_limitation"
888 -1}; // maps to pARTn "lanczos_min_size" (-1 = use default)
889 int nsmooth{-1}; // maps to pARTn "nsmooth" (-1 = use default)
891 3}; // maps to pARTn "nnewchance": retries when lowest eigval > 0
892 // (convex region). pARTn default is 0 (immediate fail), which
893 // is too aggressive for small clusters where Lanczos can
894 // momentarily settle on a positive eigenvalue before the
895 // unstable mode emerges. 3 retries is a reasonable default.
896 std::string filin{""}; // maps to pARTn "filin": path to an artn.in input
897 // file. Empty preserves pARTn's post-create default
898 // (NAN_STR sentinel "BBBB" set by artn_create in
899 // artn_api.f90), which tells m_setup_artn to skip
900 // reading any file. If set, pARTn opens the file
901 // with status="old" and errors out when absent.
902};
903
904// [IRA] //
908 bool use_pbc{false};
909};
910
911// [Debug] //
913 bool write_movies{false};
917 std::string neb_mmf{"dimer"};
918};
919
920// [Instanton] //
921// Ring-polymer instanton: the tunnelling splitting between two minima
922// (mode "splitting", eonc::tunneling::optimizeInstanton) or the thermal rate
923// out of a minimum through a saddle (mode "rate"): the ring below the
924// crossover temperature, and the parabolic barrier factor above it.
926 std::string mode{"splitting"};
927 std::string reactant_filename{"reactant.con"};
928 std::string product_filename{"product.con"};
929 // Optional band to start from (neb.con or any multi-frame con file whose
930 // first and last frames are the two minima); empty is a straight line.
931 std::string initial_path{""};
932 // Mode rate: a closed-ring geometry seed, with exactly beads frames.
933 std::string initial_ring{""};
934 // Mode rate: measured physical bath and retained-coordinate mapping.
935 std::string physical_bath_filename{""};
936 long beads{256}; // P, segments from one minimum to the other
937 double beta_hbar_omega{30.0}; // imaginary time, in units of 1 / omega
938 long max_iterations{5000}; // L-BFGS iterations on the action
939 double force_tolerance{1e-3}; // eV / (amu^0.5 A), largest bead residual
940 // FD Hessians on every stride-th bead, linear in between; 1 is every bead.
942 // Mode splitting: minima of different energy tunnel on the surface with
943 // the difference switched off along the path (tunneling::EnergyBias).
944 // False writes no splitting once beta |dV| reaches 0.1.
945 bool symmetrize{true};
946 // Mode "rate": the first-order saddle out of the reactant, and T in K.
947 std::string saddle_filename{"saddle.con"};
948 double temperature{0.0};
949 // Mode rate: kelvin values, searched from the highest down. Empty uses
950 // temperature.
951 std::vector<double> temperatures{};
952 // Mode rate: even bead count evaluates one half of a symmetric ring
953 // and copies it. An odd count evaluates every bead.
954 bool half_ring{true};
955 double energy_shift{0.0}; // eV, subtracted from each bead potential
956 // Empty keeps every spring equal. Otherwise one positive weight per
957 // bead: the spring from that bead to the next is divided by the weight.
958 std::vector<double> discretization{};
959 // Mode rate: Litman friction bath. none, implicit (one eta on every
960 // bead) or explicit (friction_eta_beads, one value per bead).
961 std::string friction{"none"};
962 double friction_eta{0.0};
963 std::vector<double> friction_eta_beads{};
964 // Mode rate: where the bead Hessian blocks start. "saddle" copies the
965 // saddle Hessian to every bead (no force calls); "finite_difference"
966 // takes 2 f gradient calls per bead first.
967 std::string initial_hessians{"saddle"};
968 // Maximum active coordinates for dense Newton; zero selects the dimer.
969 // int64, not long: Windows long is 32 bits, and this default is the
970 // 64-bit maximum on every platform.
971 std::int64_t newton_limit{std::numeric_limits<std::int64_t>::max()};
972 // Directional Lanczos displacement, sqrt(amu) Angstrom.
973 double lanczos_step{1e-4};
976 // Central physical bead-Hessian displacement, sqrt(amu) Angstrom.
978 // Mode rate: the search stops when B_N falls below this fraction of the
979 // starting ring's (the beads fell onto one point).
980 double collapse_fraction{1e-4};
981 // A reactant rotation is a zero mode when its curvature is at most this
982 // fraction of the softest vibration.
984 // Mode rate: start at a quarter of the beads and double. Off leaves the
985 // requested count alone.
986 bool bead_ladder{false};
987 // Mode rate: the rate uses a Hessian on every stride-th bead.
988 std::string hessian_final{"recomputed"};
989 // "trotter" or "eco". Economised springs are refused: the instanton
990 // is a Trotter discretisation.
991 std::string springs{"trotter"};
992 // Mode rate: path-integral quantum TST after the instanton. Planes
993 // from behind the reactant to the saddle, each holding the centroid of
994 // a sampled ring; 0 leaves it off.
995 long pi_planes{0};
996 long pi_beads{16};
999 double pi_time_step{0.5}; // fs
1000 // "pile", or "piglet" with pi_gle_file (the [Dynamics] path_gle_file
1001 // format).
1002 std::string pi_thermostat{"pile"};
1003 std::string pi_gle_file{""};
1004 double pi_pile_tau{100.0}; // fs, centroid Langevin time
1005 double pi_pile_scale{1.0}; // scales the internal-mode PILE damping
1006 long pi_seed{1};
1007 // Plane normal: "mode" is the saddle's unstable mode, "line" the
1008 // mass-weighted reactant-to-saddle line.
1009 std::string pi_direction{"mode"};
1010 // The first plane sits this fraction of the reactant-to-saddle distance
1011 // behind the reactant.
1013 // Ring-polymer MD transmission factor on the top plane: parents sampled
1014 // on the plane every pi_recrossing_spacing steps, each launching
1015 // pi_recrossing_children momentum pairs for pi_recrossing_time fs.
1016 // 0 parents leaves it off.
1019 double pi_recrossing_time{100.0}; // fs
1021};
1022
1023// [OH_TST] //
1024// Optimized hyperplanar TST (Johannesson-Jonsson, JCP 115, 9644
1025// (2001)): reversible-work progression of a hyperplanar dividing
1026// surface with constrained thermostatted sampling.
1028 std::string reactant_filename{"pos.con"};
1029 std::string product_filename{"product.con"};
1030 double time_step{1.0}; // fs, constrained sampling dynamics
1031 long equil_steps{200}; // per-plane equilibration steps
1032 long sample_steps{800}; // per-plane averaging steps
1033 long max_planes{200}; // plane-progression iterations
1034 double plane_mass{50.0}; // m_s, inertia of the s coordinate
1035 double alpha_rot{50.0}; // rotational inertia of the normal
1036 double plane_time_step{0.1}; // Verlet step for (s, n) updates
1037 double ds_max{0.1}; // A, clamp on per-iteration plane moves
1038 double dtheta_max{0.05}; // rad, clamp on per-iteration rotations
1039 double force_tol{0.005}; // eV/A convergence on plane force
1040 double s_init{0.05}; // starting fraction along the guideline
1041 long reactant_md_steps{20000}; // unconstrained reactant trajectory
1042 double max_delta_a{10.0}; // eV, divergence guard on the work
1043 // Thermostat for the plane-constrained and reactant sampling:
1044 // "andersen" (default) or "gle" (colored noise, Ceriotti-Bussi-
1045 // Parrinello; drift matrix from gle_a_file, gle4md text layout,
1046 // units of inverse internal time; a 1x1 [gamma] file degenerates
1047 // to white-noise Langevin).
1048 std::string thermostat{"andersen"};
1049 std::string gle_a_file{""};
1050 // Comma-separated .con files of the OTHER symmetry-equivalent
1051 // product minima (Eqs 13-17): sampling is confined to the
1052 // subregion of the primary product by half-line distances with
1053 // mirror velocity reflection at the boundaries.
1054 std::string symmetry_products{""};
1055 // PMF-scan mode: hold the dividing plane normal fixed along the
1056 // guideline and step s uniformly reactant->product instead of
1057 // adaptively hunting the free-energy maximum. Robust where the
1058 // adaptive progression pins at s=0 (a shallow doorway or a
1059 // barrierless capture funnel whose A(s) has no interior maximum).
1060 bool pmf_scan{false};
1061 long scan_planes{40}; // uniform planes across the guideline
1062};
1063
1064} // namespace eonc
RAII resource manager for the ARTn C library with global synchronization.
StructureComparisonOptions structure_comparison_options_t
DimerRotationBackend
Options for Matter::compare / distance.
struct eonc::ams_options_t::env_t env
bool diagonal_preconditioner
Heuristic | (H v)_i / v_i | preconditioner (not true diag(H); off by default).
std::string phva_atoms
PHVA mobile/active set for the Ritz space; "All" = all free atoms.
DimerRotationBackend rotation_backend
struct eonc::gpr_dimer_options_t::prune_params_t prune_params
struct eonc::gpr_dimer_options_t::gpr_params_t gpr_params
struct eonc::gpr_dimer_options_t::debug_params_t debug_params
struct eonc::gpr_dimer_options_t::opt_params_t opt_params
std::vector< double > temperatures
std::vector< double > discretization
std::vector< double > friction_eta_beads
double defaultVacuum
Vacuum (Angstrom) on every side of the box built when neither the file nor cell supplies one.
bool pbc
Periodicity of that fallback cell.
std::string inputFormat
Chemfiles format substituted for a .con request.
shared_flag writeConForces
Opt-in "Forces of Component" sections in written .con frames (enables force+energy co-load on restart...
std::string cell
Fallback cell when a foreign file carries none: "a b c" or nine row-major lattice numbers.
struct eonc::metatomic_options_t::variants_t variant
rgsaddle band only, rgsaddle 0.3.0 or newer.
double band_slack
When converged_only is on, the rest of the band may still be this many times the force tolerance.
struct eonc::neb_options_t::climbing_image_options_t::hybrid_dimer_t ocineb
double sidpp_frontier_tol
Convergence tol before adding images.
bool sidpp_reparam
Reparameterize after growth complete.
bool sidpp_ideal_ksp
Scale spring constant during growth.
Interior images relax a lower-triangular cell with the atoms.
double pressure
Hydrostatic pressure in eV/Angstrom^3.
struct eonc::neb_options_t::spring_options_t::energy_weighting_t weighting
bool geometric
Parallel force k (d_next^2 - d_prev^2).
struct eonc::neb_options_t::spring_options_t::onsager_machlup_t om
Zoom-NEB packs every image onto a window around the climbing image once that image is stable and the ...
std::string match_method
"ira" uses IRACompare. "hungarian" is accepted and falls back to ira.
struct eonc::neb_options_t::climbing_image_options_t climbing_image
struct eonc::neb_options_t::zoom_options_t zoom
struct eonc::neb_options_t::band_options_t band
struct eonc::neb_options_t::endpoint_options_t endpoints
struct eonc::neb_options_t::spring_options_t spring
struct eonc::neb_options_t::solid_state_options_t solid_state
double quantum_temperature
Temperature in kelvin for the harmonic quantum free-energy profile.
bool match_endpoints
Permute+rotate the reactant onto the product before interpolation.
long tunnel_wall_points
Force calls past each end minimum of the converged band, along its end segment continued outward,...
struct eonc::neb_options_t::path_initialization_t initialization
struct eonc::neb_options_t::mmf_peak_options_t mmf_peaks
struct eonc::optimizer_options_t::sd_t sd
std::string backend
"eon" or "rgmin".
struct eonc::optimizer_options_t::refine_t refine
struct eonc::optimizer_options_t::quickmin_t quickmin
struct eonc::optimizer_options_t::xtsci_t xtsci
struct eonc::optimizer_options_t::cg_t cg
struct eonc::optimizer_options_t::lbfgs_t lbfgs
double pairSwitchWidth
Width (Angstrom) of the C^2 quintic switch that takes the lj, ljcluster and morse_pt pair terms to ze...
std::uintptr_t MPIClientComm
Opaque MPI_Comm bits. Read/write with ParametersMpi.h in MPI TUs.
bool thread_safe
When false, NEB/dimer/process_search never share one Potential across threads, even if the backend re...
double pairCutoff
Cutoff (Angstrom) of the lj, ljcluster and morse_pt pair terms.
std::string backend
"nwchemc", "cpmdc", "metatomic", or "xtb"
struct eonc::saddle_search_options_t::dynamics_t dynamics
std::vector< long > displace_atom_list
struct eonc::saddle_search_options_t::confine_positive_t confine_positive
struct eonc::saddle_search_options_t::prfo_refine_t prfo_refine
struct eonc::saddle_search_options_t::irc_t irc
Bool storage shared with Matter.
shared_flag(const shared_flag &other)
std::shared_ptr< bool > & ensure()
shared_flag & operator=(const shared_flag &other)
std::shared_ptr< bool > bit
shared_flag & operator=(shared_flag &&other) noexcept
shared_flag(shared_flag &&other) noexcept
std::shared_ptr< bool > share() const
shared_flag & operator=(bool value)
shared_flag()=default