|
occ
|
Projection matrix for removing rigid-body modes from optimization. More...
#include <optimization_projection.h>
Public Member Functions | |
| RigidBodyProjection (size_t n_molecules) | |
| Construct projection for N rigid bodies. | |
| size_t | full_dof () const |
| Get number of original degrees of freedom (6N) | |
| size_t | projected_dof () const |
| Get number of projected degrees of freedom (6N-6) | |
| Vec | project_gradient (const Vec &grad_full) const |
| Project full gradient to reduced space. | |
| Vec | reconstruct_full (const Vec &x_proj, const Vec &x_base) const |
| Reconstruct full coordinates from projected coordinates. | |
| Vec | project_coordinates (const Vec &x_full, const Vec &x_base) const |
| Project full coordinates to reduced space. | |
| const Mat & | projection_matrix () const |
| Get projection matrix (for debugging/analysis) | |
Projection matrix for removing rigid-body modes from optimization.
For a system of N rigid bodies with 6N degrees of freedom (3 position + 3 orientation each), there are 6 spurious modes corresponding to global translation (3) and global rotation (3). These cause the Hessian to have 6 zero eigenvalues, leading to divergence in optimization.
Orient's approach (BUILDO routine):
For 2 molecules (N=2):
|
explicit |
Construct projection for N rigid bodies.
| n_molecules | Number of rigid bodies |
|
inline |
Get number of original degrees of freedom (6N)
| Vec occ::mults::RigidBodyProjection::project_coordinates | ( | const Vec & | x_full, |
| const Vec & | x_base | ||
| ) | const |
Project full coordinates to reduced space.
Given full coordinates, project to (6N-6) space relative to base: x_proj = P^T * (x_full - x_base)
| x_full | Coordinates in full 6N space |
| x_base | Base configuration |
Project full gradient to reduced space.
For optimization, we need: grad_proj = P^T * grad_full This removes components corresponding to global translation/rotation.
| grad_full | Gradient in full 6N space |
|
inline |
Get number of projected degrees of freedom (6N-6)
|
inline |
Get projection matrix (for debugging/analysis)
| Vec occ::mults::RigidBodyProjection::reconstruct_full | ( | const Vec & | x_proj, |
| const Vec & | x_base | ||
| ) | const |
Reconstruct full coordinates from projected coordinates.
Given projected coordinates x_proj in (6N-6) space, reconstruct full coordinates: x_full = x_base + P * x_proj
| x_proj | Coordinates in (6N-6) projected space |
| x_base | Base configuration (typically initial geometry) |