In [2]:
from numpy import *

class electronbasis():
    def __init__(self, N, rs, Nparticles):
        ############################################################
        ##
        ##  Initialize basis: 
        ##  N = number of shells
        ##  rs = parameter for volume 
        ##  Nparticles = Number of holes (conflicting naming, sorry)
        ##
        ###########################################################
        
        self.rs = rs
        self.states = []
        self.nstates = 0
        self.nparticles = Nparticles
        self.nshells = N - 1
        self.Nm = N + 1
        
        self.k_step = 2*(self.Nm + 1)
        Nm = N
        n = 0 #current shell
        ene_integer = 0
        while n <= self.nshells:
            is_shell = False
            for x in range(-Nm, Nm+1):
                for y in range(-Nm, Nm+1):
                    for z in range(-Nm,Nm+1):
                        e = x*x + y*y + z*z
                        if e   == ene_integer:
                            is_shell = True
                            self.nstates += 2
                            self.states.append([e, x,y,z,1])
                            self.states.append([e, x,y,z, -1])
                            
            if is_shell:
                n += 1
            ene_integer += 1
        self.L3 = (4*pi*self.nparticles*self.rs**3)/3.0
        self.L2 = self.L3**(2/3.0)
        self.L = pow(self.L3, 1/3.0)
        
        for i in range(self.nstates):
            self.states[i][0] *= 2*(pi**2)/self.L**2 #Multiplying in the missing factors in the single particle energy
        self.states = array(self.states) #converting to array to utilize vectorized calculations    
        
    def hfenergy(self, nParticles):
        #Calculate the HF-energy (reference energy) for nParticles particles
        e0 = 0.0
        if nParticles<=self.nstates:
            for i in range(nParticles):
                e0 += self.h(i,i)
                for j in range(nParticles):
                    if j != i:
                        e0 += .5*self.v(i,j,i,j)
        else:
            #Safety for cases where nParticles exceeds size of basis
            print "Not enough basis states."
            
        return e0
                
    def h(self, p,q):
        #Return single particle energy
        return self.states[p,0]*(p==q)

    
    def v(self,p,q,r,s):
        #Two body interaction for electron gas
        val = 0
        terms = 0.0
        term1 = 0.0
        term2 = 0.0
        kdpl = self.kdplus(p,q,r,s)
        if kdpl != 0:
            val = 1.0/self.L3
            if self.kdspin(p,r)*self.kdspin(q,s)==1:
                if self.kdwave(p,r) != 1.0:
                    term1 = self.L2/(pi*self.absdiff2(r,p))
            if self.kdspin(p,s)*self.kdspin(q,r)==1:
                if self.kdwave(p,s) != 1.0:
                    term2 = self.L2/(pi*self.absdiff2(s,p))
        return val*(term1-term2)

    
    #The following is a series of kroenecker deltas used in the two-body interactions. 
    #Just ignore these lines unless you suspect an error here
    def kdi(self,a,b):
        #Kroenecker delta integer
        return 1.0*(a==b)
    def kda(self,a,b):
        #Kroenecker delta array
        d = 1.0
        #print a,b,
        for i in range(len(a)):
            d*=(a[i]==b[i])
        return d
    def kdfullplus(self,p,q,r,s):
        #Kroenecker delta wavenumber p+q,r+s
        return self.kda(self.states[p][1:5]+self.states[q][1:5],self.states[r][1:5]+self.states[s][1:5])
    def kdplus(self,p,q,r,s):
        #Kroenecker delta wavenumber p+q,r+s
        return self.kda(self.states[p][1:4]+self.states[q][1:4],self.states[r][1:4]+self.states[s][1:4])
    def kdspin(self,p,q):
        #Kroenecker delta spin
        return self.kdi(self.states[p][4], self.states[q][4])
    def kdwave(self,p,q):
        #Kroenecker delta wavenumber
        return self.kda(self.states[p][1:4],self.states[q][1:4])
    def absdiff2(self,p,q):
        val = 0.0
        for i in range(1,4):
            val += (self.states[p][i]-self.states[q][i])*(self.states[p][i]-self.states[q][i])
        return val

        
def MBPT2(bs):
    #2. order MBPT Energy 
    Nh = bs.nparticles
    Np = bs.nstates-bs.nparticles #Note the conflicting notation here. bs.nparticles is number of hole states 
    vhhpp = zeros((Nh**2, Np**2))
    vpphh = zeros((Np**2, Nh**2))
    #manual MBPT(2) energy (Should be -0.525588309385 for 66 states, shells = 5, in this code)
    psum2 = 0
    for i in range(Nh):
        for j in range(Nh):
            for a in range(Np):
                for b in range(Np):
                    #val1 = bs.v(i,j,a+Nh,b+Nh)
                    #val2 = bs.v(a+Nh,b+Nh,i,j)
                    #if val1!=val2:
                    #    print val1, val2
                    vhhpp[i + j*Nh, a+b*Np] = bs.v(i,j,a+Nh,b+Nh)
                    vpphh[a+b*Np,i + j*Nh] = bs.v(a+Nh,b+Nh,i,j)/(bs.states[i,0] + bs.states[j,0] - bs.states[a + Nh, 0] - bs.states[b+Nh,0])
    psum = .25*sum(dot(vhhpp,vpphh).diagonal())
    return psum
    
def MBPT2_fast(bs):
    #2. order MBPT Energy 
    Nh = bs.nparticles
    Np = bs.nstates-bs.nparticles #Note the conflicting notation here. bs.nparticles is number of hole states 
    vhhpp = zeros((Nh**2, Np**2))
    vpphh = zeros((Np**2, Nh**2))
    #manual MBPT(2) energy (Should be -0.525588309385 for 66 states, shells = 5, in this code)
    psum2 = 0
    for i in range(Nh):
        for j in range(i):
            for a in range(Np):
                for b in range(a):
                    val = bs.v(i,j,a+Nh,b+Nh)
                    eps = val/(bs.states[i,0] + bs.states[j,0] - bs.states[a + Nh, 0] - bs.states[b+Nh,0])
                    vhhpp[i + j*Nh, a+b*Np] = val 
                    vhhpp[j + i*Nh, a+b*Np] = -val 
                    vhhpp[i + j*Nh, b+a*Np] = -val
                    vhhpp[j + i*Nh, b+a*Np] = val 
        
                    
                    vpphh[a+b*Np,i + j*Nh] = eps
                    vpphh[a+b*Np,j + i*Nh] = -eps
                    vpphh[b+a*Np,i + j*Nh] = -eps
                    vpphh[b+a*Np,j + i*Nh] = eps
                    
                    
    psum = .25*sum(dot(vhhpp,vpphh).diagonal())
    return psum


#user input here
number_of_shells = 5
number_of_holes = 14 #(particles)


#initialize basis    
bs = electronbasis(number_of_shells,1.0,number_of_holes) #shells, r_s = 1.0, holes

#Print some info to screen
print "Number of shells:", number_of_shells
print "Number of states:", bs.nstates
print "Number of holes :", bs.nparticles
print "Reference Energy:", bs.hfenergy(number_of_holes), "hartrees "
print "                :", 2*bs.hfenergy(number_of_holes), "rydbergs "

print "Ref.E. per hole :", bs.hfenergy(number_of_holes)/number_of_holes, "hartrees "
print "                :", 2*bs.hfenergy(number_of_holes)/number_of_holes, "rydbergs "



#calculate MBPT2 energy
print "MBPT2 energy    :", MBPT2_fast(bs), " hartrees"


Number of shells: 5
Number of states: 66
Number of holes : 14
Reference Energy: 13.6035573356 hartrees 
                : 27.2071146711 rydbergs 
Ref.E. per hole : 0.971682666826 hartrees 
                : 1.94336533365 rydbergs 
MBPT2 energy    : -0.525588309385  hartrees

In [1]:
from numpy import *

nmax =2
nshell = 3*nmax*nmax
count = 1
tzmin = 1

