# Timings are for 6ucy # BLOCK 1: < 1 SEC locsPerAtomBitset1 = {config=0 and altloc != ""}; altlocMultBitset = {%? and not config=0}; # All multiple locations. print altlocMultBitset.size # BLOCK 2: < 1 SEC locsperatomjson = {altloc != "" and not config=0}.label("[%n]%r:%[chain].%a").pivot().pivot(); print locsperatomjson.size # BLOCK 3: ~18 sec locsPerAtomBitset2 = {@{locsperatomjson[2]}}; locsPerAtomBitset3 = {@{locsperatomjson[3]}}; locsPerAtomBitset4 = {@{locsperatomjson[4]}}; locsPerAtomBitset5 = {@{locsperatomjson[5]}}; locsPerAtomBitset6 = {@{locsperatomjson[6]}} or {@{locsperatomjson[7]}} or {@{locsperatomjson[8]}}; # BLOCK 4: ≤ 1 sec ~configCount = 1; if (locsPerAtomBitset2.count) {~configCount = 2}; if (locsPerAtomBitset3.count) {~configCount = 3}; if (locsPerAtomBitset4.count) {~configCount = 4}; if (locsPerAtomBitset5.count) {~configCount = 5}; if (locsPerAtomBitset6.count) {~configCount = 6}; print ~configCount # BLOCK 5: ~22 sec previous = ""; locnum = 0; atlabel = ""; atomNthLocs = []; for (var i = 1; i <= 7; i++) {atomNthLocs[i] = {none}}; amax = altlocMultBitset.size; for (i=1; i <= amax; i++) { atlabel = altlocMultBitset[i].label("[%n]%r:%c.%a"); if (atlabel != previous) {locnum = 1;} else {locnum++}; atomNthLocs[locnum] = atomNthLocs[locnum] or altlocMultBitset[i]; previous = atlabel; } select {@{atomNthLocs[2]}} # BLOCK 6: < 1 sec conf[1] = {%} or locsPerAtomBitset1 or atomNthLocs[1]; conf[2] = {%} or locsPerAtomBitset1 or atomNthLocs[2]; select {@{conf[@2]}} # BLOCK 7: ~4 sec for (i=3; i <=~configCount; i++) { # For each configuration >2, get fill-in atoms atomsNotRepIn[N] getNotRep(i); # populates atomsNotRepIn[N] print atomsNotRepIn[i].size } if (~configCount >= 4) {atomsNotRepIn[4] |= atomsNotRepIn[3];} if (~configCount >= 5) {atomsNotRepIn[5] |= atomsNotRepIn[4];} if (~configCount >= 6) {atomsNotRepIn[6] |= atomsNotRepIn[5];} for (i=3; i <=~configCount; i++) { conf[i] = {%} or locsPerAtomBitset1 or atomNthLocs[i] or atomsNotRepIn[i]; select {@{conf[@i]}} } message DONE------------------------