sc::MolecularCoor(3)

๐Ÿ“ฆ
version 2.3.1 ยท 5 versions
, in ubuntu jammy

โœจ 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 โ€” a Molecule object. 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 โ€” a SCMatrixKit object. It is usually unnecessary to give this keyword โ€” so like, don't stress about it ๐Ÿ’…
  • natom3 โ€” an SCDimension object 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 &) โ€” the StateIn constructor, for when you're restoring from saved state ๐ŸŽ€
  • MolecularCoor (const Ref< KeyVal > &) โ€” the KeyVal constructor (the one with the keywords above, iykyk) ๐Ÿ”‘
  • void save_data_state (StateOut &) โ€” saves the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. It's giving "keep the order, don't mess it up" energy ๐Ÿ“ฆ
  • RefSCDimension dim_natom3 () โ€” returns a smart reference to an SCDimension equal 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 an SCDimension equal 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 the Molecule contained herein. Note: it does not change the vector internal โ€” 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 vector internal with 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 in internal to Cartesian coordinates and copy these Cartesian coordinate gradients to cartesian. 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 in cartesian to internal coordinates and copy these internal coordinate gradients to internal. Only the variable internal coordinate gradients are calculated ๐Ÿ”
  • virtual int to_cartesian (RefSymmSCMatrix &cartesian, RefSymmSCMatrix &internal)=0 โ€” 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 ๐Ÿงฎ
  • virtual int to_internal (RefSymmSCMatrix &internal, RefSymmSCMatrix &cartesian)=0 โ€” convert the Cartesian coordinate Hessian cartesian to internal coordinates and copy the result to internal. Only the variable internal coordinate force constants are calculated ๐Ÿ”„
  • virtual void guess_hessian (RefSymmSCMatrix &hessian)=0 โ€” calculate an approximate hessian and place the result in hessian. 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, 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 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