|
occ
|
S-functions for multipole interaction evaluation. More...
#include <sfunctions.h>
Classes | |
| struct | SFunctionResult |
Public Member Functions | |
| SFunctions (int max_rank=4) | |
| Constructor. | |
| void | set_coordinates (const Vec3 &ra, const Vec3 &rb) |
| Set the coordinate system. | |
| void | set_coordinate_system (const CoordinateSystem &coords) |
| Set the coordinate system directly. | |
| const CoordinateSystem & | coordinate_system () const |
| Get the current coordinate system. | |
| SFunctions | swap_sites () const |
| Create a new SFunctions object with swapped site coordinates. | |
| void | compute_with_swap (int t1, int t2, int j, int level, SFunctionResult &result, bool swap) const |
| Compute S-function with automatic coordinate swapping. | |
| SFunctionResult | compute_s_function (int t1, int t2, int j, int level=0) const |
| Compute S-function for given multipole indices. | |
| std::vector< SFunctionResult > | compute_s_functions (const std::vector< std::tuple< int, int, int > > &indices, int level=0) const |
| Compute multiple S-functions in batch. | |
| std::pair< int, int > | index_to_lm (int index) const |
| Convert linear multipole index to (l,m) quantum numbers. | |
| double | rax () const |
| double | ray () const |
| double | raz () const |
| double | rbx () const |
| double | rby () const |
| double | rbz () const |
| double | r () const |
| double | raw_rax () const |
| double | raw_ray () const |
| double | raw_raz () const |
| double | raw_rbx () const |
| double | raw_rby () const |
| double | raw_rbz () const |
| double | dx () const |
| double | dy () const |
| double | dz () const |
| double | cxx () const |
| double | cxy () const |
| double | cxz () const |
| double | cyx () const |
| double | cyy () const |
| double | cyz () const |
| double | czx () const |
| double | czy () const |
| double | czz () const |
Static Public Attributes | |
| static constexpr int | MAX_S_FUNCTIONS = 400 |
| static constexpr int | NUM_FIRST_DERIVS = 15 |
| static constexpr int | NUM_SECOND_DERIVS = 120 |
| static constexpr int | S1_CXX = 6 |
| static constexpr int | S1_CXY = 7 |
| static constexpr int | S1_CXZ = 8 |
| static constexpr int | S1_CYX = 9 |
| static constexpr int | S1_CYY = 10 |
| static constexpr int | S1_CYZ = 11 |
| static constexpr int | S1_CZX = 12 |
| static constexpr int | S1_CZY = 13 |
| static constexpr int | S1_CZZ = 14 |
S-functions for multipole interaction evaluation.
This class computes the S-functions used in multipole electrostatic interactions, following the formulation used in Orient.
The S-functions represent the geometric part of multipole interactions for different combinations of multipole ranks and orientations.
Coordinate system:
S-function notation: S(t1, t2, j)
|
explicit |
Constructor.
| max_rank | Maximum multipole rank to handle |
| SFunctionResult occ::mults::SFunctions::compute_s_function | ( | int | t1, |
| int | t2, | ||
| int | j, | ||
| int | level = 0 |
||
| ) | const |
Compute S-function for given multipole indices.
| t1 | Multipole index for site A |
| t2 | Multipole index for site B |
| j | Combined rank parameter |
| level | Derivative level (0=value only, 1=first derivs, 2=second derivs) |
| std::vector< SFunctionResult > occ::mults::SFunctions::compute_s_functions | ( | const std::vector< std::tuple< int, int, int > > & | indices, |
| int | level = 0 |
||
| ) | const |
Compute multiple S-functions in batch.
| indices | Vector of (t1, t2, j) triplets |
| level | Derivative level |
| void occ::mults::SFunctions::compute_with_swap | ( | int | t1, |
| int | t2, | ||
| int | j, | ||
| int | level, | ||
| SFunctionResult & | result, | ||
| bool | swap | ||
| ) | const |
Compute S-function with automatic coordinate swapping.
This helper method automatically handles coordinate swapping when needed. If swap=true, it creates a swapped SFunctions object and computes S(t2, t1) instead of S(t1, t2), effectively reusing kernels for reverse orderings.
| t1 | First multipole index |
| t2 | Second multipole index |
| j | Combined angular momentum |
| level | Derivative level (0=S0, 1=S0+S1, 2=S0+S1+S2) |
| result | Output result structure |
| swap | If true, swap coordinates and call S(t2, t1) |
|
inline |
Get the current coordinate system.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| std::pair< int, int > occ::mults::SFunctions::index_to_lm | ( | int | index | ) | const |
Convert linear multipole index to (l,m) quantum numbers.
| index | Linear index |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void occ::mults::SFunctions::set_coordinate_system | ( | const CoordinateSystem & | coords | ) |
Set the coordinate system directly.
| coords | CoordinateSystem (may include body-frame transformations) |
Set the coordinate system.
| ra | Position of site A |
| rb | Position of site B |
| SFunctions occ::mults::SFunctions::swap_sites | ( | ) | const |
Create a new SFunctions object with swapped site coordinates.
Returns a new SFunctions where site A and site B are swapped. This is used to compute S(t1@A, t2@B) as S(t2@B', t1@A') where A' and B' are the swapped positions.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |