17.1.1.7. pysisyphus.intcoords package
17.1.1.7.1. Submodules
17.1.1.7.2. pysisyphus.intcoords.Bend module
17.1.1.7.3. pysisyphus.intcoords.Bend2 module
17.1.1.7.4. pysisyphus.intcoords.BondedFragment module
17.1.1.7.5. pysisyphus.intcoords.Cartesian module
- class pysisyphus.intcoords.Cartesian.CartesianX(*args, **kwargs)[source]
Bases:
Cartesian
- cart_axis = 0
17.1.1.7.6. pysisyphus.intcoords.CartesianCoords module
- class pysisyphus.intcoords.CartesianCoords.CartesianCoords(atoms, coords3d, masses, freeze_atoms=None, *, mass_weighted=False, **kwargs)[source]
Bases:
CoordSys
- property coords: ndarray[Any, dtype[_ScalarType_co]]
Getter for coordinates in this coordinate system.
- property coords3d: ndarray[Any, dtype[_ScalarType_co]]
Getter for 3d Cartesian coordinates.
- property inv_masses_rep_sqrt: ndarray[Any, dtype[_ScalarType_co]]
- property masses: ndarray[Any, dtype[_ScalarType_co]]
- property masses_sqrt: ndarray[Any, dtype[_ScalarType_co]]
- transform_forces(cart_forces)[source]
Transform Cartesian forces to this coordinate system.
- Return type:
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]
- transform_hessian(cart_hessian, int_gradient=None)[source]
Transform Cartesian Hessian to this coordinate system.
- transform_int_step(step, update_constraints=False, pure=False)[source]
Transform step in this coordinate system to Cartesians.
- Return type:
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]
- property typed_prims: List
List of (primitive) internal coordinates.
May be empty, e.g., when the coordinate system is Cartesian.
- class pysisyphus.intcoords.CartesianCoords.MWCartesianCoords(*args, **kwargs)[source]
Bases:
CartesianCoords
17.1.1.7.7. pysisyphus.intcoords.Coords module
- class pysisyphus.intcoords.Coords.CoordSys(*args, **kwargs)[source]
Bases:
Protocol
- abstract property coords: ndarray[Any, dtype[_ScalarType_co]]
Getter for coordinates in this coordinate system.
- abstract property coords3d: ndarray[Any, dtype[_ScalarType_co]]
Getter for 3d Cartesian coordinates.
- abstract project_hessian(hessian)[source]
Project Hessian in the current coordinate system.
- Return type:
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]
- abstract transform_forces(cart_forces)[source]
Transform Cartesian forces to this coordinate system.
- Return type:
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]
- abstract transform_hessian(cart_hessian, int_gradient)[source]
Transform Cartesian Hessian to this coordinate system.
- Return type:
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]
- abstract transform_int_step(step, update_constraints=False, pure=False)[source]
Transform step in this coordinate system to Cartesians.
- Return type:
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]
- abstract property typed_prims: List
List of (primitive) internal coordinates.
May be empty, e.g., when the coordinate system is Cartesian.
17.1.1.7.8. pysisyphus.intcoords.DLC module
- class pysisyphus.intcoords.DLC.DLC(*args, full_set=True, **kwargs)[source]
Bases:
RedundantCoords
- property B
Wilson B-Matrix in the non-redundant subspace.
- property U
- backtransform_hessian(*args, **kwargs)[source]
Transform Hessian in internal coordinates to Cartesians.
- property constraints
- property coords
- freeze_primitives(typed_prims)[source]
Freeze primitive internal coordinates.
- Parameters:
typed_prims (iterable of typed primitives) -- Iterable containing typed_primitives, starting with a PrimType and followed by atom indices.
- get_active_set(B, inv_thresh=None)[source]
See [5] between Eq. (7) and Eq. (8) for advice regarding the threshold.
17.1.1.7.9. pysisyphus.intcoords.DistanceFunction module
17.1.1.7.10. pysisyphus.intcoords.DummyTorsion module
17.1.1.7.11. pysisyphus.intcoords.LinearBend module
17.1.1.7.12. pysisyphus.intcoords.LinearDisplacement module
17.1.1.7.13. pysisyphus.intcoords.OutOfPlane module
- class pysisyphus.intcoords.OutOfPlane.OutOfPlane(indices, periodic=False, calc_kwargs=None, cache=False)[source]
Bases:
Primitive
- [1] https://doi.org/10.1002/(SICI)1096-987X(19990730)20:10<1067::AID-JCC9>3.0.CO;2-V
Lee, 1999
17.1.1.7.14. pysisyphus.intcoords.PrimTypes module
- class pysisyphus.intcoords.PrimTypes.PrimTypes(value)[source]
Bases:
OrderedEnum
An enumeration.
- AUX_BOND = 1
- AUX_INTERFRAG_BOND = 4
- BEND = 5
- BEND2 = 28
- BOND = 0
- BONDED_FRAGMENT = 25
- CARTESIAN = 21
- CARTESIAN_X = 22
- CARTESIAN_Y = 23
- CARTESIAN_Z = 24
- DISTANCE_FUNCTION = 27
- DUMMY_IMPROPER = 30
- DUMMY_TORSION = 26
- HYDROGEN_BOND = 2
- IMPROPER_DIHEDRAL = 9
- INTERFRAG_BOND = 3
- LINEAR_BEND = 6
- LINEAR_BEND_COMPLEMENT = 7
- LINEAR_DISPLACEMENT = 11
- LINEAR_DISPLACEMENT_COMPLEMENT = 12
- OUT_OF_PLANE = 10
- PROPER_DIHEDRAL = 8
- PROPER_DIHEDRAL2 = 29
- ROBUST_TORSION1 = 31
- ROBUST_TORSION2 = 32
- ROTATION = 17
- ROTATION_A = 18
- ROTATION_B = 19
- ROTATION_C = 20
- TRANSLATION = 13
- TRANSLATION_X = 14
- TRANSLATION_Y = 15
- TRANSLATION_Z = 16
- pysisyphus.intcoords.PrimTypes.normalize_prim_input(prim_inp)[source]
Normalize input for define_prims and constrain_prims
The intcoords.RedundantCoords constructor expects lists of integer lists (tuples) for arguments like 'define_prims' and 'constrain_prims'. The first item of every list determines the type of primitive coordinate. Currently there are about 20 different types and it is hard to remember all of them.
So we also allow a more human friendly input, that is normalized here. The most common primitives are:
0: BOND 5: BEND 8: PROPER_DIHEDRAL
This function maps inputs like ["BOND", 1, 2] to [PrimTypes.BOND, 1, 2] etc.
Always returns a list of tuples, as some prim_inps expand to multiple coordinates, e.g., XYZ or ATOM.
17.1.1.7.15. pysisyphus.intcoords.Primitive module
17.1.1.7.16. pysisyphus.intcoords.RedundantCoords module
- class pysisyphus.intcoords.RedundantCoords.HybridRedundantCoords(*args, **kwargs)[source]
Bases:
RedundantCoords
- class pysisyphus.intcoords.RedundantCoords.RedundantCoords(atoms, coords3d, masses=None, bond_factor=1.3, typed_prims=None, define_prims=None, constrain_prims=None, freeze_atoms=None, freeze_atoms_exclude=False, internals_with_frozen=False, define_for=None, bonds_only=False, check_bends=True, rebuild=True, bend_min_deg=15, dihed_max_deg=175, lb_min_deg=175, weighted=False, min_weight=0.3, svd_inv_thresh=0.000316, recalc_B=False, tric=False, hybrid=False, hbond_angles=False, rm_for_frag=None)[source]
Bases:
object
- property B
Wilson B-Matrix
- property B_inv
Generalized inverse of the Wilson B-Matrix.
- property B_inv_prim
Generalized inverse of the primitive Wilson B-Matrix.
- property B_prim
Wilson B-Matrix
- property Bt_inv
Transposed generalized inverse of the Wilson B-Matrix.
- property Bt_inv_prim
Transposed generalized inverse of the primitive Wilson B-Matrix.
- property C
Diagonal matrix. Entries for constraints are set to one.
- property P
Projection matrix onto B. See [1] Eq. (4).
- backtransform_hessian(redund_hessian, int_gradient=None)[source]
Transform Hessian in internal coordinates to Cartesians.
- property bend_atom_indices
- property bend_indices
- property bond_atom_indices
- property bond_indices
- property bond_typed_prims
- property cartesian_indices
- property constrained_indices
- property coords
- property coords3d
- property dihedral_atom_indices
- property dihedral_indices
- property linear_bend_indices
- property outofplane_indices
- property prim_coords
- property prim_indices_set
- property prim_internals
- property primitives
- project_hessian(H, shift=1000)[source]
Expects a hessian in internal coordinates. See Eq. (11) in [1].
- property rotation_indices
- transform_hessian(cart_hessian, int_gradient=None)[source]
Transform Cartesian Hessian to internal coordinates.
- property translation_indices
- property typed_prims
- class pysisyphus.intcoords.RedundantCoords.TRIC(*args, **kwargs)[source]
Bases:
RedundantCoords
17.1.1.7.17. pysisyphus.intcoords.Rotation module
- class pysisyphus.intcoords.Rotation.Rotation(indices, *args, ref_coords3d, **kwargs)[source]
Bases:
Primitive
See (II. Theory) in [1], Eq. (3) - (14)
- index = None
- class pysisyphus.intcoords.Rotation.RotationA(indices, *args, ref_coords3d, **kwargs)[source]
Bases:
Rotation
- index = 0
- class pysisyphus.intcoords.Rotation.RotationB(indices, *args, ref_coords3d, **kwargs)[source]
Bases:
Rotation
- index = 1
17.1.1.7.18. pysisyphus.intcoords.Stretch module
17.1.1.7.19. pysisyphus.intcoords.Torsion module
17.1.1.7.20. pysisyphus.intcoords.Torsion2 module
17.1.1.7.21. pysisyphus.intcoords.Translation module
- class pysisyphus.intcoords.Translation.Translation(*args, **kwargs)[source]
Bases:
Primitive
See (II. Theory) in [1], Eq. (2)
- class pysisyphus.intcoords.Translation.TranslationX(*args, **kwargs)[source]
Bases:
Translation
- cart_axis = 0
- class pysisyphus.intcoords.Translation.TranslationY(*args, **kwargs)[source]
Bases:
Translation
- cart_axis = 1
- class pysisyphus.intcoords.Translation.TranslationZ(*args, **kwargs)[source]
Bases:
Translation
- cart_axis = 2
17.1.1.7.22. pysisyphus.intcoords.augment_bonds module
17.1.1.7.23. pysisyphus.intcoords.derivatives module
- pysisyphus.intcoords.derivatives.d2q_a(m0, m1, m2, o0, o1, o2, n0, n1, n2)[source]
Bend, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.d2q_a2(m0, m1, m2, o0, o1, o2, n0, n1, n2)[source]
Bend2, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.d2q_b(m0, m1, m2, n0, n1, n2)[source]
Stretch, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.d2q_d(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.d2q_d2(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion2, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.d2q_lb(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Bend, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.d2q_ld(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Displacement, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.d2q_oop(m0, m1, m2, n0, n1, n2, o0, o1, o2, p0, p1, p2)[source]
OutOfPlane, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.d2q_rd1(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
RobustTorsion1, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.d2q_rd2(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
RobustTorsion2, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.dq_a(m0, m1, m2, o0, o1, o2, n0, n1, n2)[source]
Bend, first derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.dq_a2(m0, m1, m2, o0, o1, o2, n0, n1, n2)[source]
Bend2, first derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.dq_b(m0, m1, m2, n0, n1, n2)[source]
Stretch, first derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.dq_d(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion, first derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.dq_d2(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion2, first derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.dq_lb(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Bend, first derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.dq_ld(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Displacement, first derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.dq_oop(m0, m1, m2, n0, n1, n2, o0, o1, o2, p0, p1, p2)[source]
OutOfPlane, first derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.dq_rd1(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
RobustTorsion1, first derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.dq_rd2(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
RobustTorsion2, first derivative wrt. Cartesians
- pysisyphus.intcoords.derivatives.q_d(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion
- pysisyphus.intcoords.derivatives.q_d2(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion2
- pysisyphus.intcoords.derivatives.q_lb(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Bend
- pysisyphus.intcoords.derivatives.q_ld(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Displacement
- pysisyphus.intcoords.derivatives.q_oop(m0, m1, m2, n0, n1, n2, o0, o1, o2, p0, p1, p2)[source]
OutOfPlane
17.1.1.7.24. pysisyphus.intcoords.eval module
- pysisyphus.intcoords.eval.augment_primitives(missing_prims, coords3d, prim_indices, fragments)[source]
17.1.1.7.25. pysisyphus.intcoords.exceptions module
- exception pysisyphus.intcoords.exceptions.NeedNewInternalsException(coords3d, *args, invalid_inds=None, invalid_prims=None, **kwargs)[source]
Bases:
Exception
17.1.1.7.26. pysisyphus.intcoords.findiffs module
17.1.1.7.27. pysisyphus.intcoords.generate_derivatives module
- class pysisyphus.intcoords.generate_derivatives.FuncResult(d0, d1, d2, f0, f1, f2)
Bases:
tuple
- d0
Alias for field number 0
- d1
Alias for field number 1
- d2
Alias for field number 2
- f0
Alias for field number 3
- f1
Alias for field number 4
- f2
Alias for field number 5
- pysisyphus.intcoords.generate_derivatives.generate_wilson(generate=None, out_fn='derivatives.py', use_mpmath=False)[source]
17.1.1.7.28. pysisyphus.intcoords.helpers module
- pysisyphus.intcoords.helpers.get_bond_difference(geom1, geom2, bond_factor=1.3)[source]
Return formed and broken bonds when going from geom1 to geom2.
- pysisyphus.intcoords.helpers.get_bond_differences_verbose(geom1, geom2, bond_factor=1.3, key1='geom1', key2='geom2')[source]
- pysisyphus.intcoords.helpers.get_tangent(prims1, prims2, dihedral_inds, normalize=False)[source]
Normalized tangent between primitive internal coordinates.
Tangent pointing from prims1 to prims2 in primitive internal coordinates, taking into account the periodicity of dihedral angles.
- Parameters:
prims1 (np.array) -- 1d-array of primitive internal coordinates in the order (stretches, bends, dihedrals).
prims2 (np.array) -- See prims1.
dihedral_inds (list of int) -- Dihedral indices in prims1 and prims2.
- Returns:
tangent -- 1d array containing the normalized tangent pointing from prims1 to prims2.
- Return type:
np.array
- pysisyphus.intcoords.helpers.get_weighted_bond_mode(weighted_bonds, coords3d, remove_translation=True)[source]
- pysisyphus.intcoords.helpers.get_weighted_bond_mode_getter(target_weighted_bonds, bond_factor=1.2, fractional=False)[source]
Create input for intcoords.helpers.get_weighted_bond_mode.
Compared to the rest of pysisyphus this method uses a slightly lowered bond factor, so it is more strict regarding what is considered a bond and what not.
17.1.1.7.29. pysisyphus.intcoords.mp_derivatives module
- pysisyphus.intcoords.mp_derivatives.d2q_a(m0, m1, m2, o0, o1, o2, n0, n1, n2)[source]
Bend, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.d2q_a2(m0, m1, m2, o0, o1, o2, n0, n1, n2)[source]
Bend2, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.d2q_b(m0, m1, m2, n0, n1, n2)[source]
Stretch, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.d2q_d(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.d2q_d2(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion2, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.d2q_lb(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Bend, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.d2q_ld(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Displacement, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.d2q_oop(m0, m1, m2, n0, n1, n2, o0, o1, o2, p0, p1, p2)[source]
OutOfPlane, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.d2q_rd1(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
RobustTorsion1, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.d2q_rd2(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
RobustTorsion2, 2nd derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.dq_a(m0, m1, m2, o0, o1, o2, n0, n1, n2)[source]
Bend, first derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.dq_a2(m0, m1, m2, o0, o1, o2, n0, n1, n2)[source]
Bend2, first derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.dq_b(m0, m1, m2, n0, n1, n2)[source]
Stretch, first derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.dq_d(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion, first derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.dq_d2(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion2, first derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.dq_lb(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Bend, first derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.dq_ld(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Displacement, first derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.dq_oop(m0, m1, m2, n0, n1, n2, o0, o1, o2, p0, p1, p2)[source]
OutOfPlane, first derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.dq_rd1(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
RobustTorsion1, first derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.dq_rd2(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
RobustTorsion2, first derivative wrt. Cartesians
- pysisyphus.intcoords.mp_derivatives.q_d(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion
- pysisyphus.intcoords.mp_derivatives.q_d2(m0, m1, m2, o0, o1, o2, p0, p1, p2, n0, n1, n2)[source]
Torsion2
- pysisyphus.intcoords.mp_derivatives.q_lb(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Bend
- pysisyphus.intcoords.mp_derivatives.q_ld(m0, m1, m2, o0, o1, o2, n0, n1, n2, p0, p1, p2)[source]
Linear Displacement
- pysisyphus.intcoords.mp_derivatives.q_oop(m0, m1, m2, n0, n1, n2, o0, o1, o2, p0, p1, p2)[source]
OutOfPlane
17.1.1.7.30. pysisyphus.intcoords.setup module
- class pysisyphus.intcoords.setup.CoordInfo(bonds, hydrogen_bonds, interfrag_bonds, aux_interfrag_bonds, bends, linear_bends, linear_bend_complements, proper_dihedrals, improper_dihedrals, translation_inds, rotation_inds, cartesian_inds, typed_prims, fragments)
Bases:
tuple
- aux_interfrag_bonds
Alias for field number 3
- bends
Alias for field number 4
- bonds
Alias for field number 0
- cartesian_inds
Alias for field number 11
- fragments
Alias for field number 13
- hydrogen_bonds
Alias for field number 1
- improper_dihedrals
Alias for field number 8
- interfrag_bonds
Alias for field number 2
- linear_bend_complements
Alias for field number 6
- linear_bends
Alias for field number 5
- proper_dihedrals
Alias for field number 7
- rotation_inds
Alias for field number 10
- translation_inds
Alias for field number 9
- typed_prims
Alias for field number 12
- pysisyphus.intcoords.setup.connect_fragments(cdm, fragments, max_aux=3.78, aux_factor=1.3, logger=None)[source]
Determine the smallest interfragment bond for a list of fragments and a condensed distance matrix. For more than a few fragments this function performs poorly, as each fragment is connected to all reamaining fragments, leading to an explosion of bonds, bends and dihedrals.
- pysisyphus.intcoords.setup.connect_fragments_ahlrichs(cdm, fragments, atoms, min_dist_scale=1.1, scale=1.2, avoid_h=False, avoid_hh=True, logger=None, max_dist=5.669178373877311)[source]
Ahlrich/von Arnim connection scheme.
See II. A in [2] and p. 2082 in [3].
- pysisyphus.intcoords.setup.connect_fragments_kmeans(cdm, fragments, atoms, aux_below_thresh=3.7807, aux_add_dist=2.8356, aux_keep=5, aux_no_hh=True, min_dist_thresh=5.0, min_scale=1.2, logger=None)[source]
Generate (auxiliary) interfragment bonds.
In the a first step, minimum distance interfragment bonds (IFBs) are determined between all possible fragment pairs. Similarly, possible auxiliary IFBs are determined. Candidates for auxiliary IFBs are:
IFB <= aux_below_thresh, default 2 Å IFB <= (minimum distance IFB + aux_add_dist), default 1.5 Å
By default, only the first aux_keep (default = 5) auxiliary IFBs are kept.
Connecting all fragments can lead to bonds between very distant atoms. If more than two fragments are present we cluster the minimum distance IFB distances using KMeans, to determine a reasonable length for valid IFBs. We start out with two clusters and increase the number of cluster until the center of one cluster is around the scaled global minimum distance between the fragments. The center of this cluster is then used as a cutoff vor valid IFBs.
After pruning all possible IFBs we can determine the fragment pairs, that are actually connected. This information is then used to also prune possible interfragment bonds. Only auxiliary IFBs between fragments that are actually connected via IFBs are kept.
- pysisyphus.intcoords.setup.get_bend_inds(coords3d, bond_inds, min_deg, max_deg, logger=None)[source]
- pysisyphus.intcoords.setup.get_bond_sets(atoms, coords3d, bond_factor=1.3, return_cdm=False, return_cbm=False)[source]
I'm sorry, but this function does not return sets, but an int ndarray.
- pysisyphus.intcoords.setup.get_dihedral_inds(coords3d, bond_inds, bend_inds, max_deg, logger=None)[source]
- pysisyphus.intcoords.setup.get_fragments(atoms, coords, bond_inds=None, bond_factor=1.3, ignore_atom_inds=None, ignore_bonds=None, with_unconnected_atoms=False)[source]
This misses unconnected single atoms w/ 'with_unconnected_atoms=False'!
- pysisyphus.intcoords.setup.get_hydrogen_bond_inds_v2(atoms, coords3d, bond_inds, logger=None)[source]
- pysisyphus.intcoords.setup.get_linear_bend_inds(coords3d, cbm, bends, min_deg=175, max_bonds=4, logger=None)[source]
- pysisyphus.intcoords.setup.setup_redundant(atoms, coords3d, factor=1.3, define_prims=None, min_deg=15, dihed_max_deg=175, lb_min_deg=None, lb_max_bonds=4, min_weight=None, tric=False, hybrid=False, interfrag_hbonds=True, hbond_angles=False, freeze_atoms=None, define_for=None, internals_with_frozen=False, rm_for_frag=None, logger=None)[source]
17.1.1.7.31. pysisyphus.intcoords.setup_fast module
- pysisyphus.intcoords.setup_fast.find_bonds(atoms, coords3d, covalent_radii=None, bond_factor=1.3, min_dist=0.1)[source]
- pysisyphus.intcoords.setup_fast.find_bonds_bends(geom, bond_factor=1.3, min_deg=15, max_deg=175)[source]
- pysisyphus.intcoords.setup_fast.find_dihedrals(coords3d, bonds, bends, max_deg, logger=None)[source]
- pysisyphus.intcoords.setup_fast.get_bend_candidates(bonds)[source]
Also yields duplicates [a, b, c] and [c, b, a].
17.1.1.7.32. pysisyphus.intcoords.update module
- pysisyphus.intcoords.update.correct_dihedrals(new_dihedrals, old_dihedrals)[source]
Dihedrals are periodic. Going from -179° to 179° is not a step of 358°, but a step of 2°. By considering the actual distance of the dihedrals from π the correct step can be calculated.
dihedral step length = abs(abs(new_dihedral) - π) + abs(abs(old_dihedral) - π)
or put differently
dihedral step length = abs(abs(new_dihedral - old_dihedral) - 2*π)
The sign is left to be determined. Going from -179° to 179° (roughly π - -π = 2π) is a counter clockwise rotation and the dihedral has to decrease below -π. Going from 179° to -179° (roughly -π - π = -2π) is a clockwise rotation and the dihedral increases abvove π. So the correct sign corresponds to the negative sign of the original difference.
original difference 2π -> dihedral must decrease -> sign = -1 original difference -2π -> dihedral must increase -> sign = +1
Overall, the old dihedral is modified by the actual step length with the correct sign.
- pysisyphus.intcoords.update.transform_int_step(int_step, old_cart_coords, cur_internals, Bt_inv_prim, primitives, typed_prims=None, dihedral_inds=None, rotation_inds=None, bend_inds=None, check_dihedrals=False, check_bends=False, bend_min_deg=15, bend_max_deg=175, freeze_atoms=None, constrained_inds=None, update_constraints=False, cart_rms_thresh=1e-06, Bt_inv_prim_getter=None, max_cycles=25, logger=None)[source]
Transformation is done in primitive internals, so int_step must be given in primitive internals and not in DLC!
17.1.1.7.33. pysisyphus.intcoords.valid module
17.1.1.7.34. Module contents
- class pysisyphus.intcoords.Bend(indices, periodic=False, calc_kwargs=None, cache=False)[source]
Bases:
Primitive
- class pysisyphus.intcoords.Bend2(indices, periodic=False, calc_kwargs=None, cache=False)[source]
Bases:
Bend
- class pysisyphus.intcoords.BondedFragment(indices, bond_indices, **kwargs)[source]
Bases:
Primitive
- class pysisyphus.intcoords.CartesianCoords(atoms, coords3d, masses, freeze_atoms=None, *, mass_weighted=False, **kwargs)[source]
Bases:
CoordSys
- property coords: ndarray[Any, dtype[_ScalarType_co]]
Getter for coordinates in this coordinate system.
- property coords3d: ndarray[Any, dtype[_ScalarType_co]]
Getter for 3d Cartesian coordinates.
- property inv_masses_rep_sqrt: ndarray[Any, dtype[_ScalarType_co]]
- property masses: ndarray[Any, dtype[_ScalarType_co]]
- property masses_sqrt: ndarray[Any, dtype[_ScalarType_co]]
- transform_forces(cart_forces)[source]
Transform Cartesian forces to this coordinate system.
- Return type:
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]
- transform_hessian(cart_hessian, int_gradient=None)[source]
Transform Cartesian Hessian to this coordinate system.
- transform_int_step(step, update_constraints=False, pure=False)[source]
Transform step in this coordinate system to Cartesians.
- Return type:
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]
- property typed_prims: List
List of (primitive) internal coordinates.
May be empty, e.g., when the coordinate system is Cartesian.
- class pysisyphus.intcoords.DLC(*args, full_set=True, **kwargs)[source]
Bases:
RedundantCoords
- property B
Wilson B-Matrix in the non-redundant subspace.
- property U
- backtransform_hessian(*args, **kwargs)[source]
Transform Hessian in internal coordinates to Cartesians.
- property constraints
- property coords
- freeze_primitives(typed_prims)[source]
Freeze primitive internal coordinates.
- Parameters:
typed_prims (iterable of typed primitives) -- Iterable containing typed_primitives, starting with a PrimType and followed by atom indices.
- get_active_set(B, inv_thresh=None)[source]
See [5] between Eq. (7) and Eq. (8) for advice regarding the threshold.
- class pysisyphus.intcoords.DummyImproper(indices, *args, fix_inner=True, **kwargs)[source]
Bases:
Torsion
- class pysisyphus.intcoords.DummyTorsion(indices, *args, fix_inner=True, **kwargs)[source]
Bases:
Torsion
- class pysisyphus.intcoords.HybridRedundantCoords(*args, **kwargs)[source]
Bases:
RedundantCoords
- class pysisyphus.intcoords.LinearDisplacement(*args, complement=False, **kwargs)[source]
Bases:
Primitive
- class pysisyphus.intcoords.MWCartesianCoords(*args, **kwargs)[source]
Bases:
CartesianCoords
- class pysisyphus.intcoords.OutOfPlane(indices, periodic=False, calc_kwargs=None, cache=False)[source]
Bases:
Primitive
- [1] https://doi.org/10.1002/(SICI)1096-987X(19990730)20:10<1067::AID-JCC9>3.0.CO;2-V
Lee, 1999
- exception pysisyphus.intcoords.PrimitiveNotDefinedException(typed_prim, *args, **kwargs)[source]
Bases:
Exception
- class pysisyphus.intcoords.RedundantCoords(atoms, coords3d, masses=None, bond_factor=1.3, typed_prims=None, define_prims=None, constrain_prims=None, freeze_atoms=None, freeze_atoms_exclude=False, internals_with_frozen=False, define_for=None, bonds_only=False, check_bends=True, rebuild=True, bend_min_deg=15, dihed_max_deg=175, lb_min_deg=175, weighted=False, min_weight=0.3, svd_inv_thresh=0.000316, recalc_B=False, tric=False, hybrid=False, hbond_angles=False, rm_for_frag=None)[source]
Bases:
object
- property B
Wilson B-Matrix
- property B_inv
Generalized inverse of the Wilson B-Matrix.
- property B_inv_prim
Generalized inverse of the primitive Wilson B-Matrix.
- property B_prim
Wilson B-Matrix
- property Bt_inv
Transposed generalized inverse of the Wilson B-Matrix.
- property Bt_inv_prim
Transposed generalized inverse of the primitive Wilson B-Matrix.
- property C
Diagonal matrix. Entries for constraints are set to one.
- property P
Projection matrix onto B. See [1] Eq. (4).
- backtransform_hessian(redund_hessian, int_gradient=None)[source]
Transform Hessian in internal coordinates to Cartesians.
- property bend_atom_indices
- property bend_indices
- property bond_atom_indices
- property bond_indices
- property bond_typed_prims
- property cartesian_indices
- property constrained_indices
- property coords
- property coords3d
- property dihedral_atom_indices
- property dihedral_indices
- property linear_bend_indices
- property outofplane_indices
- property prim_coords
- property prim_indices_set
- property prim_internals
- property primitives
- project_hessian(H, shift=1000)[source]
Expects a hessian in internal coordinates. See Eq. (11) in [1].
- property rotation_indices
- transform_hessian(cart_hessian, int_gradient=None)[source]
Transform Cartesian Hessian to internal coordinates.
- property translation_indices
- property typed_prims
- class pysisyphus.intcoords.RobustTorsion1(indices, periodic=False, calc_kwargs=None, cache=False)[source]
Bases:
Primitive
- class pysisyphus.intcoords.RobustTorsion2(indices, periodic=False, calc_kwargs=None, cache=False)[source]
Bases:
Primitive
- class pysisyphus.intcoords.RotationA(indices, *args, ref_coords3d, **kwargs)[source]
Bases:
Rotation
- index = 0
- class pysisyphus.intcoords.RotationB(indices, *args, ref_coords3d, **kwargs)[source]
Bases:
Rotation
- index = 1
- class pysisyphus.intcoords.RotationC(indices, *args, ref_coords3d, **kwargs)[source]
Bases:
Rotation
- index = 2
- class pysisyphus.intcoords.Stretch(indices, periodic=False, calc_kwargs=None, cache=False)[source]
Bases:
Primitive
- class pysisyphus.intcoords.TRIC(*args, **kwargs)[source]
Bases:
RedundantCoords
- class pysisyphus.intcoords.Torsion(indices, periodic=False, calc_kwargs=None, cache=False)[source]
Bases:
Primitive
- class pysisyphus.intcoords.Torsion2(indices, periodic=False, calc_kwargs=None, cache=False)[source]
Bases:
Torsion
- class pysisyphus.intcoords.TranslationX(*args, **kwargs)[source]
Bases:
Translation
- cart_axis = 0
- class pysisyphus.intcoords.TranslationY(*args, **kwargs)[source]
Bases:
Translation
- cart_axis = 1
- class pysisyphus.intcoords.TranslationZ(*args, **kwargs)[source]
Bases:
Translation
- cart_axis = 2