Chain X in 1m06 is 100% non-standard residues 3DR = 1',2'-DIDEOXYRIBOFURANOSE-5'-PHOSPHATE. It is DI-deoxy because both C2' and C1' lack OH. The OH of C1' is where a base connects. It has SEQRES length 10. It is not jmol "nucleic". CHAIN TYPES WITH HEADER/SEQRES: FIRST determineChains() in moltab.js *** NEEDS CHO type when no protein, no nucleic; Non-Std Res when not P/N/CHO (1m06) See notes.htm#choc for CHO only examples. chainWords[] <- SEQRES chainTypes[] <- getChainType(chainWords) util.js from SEQRES: text + e.g. non-std res info. counts residue type (chainWords[] vs. stdAA[] etc.) and compares with length. ELEMENTS MATCH bmChainList when AU or (bmNumber == 1 && !bioUnitExists()). chainListSeqresOrder[] same order as chainTypes[] chainList[] (grouped by seqid) <- from COMPND chainCount, bmChainsTotal. SECOND getBMChainLists() in modeldat.js tmpcl[] = {*}.chain.pivot.keys includes symm dups! bmChainList, bmCHOChainList, bmCHOChainsCount CHAIN TYPES WITH NO HEADER Test with (using test-pdb-files.htm) headless-1igt (protein & CHO) headless-6bhj (protein, DNA, RNA, CHO) headless-1m06 (protein & non-std-nucleotide chain X) CHAIN TYPE USES: getChainType() -> chainTypes[] in moltab.js determineChains(). chainTypes[] is used in: makeClickableChainList() in moltab.js for MIT. chainTypeFromName() when SEQRES. FOR DAA IT RETURNS Unrecognized. DAA are reported by chainTypeFromName(). chainTypeFromName() is used in ~19 places. PLACES CHAIN INFO IS USED: Mol Info Tab determineChains(), makeClickableChainList() calls getBMChainLists() When bmNumber==0 (or 1 and !bioUnitExists()): text<-getChains() in moltab.js loops chainList[] else (bmNumber > 0 and bioUnitExists()) link to showBMChainsHelp() COUNTS: proteinChainCount from getProteinChainCount() in help3.js uses chainList or bmChainList and chainTypeFromName()*. ASYMMETRIC UNIT: determineChains(): moltab.js from COMPND, SEQRES, SOURCE uses getChainType() -> chainTypes: 1ijw: DNA,DNA including 1 non-standard residue(s),Protein) getChainType() util.js uses inefficient countMatchingWords(res, stdAA). It is used only one place, for Chain Details. *chainTypeFromName('A') moltab.js returns Protein, DNA, RNA. It looks at the 1st residue and if necessary 2nd residue. Looks for isStdAA()/isStdNucleotide(), if not, calpha/c5', if not, next residue, up to the 3rd residue since a named chain can have length 3 (but 2 for nucs!) alert 14a if fails. chainCount, distinctChainCount, bmDistinctChainCount* include nucleics. * sometimes fewer than AU, e.g. 8q03. proteinChainCount was first needed for bimolecule charge help. See getProteinChainCount(). chainList for 1d66: D,E,AB (seq id are grouped). Use bmChainList for one chain per array element! chainLengths (1ijw: A 14 ,B 14 ,C 52 ) (3 spaces after letter, one after number) SEQUENCE ID FAMILIES EXAMPLE 6mx4 EEEV. modeldat.js:var auSeqIDChainFamilies = new Array(); modeldat.js:var auSeqIDChainFamilies2Select = new Array(); modeldat.js:var bmSeqIDChainFamilies = new Array(); length is 3. [0] is A-A59, D-D58, G-G59, J-J59. Comma delimited but no colons. modeldat.js:var bmSeqIDChainFamilies2Select = new Array(); [0] is same but colons and quotes, e.g. (...,:"A59",...) [0].length is 1,637! After hiding the ADGJ family of chains, no change. function getSeqIDChainsIndex(atc) returns the array index number for bmSeqIDChainFamilies2Select[] function getChainFamilyExpression(atc) ASKS: Returns an atom expression if there are additional seq-id chains, and user opts for family. HIDING modeldat.js: isChainHidden(chainName) returns true if either chainName is hidden (in hiddenChains) of chainName is a member of a seqID family that is hidden. returns false if either chainName is not in hiddenChains and is not a member of a seqID family. chainName is not in hiddenChains and is a member of a seqID family that is not hidden. hiddenChains[chain-name] lists the chains clicked in the hide dialog IN ORDER CLICKED. hiddenSeqIDChains[index-to-hiddenChains] tells whether the entire seqid family was hidden (Boolean). top.js:var hiddenSeqIDChains = new Array(); BOOLEAN 0/1 or -1 for undecided. Says whether hiddenChains[N] includes the entire seqid family listHidden() returns the text describing what is hidden for the Hide dialog, e.g. Chain F43 + + : and its sequence-identical chains. AU or BU: bmChainList is one chain per array element. After calling getProtNucChainLists() (best not for virus capsids!) proteinChainList and nucleicChainList (one per array element) BIOLOGICAL ASSYS: bmChainsTotal, bmChainList[] (not plural!) lists all chains, ONE per array element. getBMChainLists() in modeldat.js bmChainList is populated for BU1 even when BU1==AU, and is also populated for AU=1. bmChainsTotal: Ditto. bmSeqIDChainLists[][] chains present in BM grouped by seqid. *** chainIsPresent(chain) util.js returns T/F by scanning bmChainList. RATIO OF CHAINS: bmOverAU works for dotPDB (apiBMOverAU[bmNumber] works only for PDB ID api) COLORING makeColorAUChainsSpt() modeldat.js makeColorIDChainsSpt() modeldat.js ----------- chainList[] is generated from the COMPND records, which list all POLYMER chains in sequence- identical groups. Each sequence-identical group is a single element in the chainList array, which assumes single-letter chain names. Example 1d66: D,E,AB chainLengths[] are obtained from SEQRES in moltab.js (format "D 66"). If there are no SEQRES, chainLengths.length == 0. In this case, "show chains" is used to get a list of chains in getChainEnds(). chain type: moltab.js chainTypeFromName(chainName) ---------- METHOD USED ("bmchains") For the example below, 1zw0 bu=5, the BM chains become: $ load =1zw0 filter "biomolecule 5;bmchains" $ print {*}.chain.pivot.keys.join(" ") A1 A2 B1 B2 C C3 D D3 E E3 F F3 G G3 H H3 chainList = [ABCDEFGH] # all 8 original chains are sequence-identical. Every chain name references the original 1-character chain name, so we know which chains are sequence-identical based on chainList which comes from the COMPND records. ---------- BAD METHOD NOT USED (bmchains=1) This method (bmchains=1) loses original chain names when the original is moved. This loses correspondence between original chain names and biomolecule chain names. This means we cannot tell which chains are sequence identical based on COMPND record lists of original chain names. ORIGINAL CHAINS: Original chain names are preserved when the biomolecule has them in their original positions. If they are moved, then they are assigned new names. Thus, in 1zw0 biomolecule 5: REMARK 350 BIOMOLECULE: 5 REMARK 350 APPLY THE FOLLOWING TO CHAINS: A, B REMARK 350 BIOMT1 1 1.000000 0.000000 0.000000 0.00000 REMARK 350 BIOMT2 1 0.000000 1.000000 0.000000 0.00000 REMARK 350 BIOMT3 1 0.000000 0.000000 1.000000 -81.79900 REMARK 350 BIOMT1 2 -1.000000 0.000000 0.000000 165.93800 REMARK 350 BIOMT2 2 0.000000 -1.000000 0.000000 0.00000 REMARK 350 BIOMT3 2 0.000000 0.000000 1.000000 -81.79900 REMARK 350 APPLY THE FOLLOWING TO CHAINS: C, D, E, F, G, H REMARK 350 BIOMT1 3 1.000000 0.000000 0.000000 0.00000 REMARK 350 BIOMT2 3 0.000000 1.000000 0.000000 0.00000 REMARK 350 BIOMT3 3 0.000000 0.000000 1.000000 0.00000 REMARK 350 BIOMT1 4 -1.000000 0.000000 0.000000 165.93800 REMARK 350 BIOMT2 4 0.000000 -1.000000 0.000000 0.00000 REMARK 350 BIOMT3 4 0.000000 0.000000 1.000000 0.00000 --chains A,B are MOVED {symop=2} and also duplicated {symop=3}. Because none of the resulting 4 chains are in their original positions, the biomolecule has no chains A,B. A,B become I,J, and their duplicates become K,L. --chains CDEFGH are kept in their original positions {symop=1}, thus keeping their original names. Their duplicates {symop=4} become MNOPQR. The list of chains at a given symop: print {symop=1}.chains.pivot.keys.join("") # from Bob. Each element of bmChainLists[] is an array of chain names (which can be multi-character). The first name in each list is the original chain; the rest are duplicates of that chain. Example 1hho: [A,C],[B,D] ----------------------------------------------------------------------- CONSURF FG3.7: For a ConSurf PDB file, chainList is not populated in the initial display. Only after you click "Go to the FirstGlance Control Panel" it gets populated. FG3.8: chainList is populated for ConSurf*, and also [Clist, Ctot, consurf_identical_chains.]-> undefined with not ConSurf. FG4.0: getBMChainLists() is called in msgcall.js right after determineChains(). Clist -> ClistArray allowing NCCN (N [multipe] Character Chain Names). Clist is now obsolete. consurf_identical_chains is obsolete. Use ClistArray instead. Now old_consurf_chain, consurf_chain (differs from that specified for the job when the old chain is not present in the BU, e.g. 6nca 6NCA). In FG4.0, stopped supporting epitopia, pepitopia=pepsurf, selecton. These were using FG2.0 and gallery examples were 2007 and did not work in FG3.8. Did not consult Nir about this. See also chainLengths. *consurf_chain* in Javascript is the chain processed by ConSurf\ consurf_identical_chains has been broken from Tel Aviv for a long time, but in FG3.8, it is *populated from the pdbHeader using determineChains() called in processPDBHeader() in msgcall.js. CONSURF CHAIN CHECKBOXES execute reset_to_mode(false) in main_cs.js reset_consurf(false) in main_cs.js make_reset_consurf_spt(false) -> do_spt() in main_cs.js make_consurf_color_spt() make_consurf_color_spt() + add'l commands. in main_cs.js make_for_spt(make_chain_select_cmd()) in main_cs.js & cs_key.js chooses ISD or NoISD *make_chain_select_cmd()* in consurf/cs_key.js generates "select selected and (:A,:B, ...)" according to the checkboxes in the ConSurf view. The state of identical-chain checkboxes is kept in consurf_chain_checkbox[], which is updated by make_select_checked() when a checkbox is clicked. In the FG control panel, when the "ConSurf Colors" checkbox is clicked, ALL chains identical to the primary chain processed by consurf are colored. This occurs by calling *make_select_all_id_chains()* (in make_chain_select_cmd() in cs_key.js) when currentView = "renderCrosslinks" etc. The first time a View Link is clicked, if useConsurfColors, doViewLink() in jcontrol.js adds makeConsurfColorsSpt() in main_cs.js make_isd_color_spt() in main_cs.js ---->>>> make_chain_select_cmd() in cs_key.js <<<---- which selects all ConSurf sequence-identical chains according to currentView: - thin backbones (makeAllModelsSpt()) and many others. The "ConSurf Colors" checkbox (help_cs.js makeConsurfHelpPrefix() -> toggleConsurfColors()) appears in the middle left for - protein crosslinks - contacts and non-covalent interactions -------------------------------------- chainList (array) is populated (in moltab.js) from header COMPND in getChains() COMPND obtained with var rawCompnd = jgetfi("compnd") jgetfi uses jmolGetPropertyAsString("fileInfo", "compnd") COMPND lists sequence-identical chains in the same line. See "chain names" in moltab.js. For 1d66, chainList is D,E,AB useLowerCaseChains is set in moltab.js moltab.js also sets chainCount and distinctChainCount -------- EndsChain (array) has one chain per element. For 1d66: D,E,A,B. It is set from chainList in getChainEnds() in modeldat.js NOTE debugEnds! in modeldat.js When there is no COMPND, chainList and EndsChain have length 0. Then, getChainEnds (modeldat.js) populates EndsChain with jmolScriptEcho("show chains"); show chain messages a list of one chain name per line. ---------