print "Symmetric nuclear matter:"  
print "a, nx,   ny,   nz,   sz,   tz,   nx^2 + ny^2 + nz^2"
for n in range(nshell): 
    for nx in range(-nmax,nmax+1):
         for ny in range(-nmax,nmax+1):
            for nz in range(-nmax, nmax+1):  
                for sz in range(-1,1+1):
                    tz = 1
                    for tz in range(-tzmin,tzmin+1):
                        e = nx*nx + ny*ny + nz*nz
                        if e == n:
                            if sz != 0: 
                                if tz != 0: 
                                    print count, "  ",nx,"  ",ny, "  ",nz,"  ",sz,"  ",tz,"         ",e
                                    count += 1
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
nmax =1
nshell = 3*nmax*nmax
count = 1
tzmin = 1
print "------------------------------------"
print "Neutron matter:"                                    
print "a, nx,   ny,   nz,   sz,    nx^2 + ny^2 + nz^2"
for n in range(nshell): 
    for nx in range(-nmax,nmax+1):
         for ny in range(-nmax,nmax+1):
            for nz in range(-nmax, nmax+1):  
                for sz in range(-1,1+1):
                    e = nx*nx + ny*ny + nz*nz
                    if e == n:
                        if sz != 0: 
                            print count, "  ",nx,"  ",ny, "  ",sz,"  ",tz,"         ",e
                            count += 1


