zeroblue Lv 1
I also roughed in checking the segments in the untrimmed parts for score changes, but ran out of time to test and run this part.
This script is a test of the trim tool, and demonstrates some of the issues I'm having with it.
It runs three tests:
Trim Only
Wiggle and Shake - Changes whole trimmed structure
Idealize and Fix- Changes only part of the trimmed structure
I also roughed in checking the segments in the untrimmed parts for score changes, but ran out of time to test and run this part.
Here are my results from running the script on puzzle 2596 on a Windows 10 computer:
Score at start-186976.22652354
Scoring all segments
————————————————-
Running test Trim only on protein 1
Starting at score -186976.22652354
Starting trim score -28956.604092001
End trim score -28956.604092001
Expected score change 0
Expected end score -186976.22652354
Actual end score -186976.22652354
Actual score change 0
————————————————-
Test results
Segment ideal change test passsed
Test Trim only passed for protein 1
Running test Trim only on protein 2
Starting at score -186976.22652354
Starting trim score -21967.922105462
End trim score -21967.922105462
Expected score change 0
Expected end score -186976.22652354
Actual end score -186976.22652354
Actual score change 0
————————————————-
Test results
Segment ideal change test passsed
Test Trim only passed for protein 2
Running test Trim only on protein 3
Starting at score -186976.22652354
Starting trim score -100960.50921253
End trim score -100960.50921253
Expected score change 0
Expected end score -186976.22652354
Actual end score -186976.22652354
Actual score change 0
————————————————-
Test results
Segment ideal change test passsed
Test Trim only passed for protein 3
Running test Trim only on protein 4
Starting at score -186976.22652354
Starting trim score -11091.191113543
End trim score -11091.191113543
Expected score change 0
Expected end score -186976.22652354
Actual end score -186976.22652354
Actual score change 0
————————————————-
Test results
Segment ideal change test passsed
Test Trim only passed for protein 4
Running test Wiggle and Shake on protein 1
Starting at score -186976.22652354
Starting trim score -28956.604092001
End trim score 6245.8752143339
Expected score change 35202.479306335
Expected end score -151773.7472172
Actual end score -205617.81341496
Actual score change -18641.58689142
————————————————-
Test results
Unexpected idealize score change on segment 212
of -5363.4282472836
***
Test Wiggle and Shake failed for protein 1
With an unexpected score change
of -53844.066197755
***
Reloading protein
Running test Wiggle and Shake on protein 2
Starting at score -186976.22652354
Starting trim score -21967.922105462
End trim score 3539.6904917304
Expected score change 25507.612597192
Expected end score -161468.61392634
Actual end score -204737.23749055
Actual score change -17761.010967018
————————————————-
Test results
Unexpected idealize score change on segment 577
of -5363.4288075283
***
Test Wiggle and Shake failed for protein 2
With an unexpected score change
of -43268.623564211
***
Reloading protein
Running test Wiggle and Shake on protein 3
Starting at score -186976.22652354
Starting trim score -100960.50921253
End trim score -68452.920724404
Expected score change 32507.588488126
Expected end score -154468.63803541
Actual end score -219347.93919093
Actual score change -32371.712667393
————————————————-
Test results
Unexpected idealize score change on segment 942
of -5363.4277723449
***
Test Wiggle and Shake failed for protein 3
With an unexpected score change
of -64879.301155519
***
Reloading protein
Running test Wiggle and Shake on protein 4
Starting at score -186976.22652354
Starting trim score -11091.191113543
End trim score 18955.004931552
Expected score change 30046.196045095
Expected end score -156930.03047844
Actual end score -221449.89283122
Actual score change -34473.666307683
————————————————-
Test results
Unexpected idealize score change on segment 1307
of -5363.4268499749
***
Test Wiggle and Shake failed for protein 4
With an unexpected score change
of -64519.862352778
***
Reloading protein
Running test Idealize and Fix on protein 1
Starting at score -186976.22652354
Starting trim score -28956.604092001
End trim score -28225.861093512
Expected score change 730.7429984889
Expected end score -186245.48352505
Actual end score -196987.66749697
Actual score change -10011.44097343
————————————————-
Test results
Segment ideal change test passsed
Test Idealize and Fix failed for protein 1
With an unexpected score change
of -10742.183971919
***
Reloading protein
Running test Idealize and Fix on protein 2
Starting at score -186976.22652354
Starting trim score -21967.922105462
End trim score -19686.857220655
Expected score change 2281.0648848068
Expected end score -184695.16163873
Actual end score -195428.45167921
Actual score change -8452.225155677
————————————————-
Test results
Segment ideal change test passsed
Test Idealize and Fix failed for protein 2
With an unexpected score change
of -10733.290040484
***
Reloading protein
Running test Idealize and Fix on protein 3
Starting at score -186976.22652354
Starting trim score -100960.50921253
End trim score -98320.617468621
Expected score change 2639.8917439087
Expected end score -184336.33477963
Actual end score -195064.84269403
Actual score change -8088.6161704888
————————————————-
Test results
Segment ideal change test passsed
Test Idealize and Fix failed for protein 3
With an unexpected score change
of -10728.507914397
***
Reloading protein
Running test Idealize and Fix on protein 4
Starting at score -186976.22652354
Starting trim score -11091.191113543
End trim score -10488.458762346
Expected score change 602.73235119705
Expected end score -186373.49417234
Actual end score -197106.59776497
Actual score change -10130.371241435
————————————————-
Test results
Segment ideal change test passsed
Test Idealize and Fix failed for protein 4
With an unexpected score change
of -10733.103592632
***
Reloading protein
I forgot to mention: This was run on the 2596 puzzle from a fresh start.
i have also been noticing that untrim will mess with the ideal score of a few segments. you can take the 10 lowest scoring segments and shake them to fix this issue. the shake doesn't seem to do much to the actual rotamer of the sidechain but does fix the score. you can hand pick the red segments or write a recipe that picks the 10 worst scoring segments. that way you only have to shake a few and it is a quick fix to the score with no real change in atom positions.
@bravosk8erboy Good to know. Any thoughts on the other unexpected score changes?
trim tool on it's own is kinda tricky and unituitive. segments in the trim will often expand over other trimmed out segments. when untrimmed these segments will overlap and give worst scores. this can be tricky to fix and sometimes is worse over all. using a larger trim then selecting a small group of segments within the trim so there is a buffer to the grayed out segments can help, but this issue you experienced is still going to happen. you can look at this recipe for more info on how trim needs additional steps to work properly in recipes. also segment index numbers will change https://fold.it/recipes/108963
Thanks, I'll take a look. I've been trying to trim entire proteins (as shown in my script) and so the reindexing is pretty easy.