lime/spo/NAMD_2D.py
def vpsi(dt, v_2d, psi_grid):
    """
    propagate the state in grid basis half time step forward with 
    Potential Energy Operator
    
    :param dt: float
                time step
    :param v_2d: float array
                the two electronic states potential operator in grid basis
    :param psi_grid: list
                the two-electronic-states vibrational state in grid basis
    :return: psi_grid(update): list
                the two-electronic-states vibrational state in grid basis
                after being half time step forward
    """

    for i in range(len(x)):
        for j in range(len(y)):
            v_mat = np.array([[v_2d[0][i, j], v_2d[1][i, j]],
                             [v_2d[2][i, j], v_2d[3][i, j]]])

            w, u = scipy.linalg.eigh(v_mat)
            v = np.diagflat(np.exp(-1j * w * dt))
            
            array_tmp = np.array([psi_grid[0][i, j], psi_grid[1][i, j]])
            array_tmp = np.dot(u.conj().T, v.dot(u)).dot(array_tmp)
            
            psi_grid[0][i, j] = array_tmp[0]
            psi_grid[1][i, j] = array_tmp[1]

            #self.x_evolve = self.half * self.x_evolve_half
            #self.k_evolve = np.exp(-0.5 * 1j * self.hbar / self.m * \
            #               (self.k * self.k) * dt)

    propagate the state in grid basis half time step forward with 
    Potential Energy Operator
    
    :param dt: float
                time step
    :param v_2d: float array
                the two electronic states potential operator in grid basis
    :param psi_grid: list
                the two-electronic-states vibrational state in grid basis
    :return: psi_grid(update): list
                the two-electronic-states vibrational state in grid basis
                after being half time step forward
    
propagate the state in grid basis half time step forward with
Potential Energy Operator
propagate the state in grid basis half time step forward with Potential Energy Operator
def vpsi(dt, v_2d, psi_grid):
    for i in range(len(x)):
        for j in range(len(y)):
            v_mat = np.array([[v_2d[0][i, j], v_2d[1][i, j]],
                             [v_2d[2][i, j], v_2d[3][i, j]]])
            w, u = scipy.linalg.eigh(v_mat)
            v = np.diagflat(np.exp(-1j * w * dt))
            array_tmp = np.array([psi_grid[0][i, j], psi_grid[1][i, j]])
            array_tmp = np.dot(u.conj().T, v.dot(u)).dot(array_tmp)
            psi_grid[0][i, j] = array_tmp[0]
            psi_grid[1][i, j] = array_tmp[1]
def vpsi ( dt , v_2d , psi_grid ) : for i in range ( len ( x ) ) : for j in range ( len ( y ) ) : v_mat = np . array ( [ [ v_2d [ 0 ] [ i , j ] , v_2d [ 1 ] [ i , j ] ] , [ v_2d [ 2 ] [ i , j ] , v_2d [ 3 ] [ i , j ] ] ] ) w , u = scipy . linalg . eigh ( v_mat ) v = np . diagflat ( np . exp ( - 1j * w * dt ) ) array_tmp = np . array ( [ psi_grid [ 0 ] [ i , j ] , psi_grid [ 1 ] [ i , j ] ] ) array_tmp = np . dot ( u . conj ( ) . T , v . dot ( u ) ) . dot ( array_tmp ) psi_grid [ 0 ] [ i , j ] = array_tmp [ 0 ] psi_grid [ 1 ] [ i , j ] = array_tmp [ 1 ]
propagate the state in grid basis half time step forward with
Potential Energy Operator
propagate the state in grid basis half time step forward with Potential Energy Operator
"""
    propagate the state in grid basis half time step forward with 
    Potential Energy Operator
    
    :param dt: float
                time step
    :param v_2d: float array
                the two electronic states potential operator in grid basis
    :param psi_grid: list
                the two-electronic-states vibrational state in grid basis
    :return: psi_grid(update): list
                the two-electronic-states vibrational state in grid basis
                after being half time step forward
    """ #self.x_evolve = self.half * self.x_evolve_half #self.k_evolve = np.exp(-0.5 * 1j * self.hbar / self.m * \ #               (self.k * self.k) * dt)
list
the two-electronic-states vibrational state in grid basis
after being half time step forward
list the two - electronic - states vibrational state in grid basis after being half time step forward
dt
float
time step
float time step
v_2d
float array
the two electronic states potential operator in grid basis
float array the two electronic states potential operator in grid basis
psi_grid
list
the two-electronic-states vibrational state in grid basis
list the two - electronic - states vibrational state in grid basis