Libra

libra_py.models.Libra.convert_Landry_Subotnik2model1(m, Er, w, eps)[source]

This function converts the parameter of the Landry-Subotnik Hamiltonian to those of the `model1` form. This mapping is up to the arbitratry energy scale shift factor.

Parameters
  • m (double) – mass of the particle [a.u. of mass ]

  • Er (double) – reorganization energy [ Ha ]

  • w (double) – oscillator frequency [ a.u.^-1 ]

  • eps (double) – driving energy [ Ha ]

Returns

(k, x0, D): where:

  • k ( double ): force constant of the oscillator [ units: Ha*Bohr^-2 ]

  • x0 ( double ): displacement of the energy minima positions [ units: Bohr ]

  • D ( double ): the energy shift of the acceptor with respect to donor [ units: Ha]

Return type

tuple

Ref: Landry, B. R.; Subotnik, J. E. J. Chem. Phys. 2011, 135, 191101

H00 = (1/2) * m * w^2 * x^2 + M x = (1/2) * m * w^2 * ( x^2 + 2Mx/(m*w^2) ) = = (1/2) * m * w^2 * [( x + M/(m*w^2) )^2 - M^2 /(m^2 *w^4) ] = = (1/2) * m * w^2 * [( x + M/(m*w^2) )^2 ] - M^2 /(2*m*w^2)

H11 = (1/2) * m * w^2 * x^2 - M x - e = (1/2) * m * w^2 * ( x^2 - 2Mx/(m*w^2) ) - e = = (1/2) * m * w^2 * [( x - M/(m*w^2) )^2 - M^2 /(m^2 *w^4) ] - e = = (1/2) * m * w^2 * [( x - M/(m*w^2) )^2 ] - M^2 /(2*m*w^2) - e

M = sqrt(Er * m*w^2 / 2) => 2* M^2 / (m*w^2) = Er

So the connection to the model1 parameters:

k = (1/2) * m * w^2

x0 = 2 * M/(m*w^2) = M/k = sqrt( Er / k )

D = -e

libra_py.models.Libra.get_Landry_Subotnik_set1(gamma_i, eps_i)[source]

Returns one of the data point in the parameters set from Ref: Landry, B. R.; Subotnik, J. E. J. Chem. Phys. 2011, 135, 191101

The data set follows their Figure 2

Parameters
  • gamma_i (int) – index of the gamma parameter

  • eps_i (int) – index of the epsilon parameter

Returns

parameters in the format suitable for use with model1:

  • params[“gamma”] ( double ): friction coefficient [ units: (a.u. time)* Ha/amu*Bohr^2 ]

  • params[“V”] ( double ): electronic coupling between these diabats [ units: Ha]

  • params[“mass”] ( double ): mass of the particle [ units: amu ]

  • params[“kT”] ( double ): system’s temperature [ units: Ha ]

  • params[“k”] ( double ): force constante [ units: Ha/Bohr]

  • params[“x0”] ( double ): displacement of the minimum of one of the diabatic states [ units: Bohr ]

  • params[“D”] ( double ): gap between the minima of the states 1 and 0, negative

    value means the state 1 is lower in energy than state 0 [ units: Ha]

Return type

dictionary

libra_py.models.Libra.get_Landry_Subotnik_set2(V_i)[source]

Returns one of the data point in the parameters set from Ref: Landry, B. R.; Subotnik, J. E. J. Chem. Phys. 2011, 135, 191101

The data set follows their Figure 3

Parameters

V_i (int) – index of the coupling parameter

Returns

parameters in the format suitable for use with model1:

  • params[“gamma”] ( double ): friction coefficient [ units: (a.u. time)* Ha/amu*Bohr^2 ]

  • params[“V”] ( double ): electronic coupling between these diabats [ units: Ha]

  • params[“mass”] ( double ): mass of the particle [ units: amu ]

  • params[“kT”] ( double ): system’s temperature [ units: Ha ]

  • params[“k”] ( double ): force constante [ units: Ha/Bohr]

  • params[“x0”] ( double ): displacement of the minimum of one of the diabatic states [ units: Bohr ]

  • params[“D”] ( double ): gap between the minima of the states 1 and 0, negative

    value means the state 1 is lower in energy than state 0 [ units: Ha]

Return type

dictionary

libra_py.models.Libra.model1(q, params)[source]

Essentially the spin-boson (Marcus) model

k*x^2 V

Hdia = V k*(x-x0)^2 + D

Sdia = I

Ddia = 0.0

Parameters
  • q (MATRIX(1,1)) – coordinates of the particle, ndof = 1

  • params (dictionary) –

    model parameters

    • params[“x0”] ( double ): displacement of the minimum of one of the diabatic states

      [ default: 1.0, units: Bohr ]

    • params[“k”] ( double ): force constante [ default: 0.01, units: Ha/Bohr^2]

    • params[“D”] ( double ): gap between the minima of the states 1 and 0, negative

      value means the state 1 is lower in energy than state 0 [ default: 0.0, units: Ha]

    • params[“V”] ( double ): electronic coupling between these diabats [ default: 0.005, units: Ha]

Returns

obj, with the members:

  • obj.ham_dia ( CMATRIX(2,2) ): diabatic Hamiltonian

  • obj.ovlp_dia ( CMATRIX(2,2) ): overlap of the basis (diabatic) states [ identity ]

  • obj.d1ham_dia ( list of 1 CMATRIX(2,2) objects ):

    derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate

  • obj.dc1_dia ( list of 1 CMATRIX(2,2) objects ): derivative coupling in the diabatic basis [ zero ]

Return type

PyObject

libra_py.models.Libra.model1a(Hdia, Sdia, d1ham_dia, dc1_dia, q, params)[source]

Same as ::funct:`model1` just different interface

k*x^2 V

Hdia = V k*(x-x0)^2 + D

Sdia = I

Ddia = 0.0

Parameters
  • Hdia (CMATRIX(2,2)) – diabatic Hamiltonian - updated by this function

  • Sdia (CMATRIX(2,2)) – overlap of the basis (diabatic) states - updated by this function [ identity ]

  • d1ham_dia (list of 1 CMATRIX(2,2) objects) – derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate - updated by this function

  • dc1_dia (list of 1 CMATRIX(2,2) objects) – derivative coupling in the diabatic basis - updated by this function [ zero ]

  • q (double) – coordinates of the particle, ndof = 1

  • params (dictionary) –

    model parameters

    • params[“x0”] ( double ): displacement of the minimum of one of the diabatic states

      [ default: 1.0, units: Bohr ]

    • params[“k”] ( double ): force constante [ default: 0.01, units: Ha/Bohr^2]

    • params[“D”] ( double ): gap between the minima of the states 1 and 0, negative

      value means the state 1 is lower in energy than state 0 [ default: 0.0, units: Ha]

    • params[“V”] ( double ): electronic coupling between these diabats [ default: 0.005, units: Ha]

Returns

None

libra_py.models.Libra.model2(q, params)[source]

Essentially the spin-boson (Marcus) model

k*x^2 V

Hdia = V k*(x-x0)^2 + D

Sdia = I

Ddia != 0.0, but Ddia + Ddia.H() = dSdia/dR, with dSdia = 0.0

Parameters
  • q (MATRIX(1,1)) – coordinates of the particle, ndof = 1

  • params (dictionary) –

    model parameters

    • params[“x0”] ( double ): displacement of the minimum of one of the diabatic states

      [ default: 1.0, units: Bohr ]

    • params[“k”] ( double ): force constante [ default: 0.01, units: Ha/Bohr^2]

    • params[“D”] ( double ): gap between the minima of the states 1 and 0, negative

      value means the state 1 is lower in energy than state 0 [ default: 0.0, units: Ha]

    • params[“V”] ( double ): electronic coupling between these diabats [ default: 0.005, units: Ha]

    • params[“NAC”] ( double ): NAC in the diabatic basis [ default: -0.1, units: Ha]

Returns

obj, with the members:

  • obj.ham_dia ( CMATRIX(2,2) ): diabatic Hamiltonian

  • obj.ovlp_dia ( CMATRIX(2,2) ): overlap of the basis (diabatic) states [ identity ]

  • obj.d1ham_dia ( list of 1 CMATRIX(2,2) objects ):

    derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate

  • obj.dc1_dia ( list of 1 CMATRIX(2,2) objects ): derivative coupling in the diabatic basis [ zero ]

Return type

PyObject

libra_py.models.Libra.model2a(Hdia, Sdia, d1ham_dia, dc1_dia, q, params)[source]

