-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
26 lines (23 loc) · 895 Bytes
/
main.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
import json
import os
from pathlib import Path
# Collect average PAE from each file, and pair that in a Dataframe with
# the time it took for Alphafold to predict that protein
# (the number of recycles, iterations, strategy, etc on the colab)
def getAverage() -> dict[str:float]:
means = {}
for file in os.listdir("PAE Tables for 3 recycles 200 iterations and 2 seeds/"):
with open("PAE Tables for 3 recycles 200 iterations and 2 seeds/"+file) as f:
data = json.load(f)['predicted_aligned_error']
count = 0
sum = 0
for list in data:
for item in list:
count += 1
sum += item
mean = sum / count
means[Path(file).stem] = round(mean,3)
return means
means = getAverage()
for key in means.keys():
print(str(key) + ":" + str(means[key]))