Skip to content

Commit

Permalink
adding new results
Browse files Browse the repository at this point in the history
  • Loading branch information
hypnopump committed May 16, 2021
1 parent 0f6b62b commit 60c5745
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 84 deletions.
3 changes: 2 additions & 1 deletion mp_nerf/kb_proteins.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@
},
# Equal to 'ca-c-o', for OXT
"BONDTORSIONS": {
'n-ca-c-n': -0.785398163
'n-ca-c-n': -0.785398163,
'n-ca-c-o': -2.406
} # A simple approximation, not meant to be exact.
}

Expand Down
Binary file modified notebooks/experiments/100_info.joblib
Binary file not shown.
Binary file modified notebooks/experiments/200_info.joblib
Binary file not shown.
Binary file modified notebooks/experiments/300_info.joblib
Binary file not shown.
Binary file modified notebooks/experiments/400_info.joblib
Binary file not shown.
Binary file modified notebooks/experiments/500_info.joblib
Binary file not shown.
Binary file modified notebooks/experiments/600_info.joblib
Binary file not shown.
Binary file modified notebooks/experiments/700_info.joblib
Binary file not shown.
Binary file modified notebooks/experiments/800_info.joblib
Binary file not shown.
Binary file modified notebooks/experiments/900_info.joblib
Binary file not shown.
161 changes: 85 additions & 76 deletions notebooks/experiments/logs_experiment.txt
Original file line number Diff line number Diff line change
@@ -1,188 +1,197 @@
2021-05-16 13:58:13,152 INFO MainThread root Assessing lengths of: [112, 236, 327, 436, 528, 649, 760, 865, 174]

2021-05-16 13:58:13,152 INFO MainThread root Preparing speed tests: for device 'cpu'
2021-05-17 00:00:07,330 INFO MainThread root Loading data

2021-05-16 13:58:13,161 INFO MainThread root Assessing the speed of folding algorithm at length 112
2021-05-17 00:00:09,386 INFO MainThread root Data has been loaded

2021-05-16 13:58:18,521 INFO MainThread root 5.360224656 for 1000 calls
2021-05-16 13:58:18,521 INFO MainThread root Saving the related information at experiments/100_info.joblib

2021-05-16 13:58:18,523 INFO MainThread root
=======


2021-05-17 00:00:13,772 INFO MainThread root Assessing lengths of: [131, 233, 321, 431, 522, 605, 759, 821, 907]

2021-05-17 00:00:13,773 INFO MainThread root Preparing speed tests: for device 'cpu'

2021-05-17 00:00:13,785 INFO MainThread root Assessing the speed of folding algorithm at length 131

2021-05-17 00:00:19,535 INFO MainThread root 5.749439843999999 for 1000 calls
2021-05-17 00:00:19,535 INFO MainThread root Saving the related information at experiments/100_info.joblib

2021-05-17 00:00:19,536 INFO MainThread root

=======


2021-05-16 13:58:18,542 INFO MainThread root Assessing the speed of folding algorithm at length 236
2021-05-17 00:00:19,554 INFO MainThread root Assessing the speed of folding algorithm at length 233

2021-05-16 13:58:25,916 INFO MainThread root 7.374412637000001 for 1000 calls
2021-05-16 13:58:25,916 INFO MainThread root Saving the related information at experiments/200_info.joblib
2021-05-17 00:00:27,686 INFO MainThread root 8.131954185 for 1000 calls
2021-05-17 00:00:27,686 INFO MainThread root Saving the related information at experiments/200_info.joblib

2021-05-16 13:58:25,918 INFO MainThread root
2021-05-17 00:00:27,687 INFO MainThread root

=======


2021-05-16 13:58:25,942 INFO MainThread root Assessing the speed of folding algorithm at length 327
2021-05-17 00:00:27,712 INFO MainThread root Assessing the speed of folding algorithm at length 321

2021-05-16 13:58:34,686 INFO MainThread root 8.743509510999997 for 1000 calls
2021-05-16 13:58:34,686 INFO MainThread root Saving the related information at experiments/300_info.joblib
2021-05-17 00:00:36,028 INFO MainThread root 8.315729104999999 for 1000 calls
2021-05-17 00:00:36,028 INFO MainThread root Saving the related information at experiments/300_info.joblib

2021-05-16 13:58:34,687 INFO MainThread root
2021-05-17 00:00:36,029 INFO MainThread root

=======


2021-05-16 13:58:34,719 INFO MainThread root Assessing the speed of folding algorithm at length 436
2021-05-17 00:00:36,059 INFO MainThread root Assessing the speed of folding algorithm at length 431

