-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpdist.py
61 lines (42 loc) · 1.78 KB
/
pdist.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
53
54
55
56
57
58
59
60
import numpy as np
def function(n_iter, iter_group, field_name):
# We want to return the appropriate dataset.
# Datasets are named dihedral_{2..14}
return iter_group['auxdata'][field_name]
def dihedral_2(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_2')
def dihedral_3(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_3')
def dihedral_4(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_4')
def dihedral_5(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_5')
def dihedral_6(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_6')
def dihedral_7(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_7')
def dihedral_8(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_8')
def dihedral_9(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_9')
def dihedral_10(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_10')
def dihedral_11(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_11')
def dihedral_12(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_12')
def dihedral_13(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_13')
def dihedral_14(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_14')
def dihedral_14(n_iter, iter_group):
return function(n_iter, iter_group, 'dihedral_14')
def dihedral_all(n_iter, iter_group):
data = {}
for i in range(2,15):
data[i] = function(n_iter, iter_group, 'dihedral_{}'.format(i))
# Now we need to add them all together.
return_arr = data[2]
for i in range(3,15):
return_arr = np.concatenate((return_arr, data[i]), axis=1)
return return_arr