Symmetric nuclear matter:
a, nx,   ny,   nz,   sz,   tz,   nx^2 + ny^2 + nz^2
1    0    0    0    -1    -1           0
2    0    0    0    -1    1           0
3    0    0    0    1    -1           0
4    0    0    0    1    1           0
5    -1    0    0    -1    -1           1
6    -1    0    0    -1    1           1
7    -1    0    0    1    -1           1
8    -1    0    0    1    1           1
9    0    -1    0    -1    -1           1
10    0    -1    0    -1    1           1
11    0    -1    0    1    -1           1
12    0    -1    0    1    1           1
13    0    0    -1    -1    -1           1
14    0    0    -1    -1    1           1
15    0    0    -1    1    -1           1
16    0    0    -1    1    1           1
17    0    0    1    -1    -1           1
18    0    0    1    -1    1           1
19    0    0    1    1    -1           1
20    0    0    1    1    1           1
21    0    1    0    -1    -1           1
22    0    1    0    -1    1           1
23    0    1    0    1    -1           1
24    0    1    0    1    1           1
25    1    0    0    -1    -1           1
26    1    0    0    -1    1           1
27    1    0    0    1    -1           1
28    1    0    0    1    1           1
29    -1    -1    0    -1    -1           2
30    -1    -1    0    -1    1           2
31    -1    -1    0    1    -1           2
32    -1    -1    0    1    1           2
33    -1    0    -1    -1    -1           2
34    -1    0    -1    -1    1           2
35    -1    0    -1    1    -1           2
36    -1    0    -1    1    1           2
37    -1    0    1    -1    -1           2
38    -1    0    1    -1    1           2
39    -1    0    1    1    -1           2
40    -1    0    1    1    1           2
41    -1    1    0    -1    -1           2
42    -1    1    0    -1    1           2
43    -1    1    0    1    -1           2
44    -1    1    0    1    1           2
45    0    -1    -1    -1    -1           2
46    0    -1    -1    -1    1           2
47    0    -1    -1    1    -1           2
48    0    -1    -1    1    1           2
49    0    -1    1    -1    -1           2
50    0    -1    1    -1    1           2
51    0    -1    1    1    -1           2
52    0    -1    1    1    1           2
53    0    1    -1    -1    -1           2
54    0    1    -1    -1    1           2
55    0    1    -1    1    -1           2
56    0    1    -1    1    1           2
57    0    1    1    -1    -1           2
58    0    1    1    -1    1           2
59    0    1    1    1    -1           2
60    0    1    1    1    1           2
61    1    -1    0    -1    -1           2
62    1    -1    0    -1    1           2
63    1    -1    0    1    -1           2
64    1    -1    0    1    1           2
65    1    0    -1    -1    -1           2
66    1    0    -1    -1    1           2
67    1    0    -1    1    -1           2
68    1    0    -1    1    1           2
69    1    0    1    -1    -1           2
70    1    0    1    -1    1           2
71    1    0    1    1    -1           2
72    1    0    1    1    1           2
73    1    1    0    -1    -1           2
74    1    1    0    -1    1           2
75    1    1    0    1    -1           2
76    1    1    0    1    1           2
77    -1    -1    -1    -1    -1           3
78    -1    -1    -1    -1    1           3
79    -1    -1    -1    1    -1           3
80    -1    -1    -1    1    1           3
81    -1    -1    1    -1    -1           3
82    -1    -1    1    -1    1           3
83    -1    -1    1    1    -1           3
84    -1    -1    1    1    1           3
85    -1    1    -1    -1    -1           3
86    -1    1    -1    -1    1           3
87    -1    1    -1    1    -1           3
88    -1    1    -1    1    1           3
89    -1    1    1    -1    -1           3
90    -1    1    1    -1    1           3
91    -1    1    1    1    -1           3
92    -1    1    1    1    1           3
93    1    -1    -1    -1    -1           3
94    1    -1    -1    -1    1           3
95    1    -1    -1    1    -1           3
96    1    -1    -1    1    1           3
97    1    -1    1    -1    -1           3
98    1    -1    1    -1    1           3
99    1    -1    1    1    -1           3
100    1    -1    1    1    1           3
101    1    1    -1    -1    -1           3
102    1    1    -1    -1    1           3
103    1    1    -1    1    -1           3
104    1    1    -1    1    1           3
105    1    1    1    -1    -1           3
106    1    1    1    -1    1           3
107    1    1    1    1    -1           3
108    1    1    1    1    1           3
109    -2    0    0    -1    -1           4
110    -2    0    0    -1    1           4
111    -2    0    0    1    -1           4
112    -2    0    0    1    1           4
113    0    -2    0    -1    -1           4
114    0    -2    0    -1    1           4
115    0    -2    0    1    -1           4
116    0    -2    0    1    1           4
117    0    0    -2    -1    -1           4
118    0    0    -2    -1    1           4
119    0    0    -2    1    -1           4
120    0    0    -2    1    1           4
121    0    0    2    -1    -1           4
122    0    0    2    -1    1           4
123    0    0    2    1    -1           4
124    0    0    2    1    1           4
125    0    2    0    -1    -1           4
126    0    2    0    -1    1           4
127    0    2    0    1    -1           4
128    0    2    0    1    1           4
129    2    0    0    -1    -1           4
130    2    0    0    -1    1           4
131    2    0    0    1    -1           4
132    2    0    0    1    1           4
133    -2    -1    0    -1    -1           5
134    -2    -1    0    -1    1           5
135    -2    -1    0    1    -1           5
136    -2    -1    0    1    1           5
137    -2    0    -1    -1    -1           5
138    -2    0    -1    -1    1           5
139    -2    0    -1    1    -1           5
140    -2    0    -1    1    1           5
141    -2    0    1    -1    -1           5
142    -2    0    1    -1    1           5
143    -2    0    1    1    -1           5
144    -2    0    1    1    1           5
145    -2    1    0    -1    -1           5
146    -2    1    0    -1    1           5
147    -2    1    0    1    -1           5
148    -2    1    0    1    1           5
149    -1    -2    0    -1    -1           5
150    -1    -2    0    -1    1           5
151    -1    -2    0    1    -1           5
152    -1    -2    0    1    1           5
153    -1    0    -2    -1    -1           5
154    -1    0    -2    -1    1           5
155    -1    0    -2    1    -1           5
156    -1    0    -2    1    1           5
157    -1    0    2    -1    -1           5
158    -1    0    2    -1    1           5
159    -1    0    2    1    -1           5
160    -1    0    2    1    1           5
161    -1    2    0    -1    -1           5
162    -1    2    0    -1    1           5
163    -1    2    0    1    -1           5
164    -1    2    0    1    1           5
165    0    -2    -1    -1    -1           5
166    0    -2    -1    -1    1           5
167    0    -2    -1    1    -1           5
168    0    -2    -1    1    1           5
169    0    -2    1    -1    -1           5
170    0    -2    1    -1    1           5
171    0    -2    1    1    -1           5
172    0    -2    1    1    1           5
173    0    -1    -2    -1    -1           5
174    0    -1    -2    -1    1           5
175    0    -1    -2    1    -1           5
176    0    -1    -2    1    1           5
177    0    -1    2    -1    -1           5
178    0    -1    2    -1    1           5
179    0    -1    2    1    -1           5
180    0    -1    2    1    1           5
181    0    1    -2    -1    -1           5
182    0    1    -2    -1    1           5
183    0    1    -2    1    -1           5
184    0    1    -2    1    1           5
185    0    1    2    -1    -1           5
186    0    1    2    -1    1           5
187    0    1    2    1    -1           5
188    0    1    2    1    1           5
189    0    2    -1    -1    -1           5
190    0    2    -1    -1    1           5
191    0    2    -1    1    -1           5
192    0    2    -1    1    1           5
193    0    2    1    -1    -1           5
194    0    2    1    -1    1           5
195    0    2    1    1    -1           5
196    0    2    1    1    1           5
197    1    -2    0    -1    -1           5
198    1    -2    0    -1    1           5
199    1    -2    0    1    -1           5
200    1    -2    0    1    1           5
201    1    0    -2    -1    -1           5
202    1    0    -2    -1    1           5
203    1    0    -2    1    -1           5
204    1    0    -2    1    1           5
205    1    0    2    -1    -1           5
206    1    0    2    -1    1           5
207    1    0    2    1    -1           5
208    1    0    2    1    1           5
209    1    2    0    -1    -1           5
210    1    2    0    -1    1           5
211    1    2    0    1    -1           5
212    1    2    0    1    1           5
213    2    -1    0    -1    -1           5
214    2    -1    0    -1    1           5
215    2    -1    0    1    -1           5
216    2    -1    0    1    1           5
217    2    0    -1    -1    -1           5
218    2    0    -1    -1    1           5
219    2    0    -1    1    -1           5
220    2    0    -1    1    1           5
221    2    0    1    -1    -1           5
222    2    0    1    -1    1           5
223    2    0    1    1    -1           5
224    2    0    1    1    1           5
225    2    1    0    -1    -1           5
226    2    1    0    -1    1           5
227    2    1    0    1    -1           5
228    2    1    0    1    1           5
229    -2    -1    -1    -1    -1           6
230    -2    -1    -1    -1    1           6
231    -2    -1    -1    1    -1           6
232    -2    -1    -1    1    1           6
233    -2    -1    1    -1    -1           6
234    -2    -1    1    -1    1           6
235    -2    -1    1    1    -1           6
236    -2    -1    1    1    1           6
237    -2    1    -1    -1    -1           6
238    -2    1    -1    -1    1           6
239    -2    1    -1    1    -1           6
240    -2    1    -1    1    1           6
241    -2    1    1    -1    -1           6
242    -2    1    1    -1    1           6
243    -2    1    1    1    -1           6
244    -2    1    1    1    1           6
245    -1    -2    -1    -1    -1           6
246    -1    -2    -1    -1    1           6
247    -1    -2    -1    1    -1           6
248    -1    -2    -1    1    1           6
249    -1    -2    1    -1    -1           6
250    -1    -2    1    -1    1           6
251    -1    -2    1    1    -1           6
252    -1    -2    1    1    1           6
253    -1    -1    -2    -1    -1           6
254    -1    -1    -2    -1    1           6
255    -1    -1    -2    1    -1           6
256    -1    -1    -2    1    1           6
257    -1    -1    2    -1    -1           6
258    -1    -1    2    -1    1           6
259    -1    -1    2    1    -1           6
260    -1    -1    2    1    1           6
261    -1    1    -2    -1    -1           6
262    -1    1    -2    -1    1           6
263    -1    1    -2    1    -1           6
264    -1    1    -2    1    1           6
265    -1    1    2    -1    -1           6
266    -1    1    2    -1    1           6
267    -1    1    2    1    -1           6
268    -1    1    2    1    1           6
269    -1    2    -1    -1    -1           6
270    -1    2    -1    -1    1           6
271    -1    2    -1    1    -1           6
272    -1    2    -1    1    1           6
273    -1    2    1    -1    -1           6
274    -1    2    1    -1    1           6
275    -1    2    1    1    -1           6
276    -1    2    1    1    1           6
277    1    -2    -1    -1    -1           6
278    1    -2    -1    -1    1           6
279    1    -2    -1    1    -1           6
280    1    -2    -1    1    1           6
281    1    -2    1    -1    -1           6
282    1    -2    1    -1    1           6
283    1    -2    1    1    -1           6
284    1    -2    1    1    1           6
285    1    -1    -2    -1    -1           6
286    1    -1    -2    -1    1           6
287    1    -1    -2    1    -1           6
288    1    -1    -2    1    1           6
289    1    -1    2    -1    -1           6
290    1    -1    2    -1    1           6
291    1    -1    2    1    -1           6
292    1    -1    2    1    1           6
293    1    1    -2    -1    -1           6
294    1    1    -2    -1    1           6
295    1    1    -2    1    -1           6
296    1    1    -2    1    1           6
297    1    1    2    -1    -1           6
298    1    1    2    -1    1           6
299    1    1    2    1    -1           6
300    1    1    2    1    1           6
301    1    2    -1    -1    -1           6
302    1    2    -1    -1    1           6
303    1    2    -1    1    -1           6
304    1    2    -1    1    1           6
305    1    2    1    -1    -1           6
306    1    2    1    -1    1           6
307    1    2    1    1    -1           6
308    1    2    1    1    1           6
309    2    -1    -1    -1    -1           6
310    2    -1    -1    -1    1           6
311    2    -1    -1    1    -1           6
312    2    -1    -1    1    1           6
313    2    -1    1    -1    -1           6
314    2    -1    1    -1    1           6
315    2    -1    1    1    -1           6
316    2    -1    1    1    1           6
317    2    1    -1    -1    -1           6
318    2    1    -1    -1    1           6
319    2    1    -1    1    -1           6
320    2    1    -1    1    1           6
321    2    1    1    -1    -1           6
322    2    1    1    -1    1           6
323    2    1    1    1    -1           6
324    2    1    1    1    1           6
325    -2    -2    0    -1    -1           8
326    -2    -2    0    -1    1           8
327    -2    -2    0    1    -1           8
328    -2    -2    0    1    1           8
329    -2    0    -2    -1    -1           8
330    -2    0    -2    -1    1           8
331    -2    0    -2    1    -1           8
332    -2    0    -2    1    1           8
333    -2    0    2    -1    -1           8
334    -2    0    2    -1    1           8
335    -2    0    2    1    -1           8
336    -2    0    2    1    1           8
337    -2    2    0    -1    -1           8
338    -2    2    0    -1    1           8
339    -2    2    0    1    -1           8
340    -2    2    0    1    1           8
341    0    -2    -2    -1    -1           8
342    0    -2    -2    -1    1           8
343    0    -2    -2    1    -1           8
344    0    -2    -2    1    1           8
345    0    -2    2    -1    -1           8
346    0    -2    2    -1    1           8
347    0    -2    2    1    -1           8
348    0    -2    2    1    1           8
349    0    2    -2    -1    -1           8
350    0    2    -2    -1    1           8
351    0    2    -2    1    -1           8
352    0    2    -2    1    1           8
353    0    2    2    -1    -1           8
354    0    2    2    -1    1           8
355    0    2    2    1    -1           8
356    0    2    2    1    1           8
357    2    -2    0    -1    -1           8
358    2    -2    0    -1    1           8
359    2    -2    0    1    -1           8
360    2    -2    0    1    1           8
361    2    0    -2    -1    -1           8
362    2    0    -2    -1    1           8
363    2    0    -2    1    -1           8
364    2    0    -2    1    1           8
365    2    0    2    -1    -1           8
366    2    0    2    -1    1           8
367    2    0    2    1    -1           8
368    2    0    2    1    1           8
369    2    2    0    -1    -1           8
370    2    2    0    -1    1           8
371    2    2    0    1    -1           8
372    2    2    0    1    1           8
373    -2    -2    -1    -1    -1           9
374    -2    -2    -1    -1    1           9
375    -2    -2    -1    1    -1           9
376    -2    -2    -1    1    1           9
377    -2    -2    1    -1    -1           9
378    -2    -2    1    -1    1           9
379    -2    -2    1    1    -1           9
380    -2    -2    1    1    1           9
381    -2    -1    -2    -1    -1           9
382    -2    -1    -2    -1    1           9
383    -2    -1    -2    1    -1           9
384    -2    -1    -2    1    1           9
385    -2    -1    2    -1    -1           9
386    -2    -1    2    -1    1           9
387    -2    -1    2    1    -1           9
388    -2    -1    2    1    1           9
389    -2    1    -2    -1    -1           9
390    -2    1    -2    -1    1           9
391    -2    1    -2    1    -1           9
392    -2    1    -2    1    1           9
393    -2    1    2    -1    -1           9
394    -2    1    2    -1    1           9
395    -2    1    2    1    -1           9
396    -2    1    2    1    1           9
397    -2    2    -1    -1    -1           9
398    -2    2    -1    -1    1           9
399    -2    2    -1    1    -1           9
400    -2    2    -1    1    1           9
401    -2    2    1    -1    -1           9
402    -2    2    1    -1    1           9
403    -2    2    1    1    -1           9
404    -2    2    1    1    1           9
405    -1    -2    -2    -1    -1           9
406    -1    -2    -2    -1    1           9
407    -1    -2    -2    1    -1           9
408    -1    -2    -2    1    1           9
409    -1    -2    2    -1    -1           9
410    -1    -2    2    -1    1           9
411    -1    -2    2    1    -1           9
412    -1    -2    2    1    1           9
413    -1    2    -2    -1    -1           9
414    -1    2    -2    -1    1           9
415    -1    2    -2    1    -1           9
416    -1    2    -2    1    1           9
417    -1    2    2    -1    -1           9
418    -1    2    2    -1    1           9
419    -1    2    2    1    -1           9
420    -1    2    2    1    1           9
421    1    -2    -2    -1    -1           9
422    1    -2    -2    -1    1           9
423    1    -2    -2    1    -1           9
424    1    -2    -2    1    1           9
425    1    -2    2    -1    -1           9
426    1    -2    2    -1    1           9
427    1    -2    2    1    -1           9
428    1    -2    2    1    1           9
429    1    2    -2    -1    -1           9
430    1    2    -2    -1    1           9
431    1    2    -2    1    -1           9
432    1    2    -2    1    1           9
433    1    2    2    -1    -1           9
434    1    2    2    -1    1           9
435    1    2    2    1    -1           9
436    1    2    2    1    1           9
437    2    -2    -1    -1    -1           9
438    2    -2    -1    -1    1           9
439    2    -2    -1    1    -1           9
440    2    -2    -1    1    1           9
441    2    -2    1    -1    -1           9
442    2    -2    1    -1    1           9
443    2    -2    1    1    -1           9
444    2    -2    1    1    1           9
445    2    -1    -2    -1    -1           9
446    2    -1    -2    -1    1           9
447    2    -1    -2    1    -1           9
448    2    -1    -2    1    1           9
449    2    -1    2    -1    -1           9
450    2    -1    2    -1    1           9
451    2    -1    2    1    -1           9
452    2    -1    2    1    1           9
453    2    1    -2    -1    -1           9
454    2    1    -2    -1    1           9
455    2    1    -2    1    -1           9
456    2    1    -2    1    1           9
457    2    1    2    -1    -1           9
458    2    1    2    -1    1           9
459    2    1    2    1    -1           9
460    2    1    2    1    1           9
461    2    2    -1    -1    -1           9
462    2    2    -1    -1    1           9
463    2    2    -1    1    -1           9
464    2    2    -1    1    1           9
465    2    2    1    -1    -1           9
466    2    2    1    -1    1           9
467    2    2    1    1    -1           9
468    2    2    1    1    1           9
------------------------------------
Neutron matter:
a, nx,   ny,   nz,   sz,    nx^2 + ny^2 + nz^2
1    0    0    -1    1           0
2    0    0    1    1           0
3    -1    0    -1    1           1
4    -1    0    1    1           1
5    0    -1    -1    1           1
6    0    -1    1    1           1
7    0    0    -1    1           1
8    0    0    1    1           1
9    0    0    -1    1           1
10    0    0    1    1           1
11    0    1    -1    1           1
12    0    1    1    1           1
13    1    0    -1    1           1
14    1    0    1    1           1
15    -1    -1    -1    1           2
16    -1    -1    1    1           2
17    -1    0    -1    1           2
18    -1    0    1    1           2
19    -1    0    -1    1           2
20    -1    0    1    1           2
21    -1    1    -1    1           2
22    -1    1    1    1           2
23    0    -1    -1    1           2
24    0    -1    1    1           2
25    0    -1    -1    1           2
26    0    -1    1    1           2
27    0    1    -1    1           2
28    0    1    1    1           2
29    0    1    -1    1           2
30    0    1    1    1           2
31    1    -1    -1    1           2
32    1    -1    1    1           2
33    1    0    -1    1           2
34    1    0    1    1           2
35    1    0    -1    1           2
36    1    0    1    1           2
37    1    1    -1    1           2
38    1    1    1    1           2

In [ ]:


In [ ]: