SEE ALSO forks.txt, conformations.txt, isolatealtloc.txt See also conformation-tests.txt See also conformation-timings.txt See ANIMATION below. Jmol atom expressions are detailed in Evernote PDB CASES under Altloc, e.g. %, %?. javascript function listBBForkDeviations() uses JSmol function listAltLocs(). ----------------------------------------------------------------------------- Atoms with altloc codes but a single location. Bob Hanson contacted Frank von Delft author of 5sop. There, they are atoms with partial occupancy, but only one location. See data from 24 cases in ALTLOC-SINGLETON-OCCUPANCY.XLSX ----------------------------------------------------------------------------- Tested all PDB IDs in Notes under altlocs (22) and in PPda (6), total 28, for {config=1}.count == conf[1].count using alert #15 in help2.js. These were not equal. conf[1] was always higher by the amounts listed 7ucr +97 2wlk +52 3eoj AU +24 6o4f +6 3pga +4 5sop +2 7s99 +1 ----------------------------------------------------------------------------- {%} = locations of atoms with no altloc codes. locsPerAtomBitset1 = locations of atoms with altloc codes but only a single location. The following variables have locations ONLY for atoms with multiple locations: I. scripts.js: if ({%?}.count) {conformation1 = {config=-1}} else {conformation1 = {all}} II. locsPerAtomBitset[N] where N is 1-6 (renamed from old ~altloc2list) = all locations of atoms with N locations/atom. altlocMultBitset (all multiple locations) configCount = maximum number of locations/atom. III. atomNthLocs[N] = (bitset) Nth locations of atoms. One location/atom. N is 1-7. IV. atomsNotRepIn[N] = (bitset, "Fill In") (N-1th) locations of atoms not represented in atomNthLocs[N]. Lowest N is 3. (All atoms w/ 2nd location have a 1st location.) Populated by Jmol functino getNotRep(N) in altloc1(). V. conf[2] = conformation 2 = atom2ndLocs + atomsNotRepIn[2] ("fill ins"). atomsNotRepIn[3] is locations in conformation 2 (previous) for atoms not represented in atom3rdlocs + locations in conformation 1 for atoms not represented in either atom3rdlocs or atom2ndlocs. II-V above are obtained by Jmol function altloc1(). The following variables have atomindices ONLY for atoms with multiple locations: FILLINS: atomsNotRepIn[2] does not exist. Vide infra*. § atomsNotRepIn[3] are second locations for atoms not represented in the set of second locations. To "fill in" all atoms, combine third locations atomNthLocs[3] plus second locations of atoms not represented with third locations, atomsNotRepIn[3]. *There ARE NO FIRST LOCATIONS to fill in: any atom that does not have a second location is a single location atom locsPerAtomBitset1. To complete the model add single location atoms with altloc codes locsPerAtomBitset1 plus atoms without altloc codes {%}. The number of conformations (Jmol ~configCount, Javascript configCount) is the largest number of locations per atom. CONFORMATION LOCATIONS (defined in Jmol function altloc1()) conf[1] = {%} or locsPerAtomBitset1 or atomNthLocs[1]. conf[2] = {%} or locsPerAtomBitset1 or atomNthLocs[2]. § Note that second locations atomNthLocs[2] include ALL multiple location atoms. There is no fill in. conf[3] = {%} or locsPerAtomBitset1 or atomNthLocs[3] or atomsNotRepIn[3]. conf[4] = {%} or locsPerAtomBitset1 or atomNthLocs[4] or atomsNotRepIn[4]. Note that conf[4] does not need atomsNotRepIn[3]. Some atoms with third locations may not have 4th locations. All such third location atoms missing in atomNthLocs[4] are in atomsNotRepIn[4]. Atoms with second locations and fourth locations must all have a 3rd location, so there are no 2nd location atoms missing from fourth locations that are not in atomsNotRepIn[4]. conf[5] = {%} or locsPerAtomBitset1 or atomNthLocs[5] or atomsNotRepIn[5]. conf[6] = {%} or locsPerAtomBitset1 or atomNthLocs[6] or atomsNotRepIn[6]. ----------------------------------------------------------------------------- TIMINGS 3eoj 3EOJ BU1 (not AU) 12.3" With pivot().pivot() but still using config=N (not minus N), without atomNthLocs[]. 14.6" after adding loop for atomNthlocs to altloc1(). ----------------------------------------------------------------------------- Getting locsPerAtom[N]: {altloc != ""}.label("[%n]%r:%[chain].%a").pivot() # LABELS = ATOMS not locations Keys are atoms. Lists frequencies of atoms e.g. for 3eoj "[ARG]125:A.CA" : 2 "[ARG]130:A.CD" : 1 "[ASN]209:A.CA" : 3 Adding the second pivot(), keys become frequencies of atoms, e.g. for 3eoj "3" : [ [SER]208:A.OG [SER]208:A.O ... ] Jmol locsperatomjson[3] is the list of ATOMS with 3 locations, 17 for 3eoj. Jmol locsPerAtomBitset3 is the list of atomindex LOCATIONS for atoms with 3 locations, 51 for 3eoj (17 for each 1st, 2nd, 3rd location). Thus, print {locsPerAtomBitset3}.identify for 3eoj [SER]208:A.N%A #1734 [SER]208:A.N%B #1735 [SER]208:A.N%C #1736 ... Thus, the FIRST location of each atom is every 3rd location starting at the first. The SECOND location of each atom is every 3rd location starting at the second. Atoms in Arg125 of 3eoj skip %B, having only %A then %C. ----------------------------------------------------------------------------- Max 6 conformations in the Original implementation for 4.2 THIS IS ENOUGH because >6 conformations is unknown. 6: The only case I know is 5QYE 5qye (max sep 0.08). I scanned the May 2023 altloc spreadsheet as follows Codes Max Code Column Count 6 F= O 45 7 G= P 7 8 H= Q 5 I then examined those with <1000 altlocs and max separations >1.0 Å. I also checked for multiple conformation ligands. Only found 5pog (added to Notes). *Conclusion is that entries with 6-8 altloc letters usually have 3 or fewer conformations. MaxSep ------------ Codes PDB BUcount BU§ Chains Server FGiJ Conformations Shown in report A-F 6 5phf 1 1 2.21 2.21 3 A-F A-F 6 5phl 1 1 7.15 7.15 3 A-F A-F 6 5pog 2§ 1 1 0.18 2 A-C, E-F (missing D) A-F 6 5pog 2§ 2 1 1.1 2 A-F A-F 5pog 2§ AU 2 1.1 1.1 2 A-F A-V 22 1zir 1 1 4.45 4.45 2 A-V A-F 6 3eoj 1 3 5.74 3 A-D (missing E, F) ? A-F 6 3eoj 1 AU 1 5.74 5.74 3 A-D (missing E, F) ? A-D 4 6mez 2§ 1 3 0.27 2 A-D A-F 6 6mez 2§ 2 3 1.49 3 A-F A-F 6 6mez 2§ AU 2 2.08? 1.49 3 A-F 5pog: AB for most protein. CD for Phe116:B. EDO is BC. 8TJ is EF. HOH is A, C single locations. § If not 1. ----------------------------------------------------------------------------- IMPLEMENTATION altLocCount = jmolEvaluate("{!%}.count") is gotten early in moltab.js. showAltLocHelp() is not called until altloc details are requested. // moltab.js // NO LONGER NEEDED WITH BOB'S FAST CODE // confirm browser freeze for a minute or more if >6K altLocC1Count moltab.js -> makeAltLocHelp() help2.js if (!altLocFreqsGotten) "wait" while getAltLocFreqs('al') help2.js runs Jmol function altLoc1() <- defineAltLoc1Function() in util.js populates Jmol bitsets >>>> ~altloc[1-5]list <<<< then gets JS counts altLocMultLocC[1-5]Count and altLoc1LocC1Count then makeAltLocHelp2() else makeAltLocHelp2() in help2.js CHECKBOXES to hide/show !isSchematicBB conformation renderings have ids acfg# booleans are animCfg# onClick toggleACfg(#) toggles boolean and unchangedScriptToJmol(makeDisplayCheckedCfgsSpt()) in help2.js visibility is via display/hide, not restrict/~hidden_jdef doMolViewSpt() in scripts.js starts out with "display all;config 1;" when !animatingAltLoc when animatingAltLoc this is preceded by stopping animation and checking all configs when going to Vine or when ((animatingAltLoc == "wf" && nextIsSchematicBB) || (animatingAltLoc == "bb" && !nextIsSchematicBB)) checkAllCfgs() is in help2.js ANIMATION of ALTLOCS animateAltLoc() (help2.js) if already animatingAltLoc does nothing. sets animatingAltLoc to wf or bb anim1CycleSpt = makeAnimAltLocSpt(); help2.js This makes a 1 cycle spt that ends with javascript doAnim1Cycle() help2.js doAnim1Cycle() if animating, anim1CycleToJmol() which simply sends anim1CycleSpt. if NOT animating, does display all, config 1. stopAnimAltLoc() (help2.js) animatingAltLoc = false, updateHelpPrefix(helpPanel) next doAnim1Cycle, if !animatingAltLoc if isSchematicBB() ask which config to stop in. else display all, config 1. When animation is requested NOT in the altloc help, so altlocs may not have been gathered (e.g. from 2°, Cartoon, Rainbow, ThinBB) animateConformations() help2.js autoAnimateAltLoc = true, showAltLocHelp() [moltab.js] autoAnimCfgs() [moltab.js] watches for completion of Jmol function altloc1() on completion, (color Vines by configs) animateAltLoc() ----------------------------------------------------------------------------- BENCHMARKS for FG 4.2 (speeded up altloc code about 2X) Seconds ------------------- altLocC1Count 4.1 code 4.2 code fold speedup ------------------------------------------------------- 7rin 1K 8 5 1.6 6ucy 4K 42 24 1.8 6ss1-AU 6K 95 47 2.0 4nia 8.6K 174 90 1.9 4m83 is X-ray with 20 models, each assigned an altloc code A-T. Each model has 5% occupancy. FG loads only model 1, so has only %A. ----------------------------------------------------------------------------- There exists "color altloc": no altloc = red, %A=green, %B=blue. But easy enough to make my own color scheme. 1ldn: Why does Jmol menu have 8 configs, yet config=1 has all atoms? There are %A - %H, 20 atoms each. %A/B or CONF N can be a load filter. Issues: manual says "config [1]" but what works is config=1 %? is all atoms with an altloc code % and not % work. "%" means percent-space means atoms with NO altloc codes. % requires upper case (but probably shouldn't). altloc = A same as %A config=0 selects all but is supposed to select "all atoms having configs" (it says under atom properties)? manual should be clear that config=1 selects atoms with one config plus the first config of atoms with more than one. Thus config=1 and !% selects the first config of only those atoms with more than one config. When %A and %B and no atoms without altloc, config 1 includes %A. (3hyd) In 3hyd, "config=1 and not %" gives 11, same ad %A. When %A and same atoms without altloc, config 1 ???? % is atoms without altloc, and "not %" is atoms with altloc. %1 does not select %A. Is there some way to select atoms without altloc that also have altloc? e.g. .SG, .SG%A vs. .SG%A, .SG%B if {not % and not config=1) #altloc not in config=1 equals an integral multiple of (not % and config=1) then probably there are no atoms lacking altloc codes corresponding to atoms with altloc codes. equals (not % and config=2) #altloc and config When there are no altlocs, config=1 selects all atoms, and config=2 selects none. %a should not be case dependent since there are never more than a few altlocs. --------------- config=1 atoms with only one config + first config for those having more than 1. % selects atoms with only one config %A selects atoms wtih config A (case sensitive! so %a doesn't work with 3hyd).