kups.potential.common.rigid_body_composition
¶
Inputs for energy terms that depend only on rigid-body counts.
RigidBodyComposition
dataclass
¶
Rigid templates and counts for energy terms independent of body poses.
Templates fix internal geometry and particle properties; flexible internal motion is unsupported. Translation, rotation and reinsertion preserve the coefficients. Rebuild after changing templates, background, parameters or cells.
counts supplies one row per system, starting with a constant 1 for the
background, followed by template counts. fixed_system masks out mobile
particles in the initial state. Each potential prepares its own coefficients.
Source code in src/kups/potential/common/rigid_body_composition.py
potential(coefficients, gradients, hessian_lens, cache, patch_idx_view)
¶
Use ordinary potential machinery for a linear or quadratic count sum.
Source code in src/kups/potential/common/rigid_body_composition.py
sum_particles(fixed_values, template_values)
¶
Sum particle properties into background and template coefficients.