MolecularVibrations

 

__init__(self, molecule, basis, freqs=None, init=None): 

Sets up a vibration for a Molecule object over the CoordinateSystem basis

  • molecule: AbstractMolecule
  • init: None | CoordinateSet
  • basis: MolecularNormalModes

 

change_mol(self, mol): 

LLM Docstring

Rebind this set of vibrations to a different molecule, re-expressing the basis for the new molecule while keeping the same frequencies and reference coordinates.

  • mol: AbstractMolecule

    the new molecule to associate with the vibrations

  • :returns: MolecularVibrations

    a new MolecularVibrations built from mol, with basis changed via basis.change_mol(mol) and the same freqs/init as self

 

@property
basis(self): 

LLM Docstring

Property getter/setter for the underlying vibrational basis (a MolecularNormalModes object) used to describe the vibrations.

  • basis: MolecularNormalModes

    (setter only) the new basis to store

  • :returns: MolecularNormalModes

    (getter) the stored basis

 

@property
molecule(self): 

LLM Docstring

Property getter/setter for the molecule associated with these vibrations. Setting it also propagates the new molecule to self.basis.molecule.

  • mol: AbstractMolecule

    (setter only) the new molecule to associate

  • :returns: AbstractMolecule

    (getter) the stored molecule

 

@property
freqs(self): 

LLM Docstring

Frequencies associated with the vibrations. Returns the explicitly stored frequencies if present; otherwise falls back to self.basis.freqs when the basis defines that attribute.

  • :returns: np.ndarray | None

    the vibrational frequencies, or None if neither self nor self.basis has them

 

@property
coords(self): 
  • :returns: CoordinateSet

 

__len__(self): 

LLM Docstring

Number of vibrational modes, taken from the number of columns of the basis’s mode matrix.

  • :returns: int

    the number of vibrational modes

 

displace(self, displacements=None, amt=0.1, n=1, which=0): 

Displaces along the vibrational mode specified by which

  • displacements: Any
  • amt: Any
  • n: Any
  • which: Any
  • :returns: _

 

visualize(self, step_size=5, steps=(2, 2), which=0, anim_opts=None, mode='fast', **plot_args): 
  • step_size: Any
  • steps: Any
  • which: Any
  • anim_opts: Any
  • mode: Any
  • plot_args: Any
  • :returns: _

 

to_widget(self): 

LLM Docstring

Build (and cache) an interactive Jupyter widget for browsing through the vibrational modes: a menu to select which mode (which), paired with a live display that calls self.visualize for the selected mode.

  • :returns: JHTML.Div | None

    the constructed JHTML.Div widget, or None if a widget was already built and cached in self._widg

 

__getitem__(self, item): 

Takes a slice of the modes

  • item: Any
  • :returns: _

 

embed(self, frame): 
  • frame: MolecularTransformation
  • :returns: _

 

rescale(self, scaling): 

Multiplies each mode by some scaling factor

  • phases: Any
  • :returns: _

 

rotate(self, scaling): 

Multiplies each mode by some scaling factor

  • phases: Any
  • :returns: _

 

__repr__(self): 

LLM Docstring

Debug string representation showing the class name, basis, and molecule.

  • :returns: str

    string of the form ClassName(basis, molecule)


Feedback

Examples

Templates

Documentation