nitrogen.ham¶
NITROGEN implements a wide variety of molecular and model Hamiltonians
as extensions of the SciPy LinearOperator
class.
Model Hamiltonians |
|
Particle in 2-d polar coordinates. |
|
General curvilinear Hamiltonians |
|
Space-fixed frame embedding. |
|
Collinear constraint. |
|
General non-linear molecule (single state). |
|
General linear molecule (single state). |
|
Multistate spin-rovibronic linear molecule. |
|
Simple Cartesian Hamiltonian |
|
\(n\)-dimensional Cartesian |
|
Multistate version of |
|
- class nitrogen.ham.AzimuthalLinear(*args, **kwargs)¶
A general rovibrational Hamiltonian for linear molecules.
This Hamiltonian enables a fairly flexible treatment of linear molecules that accounts for the necessary rovibrational boundary conditions related to linear geometries. The same kinetic energy operator is used as that of
NonLinearHamiltonians. The requirements for the basis functions are explained in more detail in the parameter notes below.- Parameters
bases (list) – A list of
GriddedBasisbasis sets for active coordinates. Scalar elements will constrain the corresponding coordinate to that fixed value.cs (CoordSys) – The coordinate system.
azimuth (list) – The azimuthal designation of each element of bases. Each element must be one of None, Ellipsis, or a two-element tuple. See Notes for details.
pes (DFun or function, optional) – The potential energy surface, V(q). This accepts the coordinates defined by cs as input. If None (default), no PES is used.
masses (array_like, optional) – The atomic masses. If None (default), unit masses are used.
J (int, optional) – The total angular momentum quantum number \(J\). The default value is 0.
hbar (scalar, optional) – The value of \(\hbar\). If None, the default value in standard NITROGEN units is used (
n2.constants.hbar).Vmax (scalar, optional) – Potential energy cut-off thresholds. The default is None.
Vmin (scalar, optional) – Potential energy cut-off thresholds. The default is None.
Voffset (scalar, optional) – A potential energy offset. This will be subtracted from the surface value. The default is None.
signed_azimuth (bool, optional) – If True, then the Ellipsis basis functions depend on the sign of the azimuthal quantum number. If False, then the sign is ignored. The default is False.
Notes
Basis functions are constructed as products of factors supplied in the bases parameter. Each (non-scalar) element represents a single, possibly multi-dimensional,
GriddedBasisbasis set. Together with symmetric-top rotational wavefunctions, the total product is\[\Phi = f^{(m_1)}_i g^{(m_2)}_j h^{(m_3)}_k \cdots \vert J,k\rangle\]where \(i,j,k,\ldots\) are the basis function indices. Each factor is labeled with an additional azimuthal quantum number, \(m_i\), assigned automatically (see below). The linear boundary conditions are enforced by selecting only basis functions for which
\[k - \sum_i m_i = 0.\]The azimuthal quantum numbers for each basis factor are assigned according to the azimuth list, which has one element for each element in bases.
A basis factor can be assigned in one of three ways:
1. For factors/coordinates not relevant to the linear boundary conditions (typically radial distances) the appropriate azimuthal quantum number is simply \(m=0\) for every basis function of that factor. This is indicated with an azimuth element of
None.2. For factors that involve internal rotation coordinates, the azimuthal quantum number corresponds to the vibrational angular momentum for internal rotation about the body-fixed \(z\) axis. Currently, only one coordinate from a given basis factor can be identified as an internal rotation coordinate. This is specified with an azimuth element of a two-element tuple
(i, a).iis the coordinate index of the internal rotation index for that basis factor (i.e.i= 0 means the first coordinate in the function,i= 1 the second, etc.)ais a scaling parameter which defines the handedness and units of the coordinate. The sign ofais positive for right-handed rotation about \(z\) and negative for left-handed rotation. Its magnitude is equal to the geometric period of the internal rotation coordinate (in whatever units it is defined in) divided by \(2\pi\).The azimuthal quantum numbers are automatically determined by calculating the matrix representation of the operator \(-i a \partial\), where \(\partial\) is the partial derivative with respect to the coordinate identified by the
azimuthentry. To work properly, the set of basis functions must be closed under \(\partial\) (i.e. a unitary transformation produces exact eigenfunctions) and the grid representation must itself be quasi-unitary. The eigenfunctions of \(-i a \partial\) are referred to as the azimuthal representation, and this is the working representation of the linear Hamiltonian. The corresponding eigenvalues are the azimuthal quantum numbers \(m\).3. There will be one special coordinate, \(\theta\), that behaves as a generalized polar coordinate (e.g. the bond angle of a triatomic molecule). The boundary conditions on this coordinate as it approaches linear geometries are related to the “pure rotational” angular momentum component
\[m^* = k - \sum_{i'} m_{i'}\]where the sum includes all azimuthal quantum numbers other than that associated with the polar coordinate. Usually, the polar coordinate should have an integration volume element that goes like \(\sim \theta\) near linear geometries and its basis functions should go like \(\sim \theta^{m^*}\). Associated Legendre polynomials and 2D radial harmonic oscillator wavefunctions are two such examples.
The user is required to explicitly provide separate sets of basis functions for every possible (integer) value of \(m^*\). That is, the element of bases for the polar coordinate is not just a single
GriddedBasis, but a function of signaturef(m)that returns aGriddedBasiswith appropriate boundary conditions. Each of these different basis sets must have equivalent grids and quadrature rules.To indicate that a given factor contains the generalized polar coordinate, the corresponding element in azimuth is
...(Ellipsis). One and only one factor must be designated as the polar coordinate.- static vectorRME(bases, azimuth, signed_azimuth, fun, X, Y, JX, JY)¶
Evaluate reduced matrix elements of a lab-frame vector operator.
- Parameters
bases (list) – The basis set specification.
azimuth (list) – The azimuthal designations.
signed_azimuth (bool) – If True, Ellipsis functions are dependent on the sign of the azimuthal quantum number.
fun (function) – A function that returns the \(xyz\) body-frame components of the vector \(V\) in terms of the coordinates of bases.
X (list of ndarray) – Each element is an array of vectors in the bases basis set of a given value of \(J\) following conventions of the
AzimuthalLinearHamiltonian.Y (list of ndarray) – Each element is an array of vectors in the bases basis set of a given value of \(J\) following conventions of the
AzimuthalLinearHamiltonian.JX (list of integer) – The \(J\) value for each block of X or Y.
JY (list of integer) – The \(J\) value for each block of X or Y.
- Returns
VXY – The scaled reduced matrix elements \(\langle X || V || Y \rangle\). See Notes to
NonLinear.vectorRME()for precise definition.- Return type
ndarray
See also
NonLinear.vectorRMEsimilar function for
NonLinearHamiltonians
- class nitrogen.ham.AzimuthalLinearRT(*args, **kwargs)¶
A general quasi-diabatic spin-rovibronic Hamiltonian for linear molecules.
This Hamiltonian is an extension of
AzimuthalLinear. The differences introduced by the addition of spin-electronic degrees of freedom are described in the Notes.- Parameters
bases (list) – A list of
GriddedBasisbasis sets for active coordinates. Scalar elements will constrain the corresponding coordinate to that fixed value.cs (CoordSys) – The coordinate system.
azimuth (list) – The azimuthal designation of each element of bases. Each element must be one of None, Ellipsis, or a two-element tuple. See Notes for details.
pes (DFun or function, optional) – The diabatic potential energy matrix, V(q). The function returns the NE(NE+1)/2 elements of the lower triangle and the matrix is assumed to be Hermitian. The accepts the coordinates defined by cs as input. If None (default), no PES is used.
masses (array_like, optional) – The atomic masses. If None (default), unit masses are used.
JJ1 (int, optional) – The value of \(2J+1\), where \(J\) is the total angular momentum quantum number. The default value is 1.
hbar (scalar, optional) – The value of \(\hbar\). If None, the default value in standard NITROGEN units is used (
n2.constants.hbar).signed_azimuth (bool, optional) – If True, then the Ellipsis basis functions depend on the sign of the azimuthal quantum number. If False, then the sign is ignored. The default is False.
NE (int, optional) – The number of electronic states. The default is 1.
Lambda (array_like of integers, optional) – The electronic angular momentum component about the linear (\(z\)) axis (in units of \(\hbar\)). If None (default), all states as assumed to have \(\Lambda = 0\).
SS1 (array_like of integers, optional) – The spin multiplicity, \(2S+1\), of each electronic state. If None (default), singlet states will be assumed.
Li ((3,NE,NE) array_like, optional) – The matrix elements of the body-fixed electronic orbital angular momentum, \(L_i\), \(i=x,y,z\). If None (default), \(L_z\) will be determined from Lambda and \(L_{x,y}\) will be assumed to be zero.
LiLj_ac ((3,3,NE,NE) array_like, optional) – The matrix elements of the anti-commutators, \([L_i,L_j]_+ = L_i L_j + L_j L_i\), \(i,j=x,y,z\). If None (default), these will be approximated from Li.
pesorder ({'LR', 'LC'}, optional) – V matrix electronic state ordering. The pes function returns the lower triangle of the diabatic potential matrix. If ‘LR’ (default), the values are returned in row major order. If ‘LC’ the values are returned in column major order.
ASO ((3,3) array_like, optional) – The effective spin-orbit coupling tensor. If None (default), this is ignored.
Notes
Basis functions are constructed similarly as those of
AzimuthalLinear. The rotational factor is replaced with a Hund’s case (b) function\[\vert J N k S \alpha \Lambda \rangle,\]where \(J\), \(N\), and \(S\) have their usual meaning. \(k\) is the body-fixed projection of \(\mathbf{N}\). The electronic states are labeled by an index \(\alpha\), and each electronic state has a signed integer \(z\)-projection of the electronic orbital angular momentum \(\Lambda\) at linear geometries.
The rotational kinetic energy operator is modified by replacing \(J_\alpha\) with \(N_\alpha - L_\alpha\). Derivatives of the electronic orbital angular momentum matrix elements with respect to nuclear coordinates are ignored, consistent with the quasi-diabatic ansatz.
The linear boundary conditions are enforced by selecting only basis functions for which
\[k - \Lambda - \sum_i m_i = 0.\]The azimuthal quantum numbers for each basis factor are assigned according to the azimuth list in the same way as
AzimuthalLinear.The electronic orbital angular momentum matrix elements are supplied by optional parameters. They are assumed to be constant. Geometry-dependent quenching functions may be added in the future.
Spin orbit interactions are currently included with an effective \(\Delta S = 0\) interaction term
\[(A_{SO})_{\alpha \beta} L_\alpha S_\beta\]Unless spin interactions are included, there is no need to use non-zero spin, and it is most efficient to treat all states as singlets.
- calcSREop(X, SRE_op)¶
Calculate the matrix elements of a SRE operator using vectors in the working representation
- Parameters
X ((NH,n) ndarray) – A set of vectors in the working representation.
SRE_op ((Nsre, Nsre) ndarray) – The matrix representation of an operator in the SRE basis
- Returns
M – The matrix elements of the operator.
- Return type
(n,n) ndarray
- calcSREpop(X)¶
Calculate the population of each SRE basis function of vectors in the working representation
- Parameters
X ((NH,n) ndarray) – A set of vectors in the working representation.
- Returns
C – The weights of each vector in the SRE space.
- Return type
(Nsre,n) ndarray
- calcVibDensity(X)¶
Calculate the vibrational density in mixed DVR/FBR basis set factor
- Parameters
X ((NH,n) ndarray) – A set of vectors in the working representation
- Returns
- Return type
None.
- toDirectProduct(x)¶
Transform a vector in the working basis representation to the direct product azimuthal basis .
- Parameters
x ((NH,...) ndarray) – A set of vectors in the working representationg.
- Returns
y – The vectors transformed to the direct product azimuthal representation
- Return type
(Nsre,) + fbr_shape + (…)
- toSREV(x)¶
Transform a vector in the working basis representation to the SRE basis and a vibrational factor.
- Parameters
x ((NH,...) ndarray) – A set of vectors in the working representation.
- Returns
y – The vectors transformed to the direct product azimuthal representation
- Return type
(Nsre,NV,…)
- static vectorRME(bases, azimuth, signed_azimuth, NE, Lambda, SS1, fun, X, Y, JJ1X, JJ1Y, funorder='LR')¶
Evaluate reduced matrix elements of a lab-frame vector operator.
- Parameters
bases (list) – The basis set specification.
azimuth (list) – The azimuthal designations.
signed_azimuth (bool) – If True, Ellipsis functions are dependent on the sign of the azimuthal quantum number.
NE (integer) – The number of electronic states
Lambda (array_like) – The Lambda values for each electronic state
SS1 (array_like) – The 2S+1 values for each electronic state
fun (function) – A function that returns the electronic matrix elements of the \(xyz\) body-frame components of the vector \(V\) in terms of the coordinates of bases. The return shape should be (3,NE*(NE+1)/2,…) Note, we assume \(V\) is Hermitian in the electronic basis.
X (list of ndarray) – Each element is an array of vectors in the bases basis set of a given value of \(J\) following conventions of the
AzimuthalLinearHamiltonian.Y (list of ndarray) – Each element is an array of vectors in the bases basis set of a given value of \(J\) following conventions of the
AzimuthalLinearHamiltonian.JJ1X (list of integer) – The \(2J+1\) value for each block of X or Y.
JJ1Y (list of integer) – The \(2J+1\) value for each block of X or Y.
funorder ({'LR', 'LC'}, optional) – \(V\) matrix electronic state ordering. The fun function returns the lower triangle of the diabatic vector-operator matrix. If ‘LR’ (default), the values are returned in row major order. If ‘LC’ the values are returned in column major order.
- Returns
VXY – The scaled reduced matrix elements \(\langle X || V || Y \rangle\). See Notes to
NonLinear.vectorRME()for precise definition of the scaling.- Return type
ndarray
See also
NonLinear.vectorRMEsimilar function for
NonLinearHamiltonians
- class nitrogen.ham.Collinear(*args, **kwargs)¶
A generalized radial Hamiltonian for collinear configurations for total angular momentum \(J\).
The vibrational kinetic energy operator (KEO) is constructed via the general curvilinear Laplacian for the coordinate system (cs) and the vibrational integration volume element \(\rho\) defined by the basis set functions (bases). KEO matrix elements equal
\[\int dq\, \rho \Psi' (\hat{T} \Psi) = \frac{\hbar^2}{2} \int dq\, \rho (\tilde{\partial}_k \Psi') G^{kl} (\tilde{\partial}_l \Psi)\]where \(\tilde{\partial}_k = \partial_k + \frac{1}{2} \tilde{\Gamma}_k\), \(\tilde{\Gamma}_k = (\partial_k \Gamma) / \Gamma\), \(\Gamma = \rho / (g_\text{vib}^{1/2} I)\), \(g_\text{vib}\) is the determinant of the vibrational block of the coordinate system metric tensor, and \(I\) is the moment of inertia. This form of the KEO assumes certain surface terms arising from integration-by-parts are zero. The necessary boundary conditions on the basis set functions to ensure this are not checked explicitly. The user must use appropriate basis sets.
The total potential energy surface contains a centrifugal contribution \(V_J = (\hbar^2/2I) J(J+1)\), where \(J\) is the total angular momentum quantum number.
- Parameters
bases (list) – A list of
GriddedBasisbasis sets for active coordinates. Scalar elements will constrain the corresponding coordinate to that fixed value.cs (CoordSys) – The coordinate system.
pes (DFun or function, optional) – The potential energy surface, V(q). This accepts the coordinates defined by cs as input. If None (default), no PES is used.
masses (array_like, optional) – The atomic masses. If None (default), unit masses are used.
J (int, optional) – The total angular momentum quantum number \(J\). The default value is 0.
hbar (scalar, optional) – The value of \(\hbar\). If None, the default value in standard NITROGEN units is used (
n2.constants.hbar).
Notes
The coordinate system must position all atoms along the body-fixed \(z\)-axis (accounting for the fixed values of constrained coordinates).
- class nitrogen.ham.DirProdDvrCartN(*args, **kwargs)¶
A LinearOperator subclass for direct-product DVR Hamiltonians for N Cartesian coordinates.
- V¶
The PES grid with shape vshape.
- Type
ndarray
- NH¶
The size of the Hamiltonian (the number of direct-product grid points).
- Type
int
- vvar¶
The active coordinates.
- Type
list
- grids¶
Grids (for active) and fixed scalar values (for inactive) of each coordinate.
- Type
list
- vshape¶
The shape of the direct-product grid.
- Type
tuple
- masses¶
The mass of each coordinate.
- Type
ndarray
- hbar¶
The value of \(\hbar\).
- Type
float
- Parameters
dvrs (list of GenericDVR objects and/or scalars) – A list of
nitrogen.basis.GenericDVRobjects and/or scalar numbers. The length of the list must be equal to the number of coordinates, nx. Scalar elements indicate a fixed value for that coordinate.pes (DFun or function) – A potential energy function f(X) with respect to the nx Cartesian coordinates.
masses (array_like, optional) – A list of nx masses. If None, these will be assumed to be unity.
hbar (float, optional) – The value of \(\hbar\). If None, the default NITROGEN units are used.
Vmax (float, optional) – Maximum potential energy allowed. Higher values will be replaced with Vmax. If None, this is ignored.
Vmin (float, optional) – Minimum potential energy allowed. Lower values will be replaced with Vmin. If None, this is ignored.
- class nitrogen.ham.DirProdDvrCartNQD(*args, **kwargs)¶
A LinearOperator subclass for direct-product DVR Hamiltonians of N Cartesian coordinates using a multi-state quasi-diabatic (QD) Hamiltonian.
- Vij¶
Vij[i][j] refers to the diabat/coupling grid between states i and j.
- Type
list
- NH¶
The size of the Hamiltonian.
- Type
int
- NV¶
The size of the coordinate grid.
- Type
int
- NS¶
The number of states.
- Type
int
- vvar¶
The active coordinates.
- Type
list
- grids¶
Grids (for active) and fixed scalar values (for inactive) of each coordinate.
- Type
list
- vshape¶
The shape of the direct-product coordinate grid.
- Type
tuple
- masses¶
The mass of each coordinate.
- Type
ndarray
- hbar¶
The value of \(\hbar\).
- Type
float
- Parameters
dvrs (list of GenericDVR objects and/or scalars) – A list of
nitrogen.basis.GenericDVRobjects and/or scalar numbers. The length of the list must be equal to the number of coordinates, nx. Scalar elements indicate a fixed value for that coordinate.pes (DFun or function) – A potential energy/coupling surface function f(X) with respect to the nx Cartesian coordinates. This must have NS`*(`NS`+1)/2 output values for `NS states.
masses (array_like, optional) – A list of nx masses. If None, these will be assumed to be unity.
hbar (float) – The value of \(\hbar\). If None, the default value is that in NITROGEN units.
pesorder ({'LR', 'LC'}, optional) – V matrix electronic state ordering. The pes function returns the lower triangle of the diabatic potential matrix. If ‘LR’ (default), the values are returned in row major order. If ‘LC’ the values are returned in column major order.
- class nitrogen.ham.GeneralSpaceFixed(*args, **kwargs)¶
A general space-fixed frame Hamiltonian using mixed DVR-FBR basis sets.
The kinetic energy operator (KEO) is constructed via the general curvilinear Laplacian for the coordinate system (cs) and the integration volume element \(\rho\) defined by the basis set functions (bases). KEO matrix elements equal
\[\int dq\, \rho \Psi' (\hat{T} \Psi) = \frac{\hbar^2}{2} \int dq\, \rho (\tilde{\partial}_k \Psi') G^{kl} (\tilde{\partial}_l \Psi)\]where \(\tilde{\partial}_k = \partial_k + \frac{1}{2} \tilde{\Gamma}_k\), \(\tilde{\Gamma}_k = (\partial_k \Gamma) / \Gamma\), \(\Gamma = \rho / g^{1/2}\), and \(g\) is the determinant of the coordinate system metric tensor. This form of the KEO assumes certain surface terms arising from integration-by-parts are zero. The necessary boundary conditions on the basis set functions to ensure this are not checked explicitly. The user must use appropriate basis sets.
- Parameters
bases (list) – A list of
GriddedBasisfor active coordinates. Scalar elements will constrain the corresponding coordinate to that fixed value.cs (CoordSys) – The coordinate system.
pes (DFun or function, optional) – The potential energy surface, V(q). This accepts the coordinates defined by cs as input. If None (default), no PES is used.
masses (array_like, optional) – The coordinate masses. If None (default), unit masses are used. If cs is atomic, an array of length cs.natoms may be used to specify atomic masses.
hbar (scalar, optional) – The value of \(\hbar\). If None, the default value in standard NITROGEN units is used (
n2.constants.hbar).
- class nitrogen.ham.NonLinear(*args, **kwargs)¶
A general curvilinear rovibrational Hamiltonian for non-linear molecules with total angular momentum \(J\).
The vibrational kinetic energy operator (KEO) is constructed via the general curvilinear Laplacian for the body-fixed coordinate system (cs) and the vibrational integration volume element \(\rho\) defined by the basis set functions (bases). KEO matrix elements equal
\[ \begin{align}\begin{aligned}\langle r', \Psi' \vert \hat{T} \vert r, \Psi \rangle &= \frac{\hbar^2}{2} \langle r' \vert r \rangle \int dq\, \rho (\tilde{\partial}_k \Psi') G^{kl} (\tilde{\partial}_l \Psi)\\&\qquad + \frac{1}{2} \langle r' \vert J_\alpha J_\beta \vert r \rangle \int dq\, \rho G^{\alpha \beta} \Psi' \Psi\\&\qquad - \frac{\hbar}{2} \langle r' \vert i J_\alpha \vert r \rangle \int dq\, \rho G^{\alpha k} \left[\Psi'(\tilde{\partial}_k \Psi)- (\tilde{\partial}_k \Psi') \Psi\right]\end{aligned}\end{align} \]where \(\tilde{\partial}_k = \partial_k + \frac{1}{2} \tilde{\Gamma}_k\), \(\tilde{\Gamma}_k = (\partial_k \Gamma) / \Gamma\), \(\Gamma = \rho / (g^{1/2})\), \(g\) is the determinant of the full ro-vibrational metric tensor. This form of the KEO assumes certain surface terms arising from integration-by-parts are zero. The necessary boundary conditions on the basis set functions to ensure this are not checked explicitly. The user must use appropriate basis sets.
- Parameters
bases (list) – A list of
GriddedBasisbasis sets for active coordinates. Scalar elements will constrain the corresponding coordinate to that fixed value.cs (CoordSys) – The coordinate system.
pes (DFun or function, optional) – The potential energy surface, V(q). This accepts the coordinates defined by cs as input. If None (default), no PES is used.
masses (array_like, optional) – The atomic masses. If None (default), unit masses are used.
J (int, optional) – The total angular momentum quantum number \(J\). The default value is 0.
hbar (scalar, optional) – The value of \(\hbar\). If None, the default value in standard NITROGEN units is used (
n2.constants.hbar).Vmax (scalar, optional) – Potential energy cut-off thresholds. The default is None.
Vmin (scalar, optional) – Potential energy cut-off thresholds. The default is None.
- static vectorRME(bases, fun, X, Y)¶
Evaluate reduced matrix elements of a lab-frame vector operator.
- Parameters
bases (list of GriddedBasis and scalar) – The direct-product basis set factors.
fun (function) – A function that returns the \(xyz\) body-frame components of the vector \(V\) in terms of the coordinates of bases.
X (list of ndarray) – Each element is an array of vectors in the bases basis set of a given value of \(J\) following conventions of the
NonLinearHamiltonian.Y (list of ndarray) – Each element is an array of vectors in the bases basis set of a given value of \(J\) following conventions of the
NonLinearHamiltonian.
- Returns
VXY – The scaled reduced matrix elements \(\langle X || V || Y \rangle\). See Notes for precise definition.
- Return type
ndarray
Notes
We define the standard (lab-frame) reduced matrix element by
\[\langle Jm\cdots | V_Q | J' m'\cdots \rangle = \langle J' m', 1 Q | J m \rangle \langle J \cdots || V || J' \cdots \rangle\]This function returns the scaled value \(V_{JJ'} = \sqrt{2J+1} \langle J \cdots || V || J' \cdots \rangle\).
The RME itself is calculated as
\[\begin{split}\langle J \cdots || V || J' \cdots \rangle = \sqrt{2J' + 1} \sum_{q k k'} (-1)^{J + k' + q} \left(\begin{array}{ccc} J & J' & 1 \\ k & -k' & q \end{array} \right) \langle \Psi^{(J,k)} | V_{-q} | \Psi^{(J',k')} \rangle,\end{split}\]where \(\Psi^{(J,k)}\) is the vibrational factor associated with the signed-\(k\) symmetric top basis function \(| J,k \rangle\).
Note that the scaled RME satisfies \(|V_{J' J}|^2 = |V_{JJ'}|^2\) and in general
\[|V|_{J J'}^2 = \sum_{Amm'} | \langle Jm | V_A | J' m' \rangle | ^2\]When \(V\) is the electric dipole operator \(\mu\), then \(|V|_{JJ'}^2\) equals the line strength, \(S_{JJ'}\).
- class nitrogen.ham.Polar2D(*args, **kwargs)¶
A Hamiltonian for a particle in two dimensions with polar coordinates \((r,\phi)\) represented by the
Real2DHOBasistwo-dimensional harmonic oscillator basis set. The differential operator is\[\hat{H} = -\frac{\hbar^2}{2m} \left[\partial_r^2 + \frac{1}{r}\partial_r + \frac{1}{r^2}\partial_\phi^2\right] + V(r,\phi)\]with respect to integration as \(\int_0^\infty\,r\,dr\, \int_0^{2\pi}\,d\phi\).
Class initializer.
- Parameters
Vfun (function or DFun) – A function evaluating the potential energy for a (2,…)-shaped input array containing \((r,\phi)\) values and returning a (…)-shaped output array or a DFun with nx = 2.
mass (float) – The mass.
vmax (int) – Basis set parameter, see
Real2DHOBasis.R (float) – Basis set parameter, see
Real2DHOBasis.ell (int, optional) – Basis set parameter, see
Real2DHOBasis. The default is None.Nr (int, optional) – Quadrature parameter, see
Real2DHOBasis. The default is None.Nphi (int, optional) – Quadrature parameter, see
Real2DHOBasis. The default is None.hbar (float, optional) – The value of \(\hbar\). If None, the default value in standard NITROGEN units is used (
n2.constants.hbar).
- nitrogen.ham.hdpdvr_bfJ(dvrs, cs, pes, masses, Jlist=0, Vmax=None, Vmin=None)¶
Direct-product DVR grid body-frame Hamiltonian for angular momentum J.
- Parameters
dvrs (list of GenericDVR objects and scalars) – A list of
nitrogen.basis.GenericDVRbasis set objects or scalar numbers. The length of the list must be equal to the number of coordinates in cs. Scalar elements indicate a fixed value for that coordinate.cs (CoordSys) – An atomic coordinate system.
pes (DFun or function) – A potential energy function f(Q) with respect to cs coordinates.
masses (array_like) – Masses.
Jlist (int or array_like) – Total angular momentum value(s).
Vmax (float, optional) – Maximum potential energy allowed. Higher values will be replaced with Vmax. If None, this is ignored.
Vmin (float, optional) – Minimum potential energy allowed. Lower values will be replaced with Vmin. If None, this is ignored.
- Returns
H – The rovibrational Hamiltonian operator(s). If Jlist is a scalar, then a single LinearOperator is returned. If Jlist is an array, then a list of LinearOperators is returned, whose elements are the corresponding Hamiltonians for each value of Jlist.
- Return type
LinearOperator or list of LinearOperator