In [2]:
!ipython locate profile


/home/dominique/.ipython/profile_default

In [1]:
%install_ext https://raw.githubusercontent.com/rasbt/python_reference/master/ipython_magic/watermark.py
%load_ext watermark


Installed watermark.py. To use it, type:
  %load_ext watermark

In [2]:
import numpy as np
from numpy import linalg as LA
from numpy import array
from numpy import pi

In [3]:
import matplotlib.pyplot as plt
import sys
import math
from scipy.optimize import curve_fit
import pickle

if "/home/dominique/Code/PG/Source" not in sys.path:
    sys.path.append("/home/dominique/Code/PG/Source")

import phase_fluctuations as PF
from phase_fluctuations import TbModel, TbParams, SWaveModel, DWaveModel
from MCMC import MCMCDriver
import scipy.constants as cst
def K_to_meV(in_temp):
    return cst.physical_constants["Boltzmann constant in eV/K"][0] * in_temp * 1000.0
def meV_to_K(in_temp):
    return  in_temp / 1000.0 / cst.physical_constants["Boltzmann constant in eV/K"][0]
def func(x, a, b, c):
    return a * np.exp(-b * x) + c

In [4]:
%load_ext autoreload
%autoreload 2

In [5]:
%who
%matplotlib inline


DWaveModel	 K_to_meV	 LA	 MCMCDriver	 PF	 SWaveModel	 TbModel	 TbParams	 array	 
cst	 curve_fit	 func	 math	 meV_to_K	 np	 pi	 pickle	 plt	 
sys	 

In [6]:
%watermark -a "Dominique" -d -t -u -v -h -m -g


Dominique Last updated: 03/04/2015 21:41:52 

CPython 2.7.8
IPython 3.0.0

compiler   : GCC 4.9.1
system     : Linux
release    : 3.16.0-24-generic
machine    : x86_64
processor  : x86_64
CPU cores  : 4
interpreter: 64bit
host name  : Olympe
Git hash   : e48347cd6f63b48f3040fe5516c016ae19e1d0d0

TB Model

We pick the following parameters:

  • hopping constant $ t= 250$ meV
  • $\Delta = 1.0 t$ so that $T_c^{MF} = 0.5 t$, and so that $\xi_0 \simeq a_0$
  • $g = -0.25$, unitless, so as to match the article's formalism, not the thesis'
  • $J = \dfrac{0.1 t}{0.89}$ so as to set $T_{KT} = 0.1 t$.

This means that we have the following physical properties


In [7]:
Tc_mf = meV_to_K(0.5*250)

In [8]:
print '$T_c^{MF} = $', Tc_mf, "K"
print r"$T_{KT} = $", Tc_mf/10.0, "K"


$T_c^{MF} = $ 1450.56491032 K
$T_{KT} = $ 145.056491032 K

Instantiation


In [9]:
T_CST = 0.25
MY_PARAMS = {"width":10, "chem_potential": 0.0,
                 "hopping_constant": T_CST, "J_constant": 0.1 * T_CST / 0.89,
                 "delta": 1.0 * T_CST,
                 "use_assaad": False, "broadening_delta": 0.01 * T_CST}
MY_MODEL = TbModel(MY_PARAMS)

Modification


In [10]:
TB_PARAMS = {"width":20, "use_assaad": True}
MY_MODEL.set_params(TB_PARAMS)
print MY_MODEL


Class: <class 'phase_fluctuations.TbModel'>
broadening delta: 0.0025 eV
use Assad: True
is up to date: False

Lattice: 
Class: <class 'phase_fluctuations.TbParams'>
Width: 20
Chemical potential: 0.0 eV
Hopping constant: 0.25 eV
Number of sites: 
400

DOS Computation


In [11]:
fig, ax = plt.subplots(figsize = (10, 8), dpi=100, frameon=False)

x_axis_ampl = 4.5
xmin = -x_axis_ampl
xmax = x_axis_ampl

