-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_pi_0.py
53 lines (37 loc) · 1013 Bytes
/
get_pi_0.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 17 14:36:10 2018
@author: wangyf
"""
from set_ce_lattice import mother, dz
#from set_config_constants import config, Ec
import lattice_functions as lf
import numpy as np
import json
batch_i = 0
# name of the json file
json_name = 'ES_iso_' + str(batch_i) + '.json'
# name of the pi file
pi_name = 'pi_iso_' + str(batch_i)
#%%
'''
Read the json files
Creat pi matrix
size of number of configuration * numbers of clusters
'''
empty = 'grey'
filled = 'r'
occ = [empty, filled]
# Initialize the cluster object and isomorphs object
Graphs = lf.initialize_graph_object(mother, dz)
with open('clusters.json') as f:
Gcv = json.load(f)['Gcv']
with open(json_name) as f:
ES_data = json.load(f)
config_batch_i = ES_data['config_iso']
Graphs.get_configs(config_batch_i)
Gsv = Graphs.Gsv
Cal = lf.calculations(occ)
# pi = Cal.get_pi_matrix_l(Gsv ,Gcv)
#np.save(pi_name, pi, allow_pickle = True)
pi = np.load('pi_iso_0.npy')