2021-05-16 13:58:45,574 INFO MainThread root 10.854679765999997 for 1000 calls
2021-05-16 13:58:45,574 INFO MainThread root Saving the related information at experiments/400_info.joblib
2021-05-17 00:00:46,271 INFO MainThread root 10.211041927 for 1000 calls
2021-05-17 00:00:46,271 INFO MainThread root Saving the related information at experiments/400_info.joblib

2021-05-16 13:58:45,576 INFO MainThread root
2021-05-17 00:00:46,272 INFO MainThread root

=======


2021-05-16 13:58:45,623 INFO MainThread root Assessing the speed of folding algorithm at length 528
2021-05-17 00:00:46,308 INFO MainThread root Assessing the speed of folding algorithm at length 522

2021-05-16 13:58:57,644 INFO MainThread root 12.020795469999996 for 1000 calls
2021-05-16 13:58:57,644 INFO MainThread root Saving the related information at experiments/500_info.joblib
2021-05-17 00:00:57,938 INFO MainThread root 11.629142954000002 for 1000 calls
2021-05-17 00:00:57,938 INFO MainThread root Saving the related information at experiments/500_info.joblib

2021-05-16 13:58:57,645 INFO MainThread root
2021-05-17 00:00:57,939 INFO MainThread root

=======


2021-05-16 13:58:57,701 INFO MainThread root Assessing the speed of folding algorithm at length 649
2021-05-17 00:00:57,981 INFO MainThread root Assessing the speed of folding algorithm at length 605

2021-05-16 13:59:11,794 INFO MainThread root 14.093472855000002 for 1000 calls
2021-05-16 13:59:11,795 INFO MainThread root Saving the related information at experiments/600_info.joblib
2021-05-17 00:01:10,682 INFO MainThread root 12.700116232999996 for 1000 calls
2021-05-17 00:01:10,683 INFO MainThread root Saving the related information at experiments/600_info.joblib

2021-05-16 13:59:11,797 INFO MainThread root
2021-05-17 00:01:10,684 INFO MainThread root

=======


2021-05-16 13:59:11,868 INFO MainThread root Assessing the speed of folding algorithm at length 760
2021-05-17 00:01:10,737 INFO MainThread root Assessing the speed of folding algorithm at length 759

2021-05-16 13:59:27,883 INFO MainThread root 16.015339880999996 for 1000 calls
2021-05-16 13:59:27,884 INFO MainThread root Saving the related information at experiments/700_info.joblib
2021-05-17 00:01:25,666 INFO MainThread root 14.928843093000012 for 1000 calls
2021-05-17 00:01:25,666 INFO MainThread root Saving the related information at experiments/700_info.joblib

2021-05-16 13:59:27,886 INFO MainThread root
2021-05-17 00:01:25,668 INFO MainThread root

=======


2021-05-16 13:59:27,964 INFO MainThread root Assessing the speed of folding algorithm at length 865
2021-05-17 00:01:25,727 INFO MainThread root Assessing the speed of folding algorithm at length 821

2021-05-16 13:59:45,910 INFO MainThread root 17.945899956999995 for 1000 calls
2021-05-16 13:59:45,910 INFO MainThread root Saving the related information at experiments/800_info.joblib
2021-05-17 00:01:41,894 INFO MainThread root 16.167173368000007 for 1000 calls
2021-05-17 00:01:41,894 INFO MainThread root Saving the related information at experiments/800_info.joblib

2021-05-16 13:59:45,913 INFO MainThread root
2021-05-17 00:01:41,895 INFO MainThread root

=======


2021-05-16 13:59:45,935 INFO MainThread root Assessing the speed of folding algorithm at length 174
2021-05-17 00:01:41,960 INFO MainThread root Assessing the speed of folding algorithm at length 907

2021-05-16 13:59:52,137 INFO MainThread root 6.200919266 for 1000 calls
2021-05-16 13:59:52,138 INFO MainThread root Saving the related information at experiments/900_info.joblib
2021-05-17 00:01:58,826 INFO MainThread root 16.865834811 for 1000 calls
2021-05-17 00:01:58,826 INFO MainThread root Saving the related information at experiments/900_info.joblib

2021-05-16 13:59:52,139 INFO MainThread root
2021-05-17 00:01:58,827 INFO MainThread root

=======


2021-05-16 13:59:52,139 INFO MainThread root Preparing speed tests: for device device(type='cpu')
2021-05-17 00:01:58,827 INFO MainThread root Preparing speed tests: for device device(type='cpu')

2021-05-16 13:59:52,148 INFO MainThread root Assessing the speed of folding algorithm at length 112
2021-05-17 00:01:58,836 INFO MainThread root Assessing the speed of folding algorithm at length 131

2021-05-16 13:59:57,622 INFO MainThread root 5.4737392709999995 for 1000 calls
2021-05-16 13:59:57,622 INFO MainThread root Saving the related information at experiments/100_info.joblib
2021-05-17 00:02:04,473 INFO MainThread root 5.636762132000001 for 1000 calls
2021-05-17 00:02:04,473 INFO MainThread root Saving the related information at experiments/100_info.joblib

2021-05-16 13:59:57,624 INFO MainThread root
2021-05-17 00:02:04,474 INFO MainThread root

=======


2021-05-16 13:59:57,643 INFO MainThread root Assessing the speed of folding algorithm at length 236
2021-05-17 00:02:04,492 INFO MainThread root Assessing the speed of folding algorithm at length 233

2021-05-16 14:00:05,124 INFO MainThread root 7.480551407999997 for 1000 calls
2021-05-16 14:00:05,124 INFO MainThread root Saving the related information at experiments/200_info.joblib
2021-05-17 00:02:11,573 INFO MainThread root 7.081262683000006 for 1000 calls
2021-05-17 00:02:11,575 INFO MainThread root Saving the related information at experiments/200_info.joblib

2021-05-16 14:00:05,126 INFO MainThread root
2021-05-17 00:02:11,577 INFO MainThread root

=======


2021-05-16 14:00:05,156 INFO MainThread root Assessing the speed of folding algorithm at length 327
2021-05-17 00:02:11,601 INFO MainThread root Assessing the speed of folding algorithm at length 321

2021-05-16 14:00:14,154 INFO MainThread root 8.997866807000008 for 1000 calls
2021-05-16 14:00:14,155 INFO MainThread root Saving the related information at experiments/300_info.joblib
2021-05-17 00:02:19,888 INFO MainThread root 8.286120536999988 for 1000 calls
2021-05-17 00:02:19,888 INFO MainThread root Saving the related information at experiments/300_info.joblib

2021-05-16 14:00:14,156 INFO MainThread root
2021-05-17 00:02:19,889 INFO MainThread root

=======


2021-05-16 14:00:14,190 INFO MainThread root Assessing the speed of folding algorithm at length 436
2021-05-17 00:02:19,920 INFO MainThread root Assessing the speed of folding algorithm at length 431

2021-05-16 14:00:25,319 INFO MainThread root 11.128622767999985 for 1000 calls
2021-05-16 14:00:25,320 INFO MainThread root Saving the related information at experiments/400_info.joblib
2021-05-17 00:02:30,047 INFO MainThread root 10.126567298999987 for 1000 calls
2021-05-17 00:02:30,047 INFO MainThread root Saving the related information at experiments/400_info.joblib

2021-05-16 14:00:25,322 INFO MainThread root
2021-05-17 00:02:30,048 INFO MainThread root

=======


2021-05-16 14:00:25,361 INFO MainThread root Assessing the speed of folding algorithm at length 528
2021-05-17 00:02:30,085 INFO MainThread root Assessing the speed of folding algorithm at length 522

2021-05-16 14:00:37,838 INFO MainThread root 12.476804873999981 for 1000 calls
2021-05-16 14:00:37,838 INFO MainThread root Saving the related information at experiments/500_info.joblib
2021-05-17 00:02:41,576 INFO MainThread root 11.491068022000007 for 1000 calls
2021-05-17 00:02:41,576 INFO MainThread root Saving the related information at experiments/500_info.joblib

2021-05-16 14:00:37,840 INFO MainThread root
2021-05-17 00:02:41,577 INFO MainThread root

=======


2021-05-16 14:00:37,886 INFO MainThread root Assessing the speed of folding algorithm at length 649
2021-05-17 00:02:41,620 INFO MainThread root Assessing the speed of folding algorithm at length 605

2021-05-16 14:00:51,893 INFO MainThread root 14.006714434000003 for 1000 calls
2021-05-16 14:00:51,893 INFO MainThread root Saving the related information at experiments/600_info.joblib
2021-05-17 00:02:54,261 INFO MainThread root 12.640835406999997 for 1000 calls
2021-05-17 00:02:54,261 INFO MainThread root Saving the related information at experiments/600_info.joblib

2021-05-16 14:00:51,895 INFO MainThread root
2021-05-17 00:02:54,262 INFO MainThread root

=======


2021-05-16 14:00:51,947 INFO MainThread root Assessing the speed of folding algorithm at length 760
2021-05-17 00:02:54,315 INFO MainThread root Assessing the speed of folding algorithm at length 759

2021-05-16 14:01:07,231 INFO MainThread root 15.283852180999986 for 1000 calls
2021-05-16 14:01:07,231 INFO MainThread root Saving the related information at experiments/700_info.joblib
2021-05-17 00:03:09,212 INFO MainThread root 14.896864626999985 for 1000 calls
2021-05-17 00:03:09,213 INFO MainThread root Saving the related information at experiments/700_info.joblib

2021-05-16 14:01:07,232 INFO MainThread root
2021-05-17 00:03:09,214 INFO MainThread root

=======


2021-05-16 14:01:07,291 INFO MainThread root Assessing the speed of folding algorithm at length 865
2021-05-17 00:03:09,271 INFO MainThread root Assessing the speed of folding algorithm at length 821

2021-05-16 14:01:24,493 INFO MainThread root 17.202204179999995 for 1000 calls
2021-05-16 14:01:24,493 INFO MainThread root Saving the related information at experiments/800_info.joblib
2021-05-17 00:03:25,350 INFO MainThread root 16.078611724000012 for 1000 calls
2021-05-17 00:03:25,350 INFO MainThread root Saving the related information at experiments/800_info.joblib

2021-05-16 14:01:24,495 INFO MainThread root
2021-05-17 00:03:25,351 INFO MainThread root

=======


2021-05-16 14:01:24,508 INFO MainThread root Assessing the speed of folding algorithm at length 174
2021-05-17 00:03:25,415 INFO MainThread root Assessing the speed of folding algorithm at length 907

2021-05-16 14:01:30,741 INFO MainThread root 6.23271706700001 for 1000 calls
2021-05-16 14:01:30,741 INFO MainThread root Saving the related information at experiments/900_info.joblib
2021-05-17 00:03:42,216 INFO MainThread root 16.80057776199999 for 1000 calls
2021-05-17 00:03:42,217 INFO MainThread root Saving the related information at experiments/900_info.joblib

2021-05-16 14:01:30,743 INFO MainThread root
2021-05-17 00:03:42,219 INFO MainThread root

=======


2021-05-16 14:01:30,743 INFO MainThread root Execution has finished
2021-05-17 00:03:42,219 INFO MainThread root Execution has finished

Binary file not shown.
17 changes: 10 additions & 7 deletions notebooks/integrated_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get_prot(dataloader_=None, vocab_=None, min_len=80, max_len=150, verbose=Tru
Outputs: (cleaned, without padding)
(seq_str, int_seq, coords, angles, padding_seq, mask, pid)
"""
for batch in dataloader_['train']:
for b,batch in enumerate(dataloader_['train']):
# try for breaking from 2 loops at once
try:
for i in range(batch.int_seqs.shape[0]):
Expand All @@ -72,6 +72,7 @@ def get_prot(dataloader_=None, vocab_=None, min_len=80, max_len=150, verbose=Tru
# print("found a seq of length:", len(seq),
# "but oustide the threshold:", min_len, max_len)
pass

except StopIteration:
break

Expand All @@ -81,18 +82,20 @@ def get_prot(dataloader_=None, vocab_=None, min_len=80, max_len=150, verbose=Tru
if __name__ == "__main__":

logger.info("Loading data"+"\n")
lengths = [100, 200, 300, 400, 500, 600, 700, 800, 900]
lengths = [100, 200, 300, 400, 500, 600, 700, 800, 900]# [::-1]
try:
"a"+9
dataloaders_ = sidechainnet.load(casp_version=7, with_pytorch="dataloaders")
# skip
dataloaders_ = sidechainnet.load(casp_version=7, with_pytorch="dataloaders", batch_size=2)
logger.info("Data has been loaded"+"\n"+sep)
stored = [ get_prot(dataloader_=dataloaders_,
vocab_=VOCAB,
min_len=desired_len+5,
max_len=desired_len+50) for desired_len in lengths ]
max_len=desired_len+60) for desired_len in lengths ]
joblib.dump(stored, BASE_FOLDER[:-1]+"_manual/analyzed_prots.joblib")
except:
stored = joblib.load(BASE_FOLDER[:-1]+"_manual/analyzed_prots.joblib")
logger.info("Data has been loaded"+"\n"+sep)
stored = joblib.load(BASE_FOLDER[:-1]+"_manual/analyzed_prots.joblib")
logger.info("Data has been loaded"+"\n"+sep)

logger.info("Assessing lengths of: "+str([len(x[0]) for x in stored])+"\n")

Expand All @@ -103,7 +106,7 @@ def get_prot(dataloader_=None, vocab_=None, min_len=80, max_len=150, verbose=Tru

for i,desired_len in enumerate(lengths):

seq, true_coords, angles, padding_seq, mask, pid = stored[i]
seq, int_seq, true_coords, angles, padding_seq, mask, pid = stored[i]
scaffolds = mp_nerf.proteins.build_scaffolds_from_scn_angles(seq, angles.to(device))

logger.info("Assessing the speed of folding algorithm at length "+str(len(seq))+"\n")
Expand Down

0 comments on commit 60c5745

Please sign in to comment.