ax.set_xlim([xmin, xmax])
#ax.set_ylim([0.0, 1.0])
l_xticks = np.linspace(int(xmin), int(xmax), 9,endpoint=True)
ax.set_xticks(l_xticks)
ax.set_xticklabels(['%1.1f'  %elem for elem in l_xticks])
#ax.set_xticklabels([r'$\psi$' for elem in l_xticks])
#ax.set_yticks(np.linspace(xmin, xmax, 5,endpoint=True))
#ax.set_yticklabels(['%1.1f'  %elem for elem in np.linspace(xmin, xmax,5,endpoint=True)])

dos_values = np.real(MY_MODEL.get_dos())

ax.plot(MY_MODEL.lattice.omega_mesh/T_CST, dos_values)


Out[11]:
[<matplotlib.lines.Line2D at 0x7fe6b3de4ed0>]

d Wave

Instantiation


In [12]:
T_CST = 0.25
BCS_PARAMS = {"width":4, "chem_potential": 0.0,
              "hopping_constant": T_CST, "J_constant":  0.1 * T_CST / 0.89,
              "g_constant": 0.25, "delta": 1.0 * T_CST, "use_assaad": True,
              "uniform_phase": True, "temperature": 100}
MY_DWAVE_MODEL = DWaveModel(BCS_PARAMS)

In [13]:
print MY_DWAVE_MODEL


Class: <class 'phase_fluctuations.DWaveModel'>
Seed: 1234567890
Uniform phase: True
Temperature: 100 K

Base class:
Class: <class 'phase_fluctuations.DWaveModel'>
broadening delta: 0.0025 eV
use Assad: True
is up to date: False

Lattice: 
Class: <class 'phase_fluctuations.PairingParams'>
J constant: 0.0280898876404 eV
U constant: -0.825 eV
g constant: 0.25 eV
delta: 0.25 eV

Base class:
Class: <class 'phase_fluctuations.PairingParams'>
Width: 4
Chemical potential: 0.0 eV
Hopping constant: 0.25 eV
Number of sites: 
16

Modification


In [20]:
BCS_PARAMS = {"width":20, "use_assaad": True,
              "uniform_phase": True,  "temperature": 1.75*145.0, "delta":1.0 * T_CST}
MY_DWAVE_MODEL.set_params(BCS_PARAMS)
print MY_DWAVE_MODEL
print "temp: ", K_to_meV(MY_DWAVE_MODEL.temperature), "meV"


Class: <class 'phase_fluctuations.DWaveModel'>
Seed: 1234567890
Uniform phase: True
Temperature: 253.75 K

Base class:
Class: <class 'phase_fluctuations.DWaveModel'>
broadening delta: 0.0025 eV
use Assad: True
is up to date: False

Lattice: 
Class: <class 'phase_fluctuations.PairingParams'>
J constant: 0.0280898876404 eV
U constant: -0.825 eV
g constant: 0.25 eV
delta: 0.25 eV

Base class:
Class: <class 'phase_fluctuations.PairingParams'>
Width: 20
Chemical potential: 0.0 eV
Hopping constant: 0.25 eV
Number of sites: 
400
temp:  21.866480965 meV

DOS Computation


In [21]:
dos_values = np.real(MY_DWAVE_MODEL.get_dos())

In [22]:
fig, ax = plt.subplots(figsize = (10, 8), dpi=100, frameon=False)

x_values = MY_DWAVE_MODEL.lattice.omega_mesh / T_CST
xmin = np.amin(x_values)
xmax = np.amax(x_values)

ax.set_xlim([xmin, xmax])
ax.set_xticks(np.linspace(int(xmin), int(xmax), 13,endpoint=True))

ax.plot(x_values, dos_values)


Out[22]:
[<matplotlib.lines.Line2D at 0x7fe6b3a88550>]

MC Driver

Instantiation


In [19]:
BCS_PARAMS = {"width":20, "use_assaad": True,
              "uniform_phase": False,  "temperature": 1.75*145.0}