Same as ::funct:`model2` just different interface

k*x^2 V

Hdia = V k*(x-x0)^2 + D

Sdia = I

Ddia != 0.0, but Ddia + Ddia.H() = dSdia/dR, with dSdia = 0.0

Parameters
  • Hdia (CMATRIX(2,2)) – diabatic Hamiltonian - updated by this function

  • Sdia (CMATRIX(2,2)) – overlap of the basis (diabatic) states - updated by this function [ identity ]

  • d1ham_dia (list of 1 CMATRIX(2,2) objects) – derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate - updated by this function

  • dc1_dia (list of 1 CMATRIX(2,2) objects) – derivative coupling in the diabatic basis - updated by this function [ zero ]

  • q (double) – coordinates of the particle, ndof = 1

  • params (dictionary) –

    model parameters

    • params[“x0”] ( double ): displacement of the minimum of one of the diabatic states

      [ default: 1.0, units: Bohr ]

    • params[“k”] ( double ): force constante [ default: 0.01, units: Ha/Bohr^2]

    • params[“D”] ( double ): gap between the minima of the states 1 and 0, negative

      value means the state 1 is lower in energy than state 0 [ default: 0.0, units: Ha]

    • params[“V”] ( double ): electronic coupling between these diabats [ default: 0.005, units: Ha]

    • params[“NAC”] ( double ): NAC in the diabatic basis [ default: -0.1, units: Ha]

Returns

None

libra_py.models.Libra.model3(q, params)[source]

More complex spin-boson model

k*x^2 V

Hdia = V k*(x-x0)^2 + D

Sdia = 1 B*exp(-(x-0.5*x0)^2)

B*exp(-(x-0.5*x0)^2) 1

Ddia != 0.0, but Ddia + Ddia.H() = dSdia/dR, with dSdia !=0.0

Parameters
  • q (MATRIX(1,1)) – coordinates of the particle, ndof = 1

  • params (dictionary) –

    model parameters

    • params[“x0”] ( double ): displacement of the minimum of one of the diabatic states

      [ default: 1.0, units: Bohr ]

    • params[“k”] ( double ): force constante [ default: 0.01, units: Ha/Bohr^2]

    • params[“D”] ( double ): gap between the minima of the states 1 and 0, negative

      value means the state 1 is lower in energy than state 0 [ default: 0.0, units: Ha]

    • params[“V”] ( double ): electronic coupling between these diabats [ default: 0.005, units: Ha]

    • params[“B”] ( double ): parameter controlling the overlap of the diabatic states

      [ default: 0.05, units: Ha]

Returns

obj, with the members:

  • obj.ham_dia ( CMATRIX(2,2) ): diabatic Hamiltonian

  • obj.ovlp_dia ( CMATRIX(2,2) ): overlap of the basis (diabatic) states [ identity ]

  • obj.d1ham_dia ( list of 1 CMATRIX(2,2) objects ):

    derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate

  • obj.dc1_dia ( list of 1 CMATRIX(2,2) objects ): derivative coupling in the diabatic basis [ zero ]

Return type

PyObject

libra_py.models.Libra.model3a(Hdia, Sdia, d1ham_dia, dc1_dia, q, params)[source]

Same as ::funct:`model3` just different interface

k*x^2 V

Hdia = V k*(x-x0)^2 + D

Sdia = 1 B*exp(-(x-0.5*x0)^2)

B*exp(-(x-0.5*x0)^2) 1

Ddia != 0.0, but Ddia + Ddia.H() = dSdia/dR, with dSdia !=0.0

Parameters
  • Hdia (CMATRIX(2,2)) – diabatic Hamiltonian - updated by this function

  • Sdia (CMATRIX(2,2)) – overlap of the basis (diabatic) states - updated by this function [ identity ]

  • d1ham_dia (list of 1 CMATRIX(2,2) objects) – derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate - updated by this function

  • dc1_dia (list of 1 CMATRIX(2,2) objects) – derivative coupling in the diabatic basis - updated by this function [ zero ]

  • q (double) – coordinates of the particle, ndof = 1

  • params (dictionary) –

    model parameters

    • params[“x0”] ( double ): displacement of the minimum of one of the diabatic states

      [ default: 1.0, units: Bohr ]

    • params[“k”] ( double ): force constante [ default: 0.01, units: Ha/Bohr^2]

    • params[“D”] ( double ): gap between the minima of the states 1 and 0, negative

      value means the state 1 is lower in energy than state 0 [ default: 0.0, units: Ha]

    • params[“V”] ( double ): electronic coupling between these diabats [ default: 0.005, units: Ha]

    • params[“B”] ( double ): parameter controlling the overlap of the diabatic states

      [ default: 0.05, units: Ha]

Returns

None

libra_py.models.Libra.model4(q, params)[source]

2-level system with periodic anharmonic potentials

k*cos(w*x) V

Hdia = V k*sin(w*x) + D

Sdia = I

Ddia = 0.0

Parameters
  • q (MATRIX(1,1)) – coordinates of the particle, ndof = 1

  • params (dictionary) –

    model parameters

    • params[“k”] ( double ): force constante [ default: 0.01, units: Ha]

    • params[“w”] ( double ): frequency [ default: 0.1, units: Bohr^-1]

    • params[“D”] ( double ): gap between the minima of the states 1 and 0, negative

      value means the state 1 is lower in energy than state 0 [ default: 0.0, units: Ha]

    • params[“V”] ( double ): electronic coupling between these diabats [ default: 0.005, units: Ha]

Returns

obj, with the members:

  • obj.ham_dia ( CMATRIX(2,2) ): diabatic Hamiltonian

  • obj.ovlp_dia ( CMATRIX(2,2) ): overlap of the basis (diabatic) states [ identity ]

  • obj.d1ham_dia ( list of 1 CMATRIX(2,2) objects ):

    derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate

  • obj.dc1_dia ( list of 1 CMATRIX(2,2) objects ): derivative coupling in the diabatic basis [ zero ]

Return type

PyObject

libra_py.models.Libra.model4a(Hdia, Sdia, d1ham_dia, dc1_dia, q, params)[source]

Same as ::funct:`model4` just different interface

k*cos(w*x) V

Hdia = V k*sin(w*x) + D

Sdia = I

Ddia = 0.0

Parameters
  • Hdia (CMATRIX(2,2)) – diabatic Hamiltonian - updated by this function

  • Sdia (CMATRIX(2,2)) – overlap of the basis (diabatic) states - updated by this function [ identity ]

  • d1ham_dia (list of 1 CMATRIX(2,2) objects) – derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate - updated by this function

  • dc1_dia (list of 1 CMATRIX(2,2) objects) – derivative coupling in the diabatic basis - updated by this function [ zero ]

  • q (double) – coordinates of the particle, ndof = 1

  • params (dictionary) –

    model parameters

    • params[“k”] ( double ): force constante [ default: 0.01, units: Ha]

    • params[“w”] ( double ): frequency [ default: 0.1, units: Bohr^-1]

    • params[“D”] ( double ): gap between the minima of the states 1 and 0, negative

      value means the state 1 is lower in energy than state 0 [ default: 0.0, units: Ha]

    • params[“V”] ( double ): electronic coupling between these diabats [ default: 0.005, units: Ha]

Returns

None

libra_py.models.Libra.model5(q, params)[source]

Symmetric Double Well Potential in 2D Hdia = A*[0.25*(q1^4 + q2^4) - 0.5*(q1^2 + q2^2) ] Sdia = 1.0 Ddia = 0.0

Parameters
  • q (MATRIX(2,1)) – coordinates of the particle, ndof = 2

  • params (dictionary) –

    model parameters

    • params[“A”] ( double ): scaling parameter to determine the depth

    of the potential well/barrier [ default: 1.0, units: None]

Returns

obj, with the members:

  • obj.ham_dia ( CMATRIX(1,1) ): diabatic Hamiltonian

  • obj.ovlp_dia ( CMATRIX(1,1) ): overlap of the basis (diabatic) states [ identity ]

  • obj.d1ham_dia ( list of 2 CMATRIX(1,1) objects ):

    derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate

  • obj.dc1_dia ( list of 2 CMATRIX(1,1) objects ): derivative coupling in the diabatic basis [ zero ]

Return type

PyObject

libra_py.models.Libra.model6(q, params)[source]

2-level system with periodic anharmonic potentials. More general than model 4

A0*cos(w0*x+delta0) + B0 V

Hdia = V A1*cos(w1*x+delta1) + B1

Sdia = I

Ddia = 0.0

Parameters
  • q (MATRIX(1,1)) – coordinates of the particle, ndof = 1

  • params (dictionary) –

    model parameters

    • params[“A0”] ( double ): amplitude of the state 0 [ default: 0.01, units: Ha]

    • params[“A1”] ( double ): amplitude of the state 1 [ default: 0.01, units: Ha]

    • params[“w0”] ( double ): frequency of the potential 0 [ default: 0.1, units: Bohr^-1]

    • params[“w1”] ( double ): frequency of the potential 1 [ default: 0.1, units: Bohr^-1]

    • params[“delta0”] ( double ): phase shift of potential 0 [ default: 0.0, units: None]

    • params[“delta1”] ( double ): phase shift of potential 1 [ default: 0.0, units: None]

    • params[“B0”] ( double ): energy shift of potential 0 [ default: 0.0, units: Ha]

    • params[“B1”] ( double ): energy shift of potential 1 [ default: 0.0, units: Ha]

    • params[“V01”] ( double ): electronic coupling between these diabats [ default: 0.005, units: Ha]

Returns

obj, with the members:

  • obj.ham_dia ( CMATRIX(2,2) ): diabatic Hamiltonian

  • obj.ovlp_dia ( CMATRIX(2,2) ): overlap of the basis (diabatic) states [ identity ]

  • obj.d1ham_dia ( list of 1 CMATRIX(2,2) objects ):

    derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate

  • obj.dc1_dia ( list of 1 CMATRIX(2,2) objects ): derivative coupling in the diabatic basis [ zero ]

Return type

PyObject

libra_py.models.Libra.model7(q, params)[source]

3-level system with periodic anharmonic potentials.

A0*cos(w0*x+delta0) + B0 V01 V02

Hdia = V01 A1*cos(w1*x+delta1) + B1 V12

V02 V12 A2*cos(w2*x+delta2) + B2

Sdia = I

Ddia = 0.0

Parameters
  • q (MATRIX(1,1)) – coordinates of the particle, ndof = 1

  • params (dictionary) –

    model parameters

    • params[“A0”] ( double ): amplitude of the state 0 [ default: 0.01, units: Ha]

    • params[“A1”] ( double ): amplitude of the state 1 [ default: 0.01, units: Ha]

    • params[“A2”] ( double ): amplitude of the state 2 [ default: 0.01, units: Ha]

    • params[“w0”] ( double ): frequency of the potential 0 [ default: 0.1, units: Bohr^-1]

    • params[“w1”] ( double ): frequency of the potential 1 [ default: 0.1, units: Bohr^-1]

    • params[“w2”] ( double ): frequency of the potential 2 [ default: 0.1, units: Bohr^-1]

    • params[“delta0”] ( double ): phase shift of potential 0 [ default: 0.0, units: None]

    • params[“delta1”] ( double ): phase shift of potential 1 [ default: 0.0, units: None]

    • params[“delta2”] ( double ): phase shift of potential 2 [ default: 0.0, units: None]

    • params[“B0”] ( double ): energy shift of potential 0 [ default: 0.0, units: Ha]

    • params[“B1”] ( double ): energy shift of potential 1 [ default: 0.0, units: Ha]

    • params[“B2”] ( double ): energy shift of potential 2 [ default: 0.0, units: Ha]

    • params[“V01”] ( double ): electronic coupling between diabats 0 and 1 [ default: 0.005, units: Ha]

    • params[“V02”] ( double ): electronic coupling between diabats 0 and 2 [ default: 0.005, units: Ha]

    • params[“V12”] ( double ): electronic coupling between diabats 1 and 2 [ default: 0.005, units: Ha]

Returns

obj, with the members:

  • obj.ham_dia ( CMATRIX(3,3) ): diabatic Hamiltonian

  • obj.ovlp_dia ( CMATRIX(3,3) ): overlap of the basis (diabatic) states [ identity ]

  • obj.d1ham_dia ( list of 1 CMATRIX(3,3) objects ):

    derivatives of the diabatic Hamiltonian w.r.t. the nuclear coordinate

  • obj.dc1_dia ( list of 1 CMATRIX(3,3) objects ): derivative coupling in the diabatic basis [ zero ]

Return type

PyObject