MolecularVibrations
__init__(self, molecule, basis, freqs=None, init=None):
Sets up a vibration for a Molecule object over the CoordinateSystem basis
molecule:AbstractMoleculeinit:None | CoordinateSetbasis: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:AbstractMoleculethe new molecule to associate with the vibrations
:returns:MolecularVibrationsa new
MolecularVibrationsbuilt frommol, withbasischanged viabasis.change_mol(mol)and the samefreqs/initasself
@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 | Nonethe vibrational frequencies, or
Noneif neitherselfnorself.basishas 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:intthe number of vibrational modes
displace(self, displacements=None, amt=0.1, n=1, which=0):
Displaces along the vibrational mode specified by which
displacements:Anyamt:Anyn:Anywhich:Any:returns:_
visualize(self, step_size=5, steps=(2, 2), which=0, anim_opts=None, mode='fast', **plot_args):
step_size:Anysteps:Anywhich:Anyanim_opts:Anymode:Anyplot_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 | Nonethe constructed
JHTML.Divwidget, orNoneif a widget was already built and cached inself._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:strstring of the form
ClassName(basis, molecule)