MY_DWAVE_MODEL.set_params(BCS_PARAMS)
print MY_DWAVE_MODEL._uniform_phase


False

In [20]:
MC_Params = {"seed": 222315, "intervals": 100,
             "target_snapshots": 15, "observable_list":["correlation_length"]}
MY_DRIVER = MCMCDriver(MY_DWAVE_MODEL, MC_Params)

Modification


In [21]:
MC_PARAMS_MP = {"intervals": BCS_PARAMS["width"]**2 / 2,
             "target_snapshots": 25,
               "algorithm":"metropolis"}
MC_PARAMS_CLUSTER = {"intervals": 5,
             "target_snapshots": 25,
            "algorithm":"cluster"}
MY_DRIVER.set_params(MC_PARAMS_MP)
print MY_DWAVE_MODEL._uniform_phase


False

In [22]:
print MY_DRIVER
print MY_DRIVER.params


Class: <class 'MCMC.MCMCDriver'>
Seed: 222315
Intervals: 200
Algorithm: metropolis
Target snapshots: 25
Observable list: ['correlation_length']

MC Object:
Class: <class 'phase_fluctuations.DWaveModel'>
Seed: 1234567890
Uniform phase: False
Temperature: 253.75 K

Base class:
Class: <class 'phase_fluctuations.DWaveModel'>
broadening delta: 0.0025 eV
use Assad: True
is up to date: False

Lattice: 
Class: <class 'phase_fluctuations.PairingParams'>
J constant: 0.0280898876404 eV
U constant: -0.825 eV
g constant: 0.25 eV
delta: 0.25 eV

Base class:
Class: <class 'phase_fluctuations.PairingParams'>
Width: 20
Chemical potential: 0.0 eV
Hopping constant: 0.25 eV
Number of sites: 
400

Results: None
{'intervals': 200, 'algorithm': 'metropolis', 'seed': 222315, 'target_snapshots': 25, 'observable_list': ['correlation_length']}

In [23]:
MY_DRIVER.mc_object.set_params({"temperature": 2.0 * 145.0})
MY_DRIVER.thermalize(20000)
#MY_DRIVER.mc_object.set_params({"temperature": 1.1 * 145.0})
#MY_DRIVER.thermalize(50)

In [24]:
MY_DRIVER.execute()

In [25]:
result = MY_DRIVER.result
data = result.observable_results["correlation_length"]
print data["length_values"].size
print data["correlation_values"]
print result
x_data = np.sqrt(data["length_values"])
y_data = data["correlation_values"]


61
[ 1.          0.66393038  0.5609427   0.4886587   0.43833572  0.36044287
  0.35428328  0.33314644  0.27891308  0.25162207  0.23737188  0.21302291
  0.19965251  0.149759    0.14549239  0.12122383  0.09214054  0.08260682
  0.06818341  0.06063839  0.04725132  0.04036517  0.02698932 -0.0106428
 -0.0069925  -0.00628162 -0.01719227 -0.02937149 -0.04573613 -0.07065132
 -0.06019953 -0.07021935 -0.08544784 -0.08153892 -0.09007035 -0.10531669
 -0.08708187 -0.08394734 -0.10868912 -0.14031567 -0.10614007 -0.13612095
 -0.15773493 -0.15451596 -0.09347888 -0.10018225 -0.1713111  -0.11610113
 -0.19624482 -0.14238547 -0.19073125 -0.18354003 -0.2335083  -0.21945946
 -0.20296101 -0.25077159 -0.22680808 -0.27959799 -0.26006842 -0.29269442
 -0.3017232 ]
Class: <class 'MCMC.ResultContainer'>
bcs_params: {'hopping_constant': 0.25, 'uniform_phase': False, 'use_assaad': True, 'delta': 0.25, 'width': 20, 'J_constant': 0.02808988764044944, 'g_constant': 0.25, 'chem_potential': 0.0, 'temperature': 290.0}
mc_params: {'intervals': 200, 'algorithm': 'metropolis', 'seed': 222315, 'target_snapshots': 25, 'observable_list': ['correlation_length']}
Code version: {'id': 'aab789eb0c93256e31988777dbee4523b69d0a31', 'time': 'Fri, 27 Mar 2015 22:12'}
Observable list: ['correlation_length']

