17.1. pysisyphus package

17.1.1. Subpackages

17.1.2. Submodules

17.1.3. pysisyphus.Geometry module

class pysisyphus.Geometry.Geometry(atoms, coords, fragments=None, coord_type='cart', coord_kwargs=None, isotopes=None, freeze_atoms=None, comment='', name='')[source]

Bases: object

__init__(atoms, coords, fragments=None, coord_type='cart', coord_kwargs=None, isotopes=None, freeze_atoms=None, comment='', name='')[source]

Object representing atoms in a coordinate system.

The Geometry represents atoms and their positions in coordinate system. By default cartesian coordinates are used, but internal coordinates are also possible.

Parameters:
  • atoms (iterable) -- Iterable of length N, containing element symbols.

  • coords (1d iterable) -- 1d iterable of length 3N, containing the cartesian coordinates of N atoms.

  • fragments (dict, optional) -- Dict with different keys denoting different fragments. The values contain lists of atom indices.

  • coord_type ({"cart", "redund"}, optional) -- Type of coordinate system to use. Right now cartesian (cart) and redundand (redund) are supported.

  • coord_kwargs (dict, optional) -- Dictionary containing additional arguments that get passed to the constructor of the internal coordinate class.

  • isotopes (iterable of pairs, optional) -- Iterable of pairs consisting of 0-based atom index and either an integer or a float. If an integer is given the closest isotope mass will be selected. Given a float, this float will be directly used as mass.

  • freeze_atoms (iterable of integers) -- Specifies which atoms should remain fixed at their initial positions.

  • comment (str, optional) -- Comment string.

  • name (str, optional) -- Verbose name of the geometry, e.g. methanal or water. Used for printing

align_principal_axes()[source]

Align the principal axes to the cartesian axes.

https://math.stackexchange.com/questions/145023

property all_energies

Return energies of all states that were calculated.

This will also set self.energy, which may NOT be the ground state, but the state correspondig to the 'root' attribute of the calculator.

approximate_radius()[source]

Approximate molecule radius from the biggest atom distance along an axis.

as_ase_atoms()[source]
as_g98_list()[source]

Returns data for fake Gaussian98 standard orientation output.

Returns:

