17.1.1.5. pysisyphus.drivers package
17.1.1.5.1. Submodules
17.1.1.5.2. pysisyphus.drivers.afir module
- class pysisyphus.drivers.afir.AFIRPath(atoms, cart_coords, energies, forces, charge, mult, opt_is_converged=None, gamma=None, path_indices=None)[source]
Bases:
object
-
atoms:
tuple
-
cart_coords:
ndarray
-
charge:
int
-
energies:
ndarray
-
forces:
ndarray
-
gamma:
Optional
[float
] = None
-
mult:
int
-
opt_is_converged:
Optional
[bool
] = None
-
path_indices:
Optional
[List
[int
]] = None
-
atoms:
- pysisyphus.drivers.afir.automatic_fragmentation(atoms, coords3d, frag1, frag2, cycles=2, p=6, bond_factor=1.25)[source]
Automatic fragmentation scheme as described in SC-AFIR paper [1].
- pysisyphus.drivers.afir.coordinates_similar(test_coords3d, ref_coords3d, rmsd_thresh=0.01)[source]
- Return type:
Tuple
[bool
,int
]
- pysisyphus.drivers.afir.determine_target_pairs(atoms, coords3d, min_=1.25, max_=5.0, active_atoms=None)[source]
Determine possible target m, n atom pairs for SC-AFIR calculations.
- Return type:
List
[Tuple
[int
]]
- pysisyphus.drivers.afir.determine_target_pairs_for_geom(geom, **kwargs)[source]
Determine possible target m, n atom pairs for SC-AFIR calculations from geom.
- Return type:
List
[Tuple
[int
]]
- pysisyphus.drivers.afir.generate_random_union(geoms, offset=2.0, rng=None)[source]
Unite fragments into one Geometry with random fragment orientations.
Center, rotate and translate from origin acoording to approximate radius and an offset. Displace along +x, -x, +y, -y, +z, -z.
Results for > 3 fragments don't look so pretty ;).
- pysisyphus.drivers.afir.generate_random_union_ref(geoms, rng=None, opt_kwargs=None)[source]
Unite fragments into one Geometry with random fragment orientations.
- pysisyphus.drivers.afir.lstsqs_with_reference(coords3d, ref_coords3d, freeze_atoms=None)[source]
Least-squares w.r.t. reference coordinates while keeping some atoms frozen.
- pysisyphus.drivers.afir.opt_afir_path(geom, calc_getter, afir_kwargs, opt_kwargs=None, out_dir=None)[source]
Minimize geometry with AFIR calculator.
- pysisyphus.drivers.afir.prepare_mc_afir(geoms, rng=None, **kwargs)[source]
Wrapper for generate_random_union(_ref).
- pysisyphus.drivers.afir.prepare_sc_afir(geom, m, n, bond_factor=1.2)[source]
Create perturbed geometry, determine fragments and set AFIR calculator.
- pysisyphus.drivers.afir.relax_afir_path(atoms, cart_coords, calc_getter, images=15, out_dir=None)[source]
Sample imagef from AFIR path and do COS relaxation.
- pysisyphus.drivers.afir.run_afir_path(geom, calc_getter, out_dir, gamma_max, gamma_interval, rng, ignore_bonds=None, bond_factor=1.2, afir_kwargs=None, opt_kwargs=None)[source]
Driver for AFIR minimizations with increasing gamma values.
- pysisyphus.drivers.afir.run_afir_paths(afir_key, geoms, calc_getter, afir_kwargs=None, opt_kwargs=None, seed=None, N_sample=None, rmsd_thresh=0.25, **kwargs)[source]
- pysisyphus.drivers.afir.run_mc_afir_paths(geoms, calc_getter, gamma_max, rng, N_max=5, gamma_interval=(0.0, 1.0), afir_kwargs=None, opt_kwargs=None)[source]
17.1.1.5.3. pysisyphus.drivers.barriers module
17.1.1.5.4. pysisyphus.drivers.birkholz module
- pysisyphus.drivers.birkholz.bond_order(r, r0, b=2)[source]
Bond order for given bond length and reference length.
Eq. (3) in [1].
- pysisyphus.drivers.birkholz.bond_orders_for_geom(geom, bond_indices)[source]
Wrapper for bond_orders for simple use with Geometry.
17.1.1.5.5. pysisyphus.drivers.merge module
- pysisyphus.drivers.merge.align_on_subset(geom1, union, del1=None)[source]
Align 'union' onto subset of 'geom1'
- pysisyphus.drivers.merge.merge_geoms(geom1, geom2, geom1_del=None, geom2_del=None, make_bonds=None)[source]
Merge geom1 and geom2 while keeping the original coordinates.
Supports deleting certain atoms.
- pysisyphus.drivers.merge.merge_opt(union, bond_diff, ff='mmff94')[source]
Fragment merging along given bond by forcefield optimization.
- pysisyphus.drivers.merge.merge_with_frozen_geom(frozen_geom, lig_geom, make_bonds, frozen_del, lig_del, ff='mmff94')[source]
17.1.1.5.6. pysisyphus.drivers.opt module
- pysisyphus.drivers.opt.get_optimal_bias(ref_geom, calc_getter, opt_key, opt_kwargs, k_max, k_min=0.0, rmsd_target=0.188973, rmsd_thresh=None, rmsd_kwargs=None, k_thresh=0.001, strict=True)[source]
Driver to determine optimal bias value k for RMSD restraint.
- Parameters:
ref_geom (
Geometry
) -- Reference geometry. Starting point of the optimizations and reference for RMSD calculations.calc_getter (
Callable
) -- Function that returns the actual calculator, providing the energy and its derivatives.opt_key (
str
) -- Determines optimizer type. See pysisyphus.optimizers.cls_map.opt_kwargs (
Dict
) -- Optional dict of arguments passed to the optimizer.k_max (
float
) -- Maximum absolute value of bias factor k. Must be a > k_min.k_max -- Minimum absolute value of bias factor k. Must be a positive number >= 0.0. Defaults to 0.0.
rmsd_target (
float
, default:0.188973
) -- Target RMSD value in au. Defaults to 0.188973 a0 (approx. 0.1 Å).rmsd_thresh (
Optional
[float
], default:None
) -- Allowed deviation from rmsd_target in au. If omitted, 5% of rmsd_target are used.rmsd_kwargs (
Optional
[Dict
], default:None
) -- Additional keyword arguments that are passed to the RMSD class, e.g., atom_indices.k_thresh (
float
, default:0.001
) -- When the absolute value of k_bias - k_min or k_max becomes smaller than k_thresh, the bisection is aborted.strict (default:
True
) -- If True, AssertionError is raised when an optimization did not converged.
- Return type:
Tuple
[OptResult
,float
,bool
]- Returns:
opt_result -- OptimizationResult object containig the Optimizer object.
k_opt -- Optimal value of k_bias.
valid_k -- Whether an appropriate bias value k was found.
17.1.1.5.7. pysisyphus.drivers.perf module
17.1.1.5.8. pysisyphus.drivers.pka module
17.1.1.5.9. pysisyphus.drivers.precon_pos_rot module
prp a901cdfacc579eb63b193cbc9043212e8b57746f pysis 340ab6105ac4156f0613b4d0e8f080d9f195530c do_trans accidentally disabled in transtorque
- class pysisyphus.drivers.precon_pos_rot.SteepestDescent(geom, max_cycles=1000, max_step=0.05, rms_force=0.05, rms_force_only=True, prefix=None, dump=False, dump_every=100, print_every=100)[source]
Bases:
object
- pysisyphus.drivers.precon_pos_rot.form_A(frags, which_frag, formed_bonds)[source]
Construct the A-matrices.
AR[(m, n)] (AP[(m, n)]) contains the subset of atoms in Rm (Pm) that forms bonds with Rn (Pn).
- pysisyphus.drivers.precon_pos_rot.get_steps_to_active_atom_mean(frag_lists, iter_frag_lists, ind_dict, coords3d, skip=True)[source]
- pysisyphus.drivers.precon_pos_rot.precon_pos_rot(reactants, products, prefix=None, config={'s2_hs_kappa': 1.0, 's4_hs_kappa': 50.0, 's4_v_kappa': 1.0, 's4_w_kappa': 1.0, 's5_hs_kappa': 10.0, 's5_rms_force': 0.01, 's5_trans': True, 's5_v_kappa': 1.0, 's5_w_kappa': 3.0, 's5_z_kappa': 2.0})[source]
17.1.1.5.10. pysisyphus.drivers.rates module
- class pysisyphus.drivers.rates.ReactionRates(from_, barrier, barrier_si, temperature, imag_wavenumber, imag_frequency, rate_eyring, kappa_eyring, rate_wigner=None, kappa_wigner=None, rate_bell=None, kappa_bell=None, rate_eckart=None, kappa_eckart=None)[source]
Bases:
object
-
barrier:
float
-
barrier_si:
float
-
from_:
str
-
imag_frequency:
float
-
imag_wavenumber:
float
-
kappa_bell:
Optional
[float
] = None
-
kappa_eckart:
Optional
[float
] = None
-
kappa_eyring:
float
-
kappa_wigner:
Optional
[float
] = None
-
rate_bell:
Optional
[float
] = None
-
rate_eckart:
Optional
[float
] = None
-
rate_eyring:
float
-
rate_wigner:
Optional
[float
] = None
-
temperature:
float
-
barrier:
- pysisyphus.drivers.rates.bell_corr(temperature, imag_frequency)[source]
Tunneling correction according to Bell.
See https://onlinelibrary.wiley.com/doi/10.1002/anie.201708489 eq. (1) and eq. (2).
- Parameters:
temperature (
float
) -- Temperature in Kelvin.imag_frequency (
float
) -- Imaginary frequency in 1/s.
- Returns:
Unitless tunneling correction according to Bell. Negative kappas are meaningless.
- Return type:
kappa
- pysisyphus.drivers.rates.eckart_corr(fw_barrier_height, bw_barrier_height, temperature, imag_frequency)[source]
Tunneling correction according to Eckart.
See [3], [4] and [5]. The correction should be independent of the order fw_barrier_height/bw_barrier_height.
- Parameters:
fw_barrier_height (
float
) -- Barrier height in forward direction in Hartree.bw_barrier_height (
float
) -- Barrier height in backward direction in Hartree.temperature (
float
) -- Temperature in Kelvin.imag_frequency (
float
) -- Frequency in 1/s of the imaginary mode at the TS.
- Returns:
Unitless tunneling correction according to Eckart.
- Return type:
kappa
- pysisyphus.drivers.rates.eckart_corr_brown(fw_barrier_height, bw_barrier_height, temperature, imag_frequency)[source]
Tunneling correction according to Eckart.
Wrapper for the TUNL subroutine as given in the appendix of [5].
- Parameters:
fw_barrier_height (
float
) -- Barrier height in forward direction in Hartree.bw_barrier_height (
float
) -- Barrier height in backward direction in Hartree.temperature (
float
) -- Temperature in Kelvin.imag_frequency (
float
) -- Frequency in 1/s of the imaginary mode at the TS.
- Returns:
Unitless tunneling correction according to Eckart.
- Return type:
kappa
- pysisyphus.drivers.rates.eyring_rate(barrier_height, temperature, trans_coeff=1.0)[source]
Rate constant in 1/s from the Eyring equation.
See https://pubs.acs.org/doi/10.1021/acs.organomet.8b00456 "Reaction Rates and Barriers" on p. 3234 and eq. (8).
- Parameters:
barrier_height (
float
) -- Barrier height (energy, enthalpy, gibbs energy, ...) in Hartree.temperature (
Union
[_SupportsArray
[dtype
[Any
]],_NestedSequence
[_SupportsArray
[dtype
[Any
]]],bool
,int
,float
,complex
,str
,bytes
,_NestedSequence
[Union
[bool
,int
,float
,complex
,str
,bytes
]]]) -- Temperature in Kelvin.trans_coeff (
float
, default:1.0
) -- Unitless transmission coefficient, e.g., obtained from Wigner or Eckart correction.
- Returns:
Eyring reaction rate in 1/s.
- Return type:
rate
- pysisyphus.drivers.rates.get_rates(temperature, reactant_thermos, ts_thermo, product_thermos=None)[source]
- pysisyphus.drivers.rates.get_rates_for_geoms(temperature, reactant_geoms, ts_geom, product_geoms)[source]
- pysisyphus.drivers.rates.get_rates_for_hessians(temperature, reactant_h5s, ts_h5, product_h5s)[source]
- pysisyphus.drivers.rates.harmonic_tst_rate(barrier_height, temperature, rs_part_func, ts_part_func, trans_coeff=1.0)[source]
Rate constant in 1/s from harmonic TST.
See http://dx.doi.org/10.18419/opus-9841, chapter 5. Contrary to the Eyring rate this function does only takes a scalar temperature as the partition functions are also functions of the temperature and would have to be recalculated for different temperatures.
A possible extension would be to also support multiple rs/ts partition functions, one for each temperature.
- Parameters:
barrier_height (
float
) -- Barrier height (energy, enthalpy, gibbs energy, ...) in Hartree.rs_part_func (
float
) -- Partition function of the reactant state.ts_part_func (
float
) -- Partition function of the transition state.temperature (
float
) -- Temperature in Kelvin.trans_coeff (
float
, default:1.0
) -- Unitless transmission coefficient, e.g., obtained from Wigner or Eckart correction.
- Returns:
HTST reaction rate in 1/s.
- Return type:
rate
- pysisyphus.drivers.rates.tunl(alph1, alph2, U, strict=False)[source]
Eckart correction factor for rate constants according to Brown.
Python adaption of the TUNL subroutine in 4. Appendix of [5].
- Parameters:
alph1 (
float
) -- Unitless barrier height descriptor. 2π V1 / (h nu*); see (2) in [5].alph2 (
float
) -- Unitless barrier heigth descriptor. 2π V2 / (h nu*); see (2) in [5].u -- Unitless curvature descriptor. h nu* / kT; see (2) in [5].
strict (
bool
, default:False
) -- If enabled, arguments are bound checked. Will raise AssertionError if they are out of bonds. TUNL was found to yield accurate results when the arguments are within bounds.
- Returns:
Unitless tunneling correction according to Eckart.
- Return type:
G
- pysisyphus.drivers.rates.wigner_corr(temperature, imag_frequency)[source]
Tunneling correction according to Wigner.
See https://doi.org/10.1002/qua.25686 eq. (12) and https://doi.org/10.1007/978-3-642-59033-7_9 for the original publication.
- Parameters:
temperature (
float
) -- Temperature in Kelvin.imag_frequency (
float
) -- Imaginary frequency in 1/s.
- Returns:
Unitless tunneling correction according to Wigner.
- Return type:
kappa
17.1.1.5.11. pysisyphus.drivers.replace module
- pysisyphus.drivers.replace.replace_atom(geom, ind, repl_geom, repl_ind, return_full=True, opt=False, use_xtb=False, charge=0, mult=1)[source]
Replace atom with fragment.