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. --------- chain type: moltab.js chainTypeFromName(chainName) 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().