16.1. pysisyphus package
16.1.1. Subpackages
- 16.1.1.1. pysisyphus.benchmarks package
- 16.1.1.2. pysisyphus.calculators package
- 16.1.1.2.1. Submodules
- 16.1.1.2.2. pysisyphus.calculators.AFIR module
- 16.1.1.2.3. pysisyphus.calculators.AnaPot module
- 16.1.1.2.4. pysisyphus.calculators.AnaPot2 module
- 16.1.1.2.5. pysisyphus.calculators.AnaPot3 module
- 16.1.1.2.6. pysisyphus.calculators.AnaPot4 module
- 16.1.1.2.7. pysisyphus.calculators.AnaPotBase module
- 16.1.1.2.8. pysisyphus.calculators.AnaPotCBM module
- 16.1.1.2.9. pysisyphus.calculators.AtomAtomTransTorque module
- 16.1.1.2.10. pysisyphus.calculators.Calculator module
- 16.1.1.2.11. pysisyphus.calculators.CerjanMiller module
- 16.1.1.2.12. pysisyphus.calculators.Composite module
- 16.1.1.2.13. pysisyphus.calculators.ConicalIntersection module
- 16.1.1.2.14. pysisyphus.calculators.DFTBp module
- 16.1.1.2.15. pysisyphus.calculators.Dalton module
- 16.1.1.2.16. pysisyphus.calculators.Dimer module
- 16.1.1.2.17. pysisyphus.calculators.Dummy module
- 16.1.1.2.18. pysisyphus.calculators.EGO module
- 16.1.1.2.19. pysisyphus.calculators.EnergyMin module
- 16.1.1.2.20. pysisyphus.calculators.ExternalPotential module
- 16.1.1.2.21. pysisyphus.calculators.FakeASE module
- 16.1.1.2.22. pysisyphus.calculators.FourWellAnaPot module
- 16.1.1.2.23. pysisyphus.calculators.FreeEndNEBPot module
- 16.1.1.2.24. pysisyphus.calculators.Gaussian09 module
- 16.1.1.2.25. pysisyphus.calculators.Gaussian16 module
- 16.1.1.2.26. pysisyphus.calculators.HardSphere module
- 16.1.1.2.27. pysisyphus.calculators.IDPPCalculator module
- 16.1.1.2.28. pysisyphus.calculators.IPIClient module
- 16.1.1.2.29. pysisyphus.calculators.IPIServer module
- 16.1.1.2.30. pysisyphus.calculators.LEPSBase module
- 16.1.1.2.31. pysisyphus.calculators.LEPSExpr module
- 16.1.1.2.32. pysisyphus.calculators.LennardJones module
- 16.1.1.2.33. pysisyphus.calculators.MOPAC module
- 16.1.1.2.34. pysisyphus.calculators.MullerBrownSympyPot module
- 16.1.1.2.35. pysisyphus.calculators.MultiCalc module
- 16.1.1.2.36. pysisyphus.calculators.OBabel module
- 16.1.1.2.37. pysisyphus.calculators.ONIOMv2 module
- 16.1.1.2.38. pysisyphus.calculators.ORCA module
- 16.1.1.2.39. pysisyphus.calculators.ORCA5 module
- 16.1.1.2.40. pysisyphus.calculators.OpenMM module
- 16.1.1.2.41. pysisyphus.calculators.OpenMolcas module
- 16.1.1.2.42. pysisyphus.calculators.OverlapCalculator module
- 16.1.1.2.43. pysisyphus.calculators.Psi4 module
- 16.1.1.2.44. pysisyphus.calculators.PyPsi4 module
- 16.1.1.2.45. pysisyphus.calculators.PySCF module
- 16.1.1.2.46. pysisyphus.calculators.PyXTB module
- 16.1.1.2.47. pysisyphus.calculators.QCEngine module
- 16.1.1.2.48. pysisyphus.calculators.Rastrigin module
- 16.1.1.2.49. pysisyphus.calculators.Remote module
- 16.1.1.2.50. pysisyphus.calculators.Rosenbrock module
- 16.1.1.2.51. pysisyphus.calculators.SocketCalc module
- 16.1.1.2.52. pysisyphus.calculators.TIP3P module
- 16.1.1.2.53. pysisyphus.calculators.TransTorque module
- 16.1.1.2.54. pysisyphus.calculators.Turbomole module
- 16.1.1.2.55. pysisyphus.calculators.WFOWrapper module
- 16.1.1.2.56. pysisyphus.calculators.WFOWrapper2 module
- 16.1.1.2.57. pysisyphus.calculators.XTB module
- 16.1.1.2.58. pysisyphus.calculators.parser module
- 16.1.1.2.59. Module contents
- 16.1.1.3. pysisyphus.cos package
- 16.1.1.3.1. Submodules
- 16.1.1.3.2. pysisyphus.cos.AdaptiveNEB module
- 16.1.1.3.3. pysisyphus.cos.ChainOfStates module
- 16.1.1.3.4. pysisyphus.cos.FreeEndNEB module
- 16.1.1.3.5. pysisyphus.cos.FreezingString module
- 16.1.1.3.6. pysisyphus.cos.GrowingChainOfStates module
- 16.1.1.3.7. pysisyphus.cos.GrowingNT module
- 16.1.1.3.8. pysisyphus.cos.GrowingString module
- 16.1.1.3.9. pysisyphus.cos.NEB module
- 16.1.1.3.10. pysisyphus.cos.SimpleZTS module
- 16.1.1.3.11. Module contents
- 16.1.1.4. pysisyphus.db package
- 16.1.1.5. pysisyphus.drivers package
- 16.1.1.5.1. Submodules
- 16.1.1.5.2. pysisyphus.drivers.afir module
- 16.1.1.5.3. pysisyphus.drivers.barriers module
- 16.1.1.5.4. pysisyphus.drivers.birkholz module
- 16.1.1.5.5. pysisyphus.drivers.merge module
- 16.1.1.5.6. pysisyphus.drivers.opt module
- 16.1.1.5.7. pysisyphus.drivers.perf module
- 16.1.1.5.8. pysisyphus.drivers.pka module
- 16.1.1.5.9. pysisyphus.drivers.precon_pos_rot module
- 16.1.1.5.10. pysisyphus.drivers.rates module
- 16.1.1.5.11. pysisyphus.drivers.replace module
- 16.1.1.5.12. pysisyphus.drivers.scan module
- 16.1.1.5.13. pysisyphus.drivers.thermo module
- 16.1.1.5.14. Module contents
- 16.1.1.6. pysisyphus.dynamics package
- 16.1.1.6.1. Submodules
- 16.1.1.6.2. pysisyphus.dynamics.Gaussian module
- 16.1.1.6.3. pysisyphus.dynamics.colvars module
- 16.1.1.6.4. pysisyphus.dynamics.driver module
- 16.1.1.6.5. pysisyphus.dynamics.helpers module
- 16.1.1.6.6. pysisyphus.dynamics.lincs module
- 16.1.1.6.7. pysisyphus.dynamics.mdp module
- 16.1.1.6.8. pysisyphus.dynamics.rattle module
- 16.1.1.6.9. pysisyphus.dynamics.thermostats module
- 16.1.1.6.10. Module contents
- 16.1.1.7. pysisyphus.intcoords package
- 16.1.1.7.1. Submodules
- 16.1.1.7.2. pysisyphus.intcoords.Bend module
- 16.1.1.7.3. pysisyphus.intcoords.Bend2 module
- 16.1.1.7.4. pysisyphus.intcoords.BondedFragment module
- 16.1.1.7.5. pysisyphus.intcoords.Cartesian module
- 16.1.1.7.6. pysisyphus.intcoords.CartesianCoords module
- 16.1.1.7.7. pysisyphus.intcoords.Coords module
- 16.1.1.7.8. pysisyphus.intcoords.DLC module
- 16.1.1.7.9. pysisyphus.intcoords.DistanceFunction module
- 16.1.1.7.10. pysisyphus.intcoords.DummyTorsion module
- 16.1.1.7.11. pysisyphus.intcoords.LinearBend module
- 16.1.1.7.12. pysisyphus.intcoords.LinearDisplacement module
- 16.1.1.7.13. pysisyphus.intcoords.OutOfPlane module
- 16.1.1.7.14. pysisyphus.intcoords.PrimTypes module
- 16.1.1.7.15. pysisyphus.intcoords.Primitive module
- 16.1.1.7.16. pysisyphus.intcoords.RedundantCoords module
- 16.1.1.7.17. pysisyphus.intcoords.Rotation module
- 16.1.1.7.18. pysisyphus.intcoords.Stretch module
- 16.1.1.7.19. pysisyphus.intcoords.Torsion module
- 16.1.1.7.20. pysisyphus.intcoords.Torsion2 module
- 16.1.1.7.21. pysisyphus.intcoords.Translation module
- 16.1.1.7.22. pysisyphus.intcoords.augment_bonds module
- 16.1.1.7.23. pysisyphus.intcoords.derivatives module
- 16.1.1.7.24. pysisyphus.intcoords.eval module
- 16.1.1.7.25. pysisyphus.intcoords.exceptions module
- 16.1.1.7.26. pysisyphus.intcoords.findiffs module
- 16.1.1.7.27. pysisyphus.intcoords.generate_derivatives module
- 16.1.1.7.28. pysisyphus.intcoords.helpers module
- 16.1.1.7.29. pysisyphus.intcoords.mp_derivatives module
- 16.1.1.7.30. pysisyphus.intcoords.setup module
- 16.1.1.7.31. pysisyphus.intcoords.setup_fast module
- 16.1.1.7.32. pysisyphus.intcoords.update module
- 16.1.1.7.33. pysisyphus.intcoords.valid module
- 16.1.1.7.34. Module contents
- 16.1.1.8. pysisyphus.interpolate package
- 16.1.1.9. pysisyphus.io package
- 16.1.1.9.1. Submodules
- 16.1.1.9.2. pysisyphus.io.cjson module
- 16.1.1.9.3. pysisyphus.io.crd module
- 16.1.1.9.4. pysisyphus.io.hdf5 module
- 16.1.1.9.5. pysisyphus.io.hessian module
- 16.1.1.9.6. pysisyphus.io.mol2 module
- 16.1.1.9.7. pysisyphus.io.molden module
- 16.1.1.9.8. pysisyphus.io.pdb module
- 16.1.1.9.9. pysisyphus.io.pubchem module
- 16.1.1.9.10. pysisyphus.io.sdf module
- 16.1.1.9.11. pysisyphus.io.xyz module
- 16.1.1.9.12. pysisyphus.io.zmat module
- 16.1.1.9.13. Module contents
- 16.1.1.10. pysisyphus.irc package
- 16.1.1.10.1. Submodules
- 16.1.1.10.2. pysisyphus.irc.DWI module
- 16.1.1.10.3. pysisyphus.irc.DampedVelocityVerlet module
- 16.1.1.10.4. pysisyphus.irc.Euler module
- 16.1.1.10.5. pysisyphus.irc.EulerPC module
- 16.1.1.10.6. pysisyphus.irc.GonzalezSchlegel module
- 16.1.1.10.7. pysisyphus.irc.IMKMod module
- 16.1.1.10.8. pysisyphus.irc.IRC module
- 16.1.1.10.9. pysisyphus.irc.IRCDummy module
- 16.1.1.10.10. pysisyphus.irc.Instanton module
- 16.1.1.10.11. pysisyphus.irc.LQA module
- 16.1.1.10.12. pysisyphus.irc.ModeKill module
- 16.1.1.10.13. pysisyphus.irc.ParamPlot module
- 16.1.1.10.14. pysisyphus.irc.RK4 module
- 16.1.1.10.15. pysisyphus.irc.initial_displ module
- 16.1.1.10.16. Module contents
- 16.1.1.11. pysisyphus.line_searches package
- 16.1.1.11.1. Submodules
- 16.1.1.11.2. pysisyphus.line_searches.Backtracking module
- 16.1.1.11.3. pysisyphus.line_searches.HagerZhang module
- 16.1.1.11.4. pysisyphus.line_searches.LineSearch module
- 16.1.1.11.5. pysisyphus.line_searches.StrongWolfe module
- 16.1.1.11.6. pysisyphus.line_searches.interpol module
- 16.1.1.11.7. Module contents
- 16.1.1.12. pysisyphus.modefollow package
- 16.1.1.13. pysisyphus.optimizers package
- 16.1.1.13.1. Submodules
- 16.1.1.13.2. pysisyphus.optimizers.BFGS module
- 16.1.1.13.3. pysisyphus.optimizers.BacktrackingOptimizer module
- 16.1.1.13.4. pysisyphus.optimizers.ConjugateGradient module
- 16.1.1.13.5. pysisyphus.optimizers.CubicNewton module
- 16.1.1.13.6. pysisyphus.optimizers.FIRE module
- 16.1.1.13.7. pysisyphus.optimizers.HessianOptimizer module
- 16.1.1.13.8. pysisyphus.optimizers.LBFGS module
- 16.1.1.13.9. pysisyphus.optimizers.LayerOpt module
- 16.1.1.13.10. pysisyphus.optimizers.MicroOptimizer module
- 16.1.1.13.11. pysisyphus.optimizers.NCOptimizer module
- 16.1.1.13.12. pysisyphus.optimizers.Optimizer module
- 16.1.1.13.13. pysisyphus.optimizers.PreconLBFGS module
- 16.1.1.13.14. pysisyphus.optimizers.PreconSteepestDescent module
- 16.1.1.13.15. pysisyphus.optimizers.QuickMin module
- 16.1.1.13.16. pysisyphus.optimizers.RFOptimizer module
- 16.1.1.13.17. pysisyphus.optimizers.RSA module
- 16.1.1.13.18. pysisyphus.optimizers.StabilizedQNMethod module
- 16.1.1.13.19. pysisyphus.optimizers.SteepestDescent module
- 16.1.1.13.20. pysisyphus.optimizers.StringOptimizer module
- 16.1.1.13.21. pysisyphus.optimizers.closures module
- 16.1.1.13.22. pysisyphus.optimizers.cls_map module
- 16.1.1.13.23. pysisyphus.optimizers.exceptions module
- 16.1.1.13.24. pysisyphus.optimizers.gdiis module
- 16.1.1.13.25. pysisyphus.optimizers.guess_hessians module
- 16.1.1.13.26. pysisyphus.optimizers.hessian_updates module
- 16.1.1.13.27. pysisyphus.optimizers.poly_fit module
- 16.1.1.13.28. pysisyphus.optimizers.precon module
- 16.1.1.13.29. pysisyphus.optimizers.restrict_step module
- 16.1.1.13.30. Module contents
- 16.1.1.14. pysisyphus.plotters package
- 16.1.1.15. pysisyphus.stocastic package
- 16.1.1.16. pysisyphus.tests package
- 16.1.1.17. pysisyphus.tsoptimizers package
- 16.1.1.18. pysisyphus.wrapper package
16.1.2. Submodules
16.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
- approximate_radius()[source]
Approximate molecule radius from the biggest atom distance along an axis.
- 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_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
- property atomic_numbers
- property bond_sets
- property cart_coords
- property cart_forces
- property cart_gradient
- property cart_hessian
- 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, )
- 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'>, '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
- property covalent_radii
- property energy
Energy of the current atomic configuration.
- Returns
energy -- Energy of the current atomic configuration.
- Return type
float
- 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_forces_at(coords)[source]
Calculate forces and energies at the given coordinates.
The results are not saved in the Geometry object.
- get_normal_modes(cart_hessian=None, full=False)[source]
Normal mode wavenumbers, eigenvalues and Cartesian displacements Hessian.
- 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
- 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
- property layers
- 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.
- property moving_atoms
- 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
- 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_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.
- property sum_formula
- property total_mass
- 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)
16.1.4. pysisyphus.TableFormatter module
16.1.5. pysisyphus.TablePrinter module
16.1.6. pysisyphus.color module
16.1.7. pysisyphus.config module
16.1.8. pysisyphus.constants module
16.1.9. pysisyphus.elem_data module
16.1.10. pysisyphus.exceptions module
16.1.11. pysisyphus.filtertrj module
16.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.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.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.get_tangent_trj_str(atoms, coords, tangent, comment=None, 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
16.1.13. pysisyphus.helpers_pure module
- pysisyphus.helpers_pure.approx_float(num, expected, abs_tol=1e-06, rel_tol=1e-12)[source]
- Return type
bool
- pysisyphus.helpers_pure.chunks(l, n)[source]
Yield successive n-sized chunks from l. https://stackoverflow.com/a/312464
- pysisyphus.helpers_pure.find_closest_sequence(str_, comp_strs)[source]
- Return type
Tuple
[str
,float
]
- pysisyphus.helpers_pure.get_ratio(str_, comp_str)[source]
See https://stackoverflow.com/a/17388505
- Return type
str
- 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.recursive_update(d, u)[source]
Recursive update of d with keys/values from u.
- 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.
16.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.
16.1.15. pysisyphus.linalg module
- 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)[source]
Numerical Hessian from central finite gradient differences.
- See central differences in
for the different accuracies.
- Return type
ndarray
[Any
,dtype
[float
]]
- 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.
16.1.16. pysisyphus.pack module
16.1.17. pysisyphus.peakdetect module
- pysisyphus.peakdetect.peakdetect(y_axis, x_axis=None, lookahead=200, delta=0)[source]
Converted from/based on a MATLAB script at: http://billauer.co.il/peakdet.html
function for detecting local maxima and minima in a signal. Discovers peaks by searching for values which are surrounded by lower or larger values for maxima and minima respectively
keyword arguments: y_axis -- A list containing the signal over which to find peaks
- x_axis -- A x-axis whose values correspond to the y_axis list and is used
in the return to specify the position of the peaks. If omitted an index of the y_axis is used. (default: None)
- lookahead -- distance to look ahead from a peak candidate to determine if
it is the actual peak (default: 200) '(samples / period) / f' where '4 >= f >= 1.25' might be a good value
- delta -- this specifies a minimum difference between a peak and
the following points, before a peak may be considered a peak. Useful to hinder the function from picking up false peaks towards to end of the signal. To work well delta should be set to delta >= RMSnoise * 5. (default: 0)
When omitted delta function causes a 20% decrease in speed. When used Correctly it can double the speed of the function
- return: two lists [max_peaks, min_peaks] containing the positive and
negative peaks respectively. Each cell of the lists contains a tuple of: (position, peak_value) to get the average peak value do: np.mean(max_peaks, 0)[1] on the results to unpack one of the lists into x, y coordinates do: x, y = zip(*max_peaks)
- pysisyphus.peakdetect.peakdetect_fft(y_axis, x_axis, pad_len=20)[source]
Performs a FFT calculation on the data and zero-pads the results to increase the time domain resolution after performing the inverse fft and send the data to the 'peakdetect' function for peak detection.
Omitting the x_axis is forbidden as it would make the resulting x_axis value silly if it was returned as the index 50.234 or similar.
Will find at least 1 less peak then the 'peakdetect_zero_crossing' function, but should result in a more precise value of the peak as resolution has been increased. Some peaks are lost in an attempt to minimize spectral leakage by calculating the fft between two zero crossings for n amount of signal periods.
The biggest time eater in this function is the ifft and thereafter it's the 'peakdetect' function which takes only half the time of the ifft. Speed improvements could include to check if 2**n points could be used for fft and ifft or change the 'peakdetect' to the 'peakdetect_zero_crossing', which is maybe 10 times faster than 'peakdetct'. The pro of 'peakdetect' is that it results in one less lost peak. It should also be noted that the time used by the ifft function can change greatly depending on the input.
keyword arguments: y_axis -- A list containing the signal over which to find peaks
- x_axis -- A x-axis whose values correspond to the y_axis list and is used
in the return to specify the position of the peaks.
- pad_len -- By how many times the time resolution should be
increased by, e.g. 1 doubles the resolution. The amount is rounded up to the nearest 2**n amount (default: 20)
- return: two lists [max_peaks, min_peaks] containing the positive and
negative peaks respectively. Each cell of the lists contains a tuple of: (position, peak_value) to get the average peak value do: np.mean(max_peaks, 0)[1] on the results to unpack one of the lists into x, y coordinates do: x, y = zip(*max_peaks)
- pysisyphus.peakdetect.peakdetect_parabola(y_axis, x_axis, points=31)[source]
Function for detecting local maxima and minima in a signal. Discovers peaks by fitting the model function: y = k (x - tau) ** 2 + m to the peaks. The amount of points used in the fitting is set by the points argument.
Omitting the x_axis is forbidden as it would make the resulting x_axis value silly, if it was returned as index 50.234 or similar.
will find the same amount of peaks as the 'peakdetect_zero_crossing' function, but might result in a more precise value of the peak.
keyword arguments: y_axis -- A list containing the signal over which to find peaks
- x_axis -- A x-axis whose values correspond to the y_axis list and is used
in the return to specify the position of the peaks.
- points -- How many points around the peak should be used during curve
fitting (default: 31)
- return: two lists [max_peaks, min_peaks] containing the positive and
negative peaks respectively. Each cell of the lists contains a tuple of: (position, peak_value) to get the average peak value do: np.mean(max_peaks, 0)[1] on the results to unpack one of the lists into x, y coordinates do: x, y = zip(*max_peaks)
- pysisyphus.peakdetect.peakdetect_sine(y_axis, x_axis, points=31, lock_frequency=False)[source]
Function for detecting local maxima and minima in a signal. Discovers peaks by fitting the model function: y = A * sin(2 * pi * f * (x - tau)) to the peaks. The amount of points used in the fitting is set by the points argument.
Omitting the x_axis is forbidden as it would make the resulting x_axis value silly if it was returned as index 50.234 or similar.
will find the same amount of peaks as the 'peakdetect_zero_crossing' function, but might result in a more precise value of the peak.
The function might have some problems if the sine wave has a non-negligible total angle i.e. a k*x component, as this messes with the internal offset calculation of the peaks, might be fixed by fitting a y = k * x + m function to the peaks for offset calculation.
keyword arguments: y_axis -- A list containing the signal over which to find peaks
- x_axis -- A x-axis whose values correspond to the y_axis list and is used
in the return to specify the position of the peaks.
- points -- How many points around the peak should be used during curve
fitting (default: 31)
- lock_frequency -- Specifies if the frequency argument of the model
function should be locked to the value calculated from the raw peaks or if optimization process may tinker with it. (default: False)
- return: two lists [max_peaks, min_peaks] containing the positive and
negative peaks respectively. Each cell of the lists contains a tuple of: (position, peak_value) to get the average peak value do: np.mean(max_peaks, 0)[1] on the results to unpack one of the lists into x, y coordinates do: x, y = zip(*max_peaks)
- pysisyphus.peakdetect.peakdetect_sine_locked(y_axis, x_axis, points=31)[source]
Convenience function for calling the 'peakdetect_sine' function with the lock_frequency argument as True.
keyword arguments: y_axis -- A list containing the signal over which to find peaks x_axis -- A x-axis whose values correspond to the y_axis list and is used
in the return to specify the position of the peaks.
- points -- How many points around the peak should be used during curve
fitting (default: 31)
return: see the function 'peakdetect_sine'
- pysisyphus.peakdetect.peakdetect_spline(y_axis, x_axis, pad_len=20)[source]
Performs a b-spline interpolation on the data to increase resolution and send the data to the 'peakdetect_zero_crossing' function for peak detection.
Omitting the x_axis is forbidden as it would make the resulting x_axis value silly if it was returned as the index 50.234 or similar.
will find the same amount of peaks as the 'peakdetect_zero_crossing' function, but might result in a more precise value of the peak.
keyword arguments: y_axis -- A list containing the signal over which to find peaks
- x_axis -- A x-axis whose values correspond to the y_axis list and is used
in the return to specify the position of the peaks. x-axis must be equally spaced.
- pad_len -- By how many times the time resolution should be increased by,
e.g. 1 doubles the resolution. (default: 20)
- return: two lists [max_peaks, min_peaks] containing the positive and
negative peaks respectively. Each cell of the lists contains a tuple of: (position, peak_value) to get the average peak value do: np.mean(max_peaks, 0)[1] on the results to unpack one of the lists into x, y coordinates do: x, y = zip(*max_peaks)
- pysisyphus.peakdetect.peakdetect_zero_crossing(y_axis, x_axis=None, window=11)[source]
Function for detecting local maxima and minima in a signal. Discovers peaks by dividing the signal into bins and retrieving the maximum and minimum value of each the even and odd bins respectively. Division into bins is performed by smoothing the curve and finding the zero crossings.
Suitable for repeatable signals, where some noise is tolerated. Executes faster than 'peakdetect', although this function will break if the offset of the signal is too large. It should also be noted that the first and last peak will probably not be found, as this function only can find peaks between the first and last zero crossing.
keyword arguments: y_axis -- A list containing the signal over which to find peaks
- x_axis -- A x-axis whose values correspond to the y_axis list
and is used in the return to specify the position of the peaks. If omitted an index of the y_axis is used. (default: None)
- window -- the dimension of the smoothing window; should be an odd integer
(default: 11)
- return: two lists [max_peaks, min_peaks] containing the positive and
negative peaks respectively. Each cell of the lists contains a tuple of: (position, peak_value) to get the average peak value do: np.mean(max_peaks, 0)[1] on the results to unpack one of the lists into x, y coordinates do: x, y = zip(*max_peaks)
- pysisyphus.peakdetect.zero_crossings(y_axis, window_len=11, window_f='hanning', offset_corrected=False)[source]
Algorithm to find zero crossings. Smooths the curve and finds the zero-crossings by looking for a sign change.
keyword arguments: y_axis -- A list containing the signal over which to find zero-crossings
- window_len -- the dimension of the smoothing window; should be an odd
integer (default: 11)
- window_f -- the type of window from 'flat', 'hanning', 'hamming',
'bartlett', 'blackman' (default: 'hanning')
offset_corrected -- Used for recursive calling to remove offset when needed
return: the index for each zero-crossing
- pysisyphus.peakdetect.zero_crossings_sine_fit(y_axis, x_axis, fit_window=None, smooth_window=11)[source]
Detects the zero crossings of a signal by fitting a sine model function around the zero crossings: y = A * sin(2 * pi * Hz * (x - tau)) + k * x + m Only tau (the zero crossing) is varied during fitting.
Offset and a linear drift of offset is accounted for by fitting a linear function the negative respective positive raw peaks of the wave-shape and the amplitude is calculated using data from the offset calculation i.e. the 'm' constant from the negative peaks is subtracted from the positive one to obtain amplitude.
Frequency is calculated using the mean time between raw peaks.
Algorithm seems to be sensitive to first guess e.g. a large smooth_window will give an error in the results.
keyword arguments: y_axis -- A list containing the signal over which to find peaks
- x_axis -- A x-axis whose values correspond to the y_axis list
and is used in the return to specify the position of the peaks. If omitted an index of the y_axis is used. (default: None)
- fit_window -- Number of points around the approximate zero crossing that
should be used when fitting the sine wave. Must be small enough that no other zero crossing will be seen. If set to none then the mean distance between zero crossings will be used (default: None)
- smooth_window -- the dimension of the smoothing window; should be an odd
integer (default: 11)
return: A list containing the positions of all the zero crossings.
16.1.18. pysisyphus.plot module
- pysisyphus.plot.CDD_PNG_FNS = 'cdd_png_fns'
Default to kJ mol⁻¹. DE_LABEL and get_en_conv will be overwritten when run() is executed. Both are still defined here, to make the functions from plot.py importable.
16.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.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.print_header()[source]
Generated from https://asciiartgen.now.sh/?s=pysisyphus&style=colossal
- pysisyphus.run.run_calculations(geoms, calc_getter, scheduler=None, assert_track=False, run_func=None)[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]
16.1.20. pysisyphus.socket_helper module
16.1.21. pysisyphus.testing module
16.1.22. pysisyphus.thermo module
16.1.23. pysisyphus.trj module
- pysisyphus.trj.dump_geoms(geoms, fn_base, trj_infix='', dump_trj=True, dump_xyz=True, dump_pdb=False, ang=False)[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.
16.1.24. pysisyphus.version module
16.1.25. pysisyphus.xyzloader module
- pysisyphus.xyzloader.parse_xyz_str(xyz_str, with_comment)[source]
Parse a xyz string.
- 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.