In [26]:
fig, ax = plt.subplots(figsize = (10, 8), dpi=100, frameon=False)

ax.plot(x_data, y_data)

popt, pcov = curve_fit(func, x_data, y_data)
print popt
ax.plot(x_data, func(x_data, popt[0], popt[1], popt[2]))
print "corr length:", 1.0/popt[1]


[ 1.25346342  0.1809791  -0.35813725]
corr length: 5.52549987511

In [27]:
results = pickle.load( open( "result_corr_dwave_new.txt", "rb" ) )
results = np.append(results, pickle.load( open( "result_corr_dwave_new2.txt", "rb" ) ))
#results = np.append(results, pickle.load( open( "result_corr_dwave_4.txt", "rb" ) ))
#results = np.append(results, pickle.load( open( "result_corr_dwave_5.txt", "rb" ) ))
#results = np.append(results, pickle.load( open( "result_corr_dwave_6.txt", "rb" ) ))
data = results[0].observable_results["correlation_length"]
l_values = []
for elem in data['correlation_values']:
    l_values.append(np.average(elem))
print data["length_values"].size
print len(l_values)


135
135

In [28]:
datas = {}
temps =np.array([])
for elem in results:
    temps = np.append(temps, elem.bcs_params['temperature'])
temps = np.unique(temps)
for temp in temps:
    datas[temp] = np.array([elem for elem in results if elem.bcs_params['temperature']==temp])
print temps
print datas[temps[0]].size


[  120.    150.    180.    225.    270.    300.    337.5   375.    450.
   525.    600.    900.   1200.   1500. ]
32

In [29]:
x_datas = {}
y_datas = {}

for temp in temps:
    x_datas[temp] = np.sqrt(datas[temp][0].observable_results["correlation_length"]["length_values"])
    y_datas[temp] = np.zeros((x_datas[temp].size))
    total_sum = 0
    for elem in datas[temp]:
        y_datas[temp] +=\
            elem.observable_results["correlation_length"]["correlation_values"]
    y_datas[temp] /= datas[temp].size
#np.array([np.average(zob) for zob in elem.observable_results["correlation_length"]["correlation_values"]])

In [30]:
fig, ax = plt.subplots(figsize = (14, 12), dpi=100, frameon=False)
corr_lens = {}

for temp in temps:
    x_data = x_datas[temp]
    y_data = y_datas[temp]
    ax.plot(x_data, y_data, label=str(temp))
    popt, pcov = curve_fit(func, x_data, y_data)
    print "temp: ", temp, "params: ", popt, "length: ", 1.0/popt[1]
    corr_lens[temp] = 1.0/popt[1]
    ax.plot(x_data, func(x_data, popt[0], popt[1], popt[2]))
    
ax.legend()
plt.savefig("Notransition.pdf")


temp:  120.0 params:  [ 1.14372054  0.23009512 -0.04266259] length:  4.34602874956
temp:  150.0 params:  [ 1.10762502  0.22314066 -0.03685925] length:  4.48147822085
temp:  180.0 params:  [ 1.09377588  0.22437676 -0.04093276] length:  4.45678948379
temp:  225.0 params:  [ 1.04074735  0.22113531 -0.04339766] length:  4.52211805846
temp:  270.0 params:  [ 0.96120445  0.22926338 -0.0261074 ] length:  4.36179555272
temp:  300.0 params:  [ 0.92824275  0.23624405 -0.0338617 ] length:  4.23291083972
temp:  337.5 params:  [ 0.89589153  0.33870323  0.01544003] length:  2.95243717962
temp:  375.0 params:  [ 0.90820289  0.44182946  0.01420455] length:  2.26331672678
temp:  450.0 params:  [ 0.97532524  0.74455971  0.00219452] length:  1.34307562404
temp:  525.0 params:  [ 0.99338141  1.00944174  0.00136639] length:  0.990646571302
temp:  600.0 params:  [  9.97993428e-01   1.20860871e+00   7.89160939e-04] length:  0.827397647455
temp:  900.0 params:  [  1.00017233e+00   1.72023878e+00   3.24411766e-04] length:  0.581314647837
temp:  1200.0 params:  [  1.00035941e+00   2.04283842e+00   1.09660712e-05] length:  0.489514974763
temp:  1500.0 params:  [  1.00022174e+00   2.27974489e+00   2.77868136e-05] length:  0.438645571709

