Ejemplo n.º 1
0
def run_gui_nodisorder(L=24):
    from pele.gui import run_gui
    dim=[L,L]
    system = XYModlelSystem(dim=dim, phi_disorder=0.)
    system.params.basinhopping.temperature=10.
    db = system.create_database("xy_%dx%d_nodisorder.sqlite" %(L,L))
    
    run_gui(system, db=db)
Ejemplo n.º 2
0
def run_gui_nodisorder(L=24):
    from pele.gui import run_gui
    dim = [L, L]
    system = XYModlelSystem(dim=dim, phi_disorder=0.)
    system.params.basinhopping.temperature = 10.
    db = system.create_database("xy_%dx%d_nodisorder.sqlite" % (L, L))

    run_gui(system, db=db)
Ejemplo n.º 3
0
def main():
    from xy_model_system import XYModlelSystem
    fname = "gmin.coords"
    fname = "goldstone_mode.coords"
    fname = "vortex2.coords"
    reduced_coords = np.genfromtxt(fname)
    print(len(reduced_coords))
    print np.sqrt(len(reduced_coords))
    dim = [24, 24]
    print "dim", dim

    system = XYModlelSystem(dim, phi_disorder=0)
    coords = system.pot.coords_converter.get_full_coords(reduced_coords)

    x = np.zeros(len(coords))
    y = x.copy()
    dx = x.copy()
    dy = x.copy()
    for node in system.pot.G.nodes():
        xyz = system.node2xyz(node)
        i = system.pot.indices[node]
        x[i] = xyz[0]
        y[i] = xyz[1]

        theta = coords[i]
        dx[i] = np.cos(theta)
        dy[i] = np.sin(theta)

    if True:
        pot = system.get_potential()
        energies = pot.get_spin_energies(coords)
    else:
        energies = None


#    plt.quiver(x, y, dx, dy, energies, pivot="middle", cmap="YlOrRd_r")
    if energies is not None:
        plt.quiver(x, y, dx, dy, energies, pivot="middle", cmap="cool_r")
    else:
        plt.quiver(x, y, dx, dy, pivot="middle")
    d = 0.5
    plt.xlim([-d, dim[0] - d])
    plt.ylim([-d, dim[1] - d])
    plt.tight_layout()
    plt.xticks([])
    plt.yticks([])
    plt.gcf().set_facecolor('white')
    plt.box(on=False)

    plt.savefig(fname + ".eps", format="eps")