forked from golddoushi/mcsolver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinput.py
29 lines (26 loc) · 839 Bytes
/
input.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import numpy as np
import Lattice as lat
import mcMain as mc
import matplotlib.pyplot as plt
## magnetic crystal part
LMatrix=[[1,0,0],
[0,1,0],
[0,0,1]]
# magnetic orbitals in fractional coordinates
pos=[[0,0,0]]
# couplings #source #target #edge #J(meV) negative for FM coupling
bond1=lat.Bond(0,0,np.array([1,0,0]),-1)
bond2=lat.Bond(0,0,np.array([0,1,0]),-1)
bondList=[bond1,bond2]
TList=np.linspace(2.2,2.3,10)
U4_list=[]
for L in [16,32]:
U4_L=[]
for T in TList:
mcslave=mc.MC(0,LMatrix,pos,bondList,T,L,L,1)
mData, eData=np.array(mcslave.mainLoopViaCLib(nsweep=40000,nthermal=20000,algo='Wolff'))
U4_L.append(np.mean(mData*mData)**2/np.mean(mData**4))
U4_list.append(U4_L)
plt.plot(TList,U4_list[0])
plt.plot(TList,U4_list[1])
plt.show()