In [31]:
fig, ax = plt.subplots(figsize = (14, 12), dpi=100, frameon=False)
x_es = np.sort(np.array(corr_lens.keys()))
y_es = np.array([corr_lens[elem] for elem in x_es])

ax.plot(x_es, y_es)
ax.grid(True)


Questions:

  • What is the temp below which the correlation length should plateau?
  • What should the value of such plateau be ? Why would it be different from the size of the grid for low enough T??

In [32]:
a = np.array([1.125, 1.25, 1.5, 1.75, 2.0, 3.0, 4.0, 5.0])

In [33]:
fig, ax = plt.subplots(figsize = (10, 8), dpi=100, frameon=False)

for temp in temps:
    x_data = x_datas[temp]
    y_data = y_datas[temp]
    ax.plot(x_data, y_data, label=str(temp))
    popt, pcov = curve_fit(func, x_data, y_data)
    print "temp: ", temp, "params: ", popt, "length: ", 1.0/popt[1]
    ax.plot(x_data, func(x_data, popt[0], popt[1], popt[2]))
ax.legend()


temp:  120.0 params:  [ 1.14372054  0.23009512 -0.04266259] length:  4.34602874956
temp:  150.0 params:  [ 1.10762502  0.22314066 -0.03685925] length:  4.48147822085
temp:  180.0 params:  [ 1.09377588  0.22437676 -0.04093276] length:  4.45678948379
temp:  225.0 params:  [ 1.04074735  0.22113531 -0.04339766] length:  4.52211805846
temp:  270.0 params:  [ 0.96120445  0.22926338 -0.0261074 ] length:  4.36179555272
temp:  300.0 params:  [ 0.92824275  0.23624405 -0.0338617 ] length:  4.23291083972
temp:  337.5 params:  [ 0.89589153  0.33870323  0.01544003] length:  2.95243717962
temp:  375.0 params:  [ 0.90820289  0.44182946  0.01420455] length:  2.26331672678
temp:  450.0 params:  [ 0.97532524  0.74455971  0.00219452] length:  1.34307562404
temp:  525.0 params:  [ 0.99338141  1.00944174  0.00136639] length:  0.990646571302
temp:  600.0 params:  [  9.97993428e-01   1.20860871e+00   7.89160939e-04] length:  0.827397647455
temp:  900.0 params:  [  1.00017233e+00   1.72023878e+00   3.24411766e-04] length:  0.581314647837
temp:  1200.0 params:  [  1.00035941e+00   2.04283842e+00   1.09660712e-05] length:  0.489514974763
temp:  1500.0 params:  [  1.00022174e+00   2.27974489e+00   2.77868136e-05] length:  0.438645571709
Out[33]:
<matplotlib.legend.Legend at 0x7f8ba639a990>

In [34]:
#print results
print ""




In [35]:
fig, ax = plt.subplots(figsize = (10, 8), dpi=100, frameon=False)
temp = 120.0

x_data = x_datas[temp]
y_data = y_datas[temp]
l_values = y_data
popt, pcov = curve_fit(func, x_data, y_data)

ax.plot(np.sqrt(data["length_values"]), np.log(l_values - popt[2]))

ax.plot(np.sqrt(data["length_values"]), np.log(popt[0]) - popt[1] * np.sqrt(data["length_values"]))


Out[35]:
[<matplotlib.lines.Line2D at 0x7f8ba62fa0d0>]

