NOTE: In FGiJ 2.2, ~hidden_jdef was redefined to mean (~hidden4hide_jdef or ~hidden4isolate_jdef) The Hide viewlink (see viewlink.txt) comes from putBottomControls() in moltab.js. ANYHIDDEN(): hiddenTot = getHiddenTot() is a nonzero integer if anything is hidden. hiddenTot is not a count of atoms or groups hidden. NOTE that ISOLATED is not counted in hiddenTot. Therefore, anyHidden() returns true if either hiddenTot is nonzero, or isolatedDescription != "". makeDefineHiddenSpt() returns a spt that re-defines ~hidden_jdef and ~hidden4hide_jdef. It includes ~hidden4isolate_jdef in ~hidden_jdef but does NOT re-define that. UNHIDE: re-display everything: unHideAll() in jcontrol.js which calls clearHidden() which sets JS variables but does not change ~hidden_jdef. then reDisplay() which uses eval(currentView); re-display last: unHideLast() in jcontrol.js invert hiding (invertHiding() in jcontrol.js) is disabled when something is isolated. The "invert" checkbox is still available but user is alerted if it is checked. ------------- HIDE HALOED (hideHaloed): When checked, it saves toFind in toFindHidden. Then if Find changes toFind while the formerly haloed atoms are hidden, they remain hidden until unhidden. ------------- pickcall.js has code for constructing hiddenAtoms[], hiddenGroups[], and hiddenChains[], hiddenRanges[]. Constructing these lists is all it does -- it does not do any hiding. jcontrol.js has the script functions below. help.js generates the reports of what was hidden NOTE: In FGiJ 2.2, ~hidden_jdef was redefined to mean (~hidden4hide_jdef or ~hidden4isolate_jdef) ~hidden_jdef is defined in Jmol. cf. ~incomplete_sidechains and ~anomolous_atoms. --------------------------- Execution: hideMode (c, g, a, r, "" for none) is shared with Isolate. Clicking "Hide" or "Isolate" sets hideMode to "c". Then performing another operation clears hideMode, regardless of whether anything was hidden. When isolateMode is true, clicking an entity does nothing as long as hideMode is blank. Isolating something sets isolateMode to false and blanks hideMode. Entering Hide sets isolateMode to false. When a radio button is changed (chains, groups, atoms, range): changeHideRadio() in top.js Clicking on something with hideMode nonblank populates the hidden??? arrays, in pickcall.js. if hideMode is not blank, pickcall.js calls makeDefineHiddenSpt() and then doMolViewSpt(). When a checkbox is clicked, hideChecked() in scripts.js is called. It generates an echo script, and turns on e.g. hideHaloed, then calls reDisplay(echo, "") [jcontrol.js] and refreshes the help. reDisplay() calls doMolViewSpt() [scripts.js] which calls makeHideSpt() see below. help.js: makeHideHelp() calls makeHideHelpDetails() which calls makeHideCheckboxes() and makeHideRadios() --------------------------- Scripts: hide# easy search in jcontrol.js hide1 - makeHideSpt() jcontrol.js starts off with makeDefineHiddenSpt() hide2 - makeDefineHiddenSpt() jcontrol.js starts off with makeSelectHiddenSpt() defines ~hidden_jdef and does the ACTUAL HIDING WITH RESTRICT COMMANDS hide3 - makeSelectHiddenSpt() jcontrol.js hide4 - getChainFamilyExpression() ASKS whether to hide whole family, blank if no. hide5 - getSeqIDChainsIndex() Several functions that execute scripts include makeDefineHiddenSpt() to guarantee that ~hidden_jdef is current. THIS MAY CAUSE REDUNDANT HIDING -- PROBABLY HIDING SHOULD BE SEPARATED FROM SCRIPT GENERATION. makeFindSpt() includes makeDefineHiddenSpt() in findSpt. ------------- hiddenTot is the total number of chains, groups, atoms, and checkbox categories that are hidden -- it is NOT a count of atoms or residues hidden. hiddenAtoms[i] format serial# space description (for 1 atom) or jmol-expression space description (for all atoms in chain/all chains) ------------- CD and CA have special code. Search for cacd in pickcall.js (several places). ------------- -------------