occ
|
fundamental functionality for linear algebra, utilities, molecules and more More...
Namespaces | |
namespace | charges |
namespace | diis |
namespace | graph |
namespace | linalg |
namespace | numpy |
namespace | opt |
namespace | rotor |
Classes | |
struct | Atom |
Class representing and holding data for an Atom in 3D space. More... | |
class | Combinations |
Class to generate all possible combinations of a integers. More... | |
struct | ConditioningOrthogonalizerResult |
class | Dimer |
Storage class for relevant information of a dimer (pair) of Molecule objects. More... | |
class | ElasticTensor |
Class for computation of properties based on an elasticity tensor. More... | |
class | Element |
Utility class representing and holding data for a chemical element. More... | |
class | EnergyComponents |
Storage class for components of energy, separated by the dot character. More... | |
class | Fraction |
Class representing and holding data a rational number i.e. More... | |
struct | GenSqrtInvResult |
class | Interpolator1D |
Class for interpolating one-dimensional functions. More... | |
struct | KalmanEstimator |
class | MolecularAxisCalculator |
Molecular axis calculator class. More... | |
struct | MolecularAxisResult |
Structure to hold molecular axis calculation results. More... | |
class | MolecularPointGroup |
Storage class for a point group describing a Molecule. More... | |
class | Molecule |
Storage class for relevant information of a Molecule. More... | |
struct | Multipole |
Templated storage class for Multipole expansions. More... | |
struct | NeighcrysAxisInfo |
Structure for neighcrys-compatible axis file information. More... | |
class | PointCharge |
class | ProgressTracker |
struct | SymmetryMappingResult |
Result of attempting a transformation with grouped permutations. More... | |
struct | SymOp |
Structure/utility class for a point group symmetry operation. More... | |
struct | TerminalSize |
Typedefs | |
template<typename NumericType > | |
using | KDTree = nanoflann::KDTreeEigenMatrixAdaptor< Eigen::Matrix< NumericType, 3, Eigen::Dynamic >, 3, nanoflann::metric_L2, false > |
Enumerations | |
enum | DomainMapping { Linear , SquareRoot , Log } |
An enum to specify the mapping of the domain of inputs for interpolation. More... | |
enum class | AxisMethod { None , Neighcrys , PCA , MOI } |
Enumeration of molecular axis calculation methods. More... | |
enum class | PointGroup { C1 , Ci , Cs , C2 , C3 , C4 , C5 , C6 , C8 , Coov , Dooh , C2v , C3v , C4v , C5v , C6v , C2h , C3h , C4h , C5h , C6h , D2 , D3 , D4 , D5 , D6 , D7 , D8 , D2h , D3h , D4h , D5h , D6h , D7h , D8h , D2d , D3d , D4d , D5d , D6d , D7d , D8d , S4 , S6 , S8 , T , Td , Th , O , Oh , I , Ih } |
enum class | MirrorType { None , H , D , V } |
Functions | |
bool | operator== (const Atom &atom1, const Atom &atom2) |
returns true if two Atoms have the same element and are at the exact same point in space | |
template<typename AtomIterator > | |
void | rotate_atoms (AtomIterator &atoms, const Mat3 &rotation) |
Rotate a range of atoms about the origin. | |
template<typename AtomIterator > | |
void | translate_atoms (AtomIterator &atoms, const Vec3 &translation) |
translate a range of atoms | |
void | set_bond_tolerance (float t) |
double | get_bond_tolerance () |
ConditioningOrthogonalizerResult | conditioning_orthogonalizer (Eigen::Ref< const Mat >, double) |
std::string | chemical_formula (const std::vector< Element > &elements) |
The chemical formula of a given std::vector of Elements e.g. | |
GenSqrtInvResult | gensqrtinv (Eigen::Ref< const Mat >, bool symmetric=false, double max_condition_number=1e8) |
Mat3 | inertia_tensor (Eigen::Ref< const Vec > masses, Eigen::Ref< const Mat3N > positions) |
template<typename T > | |
OCC_ALWAYS_INLINE T | lerp (T v0, T v1, T t) |
std::pair< Mat, Mat > | meshgrid (const Vec &, const Vec &) |
SymmetryMappingResult | try_transformation_with_grouped_permutations (const IVec &labels_A, const Mat3N &positions_A, const IVec &labels_B, const Mat3N &positions_B, const Mat3 &transformation, double rmsd_threshold=1e-3) |
Attempts to find a transformation mapping from one set of atoms to another using grouped permutations based on provided labels. | |
void | label_molecules_by_chemical_formula (std::vector< occ::core::Molecule > &molecules) |
constexpr unsigned int | num_unique_multipole_components (int L) |
The number of unique multipole components for a given angular momentum. | |
constexpr unsigned int | num_multipole_components_tensor (int L) |
The number of tensor multipole components for a given angular momentum. | |
constexpr unsigned int | total_num_multipole_components (int L) |
The total number of unique multipole components up to and including a given angular momentum. | |
std::vector< PointCharge > | make_point_charges (const std::vector< Atom > &atoms) |
constexpr unsigned int | num_multipole_components (unsigned int order) |
template<unsigned int order = 0> | |
auto | compute_multipoles (const std::vector< PointCharge > &charges, const Vec3 &origin=Vec3::Zero()) |
PointGroup | dihedral_group (int, MirrorType) |
PointGroup | cyclic_group (int, MirrorType) |
Mat | quasirandom_kgf (size_t ndims, size_t count, size_t seed=0) |
Generate an D dimensional Korobov type quasi-random vector based on the generalized Fibonacci sequence. | |
void | to_json (nlohmann::json &j, const Molecule &) |
void | from_json (const nlohmann::json &j, Molecule &) |
Variables | |
double | covalent_bond_tolerance = 0.4 |
constexpr size_t | max_leaf = 10 |
constexpr std::array< const char *, 35 > | multipole_component_names |
The names of multipole components in order. | |
fundamental functionality for linear algebra, utilities, molecules and more
No dependencies on other modules in occ
using occ::core::KDTree = typedef nanoflann::KDTreeEigenMatrixAdaptor< Eigen::Matrix<NumericType, 3, Eigen::Dynamic>, 3, nanoflann::metric_L2, false> |
|
strong |
An enum to specify the mapping of the domain of inputs for interpolation.
Can help improve precision of linear interpolation while minimizing number of points.
Enumerator | |
---|---|
Linear | The typical f(x) mapping. |
SquareRoot | Make f a function of x^2 -> f(x*x) mapping. |
Log | Make f a function of e^x -> f(e^x) mapping. |
|
strong |
|
strong |
std::string occ::core::chemical_formula | ( | const std::vector< Element > & | elements | ) |
The chemical formula of a given std::vector of Elements e.g.
"H2O"
The result is in plain ASCII characters (i.e. no subscripts) and elements with a count of 1 the number suffix is omitted. i.e. H2O
not H2O1
elements | a std::vector of Elements used to calculate the chemical formula |
|
inline |
ConditioningOrthogonalizerResult occ::core::conditioning_orthogonalizer | ( | Eigen::Ref< const Mat > | , |
double | |||
) |
PointGroup occ::core::cyclic_group | ( | int | , |
MirrorType | |||
) |
PointGroup occ::core::dihedral_group | ( | int | , |
MirrorType | |||
) |
void occ::core::from_json | ( | const nlohmann::json & | j, |
Molecule & | |||
) |
GenSqrtInvResult occ::core::gensqrtinv | ( | Eigen::Ref< const Mat > | , |
bool | symmetric = false , |
||
double | max_condition_number = 1e8 |
||
) |
|
inline |
Mat3 occ::core::inertia_tensor | ( | Eigen::Ref< const Vec > | masses, |
Eigen::Ref< const Mat3N > | positions | ||
) |
void occ::core::label_molecules_by_chemical_formula | ( | std::vector< occ::core::Molecule > & | molecules | ) |
|
inline |
|
constexpr |
|
inlineconstexpr |
The number of tensor multipole components for a given angular momentum.
L | the angular momentum. |
|
inlineconstexpr |
The number of unique multipole components for a given angular momentum.
L | the angular momentum. |
returns true if two Atoms have the same element and are at the exact same point in space
Mat occ::core::quasirandom_kgf | ( | size_t | ndims, |
size_t | count, | ||
size_t | seed = 0 |
||
) |
Generate an D dimensional Korobov type quasi-random vector based on the generalized Fibonacci sequence.
Based on the R_1, R_2 sequences available here: https://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/
Parameters:
ndims | number of dimensions to sample |
count | the number of points in space to generate |
seed | the seed (offset) into the sequence, default = 0 |
|
inline |
Rotate a range of atoms about the origin.
|
inline |
void occ::core::to_json | ( | nlohmann::json & | j, |
const Molecule & | |||
) |
|
inlineconstexpr |
The total number of unique multipole components up to and including a given angular momentum.
L | the angular momentum. |
|
inline |
translate a range of atoms
SymmetryMappingResult occ::core::try_transformation_with_grouped_permutations | ( | const IVec & | labels_A, |
const Mat3N & | positions_A, | ||
const IVec & | labels_B, | ||
const Mat3N & | positions_B, | ||
const Mat3 & | transformation, | ||
double | rmsd_threshold = 1e-3 |
||
) |
Attempts to find a transformation mapping from one set of atoms to another using grouped permutations based on provided labels.
This function applies the given transformation matrix to positions B and then finds permutations within atom groups to match reference positions A. Groups are formed by the provided labels (e.g., asymmetric unit indices or atomic numbers). The transformed positions are automatically aligned by centroid.
labels_A | The labels for reference atoms (A) |
positions_A | The reference positions (A) to match against |
labels_B | The labels for atoms to transform (B) |
positions_B | The positions (B) to transform and permute |
transformation | The transformation matrix to apply to positions_B |
rmsd_threshold | The RMSD threshold for considering a match (default: 1e-3) |
|
inline |
|
constexpr |
|
inlineconstexpr |
The names of multipole components in order.