In [36]:
fig, ax = plt.subplots(figsize = (10, 8), dpi=100, frameon=False)

x_values = MY_DRIVER.mc_object.lattice.omega_mesh / T_CST
xmin = np.amin(x_values)
xmax = np.amax(x_values)

ax.set_xlim([xmin, xmax])
ax.set_xticks(np.linspace(int(xmin), int(xmax), 13,endpoint=True))

ax.plot(x_values, dos_values)


Out[36]:
[<matplotlib.lines.Line2D at 0x7f8ba50eb990>]

In [37]:
print MY_DRIVER.result.observable_results
print MY_DRIVER.result.observable_list


{'correlation_length': {'length_values': array([   0.,    1.,    2.,    4.,    5.,    8.,    9.,   10.,   13.,
         16.,   17.,   18.,   20.,   25.,   26.,   29.,   32.,   34.,
         36.,   37.,   40.,   41.,   45.,   49.,   50.,   52.,   53.,
         58.,   61.,   64.,   65.,   68.,   72.,   73.,   74.,   80.,
         81.,   82.,   85.,   89.,   90.,   97.,   98.,  100.,  101.,
        104.,  106.,  109.,  113.,  116.,  117.,  125.,  128.,  130.,
        136.,  145.,  149.,  162.,  164.,  181.,  200.]), 'correlation_values': array([ 1.        ,  0.66393038,  0.5609427 ,  0.4886587 ,  0.43833572,
        0.36044287,  0.35428328,  0.33314644,  0.27891308,  0.25162207,
        0.23737188,  0.21302291,  0.19965251,  0.149759  ,  0.14549239,
        0.12122383,  0.09214054,  0.08260682,  0.06818341,  0.06063839,
        0.04725132,  0.04036517,  0.02698932, -0.0106428 , -0.0069925 ,
       -0.00628162, -0.01719227, -0.02937149, -0.04573613, -0.07065132,
       -0.06019953, -0.07021935, -0.08544784, -0.08153892, -0.09007035,
       -0.10531669, -0.08708187, -0.08394734, -0.10868912, -0.14031567,
       -0.10614007, -0.13612095, -0.15773493, -0.15451596, -0.09347888,
       -0.10018225, -0.1713111 , -0.11610113, -0.19624482, -0.14238547,
       -0.19073125, -0.18354003, -0.2335083 , -0.21945946, -0.20296101,
       -0.25077159, -0.22680808, -0.27959799, -0.26006842, -0.29269442,
       -0.3017232 ])}}
['correlation_length']

In [38]:
MC_PARAMS = {"observable_list":["correlation_length", "DOS"]}
MY_DRIVER.set_params(MC_PARAMS)

In [39]:
MY_DRIVER.mc_object.temperature = 1.0 * 145.0
MY_DRIVER.thermalize(20000)

In [40]:
MY_DRIVER.execute()

In [41]:
fig, ax = plt.subplots(figsize = (10, 8), dpi=100, frameon=False)

x_axis_ampl = 4.5
xmin = -x_axis_ampl
xmax = x_axis_ampl

ax.set_xlim([xmin, xmax])
#ax.set_ylim([0.0, 1.0])
ax.set_xticks(np.linspace(int(xmin), int(xmax), 9,endpoint=True))
#ax.set_yticks(np.linspace(xmin, xmax, 5,endpoint=True))
#ax.set_xticklabels(['%1.1f'  %elem for elem in np.linspace(xmin, xmax,5,endpoint=True)])
#ax.set_yticklabels(['%1.1f'  %elem for elem in np.linspace(xmin, xmax,5,endpoint=True)])

dos_values = MY_DRIVER.result.observable_results["DOS"]

ax.plot(dos_values['omega_mesh']/ T_CST, dos_values['DOS_values'])


Out[41]:
[<matplotlib.lines.Line2D at 0x7f8ba5126210>]

In [ ]:


In [42]:
1500/ 450


Out[42]:
3

In [ ]:


In [ ]:


In [43]:
#300K
temps = [15, 113, 150, 155, 300, 450, 600, 800, 1200]
names = ['./result_dwave_' + str(temp)+'.txt' for temp in temps]
input_files = [np.loadtxt(name) for name in names]

In [44]:
print len(input_files[3])


1001

In [45]:
fig, ax = plt.subplots(figsize = (10, 8), dpi=100, frameon=False)

x_axis_ampl = 6.0 * T_CST
nb_ticks = 1001
xvalues = np.linspace(-x_axis_ampl, x_axis_ampl, nb_ticks, endpoint=True)

#ymin = 0.0
#ymax = 0.5
xmin = -x_axis_ampl
xmax = x_axis_ampl

ax.set_xlim([xmin, xmax])
#ax.set_ylim([0.0, 2.0])
ax.set_xticks(np.linspace(int(xmin), int(xmax), 9,endpoint=True))
#ax.set_yticks(np.linspace(xmin, xmax, 5,endpoint=True))
#ax.set_xticklabels(['%1.1f'  %elem for elem in np.linspace(xmin, xmax,5,endpoint=True)])
#ax.set_yticklabels(['%1.1f'  %elem for elem in np.linspace(xmin, xmax,5,endpoint=True)])


for i in range(len(input_files)):
    ax.plot(xvalues/T_CST, input_files[i], ls = '-', label = str(temps[i]))

ax.legend(loc=2)
plt.savefig("DOS.pdf")



In [46]:
#200K
out = np.loadtxt('result_dwave_750.txt')

In [47]:
fig, ax = plt.subplots(figsize = (10, 8), dpi=100, frameon=False)

x_axis_ampl = 4.2
nb_ticks = 1001
xvalues = np.linspace(-x_axis_ampl, x_axis_ampl, nb_ticks, endpoint=True)

#ymin = 0.0
#ymax = 0.5
xmin = -x_axis_ampl
xmax = x_axis_ampl

ax.set_xlim([xmin, xmax])
#ax.set_ylim([0.0, 1.0])
ax.set_xticks(np.linspace(int(xmin), int(xmax), 9,endpoint=True))
#ax.set_yticks(np.linspace(xmin, xmax, 5,endpoint=True))
#ax.set_xticklabels(['%1.1f'  %elem for elem in np.linspace(xmin, xmax,5,endpoint=True)])
#ax.set_yticklabels(['%1.1f'  %elem for elem in np.linspace(xmin, xmax,5,endpoint=True)])

ax.plot(xvalues/0.25, out)
plt.savefig("DOS_dwave_T_KT.pdf")



In [48]:
150.0*1.75


Out[48]:
262.5

In [49]:
print cst.physical_constants["Boltzmann constant in eV/K"][0]


8.6173324e-05

In [50]:
import pickle

In [51]:
data_new = pickle.load(open('result_dwave_alltemps.txt', 'rb'))

In [52]:
print data


