16.1.1.5. pysisyphus.drivers package

16.1.1.5.1. Submodules

16.1.1.5.2. pysisyphus.drivers.afir module

pysisyphus.drivers.afir.analyze_afir_path(energies)[source]
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.decrease_distance(coords3d, m, n, frac=0.9)[source]
pysisyphus.drivers.afir.determine_target_pairs(atoms, coords3d, min_=1.25, max_=5.0)[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.find_candidates(center, bond_sets)[source]
pysisyphus.drivers.afir.generate_random_union(geoms, offset=1.0, copy=True)[source]
pysisyphus.drivers.afir.geom_similar(test_geom, ref_geoms, **kwargs)[source]
Return type

bool

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.multicomponent_afir(geom, calc_getter, fragments, gamma, out_dir=None)[source]
pysisyphus.drivers.afir.prepare_single_component_afir(geom, m, n, calc_getter, afir_kwargs)[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]
pysisyphus.drivers.afir.run_mc_afir_paths(geoms, calc_getter, num=5, gamma=None, t=None, T=298.15)[source]
pysisyphus.drivers.afir.weight_function(atoms, coords3d, i, j, p=6)[source]

16.1.1.5.3. pysisyphus.drivers.barriers module

pysisyphus.drivers.barriers.do_endopt_ts_barriers(ts_geom, left_geoms, right_geoms=None, left_fns=None, right_fns=None, do_thermo=False, T=298.15, p=101325, calc_getter=None, solv_calc_getter=None, do_standard_state_corr=False)[source]

16.1.1.5.4. pysisyphus.drivers.birkholz module

pysisyphus.drivers.birkholz.birkholz_interpolation(geoms, calc_getter, recreate=True)[source]
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(coords3d, bond_indices, r0s)[source]

List of bond orders.

pysisyphus.drivers.birkholz.bond_orders_for_geom(geom, bond_indices)[source]

Wrapper for bond_orders for simple use with Geometry.

pysisyphus.drivers.birkholz.get_r0s(geom, bond_indices)[source]

Reference bond lengths as sum of covalent radii.

pysisyphus.drivers.birkholz.length_for_bond_order(bo, r0, b=2)[source]

Return bond length for given bond order and reference length.

Eq. (3) in [1].

16.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.hardsphere_merge(geom1, geom2)[source]
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='uff')[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)[source]
pysisyphus.drivers.merge.parse_args(args)[source]
pysisyphus.drivers.merge.prepare_merge(geom1, bond_diff, geom2=None, del1=None, del2=None, dump=False)[source]
pysisyphus.drivers.merge.run_merge()[source]

16.1.1.5.6. pysisyphus.drivers.opt module

class pysisyphus.drivers.opt.OptResult(opt, geom, fn)[source]

Bases: object

fn: Path
geom: Geometry
opt: Optimizer
pysisyphus.drivers.opt.opt_davidson(opt, tsopt=True, res_rms_thresh=0.0001)[source]
pysisyphus.drivers.opt.run_opt(geom, calc_getter, opt_key, opt_kwargs=None, iterative=False, iterative_max_cycles=5, iterative_thresh=- 15, iterative_scale=2.0, cart_hessian=None, print_thermo=False, title='Optimization', copy_final_geom=None, level=0)[source]

16.1.1.5.7. pysisyphus.drivers.perf module

pysisyphus.drivers.perf.print_perf_results(results)[source]
pysisyphus.drivers.perf.run_perf(geom, calc_getter, pals=None, mems=None, pal_range=None, mem_range=None, repeat=1, kind='forces')[source]

16.1.1.5.8. pysisyphus.drivers.pka module

pysisyphus.drivers.pka.G_aq_from_h5_hessian(h5_hessian, solv_en, T=298.15, p=101325)[source]
pysisyphus.drivers.pka.direct_cycle(acid_h5, base_h5, acid_solv_en, base_solv_en, G_aq_H=None, G_gas_H=- 6.28, dG_solv_H=- 265.9, T=298.15, p=101325)[source]

16.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, print_mod=25)[source]

Bases: object

run()[source]
pysisyphus.drivers.precon_pos_rot.center_fragments(frag_list, geom)[source]
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_fragments_and_bonds(geoms)[source]
pysisyphus.drivers.precon_pos_rot.get_rot_mat(coords3d_1, coords3d_2, center=False)[source]
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.get_which_frag(frags)[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]
pysisyphus.drivers.precon_pos_rot.report_frags(rgeom, pgeom, rfrags, pfrags, rbond_diff, pbond_diff)[source]
pysisyphus.drivers.precon_pos_rot.report_mats(name, mats)[source]
pysisyphus.drivers.precon_pos_rot.run_precontr(reactant_geom, product_geom, **kwargs)[source]

16.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
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], _NestedSequence[_SupportsArray[dtype]], 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.render_rx_rates(rx_rates)[source]
Return type

str

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

16.1.1.5.11. pysisyphus.drivers.replace module

pysisyphus.drivers.replace.get_bond_subgeom(geom, ind, invert=False)[source]
pysisyphus.drivers.replace.normalize_replacements(replacements)[source]
pysisyphus.drivers.replace.parse_args(args)[source]
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.

pysisyphus.drivers.replace.replace_atoms(geom, replacements, opt=False, use_xtb=False, charge=0, mult=1)[source]
pysisyphus.drivers.replace.run()[source]
pysisyphus.drivers.replace.run_opt(geom, freeze_inds, ff='uff', use_xtb=False, charge=0, mult=1)[source]

16.1.1.5.12. pysisyphus.drivers.scan module

pysisyphus.drivers.scan.relaxed_1d_scan(geom, calc_getter, constrain_prims, start, step_size, steps, opt_key, opt_kwargs, pref=None, callback=None)[source]
pysisyphus.drivers.scan.relaxed_scan(geom, calc_getter, constrain_prims, target_values, title, max_cycles=25, trust_radius=0.5, thresh=0.01, dump=True)[source]

Relaxed scan, allowing fixing of multiple primitive internals.

16.1.1.5.13. pysisyphus.drivers.thermo module

pysisyphus.drivers.thermo.parse_args(args)[source]
pysisyphus.drivers.thermo.run_thermo()[source]

16.1.1.5.14. Module contents