occ
Loading...
Searching...
No Matches
occ::mults::CartesianMolecule Struct Reference

Collection of precomputed Cartesian sites for a molecule. More...

#include <cartesian_molecule.h>

Public Member Functions

void update_positions (const Mat3 &rotation, const Vec3 &center, const std::vector< Vec3 > &body_offsets)
 Update lab-frame positions from body-frame offsets + rotation.
 
void update_orientation (const Mat3 &new_rotation, const Vec3 &new_center)
 Update both positions AND multipoles for a new orientation.
 

Static Public Member Functions

static CartesianMolecule from_lab_sites (const std::vector< std::pair< occ::dma::Mult, Vec3 > > &site_data)
 Build from lab-frame site data (multipole + position pairs).
 
static CartesianMolecule from_body_frame (const std::vector< std::pair< occ::dma::Mult, Vec3 > > &body_sites, const Mat3 &rotation, const Vec3 &center)
 Build from body-frame data with rotation and center-of-mass offset.
 
static CartesianMolecule from_body_frame_with_rotation (const std::vector< std::pair< occ::dma::Mult, Vec3 > > &body_sites, const Mat3 &rotation, const Vec3 &center)
 Build from body-frame data, retaining body-frame multipoles for rotation support.
 

Public Attributes

std::vector< CartesianSitesites
 
std::optional< BodyFrameDatabody_data
 Body-frame data for rotation support (optional).
 

Detailed Description

Collection of precomputed Cartesian sites for a molecule.

Caches the spherical-to-Cartesian conversion and effective_rank so they are computed once per molecule rather than once per pair.

Member Function Documentation

◆ from_body_frame()

static CartesianMolecule occ::mults::CartesianMolecule::from_body_frame ( const std::vector< std::pair< occ::dma::Mult, Vec3 > > &  body_sites,
const Mat3 rotation,
const Vec3 center 
)
static

Build from body-frame data with rotation and center-of-mass offset.

Does NOT retain body-frame data (positions only).

Parameters
body_sitesMultipoles and body-frame positions
rotation3x3 rotation matrix (body → lab)
centerLab-frame center of mass

◆ from_body_frame_with_rotation()

static CartesianMolecule occ::mults::CartesianMolecule::from_body_frame_with_rotation ( const std::vector< std::pair< occ::dma::Mult, Vec3 > > &  body_sites,
const Mat3 rotation,
const Vec3 center 
)
static

Build from body-frame data, retaining body-frame multipoles for rotation support.

Both positions AND multipoles are rotated to lab.

Parameters
body_sitesMultipoles (body frame) and body-frame positions
rotation3x3 rotation matrix (body → lab)
centerLab-frame center of mass

◆ from_lab_sites()

static CartesianMolecule occ::mults::CartesianMolecule::from_lab_sites ( const std::vector< std::pair< occ::dma::Mult, Vec3 > > &  site_data)
static

Build from lab-frame site data (multipole + position pairs).

◆ update_orientation()

void occ::mults::CartesianMolecule::update_orientation ( const Mat3 new_rotation,
const Vec3 new_center 
)

Update both positions AND multipoles for a new orientation.

Requires body_data to be set (via from_body_frame_with_rotation).

◆ update_positions()

void occ::mults::CartesianMolecule::update_positions ( const Mat3 rotation,
const Vec3 center,
const std::vector< Vec3 > &  body_offsets 
)

Update lab-frame positions from body-frame offsets + rotation.

This avoids re-converting spherical → Cartesian multipoles; only positions change. The effective_rank is rotation-invariant and remains cached.

Member Data Documentation

◆ body_data

std::optional<BodyFrameData> occ::mults::CartesianMolecule::body_data

Body-frame data for rotation support (optional).

◆ sites

std::vector<CartesianSite> occ::mults::CartesianMolecule::sites

The documentation for this struct was generated from the following file: