Ejemplo n.º 1
0
    x0 = np.array([.75, 1.5]) #np.random.random(3)
    #final = np.array([2., .75]) #np.random.random(3)

    pl.pcolor(x, y, z, vmax=-0.5, cmap=pl.cm.PuBu)
    tau=np.array([0.5,-1.])#np.random.random(2)-0.5
    x1 = x0 + 0.1*tau
    pl.plot([x0[0], x1[0]], [x0[1], x1[1]])
    ret = findTransitionState_dimer(x0, potential, tau)
    x0 = ret.coords
    tau=ret.eigenvec
    E = ret.energy
    x1 = x0 + 0.1*tau
    pl.plot([x0[0], x1[0]], [x0[1], x1[1]])
    pl.colorbar()
    pl.xlabel("x")
    pl.ylabel("y")
    for i in range(len(xt)):
        pl.plot(xt[i][0], xt[i][1], 'o')
        pl.plot([xt[i][0],xt[i][0] + 0.05*tt[i][0]], [xt[i][1],xt[i][1]+ 0.05*tt[i][1]], '-')
    print E
    import tstools
    potential.trajectory = []
    m1,m2 = tstools.minima_from_ts(potential, x0, tau, displace=1e-2)
    for xt in potential.trajectory:
        pl.plot(xt[0], xt[1], 'x')
    pl.axis(xmin=0.5, xmax=2.5, ymin=0.5, ymax=2.5)
    
    pl.show()          

        
Ejemplo n.º 2
0
    x0 = np.array([.75, 1.5]) #np.random.random(3)
    #final = np.array([2., .75]) #np.random.random(3)

    pl.pcolor(x, y, z, vmax=-0.5, cmap=pl.cm.PuBu)
    tau=np.array([0.5,-1.])#np.random.random(2)-0.5
    x1 = x0 + 0.1*tau
    pl.plot([x0[0], x1[0]], [x0[1], x1[1]])
    ret = findTransitionState_dimer(x0, potential, tau)
    x0 = ret.coords
    tau=ret.eigenvec
    E = ret.energy
    x1 = x0 + 0.1*tau
    pl.plot([x0[0], x1[0]], [x0[1], x1[1]])
    pl.colorbar()
    pl.xlabel("x")
    pl.ylabel("y")
    for i in range(len(xt)):
        pl.plot(xt[i][0], xt[i][1], 'o')
        pl.plot([xt[i][0],xt[i][0] + 0.05*tt[i][0]], [xt[i][1],xt[i][1]+ 0.05*tt[i][1]], '-')
    print E
    import tstools
    potential.trajectory = []
    m1,m2 = tstools.minima_from_ts(potential.getEnergyGradient, x0, tau, displace=1e-2)
    for xt in potential.trajectory:
        pl.plot(xt[0], xt[1], 'x')
    pl.axis(xmin=0.5, xmax=2.5, ymin=0.5, ymax=2.5)
    
    pl.show()