sc::MolecularCoor(3)
โจ sc::MolecularCoor(3) โจ โ the manual for the MPQC vibes
Okay so bestie, welcome to the sc::MolecularCoor(3) page ๐
this is the MPQC manual, and we're about to get into the abstract class that literally describes the coordinate system used to describe a molecule. No cap, it's giving main character energy for all your molecular geometry needs ๐ง
๐ฆ SYNOPSIS ๐ฆ
#include <coor.h>
It inherits from sc::SavableState (so it's savable, periodt ๐พ). And it gets inherited by sc::CartMolecularCoor and sc::IntMolecularCoor โ slay, the family tree is thriving ๐
๐ธ DESCRIPTION ๐ธ
The sc::MolecularCoor abstract class describes the coordinate system used to describe a molecule. That's the whole vibe. It's used to convert a molecule's cartesian coordinates to and from this coordinate system โ so it's like the translator between your fave coordinate world and cartesian reality, and honestly? We love a bilingual icon ๐ซถ
๐ OPTIONS ๐
Okay so these are the KeyVal constructor keywords โ the little settings you can pass in via const Ref< KeyVal > &, iykwim ๐
moleculeโ aMoleculeobject. There is no default โ so you literally have to give it one, bestie, no skipping ๐debugโ an integer which, if nonzero, will cause extra output. So if you're nosy like me, set it and watch the tea spill โmatrixkitโ aSCMatrixKitobject. It is usually unnecessary to give this keyword โ so like, don't stress about it ๐natom3โ anSCDimensionobject for the dimension of the vector of cartesian coordinates. It is usually unnecessary to give this keyword โ again, optional, no pressure ๐ฆ
๐ PUBLIC MEMBER FUNCTIONS ๐
Here's the full roster, bestie โ every single one, no skips โจ
MolecularCoor (Ref< Molecule > &)โ constructor energy, let's go ๐MolecularCoor (StateIn &)โ theStateInconstructor, for when you're restoring from saved state ๐MolecularCoor (const Ref< KeyVal > &)โ theKeyValconstructor (the one with the keywords above, iykyk) ๐void save_data_state (StateOut &)โ saves the base classes (withsave_data_state) and the members in the same order that theStateInCTOR initializes them. It's giving "keep the order, don't mess it up" energy ๐ฆRefSCDimension dim_natom3 ()โ returns a smart reference to anSCDimensionequal to the number of atoms in the molecule times 3. So like, atoms ร 3 = the dimension, math is mathing ๐ขRef< Molecule > molecule () constโ returns the molecule. That's it, that's the function โ short and iconic ๐virtual void print (std::ostream &=ExEnv::out0()) const =0โ print the coordinate. Pure virtual, so the derived classes have to bring it to life ๐จ๏ธvirtual void print_simples (std::ostream &=ExEnv::out0()) const =0โ also pure virtual, no default body โ the derived classes better handle it ๐virtual RefSCDimension dim ()=0โ returns a smart reference to anSCDimensionequal to the number of coordinates (be they Cartesian, internal, or whatever) that are being optimized. Whatever the vibe, it counts them ๐int to_cartesian (const RefSCVector &internal)โ given a set of displaced internal coordinates, updates the cartesian coordinates of theMoleculecontained herein. Note: it does not change the vectorinternalโ so don't expect it to mutate your input, bestie ๐ โโ๏ธvirtual int to_cartesian (const Ref< Molecule > &mol, const RefSCVector &internal)=0โ pure virtual, no body, the derived classes take the wheel ๐virtual int to_internal (RefSCVector &internal)=0โ fill in the vectorinternalwith the current internal coordinates. Heads up: this member will update the values of the variable internal coordinates โ ๏ธvirtual int to_cartesian (RefSCVector &cartesian, RefSCVector &internal)=0โ convert the internal coordinate gradients ininternalto Cartesian coordinates and copy these Cartesian coordinate gradients tocartesian. Only the variable internal coordinate gradients are transformed โ so not everything, just the variable ones, periodt ๐virtual int to_internal (RefSCVector &internal, RefSCVector &cartesian)=0โ convert the Cartesian coordinate gradients incartesianto internal coordinates and copy these internal coordinate gradients tointernal. Only the variable internal coordinate gradients are calculated ๐virtual int to_cartesian (RefSymmSCMatrix &cartesian, RefSymmSCMatrix &internal)=0โ convert the internal coordinate Hessianinternalto Cartesian coordinates and copy the result tocartesian. Only the variable internal coordinate force constants are transformed โ again, just the variable ones ๐งฎvirtual int to_internal (RefSymmSCMatrix &internal, RefSymmSCMatrix &cartesian)=0โ convert the Cartesian coordinate Hessiancartesianto internal coordinates and copy the result tointernal. Only the variable internal coordinate force constants are calculated ๐virtual void guess_hessian (RefSymmSCMatrix &hessian)=0โ calculate an approximate hessian and place the result inhessian. It's a guess, but make it a good one ๐คvirtual RefSymmSCMatrix inverse_hessian (RefSymmSCMatrix &)=0โ given a Hessian, return the inverse of that hessian. For singular matrices this should return the generalized inverse โ so like, even when it's singular, it's still got you ๐ซถvirtual int nconstrained ()โ returns the number of constrained coordinates. Count them, bestie ๐ขvirtual Ref< NonlinearTransform > change_coordinates ()โ when this is called,MoleculeCoormay select a new internal coordinate system and return a transform to it. The default action is to not change anything and return anIdentityTransformโ so it's giving "no changes, I'm comfy" energy ๐Ref< SCMatrixKit > matrixkit () constโ returns the matrix kit, cute and simple ๐
๐ PROTECTED ATTRIBUTES ๐
These are the protected besties โ not for everyone, just the class and its derivatives ๐
Ref< Molecule > molecule_RefSCDimension dnatom3_Ref< SCMatrixKit > matrixkit_int debug_
๐ MEMBER FUNCTION DETAILS (the deep lore) ๐
Okay so now we're getting into the detailed descriptions โ this is where the real tea is โ
๐ฆ virtual Ref<NonlinearTransform> sc::MolecularCoor::change_coordinates () [virtual]
When this is called, MoleculeCoor may select a new internal coordinate system and return a transform to it. The default action is to not change anything and return an IdentityTransform โ so yeah, it's the "I'm not changing, I'm iconic as I am" function ๐
Reimplemented in sc::SymmMolecularCoor โ so that one's got its own take on it ๐ซ
๐ธ virtual RefSymmSCMatrix sc::MolecularCoor::inverse_hessian (RefSymmSCMatrix &) [pure virtual]
Given a Hessian, return the inverse of that hessian. For singular matrices this should return the generalized inverse โ so even when the math says "nope, singular", it's still got a generalized inverse for you, bestie ๐ซถ
Implemented in sc::CartMolecularCoor, sc::RedundMolecularCoor, and sc::SymmMolecularCoor โ the whole squad showed up ๐
๐ void sc::MolecularCoor::save_data_state (StateOut &) [virtual]
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. This must be implemented by the derived class if the class has data โ so like, no skipping, it's mandatory ๐
โโ๏ธ
Reimplemented from sc::SavableState.
Reimplemented in sc::CartMolecularCoor, sc::RedundMolecularCoor, sc::SymmMolecularCoor, and sc::IntMolecularCoor โ slay, the whole crew ๐
๐ง int sc::MolecularCoor::to_cartesian (const RefSCVector & internal)
Given a set of displaced internal coordinates, update the cartesian coordinates of the Molecule contained herein. This function does not change the vector internal โ so your input stays untouched, periodt ๐
โโ๏ธ
๐ฅ virtual int sc::MolecularCoor::to_cartesian (RefSCVector & cartesian, RefSCVector & internal) [pure virtual]
Convert the internal coordinate gradients in internal to Cartesian coordinates and copy these Cartesian coordinate gradients to cartesian. Only the variable internal coordinate gradients are transformed โ so not all of them, just the variable ones, iykyk ๐
Implemented in sc::CartMolecularCoor, and sc::IntMolecularCoor.
โญ virtual int sc::MolecularCoor::to_cartesian (RefSymmSCMatrix & cartesian, RefSymmSCMatrix & internal) [pure virtual]
Convert the internal coordinate Hessian internal to Cartesian coordinates and copy the result to cartesian. Only the variable internal coordinate force constants are transformed โ again, just the variable ones ๐งฎ
Implemented in sc::CartMolecularCoor, and sc::IntMolecularCoor.
๐ virtual int sc::MolecularCoor::to_internal (RefSCVector & internal) [pure virtual]
Fill in the vector internal with the current internal coordinates. Note that this member will update the values of the variable internal coordinates โ so yeah, it changes things, be aware โ ๏ธ
Implemented in sc::CartMolecularCoor, and sc::IntMolecularCoor.
๐ virtual int sc::MolecularCoor::to_internal (RefSCVector & internal, RefSCVector & cartesian) [pure virtual]
Convert the Cartesian coordinate gradients in cartesian to internal coordinates and copy these internal coordinate gradients to internal. Only the variable internal coordinate gradients are calculated ๐
Implemented in sc::CartMolecularCoor, and sc::IntMolecularCoor.
๐ virtual int sc::MolecularCoor::to_internal (RefSymmSCMatrix & internal, RefSymmSCMatrix & cartesian) [pure virtual]
Convert the Cartesian coordinate Hessian cartesian to internal coordinates and copy the result to internal. Only the variable internal coordinate force constants are calculated ๐
Implemented in sc::CartMolecularCoor, and sc::IntMolecularCoor.
๐ AUTHOR & SIGN-OFF ๐
Generated automatically by Doxygen for MPQC from the source code โ so like, the robots wrote this one, not me, but I'm just here to make it cute ๐
MPQC Version 2.3.1 โ dated Sun Oct 4 2020.
And that's the whole page, bestie! Go forth and coordinate your molecules, periodt ๐ โจ๐ฆ
๐ฆ where this page comes from
- ubuntu jammy: libsc-doc 2.3.1-21
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms