ramannoodle.dynamics

Classes representing atomic motions, for example phonons and trajectories.

class ramannoodle.dynamics.Phonons(ref_positions, wavenumbers, displacements)

Bases: Dynamics

Harmonic lattice vibrations.

A phonon can be represented by a wavenumber and corresponding atomic displacement. The wavenumbers are the eigenvalues of the system’s dynamical matrix, while the atomic displacements are the eigenvectors of the dynamical matrix divided by the square root of the atomic masses.

Parameters:
  • ref_positions (ndarray[Any, dtype[float64]]) – (fractional) Array with shape (N,3) where N is the number of atoms.

  • wavenumbers (ndarray[Any, dtype[float64]]) – (cm-1) Array with shape (M,).

  • displacements (ndarray[Any, dtype[float64]]) – (fractional) Array with shape (M,N,3).

get_raman_spectrum(polarizability_model)

Calculate a raman spectrum using a polarizability model.

Parameters:

polarizability_model (PolarizabilityModel) – Must be compatible with phonons.

Return type:

PhononRamanSpectrum

property displacements: ndarray[Any, dtype[float64]]

Get (a copy of) displacements.

Returns:

(fractional) Array with shape (M,N,3) where M is the number of phonons and N is the number of atoms.

property ref_positions: ndarray[Any, dtype[float64]]

Get (a copy of) reference positions.

Returns:

(fractional) Array with shape (N,3) where N is the number of atoms.

property wavenumbers: ndarray[Any, dtype[float64]]

Get (a copy of) wavenumbers.

Returns:

(cm-1) Array with shape (M,) where M is the number of phonons.

class ramannoodle.dynamics.Trajectory(positions_ts, timestep)

Bases: Dynamics, Sequence[ndarray[Any, dtype[float64]]]

Molecular dynamics trajectory.

A trajectory is represented as a positions time series (positions_ts) and a timestep.

Parameters:
  • positions_ts (ndarray[Any, dtype[float64]]) – (fractional) Array with shape (S,N,3) where S in the number of configurations and N is the number of atoms.

  • timestep (float) – (fs)

get_raman_spectrum(polarizability_model)

Calculate a raman spectrum using a polarizability model.

Parameters:

polarizability_model (PolarizabilityModel) – Must be compatible with the trajectory.

Return type:

MDRamanSpectrum

property positions_ts: ndarray[Any, dtype[float64]]

Get (a copy of) the positions time series.

Returns:

(fractional) Array with shape (S,N,3) where S in the number of configurations and N is the number of atoms.

property timestep: float

Get timestep.

Returns:

(fs)