Expand description
Geometric constraint system for molecular optimization.
This module provides geometric constraints for MECP calculations.
Enumsยง
- Constraint
- Represents a geometric constraint that can be applied during optimization.
- Constraint
Error - Error type for constraint-related operations.
Functionsยง
- add_
constraint_ lagrange - Applies constraint forces using the Lagrange multiplier method.
- build_
constraint_ jacobian - Builds the constraint Jacobian matrix (C). Each row is the gradient of a single constraint (โgแตข). Dimensions: (num_constraints, 3 * num_atoms)
- calculate_
angle_ ๐gradient - calculate_
bond_ ๐angle - Calculates the current bond angle between three atoms.
- calculate_
bond_ ๐distance - Calculates the current bond distance between two atoms.
- calculate_
bond_ ๐gradient - calculate_
dihedral - Calculate the dihedral angle between four atoms in radians.
- calculate_
dihedral_ gradient - Calculate the analytical gradient of a dihedral angle with respect to atomic coordinates.
- cross_
product ๐ - Helper function to compute cross product of two 3D vectors.
- dot_
product ๐ - Helper function to compute dot product of two 3D vectors.
- evaluate_
constraints - Calculates the current value of each constraint. A positive value means the constraint is violated (e.g., bond is too long).
- report_
constraint_ status - Reports the current status of all constraints during optimization.
- validate_
constraints - Validates constraint specifications for correctness.