g98_list -- List with one row per atom. Every row contains [center number, atomic number, atomic type (always 0 for now), X Y Z coordinates in Angstrom.

Return type:

list

as_xyz(comment='', atoms=None, cart_coords=None)[source]

Current geometry as a string in XYZ-format.

Parameters:
  • comment (str, optional) -- Will be written in the second line (comment line) of the XYZ-string.

  • cart_coords (np.array, 1d, shape (3 * atoms.size, )) -- Cartesians for dumping instead of self._coords.

Returns:

xyz_str -- Current geometry as string in XYZ-format.

Return type:

str

assert_cart_coords(coords)[source]
assert_compatibility(other)[source]

Assert that two Geometries can be substracted from each other.

Parameters:

other (Geometry) -- Geometry for comparison.

atom_indices()[source]

Dict with atom types as key and corresponding indices as values.

Returns:

inds_dict -- Unique atom types as keys, corresponding indices as values.

Return type:

dict

property atom_types
atom_xyz_iter()[source]
property atomic_numbers
property bond_sets
calc_double_ao_overlap(geom2)[source]
calc_energy_and_forces()[source]

Force a calculation of the current energy and forces.

property cart_coords
property cart_forces
property cart_gradient
property cart_hessian
center()[source]
property center_of_mass

Returns the center of mass.

Returns:

R -- Center of mass.

Return type:

np.array, shape(3, )

center_of_mass_at(coords3d)[source]

Returns the center of mass at given coords3d.

Parameters:

coords3d (np.array, shape(N, 3)) -- Cartesian coordiantes.

Returns:

R -- Center of mass.

Return type:

np.array, shape(3, )

property centroid

Geometric center of the Geometry.

Returns:

R -- Geometric center of the Geometry.

Return type:

np.array, shape(3, )

clear()[source]

Reset the object state.

property comment
coord_types = {'cart': None, 'cartesian': <class 'pysisyphus.intcoords.CartesianCoords.CartesianCoords'>, 'dlc': <class 'pysisyphus.intcoords.DLC.DLC'>, 'hdlc': <class 'pysisyphus.intcoords.DLC.HDLC'>, 'hredund': <class 'pysisyphus.intcoords.RedundantCoords.HybridRedundantCoords'>, 'mwcartesian': <class 'pysisyphus.intcoords.CartesianCoords.MWCartesianCoords'>, 'redund': <class 'pysisyphus.intcoords.RedundantCoords.RedundantCoords'>, 'tmtric': <class 'pysisyphus.intcoords.RedundantCoords.TMTRIC'>, 'tric': <class 'pysisyphus.intcoords.RedundantCoords.TRIC'>}
property coords

1d vector of atomic coordinates.

Returns:

coords -- 1d array holding the current coordinates.

Return type:

np.array

property coords3d

Coordinates in 3d.

Returns:

coords3d -- Coordinates of the Geometry as 2D array.

Return type:

np.array

property coords_by_type

Coordinates in 3d by atom type and their corresponding indices.

Returns:

  • cbt (dict) -- Dictionary with the unique atom types of the Geometry as keys. It's values are the 3d coordinates of the corresponding atom type.

  • inds (dict) -- Dictionary with the unique atom types of the Geometry as keys. It's values are the original indices of the 3d coordinates in the whole coords3d array.

copy(coord_type=None, coord_kwargs=None)[source]

Returns a new Geometry object with same atoms and coordinates.

Parameters:
  • coord_type (str) -- Desired coord_type, defaults to current coord_type.

  • coord_kwargs (dict, optional) -- Any desired coord_kwargs that will be passed to the RedundantCoords object.

Returns:

geom -- New Geometry object with the same atoms and coordinates.

Return type:

Geometry

copy_all(coord_type=None, coord_kwargs=None)[source]
property covalent_radii
del_atoms(inds, **kwargs)[source]
describe()[source]
dump_xyz(fn, cart_coords=None, **kwargs)[source]
eckart_projection(mw_hessian, return_P=False, full=False)[source]
property energy

Energy of the current atomic configuration.

Returns:

energy -- Energy of the current atomic configuration.

Return type:

float

fd_coords3d_gen(step_size=0.001)[source]

Iterator returning 3d Cartesians for finite-differences.

property forces

Energy of the current atomic configuration.

Returns:

force -- 1d array containing the forces acting on the atoms. Negative of the gradient.

Return type:

np.array

get_energy_and_cart_forces_at(cart_coords)[source]
get_energy_and_cart_hessian_at(cart_coords)[source]
get_energy_and_forces_at(coords)[source]

Calculate forces and energies at the given coordinates.

The results are not saved in the Geometry object.

get_energy_at(coords)[source]
get_energy_at_cart_coords(cart_coords)[source]
get_fragments(regex)[source]
get_imag_frequencies(hessian=None, thresh=1e-06)[source]
get_normal_modes(cart_hessian=None, full=False)[source]

Normal mode wavenumbers, eigenvalues and Cartesian displacements Hessian.

get_restart_info()[source]
get_sphere_radius(offset=4)[source]
get_subgeom(indices, coord_type='cart', sort=False)[source]

Return a Geometry containing a subset of the current Geometry.

Parameters:
  • indices (iterable of ints) -- Atomic indices that the define the subset of the current Geometry.

  • coord_type (str, ("cart", "redund"), optional) -- Coordinate system of the new Geometry.

Returns:

sub_geom -- Subset of the current Geometry.

Return type:

Geometry

get_subgeom_without(indices, **kwargs)[source]
get_temporary_coords(coords)[source]
get_thermoanalysis(energy=None, cart_hessian=None, T=298.15, p=101325, point_group='c1')[source]
get_trans_rot_projector(full=False)[source]
property gradient

Negative of the force.

Returns:

gradient -- 1d array containing the negative of the current forces.

Return type:

np.array

property hessian

Matrix of second derivatives of the energy in respect to atomic displacements.

Returns:

hessian -- 2d array containing the second derivatives of the energy with respect to atomic/coordinate displacements depending on the type of coordiante system.

Return type:

np.array

property inertia_tensor
property is_analytical_2d
jmol(atoms=None, cart_coords=None)[source]

Show geometry in jmol.

property layers
mass_weigh_hessian(hessian)[source]
property masses
property masses_rep
property mm_inv

Inverted mass matrix.

Returns a diagonal matrix containing the inverted atomic masses.

property mm_sqrt_inv

Inverted square root of the mass matrix.

modes3d()[source]
property moving_atoms
moving_atoms_jmol()[source]
property mw_coords

Mass-weighted coordinates.

Returns:

mw_coords -- 1d array containing the mass-weighted cartesian coordiantes.

Return type:

np.array

property mw_gradient

Mass-weighted gradient.

Returns:

mw_gradient -- Returns the mass-weighted gradient.

Return type:

np.array

property mw_hessian

Mass-weighted hessian.

Returns:

mw_hessian -- 2d array containing the mass-weighted hessian M^(-1/2) H M^(-1/2).

Return type:

np.array

principal_axes_are_aligned()[source]

Check if the principal axes are aligned with the cartesian axes.

Returns:

aligned -- Wether the principal axes are aligned or not.

Return type:

bool

reparametrize()[source]
reset_coords(new_typed_prims=None)[source]
rmsd(geom)[source]
rotate(copy=False, rng=None)[source]
set_calculator(calculator, clear=True)[source]

Reset the object and set a calculator.

set_coord(ind, coord)[source]

Set a coordinate by index.

Parameters:
  • ind (int) -- Index in of the coordinate to set in the self.coords array.

  • coord (float) -- Coordinate value.

set_coords(coords, cartesian=False, update_constraints=False)[source]
set_h5_hessian(fn)[source]
set_restart_info(restart_info)[source]
set_results(results)[source]

Save the results from a dictionary.

Parameters:

results (dict) -- The keys in this dict will be set as attributes in the current object, with the corresponding item as value.

standard_orientation()[source]
property sum_formula
tmp_xyz_handle(atoms=None, cart_coords=None)[source]
property total_mass
unweight_mw_hessian(mw_hessian)[source]

Unweight a mass-weighted hessian.

Parameters:

mw_hessian (np.array) -- Mass-weighted hessian to be unweighted.

Returns:

hessian -- 2d array containing the hessian.

Return type:

np.array

property vdw_radii
vdw_volume(**kwargs)[source]
without_hydrogens()[source]
zero_frozen_forces(cart_forces)[source]
pysisyphus.Geometry.get_trans_rot_projector(cart_coords, masses, full=False)[source]
pysisyphus.Geometry.get_trans_rot_vectors(cart_coords, masses, rot_thresh=1e-06)[source]

Vectors describing translation and rotation.

These vectors are used for the Eckart projection by constructing a projector from them.

See Martin J. Field - A Pratcial Introduction to the simulation of Molecular Systems, 2007, Cambridge University Press, Eq. (8.23), (8.24) and (8.26) for the actual projection.

See also https://chemistry.stackexchange.com/a/74923.

Parameters:
  • cart_coords (np.array, 1d, shape (3 * atoms.size, )) -- Atomic masses in amu.

  • masses (iterable, 1d, shape (atoms.size, )) -- Atomic masses in amu.

Returns:

ortho_vecs -- 2d array containing row vectors describing translations and rotations.

Return type:

np.array(6, 3*atoms.size)

pysisyphus.Geometry.inertia_tensor(coords3d, masses)[source]

Inertita tensor.

x² xy xz |
(x y z)^T . (x y z) = | xy y² yz |
xz yz z² |

17.1.4. pysisyphus.TableFormatter module

class pysisyphus.TableFormatter.TableFormatter(header, fmts, min_width=7, space=3)[source]

Bases: object

property header
join_format(fmts, lst)[source]

Format a given iterable lst with formats given in the iterable lst and return the joined items of the formatted list.

line(*args)[source]
min_width_fmts(raw_fmts=None)[source]
pysisyphus.TableFormatter.run()[source]

17.1.5. pysisyphus.TablePrinter module

class pysisyphus.TablePrinter.TablePrinter(header, col_fmts, width=12, sub_underline=True, shift_left=0, fmts_update=None, mark='*')[source]

Bases: object

print(*args, **kwargs)[source]
print_header(with_sep=True)[source]
print_row(args, marks=None)[source]
print_sep()[source]

17.1.6. pysisyphus.color module

pysisyphus.color.bool_color(bool_, str_=None)[source]
pysisyphus.color.green(str_)[source]
pysisyphus.color.red(str_)[source]

17.1.7. pysisyphus.config module

pysisyphus.config.detect_paths()[source]
pysisyphus.config.get_cmd(section, key='cmd', use_defaults=True)[source]
pysisyphus.config.parse_args(args)[source]
pysisyphus.config.run_detect_paths()[source]

17.1.8. pysisyphus.constants module

17.1.9. pysisyphus.elem_data module

pysisyphus.elem_data.get_tm_indices(atoms)[source]
pysisyphus.elem_data.nuc_charges_for_atoms(atoms)[source]

17.1.10. pysisyphus.exceptions module

exception pysisyphus.exceptions.HEIIsFirstOrLastException[source]

Bases: Exception

17.1.11. pysisyphus.filtertrj module

pysisyphus.filtertrj.get_unique_internals(geom)[source]
pysisyphus.filtertrj.parse_args(args)[source]
pysisyphus.filtertrj.parse_filter(raw_filter)[source]
pysisyphus.filtertrj.run()[source]

17.1.12. pysisyphus.helpers module

class pysisyphus.helpers.FinalHessianResult(neg_eigvals, eigvals, nus, imag_fns, thermo)

Bases: tuple

eigvals

Alias for field number 1

imag_fns

Alias for field number 3

neg_eigvals

Alias for field number 0

nus

Alias for field number 2

thermo

Alias for field number 4

pysisyphus.helpers.align_coords(coords_list)[source]
pysisyphus.helpers.align_geoms(geoms)[source]
pysisyphus.helpers.check_for_end_sign(check_user=True, cwd='.', add_signs=None)[source]
pysisyphus.helpers.complete_fragments(atoms, fragments)[source]
pysisyphus.helpers.confirm_input(message)[source]
pysisyphus.helpers.do_final_hessian(geom, save_hessian=True, write_imag_modes=False, is_ts=False, prefix='', T=298.15, p=101325, ev_thresh=-1e-06, print_thermo=False, out_dir=None)[source]
pysisyphus.helpers.fit_rigid(geometry, vectors=None, vector_lists=None, hessian=None, align_factor=1.0)[source]
pysisyphus.helpers.geom_from_xyz_file(xyz_fn, coord_type='cart', **coord_kwargs)[source]
pysisyphus.helpers.geom_loader(fn, coord_type='cart', iterable=False, **coord_kwargs)[source]

After introducing the pubchem functionality I don't like this function anymore :) Too complicated.

pysisyphus.helpers.geoms_from_trj(trj_fn, first=None, coord_type='cart', **coord_kwargs)[source]
pysisyphus.helpers.get_coords_diffs(coords, align=False, normalize=True)[source]
pysisyphus.helpers.get_geom_getter(ref_geom, calc_setter)[source]
pysisyphus.helpers.get_tangent_trj_str(atoms, coords, tangent, comment=None, points=10, displ=None)[source]
pysisyphus.helpers.imag_modes_from_geom(geom, freq_thresh=-10, points=10, displ=None)[source]
pysisyphus.helpers.index_array_from_overlaps(overlaps, axis=1)[source]

It is assumed that the overlaps between two points with indices i and j with (j > i) are computed and that i changes along the first axis (axis=0) and j changes along the second axis (axis=1).

So the first row of the overlap matrix (overlaps[0]) should contain the overlaps between state 0 at index i and all states at index j.

argmax along axis 1 returns the indices of the most overlapping states at index j with the states at index i, given by the item index in the indices array. E.g.:

[0 1 3 2] indicates a root flip in a system with four states when going from index i to index j. Root 2 at i became root 3 at j and vice versa.

pysisyphus.helpers.match_geoms(ref_geom, geom_to_match, hydrogen=False)[source]
See

[1] 10.1021/ci400534h [2] 10.1021/acs.jcim.6b00516

pysisyphus.helpers.norm_max_rms(arr)[source]
pysisyphus.helpers.np_print(func, precision=2, suppress=True, linewidth=120)[source]
pysisyphus.helpers.pick_image_inds(cart_coords, images)[source]

Pick approx. evenly distributed images from given Cartesian coordinates.

pysisyphus.helpers.print_barrier(ref_energy, comp_energy, ref_str, comp_str)[source]
pysisyphus.helpers.procrustes(geometry, align_factor=1.0)[source]
pysisyphus.helpers.shake_coords(coords, scale=0.1, seed=None)[source]
pysisyphus.helpers.simple_peaks(data)[source]
pysisyphus.helpers.slugify_worker(dask_worker)[source]

17.1.13. pysisyphus.helpers_pure module

class pysisyphus.helpers_pure.OrderedEnum(value)[source]

Bases: Enum

An enumeration.

pysisyphus.helpers_pure.approx_float(num, expected, abs_tol=1e-06, rel_tol=1e-12)[source]
Return type:

bool

pysisyphus.helpers_pure.cache_arrays(sources, dest)[source]
pysisyphus.helpers_pure.check_mem(mem, pal, avail_frac=0.85, logger=None)[source]
pysisyphus.helpers_pure.chunks(l, n)[source]

Yield successive n-sized chunks from l. https://stackoverflow.com/a/312464

pysisyphus.helpers_pure.describe(arr)[source]
pysisyphus.helpers_pure.eigval_to_wavenumber(ev)[source]
pysisyphus.helpers_pure.estimate(gen, elems)[source]
pysisyphus.helpers_pure.expand(to_expand)[source]
pysisyphus.helpers_pure.file_or_str(*args, method=False, mode='r', exact=False)[source]
pysisyphus.helpers_pure.filter_fixture_store(test_name)[source]
pysisyphus.helpers_pure.find_closest_sequence(str_, comp_strs)[source]
Return type:

Tuple[str, float]

pysisyphus.helpers_pure.full_expand(to_expand)[source]
pysisyphus.helpers_pure.get_box(coords3d, offset=0.0)[source]
pysisyphus.helpers_pure.get_clock()[source]
pysisyphus.helpers_pure.get_cubic_crystal(l, n=2, atom='Na')[source]
pysisyphus.helpers_pure.get_input(data, prompt, lbl_func=None)[source]
pysisyphus.helpers_pure.get_molecular_radius(coords3d, min_offset=0.9452)[source]
pysisyphus.helpers_pure.get_random_path(stem='')[source]
pysisyphus.helpers_pure.get_ratio(str_, comp_str)[source]

See https://stackoverflow.com/a/17388505

Return type:

str

pysisyphus.helpers_pure.hash_args(*args, precision=4)[source]
pysisyphus.helpers_pure.hash_arr(arr, precision=4)[source]
pysisyphus.helpers_pure.highlight_text(text, width=80, level=0)[source]
pysisyphus.helpers_pure.increment_fn(org_fn, suffix=None)[source]

Append, or increase a suffixed counter on a given filename. If no counter is present it will be set to zero. Otherwise it is incremented by one.

>>> increment_fn("opt", "rebuilt")
'opt_rebuilt_000'
>>> increment_fn("opt")
'opt_000'
>>> increment_fn("opt_rebuilt_000", "rebuilt")
'opt_rebuilt_001'
Parameters:
  • org_fn (str) -- The original, unaltered filename.

  • suffix (Optional[str], default: None) -- Optional suffix to be append.

Returns:

Modified filename with optional suffix and incremented counter.

Return type:

incr_fn

pysisyphus.helpers_pure.interpolate_colors(values, c1, c2, num=32)[source]

Expects two RGB colors c1 and c2.

pysisyphus.helpers_pure.json_to_results(as_json)[source]
pysisyphus.helpers_pure.kill_dir(path)[source]

Innocent function remove a directory.

It must contain only files and no other directories. So this won't do too much damage hopefully.

pysisyphus.helpers_pure.log(logger, msg, level=10)[source]
pysisyphus.helpers_pure.merge_sets(fragments)[source]

Merge a list of iterables.

pysisyphus.helpers_pure.molecular_volume(coords3d, vdw_radii, n_trial=10000, offset=1.0)[source]

Monte-Carlo estimate of molecular volume using Van der Waals spheres. Cartesian coordinates and VdW-radii are expected in Bohr!

Return type:

Tuple[float, float, float]

pysisyphus.helpers_pure.recursive_update(d, u)[source]

Recursive update of d with keys/values from u.

From https://stackoverflow.com/questions/3232943

pysisyphus.helpers_pure.remove_duplicates(seq)[source]
pysisyphus.helpers_pure.report_frozen_atoms(geom)[source]
pysisyphus.helpers_pure.report_isotopes(geom, affect_str)[source]
pysisyphus.helpers_pure.results_to_json(results)[source]
pysisyphus.helpers_pure.rms(arr)[source]
pysisyphus.helpers_pure.sort_by_central(set1, set2)[source]

Determines a common index in two sets and returns a length 3 tuple with the central index at the middle position and the two terminal indices as first and last indices.

pysisyphus.helpers_pure.standard_state_corr(T=298.15, p=101325, n=1)[source]

dG for change of standard state from gas to solution of 1 mol/l

pysisyphus.helpers_pure.timed(logger=None)[source]
pysisyphus.helpers_pure.to_sets(iterable)[source]
pysisyphus.helpers_pure.to_subscript_num(num)[source]
pysisyphus.helpers_pure.touch(fn)[source]

17.1.14. pysisyphus.init_logging module

pysisyphus.init_logging.get_fh_logger(name, log_fn)[source]

Initialize a logger with 'name', level DEBUG and a FileHandler.

pysisyphus.init_logging.init_logging(log_dir='./', scheduler=None)[source]

Prepare the logger in log_path. When called with scheduler loggers for every worker are prepared.

pysisyphus.init_logging.init_logging_base(dask_worker, log_path)[source]

Prepare individual loggers for one dask_worker.

17.1.15. pysisyphus.linalg module

pysisyphus.linalg.cross3(a, b)[source]

10x as fast as np.cross for two 1d arrays of size 3.

pysisyphus.linalg.eigvec_grad(w, v, ind, mat_grad)[source]

Gradient of 'ind'-th eigenvector.

dv_i / dx_i = (w_i*I - mat)⁻¹ dmat/dx_i v_i

pysisyphus.linalg.finite_difference_hessian(coords, grad_func, step_size=0.01, acc=2, callback=None)[source]

Numerical Hessian from central finite gradient differences.

Return type:

ndarray[Any, dtype[float]]

See central differences in

https://en.wikipedia.org/wiki/Finite_difference_coefficient

for the different accuracies.

pysisyphus.linalg.get_rot_mat(abc=None)[source]
pysisyphus.linalg.get_rot_mat_for_coords(coords3d_1, coords3d_2)[source]
pysisyphus.linalg.gram_schmidt(vecs, thresh=1e-08)[source]
pysisyphus.linalg.make_unit_vec(vec1, vec2)[source]

Return unit vector pointing from vec2 to vec1.

pysisyphus.linalg.matrix_power(mat, p, thresh=1e-12, strict=True)[source]
pysisyphus.linalg.multi_component_sym_mat(arr, dim)[source]
pysisyphus.linalg.norm3(a)[source]

5x as fas as np.linalg.norm for a 1d array of size 3.

pysisyphus.linalg.orthogonalize_against(mat, vecs, max_cycles=5, thresh=1e-10)[source]

Orthogonalize rows of 'mat' against rows in 'vecs'

Returns a (modified) copy of mat.

pysisyphus.linalg.perp_comp(vec, along)[source]

Return the perpendicular component of vec along along.

pysisyphus.linalg.pivoted_cholesky(A, tol=-1.0)[source]

Cholesky factorization a real symmetric positive semidefinite matrix. Cholesky factorization is carried out with full pivoting.

Adapated from PySCF.

P.T * A * P = L * L.T

Parameters:
  • A (ndarray[Any, dtype[TypeVar(_ScalarType_co, bound= generic, covariant=True)]]) -- Matrix to be factorized.

  • tol (float, default: -1.0) -- User defined tolerance, as outlined in the LAPACK docs.

Returns:

  • L -- Lower or upper triangular matrix.

  • piv -- Pivot vectors, starting at 0.

  • rank -- Rank of the factoirzed matrix.

pysisyphus.linalg.pivoted_cholesky2(A, tol=None, m_max=0)[source]

https://doi.org/10.1016/j.apnum.2011.10.001

pysisyphus.linalg.quaternion_to_rot_mat(q)[source]
pysisyphus.linalg.rmsd_grad(coords3d, ref_coords3d, offset=1e-09)[source]

RMSD and gradient between two sets of coordinates from quaternions.

The gradient is given w.r.t. the coordinates of 'coords3d'.

Python adaption of

ls_rmsd.f90

from the xtb repository of the Grimme group, which in turn implements

[1] https://doi.org/10.1002/jcc.20110

.

Parameters:
  • coords3d (ndarray[Any, dtype[float]]) -- Coordinate array of shape (N, 3) with N denoting the number of atoms.

  • ref_coords3d (ndarray[Any, dtype[float]]) -- Reference coordinates.

  • offset (float, default: 1e-09) -- Small floating-point number that is added to the RMSD, to avoid division by zero.

Return type:

Tuple[float, ndarray[Any, dtype[float]]]

Returns:

  • rmsd -- RMSD value.

  • rmsd_grad -- Gradient of the RMSD value w.r.t. to 'coords3d'.

pysisyphus.linalg.rot_quaternion(coords3d, ref_coords3d)[source]
pysisyphus.linalg.svd_inv(array, thresh, hermitian=False)[source]
pysisyphus.linalg.sym_mat_from_tril(arr, data)[source]
pysisyphus.linalg.sym_mat_from_triu(arr, data)[source]

17.1.16. pysisyphus.pack module

pysisyphus.pack.as_pdb(fn)[source]
pysisyphus.pack.parse_args(args)[source]
pysisyphus.pack.print_info(title, geom)[source]
pysisyphus.pack.run()[source]
pysisyphus.pack.sphere_radius_from_volume(volume)[source]
pysisyphus.pack.volume_for_density(molecule_num, mol_mass, density)[source]

17.1.17. pysisyphus.peakdetect module

17.1.18. pysisyphus.plot module

17.1.19. pysisyphus.run module

class pysisyphus.run.RunResult(preopt_first_geom, preopt_last_geom, cos, cos_opt, ts_geom, ts_opt, end_geoms, irc, irc_geom, mdp_result, opt_geom, opt, calced_geoms, calced_results, stocastic, calc_getter, scan_geoms, scan_vals, scan_energies, perf_results)

Bases: tuple

calc_getter

Alias for field number 15

calced_geoms

Alias for field number 12

calced_results

Alias for field number 13

cos

Alias for field number 2

cos_opt

Alias for field number 3

end_geoms

Alias for field number 6

irc

Alias for field number 7

irc_geom

Alias for field number 8

mdp_result

Alias for field number 9

opt

Alias for field number 11

opt_geom

Alias for field number 10

perf_results

Alias for field number 19

preopt_first_geom

Alias for field number 0

preopt_last_geom

Alias for field number 1

scan_energies

Alias for field number 18

scan_geoms

Alias for field number 16

scan_vals

Alias for field number 17

stocastic

Alias for field number 14

ts_geom

Alias for field number 4

ts_opt

Alias for field number 5

pysisyphus.run.check_asserts(results, run_dict)[source]
pysisyphus.run.copy_yaml_and_geometries(run_dict, yaml_fn, dest_and_add_cp, new_yaml_fn=None)[source]
pysisyphus.run.do_clean(force=False)[source]

Deletes files from previous runs in the cwd. A similar function could be used to store everything ...

pysisyphus.run.do_rmsds(xyz, geoms, end_fns, end_geoms, preopt_map=None, similar_thresh=0.25)[source]
pysisyphus.run.get_calc_closure(base_name, calc_key, calc_kwargs, iter_dict=None, index=None)[source]
pysisyphus.run.get_defaults(conf_dict, T_default=298.15, p_default=101325)[source]
pysisyphus.run.get_last_calc_cycle()[source]
pysisyphus.run.load_run_dict(yaml_fn)[source]
pysisyphus.run.main(run_dict, restart=False, yaml_dir='./', scheduler=None)[source]
pysisyphus.run.parse_args(args)[source]
pysisyphus.run.print_bibtex()[source]
pysisyphus.run.print_header()[source]

Generated from https://asciiartgen.now.sh/?s=pysisyphus&style=colossal

pysisyphus.run.run()[source]
pysisyphus.run.run_calculations(geoms, calc_getter, scheduler=None, assert_track=False, run_func=None)[source]
pysisyphus.run.run_endopt(irc, endopt_key, endopt_kwargs, calc_getter)[source]
pysisyphus.run.run_from_dict(run_dict, cwd=None, set_defaults=True, yaml_fn=None, cp=None, scheduler=None, clean=False, fclean=False, version=False, restart=False)[source]
pysisyphus.run.run_irc(geom, irc_key, irc_kwargs, calc_getter)[source]
pysisyphus.run.run_md(geom, calc_getter, md_kwargs)[source]
pysisyphus.run.run_mdp(geom, calc_getter, mdp_kwargs)[source]
pysisyphus.run.run_preopt(first_geom, last_geom, calc_getter, preopt_key, preopt_kwargs)[source]
pysisyphus.run.run_scan(geom, calc_getter, scan_kwargs, callback=None)[source]
pysisyphus.run.run_stocastic(stoc)[source]
pysisyphus.run.run_tsopt_from_cos(cos, tsopt_key, tsopt_kwargs, calc_getter=None, ovlp_thresh=0.4, coordinate_union='bonds')[source]
pysisyphus.run.setup_run_dict(run_dict)[source]

17.1.20. pysisyphus.socket_helper module

pysisyphus.socket_helper.get_fmts(cartesians)[source]
pysisyphus.socket_helper.recv_closure(sock, hdrlen, fmts, verbose=False)[source]
pysisyphus.socket_helper.send_closure(sock, hdrlen, fmts, verbose=False)[source]

17.1.21. pysisyphus.testing module

class pysisyphus.testing.DummyMark(available)[source]

Bases: object

pysisyphus.testing.available(calculator, **kwargs)[source]
pysisyphus.testing.module_available(calculator)[source]
pysisyphus.testing.using(calculator, set_pytest_mark=True)[source]

Calling disabling set_pytest_mark avoids a runtime dependency on pytest.

17.1.22. pysisyphus.thermo module

pysisyphus.thermo.get_thermoanalysis_from_hess_h5(h5_fn, T=298.15, p=101325, point_group='c1', return_geom=False)[source]
pysisyphus.thermo.print_thermoanalysis(thermo, geom=None, is_ts=False, unit='joule', level=0, title=None)[source]

Print thermochemical analysis.

17.1.23. pysisyphus.trj module

exception pysisyphus.trj.GotNoGeometryException[source]

Bases: Exception

pysisyphus.trj.align(geoms)[source]

Align all geometries onto the first using partical procrustes.

pysisyphus.trj.append(geoms)[source]
pysisyphus.trj.center(geoms)[source]
pysisyphus.trj.centerm(geoms)[source]
pysisyphus.trj.dump_geoms(geoms, fn_base, trj_infix='', dump_trj=True, dump_xyz=True, dump_pdb=False, ang=False)[source]
pysisyphus.trj.every(geoms, every_nth)[source]
pysisyphus.trj.frag_sort(geoms)[source]
pysisyphus.trj.get(geoms, index)[source]
pysisyphus.trj.get_geoms(xyz_fns, coord_type='cart', geom_kwargs=None, union=False, same_prims=True, quiet=False, interpol_kwargs=None)[source]

Returns a list of Geometry objects in the given coordinate system and interpolates if necessary.

pysisyphus.trj.get_interactively(geoms)[source]
pysisyphus.trj.hardsphere_merge(geoms)[source]
pysisyphus.trj.match(ref_geom, geom_to_match)[source]
pysisyphus.trj.origin(geoms)[source]
pysisyphus.trj.parse_args(args)[source]
pysisyphus.trj.print_internal_vals(geoms, typed_prim)[source]
pysisyphus.trj.print_internals(geoms, filter_atoms=None, add_prims='')[source]
pysisyphus.trj.read_geoms(xyz_fns, coord_type='cart', geom_kwargs=None)[source]
pysisyphus.trj.run()[source]
pysisyphus.trj.shake(geoms, scale=0.1, seed=None)[source]
pysisyphus.trj.spline_redistribute(geoms)[source]
pysisyphus.trj.standard_orientation(geoms)[source]
pysisyphus.trj.standardize_geoms(geoms, coord_type, geom_kwargs, same_prims=True, union=False)[source]
pysisyphus.trj.translate(geoms, trans)[source]

17.1.24. pysisyphus.version module

17.1.25. pysisyphus.xyzloader module

pysisyphus.xyzloader.coords_to_trj(trj_fn, atoms, coords_list, comments=None)[source]
pysisyphus.xyzloader.make_trj_str(atoms, coords_list, comments=None)[source]
pysisyphus.xyzloader.make_trj_str_from_geoms(geoms, comments=None, energy_comments=False)[source]
pysisyphus.xyzloader.make_xyz_str(atoms, coords, comment='')[source]
pysisyphus.xyzloader.parse_trj_file(trj_fn, with_comments=False)[source]
pysisyphus.xyzloader.parse_trj_str(trj_str, with_comments=False)[source]
pysisyphus.xyzloader.parse_xyz_file(xyz_fn, with_comment=False)[source]
pysisyphus.xyzloader.parse_xyz_str(xyz_str, with_comment)[source]

Parse a xyz string.

17.1. Paramters

xyz_strstr

The contents of a .xyz file.

with_commentbool

Return comment line if True.

returns:
  • atoms (list) -- List of length N (N = number of atoms) holding the element symbols.

  • coords (np.array) -- An array of shape (N, 3) holding the xyz coordinates.

  • comment_line (str, optional) -- Comment line if with_comment argument was True.

pysisyphus.xyzloader.split_xyz_str(xyz_str)[source]

Example:

xyz:

1

X -1.2 1.4 0.0 1

X 2.0 4.0 0.0

pysisyphus.xyzloader.write_geoms_to_trj(geoms, fn, comments=None)[source]

17.1.26. pysisyphus.yaml_mods module

pysisyphus.yaml_mods.get_constructor(unit)[source]
pysisyphus.yaml_mods.get_loader(units=['Eh', 'kJpermol', 'kcalpermol', 'eV', 'fs', 'ps', 'ns', 'a0', 'angstrom', 'nm', 'deg'])[source]

17.1.27. Module contents