{'length_values': array([   0.,    1.,    2.,    4.,    5.,    8.,    9.,   10.,   13.,
         16.,   17.,   18.,   20.,   25.,   26.,   29.,   32.,   34.,
         36.,   37.,   40.,   41.,   45.,   49.,   50.,   52.,   53.,
         58.,   61.,   64.,   65.,   68.,   72.,   73.,   74.,   80.,
         81.,   82.,   85.,   89.,   90.,   97.,   98.,  100.,  101.,
        104.,  106.,  109.,  113.,  116.,  117.,  121.,  122.,  125.,
        128.,  130.,  136.,  137.,  144.,  145.,  146.,  148.,  149.,
        153.,  157.,  160.,  162.,  164.,  169.,  170.,  173.,  178.,
        180.,  181.,  185.,  193.,  194.,  196.,  197.,  200.,  202.,
        205.,  208.,  212.,  218.,  221.,  225.,  226.,  229.,  232.,
        233.,  234.,  241.,  242.,  244.,  245.,  250.,  256.,  257.,
        260.,  261.,  265.,  269.,  272.,  274.,  277.,  281.,  288.,
        289.,  290.,  292.,  296.,  305.,  306.,  313.,  317.,  320.,
        325.,  337.,  338.,  340.,  346.,  356.,  365.,  369.,  377.,
        392.,  394.,  400.,  421.,  425.,  450.,  452.,  481.,  512.]), 'correlation_values': array([ 1.        ,  0.61771988,  0.51654111,  0.45146803,  0.41552654,
        0.35783257,  0.34813015,  0.33297411,  0.29906908,  0.27423394,
        0.26650947,  0.2556659 ,  0.24425479,  0.21506143,  0.21197028,
        0.19727872,  0.18430173,  0.17605589,  0.16545653,  0.16388313,
        0.1556586 ,  0.15549892,  0.14357008,  0.12689402,  0.12847865,
        0.12886536,  0.12069994,  0.11366366,  0.11166176,  0.09866681,
        0.10037632,  0.09302533,  0.09245942,  0.08938673,  0.09012946,
        0.08060184,  0.07952646,  0.07730941,  0.07397525,  0.07100556,
        0.07036434,  0.0653598 ,  0.06019836,  0.06284665,  0.06602768,
        0.06245908,  0.05992937,  0.0585112 ,  0.05208329,  0.05541735,
        0.05336525,  0.06133714,  0.06038045,  0.05418055,  0.04758961,
        0.05144774,  0.05019952,  0.05140931,  0.05635031,  0.05207037,
        0.04908185,  0.05354018,  0.04765903,  0.05185779,  0.04737431,
        0.05235833,  0.04559166,  0.0473186 ,  0.0520184 ,  0.05264783,
        0.05370351,  0.05328107,  0.04936886,  0.04602135,  0.05070065,
        0.04807448,  0.05178174,  0.05824039,  0.05714049,  0.05190998,
        0.04912888,  0.05340328,  0.04839567,  0.05505203,  0.05004063,
        0.05192696,  0.05096506,  0.05714448,  0.05611521,  0.05351693,
        0.04980095,  0.05593114,  0.05697293,  0.04884956,  0.0475092 ,
        0.05195965,  0.05331756,  0.05566209,  0.05507176,  0.05314913,
        0.05503024,  0.05045585,  0.05040848,  0.05824863,  0.05309322,
        0.05262232,  0.05814577,  0.04877592,  0.05282366,  0.04808412,
        0.05654519,  0.05173006,  0.05288657,  0.05264231,  0.04984396,
        0.05219726,  0.05214408,  0.05268032,  0.05299309,  0.04913533,
        0.05066625,  0.05068181,  0.05240744,  0.05094169,  0.05057108,
        0.05078343,  0.05340664,  0.050656  ,  0.04956955,  0.05064723,
        0.04961763,  0.0498003 ,  0.04929454,  0.04855682,  0.04696912])}

In [53]:
print data['length_values']


[   0.    1.    2.    4.    5.    8.    9.   10.   13.   16.   17.   18.
   20.   25.   26.   29.   32.   34.   36.   37.   40.   41.   45.   49.
   50.   52.   53.   58.   61.   64.   65.   68.   72.   73.   74.   80.
   81.   82.   85.   89.   90.   97.   98.  100.  101.  104.  106.  109.
  113.  116.  117.  121.  122.  125.  128.  130.  136.  137.  144.  145.
  146.  148.  149.  153.  157.  160.  162.  164.  169.  170.  173.  178.
  180.  181.  185.  193.  194.  196.  197.  200.  202.  205.  208.  212.
  218.  221.  225.  226.  229.  232.  233.  234.  241.  242.  244.  245.
  250.  256.  257.  260.  261.  265.  269.  272.  274.  277.  281.  288.
  289.  290.  292.  296.  305.  306.  313.  317.  320.  325.  337.  338.
  340.  346.  356.  365.  369.  377.  392.  394.  400.  421.  425.  450.
  452.  481.  512.]

In [ ]: