➤ Background ➤ Terminology ➤ Rules for Conformations ➤ Atoms in Common ➤ Definitions of Conformations ➤ EXAMPLES ➤ Technical & Jmol Code |
| |
In 4.1, some counts of atom locations were erroneously low. Altlocs E and F have 2 locations/atom but are not listed. |
|
| |
Counts in 4.1 were correct. 4.2 adds links to identify first and second locations regardless of the altloc symbol marks. |
|
| |
Counts in 4.1 were correct. 4.2 adds links to identify first and second locations regardless of the altloc symbol marks. |
|
| |
4.1 did not accommodate 6 locations/atom. Counts in 4.1 were correct. 4.2 adds links to identify first and second locations regardless of the altloc symbol marks. |
|
| |
In 4.1, some counts of atom locations were erroneously zero. 4.2 adds links to identify first and second locations regardless of the altloc symbol marks. |
|
Eric Bob PDB Assy MLALC TotALC TotLocs Seconds Seconds 2f03 AU 0 4,912 4,912 2 2 3eoj AU 769 927 4,115 3 5sop BU1 2,755 2,826 4,266 7 1cm4 5,032 5,048 5,107 13 6 7Lb6 960 47,760 47,760 17 8 4nia AU 2,931 10,174 28,403 28 5 4oq9 AU 2,671 10,293 29,296 33 6 6sry AU 11,212 11,420 15,615 72 10 2v97 17,030 18,791 18,979 134 13 Assy: AU Asymmetric Unit; BU1 Biological Unit 1; Blank when AU = BU1. MLALC Multiple Location AltLoc Codes TotALC Total AltLoc Codes TotLocs Total Locations Simplification, when offered, must be declined in order to work with altlocs.
CODE IN VERSION 4.2 (COMPARE WITH THAT IN util.js FOR ANY LATE CHANGES): conf = []; altLocAtoms = {}; // associative array { "[SER]22:B.OG" : ({984 985}), ...} locsPerAtomBitset = []; atomNthLocs = []; // array of bitsets configCap = 6; // maximum number of configs function altLoc1() { ~configCount = 1; # BOB'S CODE # GET LOCATIONS/ATOM # Atoms with altloc codes but only a single location. locsPerAtomBitset[1] = {config=0 and altloc != ""}; # Locations for atoms with multiple locations/atom. altLocMultBitset = {%? and not config=0}; # All multiple locations. # Get associative array altLocAtoms[] { "[SER]22:B.OG" : ({984 985}), ...} for (var ata in altLocMultBitset) { var atname = ata.atom; if (altLocAtoms[atname] == null) { altLocAtoms[atname] = ({}); } altLocAtoms[atname] |= ata.atomIndex; } # Get locations for atoms with exactly 2, 3, 4, 5, 6 locations/atom. # and get ~configCount for (var key in altlocAtoms.keys) { var locs = altlocAtoms[key]; var len = locs.length; if (len > configCap) { javascript locsPerAtomExceedsCap = true; len = configCap; } if (locsPerAtomBitset[len] == null) {locsPerAtomBitset[len] = ({})}; locsPerAtomBitset[len] |= locs; if (len > ~configCount) ~configCount = len; } # Initialize array of bitsets for (var nth = 1; nth <= configCap; nth++) {atomNthLocs[nth] = ({});} # ERIC'S CODE USING BOB'S ADVICE # Get atomNthLocs[N]. N=1=1st locs of multiple loc atoms. N=2=2nd locs of multiloc atoms. for (var atname in altLocAtoms) // { "[SER]22:B.OG" : ({984 985}), ...} { // atname is an atom var locs = altLocAtoms[atname]; // bitset of altlocs for this atom var lpa = locs.length; // lpa = locs/atom. # if (lpa == 1) {continue} // we have already eliminated singletons in altLocAtoms[]. if (lpa > configCap) { javascript locsPerAtomExceedsCap = true; lpa = configCap; // Put 7th+ locations in 6th locations. No known cases. } for (var bsn = 1; bsn <= lpa; bsn++) { atomNthLocs[bsn] |= altLocAtoms[atname][bsn]; } } # ERIC'S CODE // DEFINE CONFORMATIONS AND ATOMS-NOT-REPRESENTED-IN[N] conf[1] = {%} or locsPerAtomBitset[1] or atomNthLocs[1]; conf[2] = {%} or locsPerAtomBitset[1] or atomNthLocs[2]; for (i=3; i <=~configCount; i++) { # For each configuration >2, get fill-in atoms atomsNotRepIn[N] getNotRep(i); # populates atomsNotRepIn[N] } 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 locsPerAtomBitset[1] or atomNthLocs[i] or atomsNotRepIn[i]; // syntax: select {@{conf[1]}} } } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - atomsNotRepIn = []; # ERIC'S CODE function getNotRep(lvl) { byseq = []; # Load byseq with (lvl)th locs of multloc atom labels at each sequence number. # For 3eoj AU this is 17 locations. for (var i in atomNthLocs[lvl]) { atseq = i.label("%r"); if (byseq[atseq].type == "string") byseq[atseq] = []; byseq[atseq].push(i.label("[%n]%r:%c.%a")); } # 2. GATHER BITSET OF lvl-1 LOCS (376 MULTLOC IN 3EOJ) NOT REPRESENTED at lvl (359 3EOJ). atomsNotRepIn[lvl] = {none}; for (var i in atomNthLocs[lvl-1]) { atseq = i.label("%r"); # resno==sequence number. if (atseq > byseq.length || byseq[atseq].type != "array") # no atseq element in byseq. { # print "Skipping " + atseq; # atomsNotRepIn[lvl].push(i) PUSH DOES NOT WORK FOR BITSETS atomsNotRepIn[lvl] |= i; continue; } # print "------------ Doing " + atseq; addme = i.label("[%n]%r:%c.%a"); for (var j in byseq[atseq]) # i=atomindex, j=atomlabel. { #print "" + addme + " / " + j if (addme == j) {#print "Rep " + addme; addme = ""; break;} } if (addme) {#print "NotRep " + addme; atomsNotRepIn[lvl] |= i;} } }