.. index:: pair: class; gpr::geometry::InternalCoordinateSet .. _doxid-classgpr_1_1geometry_1_1_internal_coordinate_set: class gpr::geometry::InternalCoordinateSet ========================================== .. toctree:: :hidden: struct_gpr_geometry_InternalCoordinateSet_RetractionReport.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class InternalCoordinateSet { public: // structs struct :ref:`RetractionReport`; // construction :target:`InternalCoordinateSet`(int n_atoms, std::vector moving_atoms, std::vector<:ref:`PrimitiveInternal`> primitives, std::array cell = {}); // methods bool :ref:`hasSameDefinition`(const :ref:`InternalCoordinateSet`& other) const; int :target:`numAtoms`() const; const std::vector& :target:`movingAtoms`() const; const std::vector<:ref:`PrimitiveInternal`>& :target:`primitives`() const; const std::vector& :target:`activeColumns`() const; const std::array& :target:`cell`() const; Eigen::VectorXd :target:`values`(const Eigen::VectorXd& positions) const; Eigen::MatrixXd :target:`jacobian`(const Eigen::VectorXd& positions) const; Eigen::MatrixXd :ref:`directionalJacobian`(const Eigen::VectorXd& positions, const Eigen::VectorXd& direction) const; Eigen::MatrixXd :target:`activeJacobian`(const Eigen::VectorXd& positions) const; Eigen::VectorXd :target:`activeStep`(const Eigen::VectorXd& full_step) const; Eigen::VectorXd :ref:`linearizedChange`(const Eigen::VectorXd& positions, const Eigen::VectorXd& direction) const; :ref:`RetractionReport` :ref:`retractLinearizedReport`(const Eigen::VectorXd& positions, const Eigen::VectorXd& cartesian_step) const; Eigen::VectorXd :target:`retractLinearized`(const Eigen::VectorXd& positions, const Eigen::VectorXd& cartesian_step) const; }; .. _details-classgpr_1_1geometry_1_1_internal_coordinate_set: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; hasSameDefinition .. _doxid-classgpr_1_1geometry_1_1_internal_coordinate_set_1af904fafbe773032c6ec8a916731350eb: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool hasSameDefinition(const :ref:`InternalCoordinateSet`& other) const Exact coordinate definition, including primitive order and bend axes. Equal definitions share a chart at the same Cartesian anchor. .. index:: pair: function; directionalJacobian .. _doxid-classgpr_1_1geometry_1_1_internal_coordinate_set_1a27b1fe41b2897a0063fe299f6e6b1dfe: .. ref-code-block:: cpp :class: doxyrest-title-code-block Eigen::MatrixXd directionalJacobian(const Eigen::VectorXd& positions, const Eigen::VectorXd& direction) const Derivative of jacobian(positions) along a Cartesian direction, exact by forward-over-forward AutoDiff of each primitive. Throws :ref:`UndefinedInternalCoordinate ` where a primitive has no curvature, including a valence angle at collinearity. .. index:: pair: function; linearizedChange .. _doxid-classgpr_1_1geometry_1_1_internal_coordinate_set_1a40d0e32b420e43b1adacab31639286a5: .. ref-code-block:: cpp :class: doxyrest-title-code-block Eigen::VectorXd linearizedChange(const Eigen::VectorXd& positions, const Eigen::VectorXd& direction) const Primitive changes B \* direction without forming the dense Wilson matrix. Rows are the primitive order of this set. .. index:: pair: function; retractLinearizedReport .. _doxid-classgpr_1_1geometry_1_1_internal_coordinate_set_1a141f28818e35ebc049ad973ac153e328: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`RetractionReport` retractLinearizedReport(const Eigen::VectorXd& positions, const Eigen::VectorXd& cartesian_step) const Gauss-Newton retraction onto the linearized internal-coordinate target. Retracted requires an accepted step whose residual improved, a constraint residual within tolerance, or least-squares stationarity of a usable Jacobian. A correction below the coordinate resolution does not succeed on its own. That resolution is the spread of the involved atoms about their centroid, so a translation of the molecule does not change it. An undefined primitive gradient fails the retraction. Redundant primitives make the linearized target inconsistent, so the residual floor is generally far above epsilon and stationarity of a usable Jacobian ends the iteration. The anchor row space comes from the chart's sparse QR and compact-R SVD. A wide Wilson matrix refines the unresolved tail of B^T B with that SVD, because a left-looking QR of the Gabriel complex does not fit the retraction budget. Rows below the dense retraction's relative cutoff stay in the reported rank and are not inverted.