message: Fix secondary struct assignment
diff: @@ -69,6 +69,7 @@ function addHelices(cat: mmCIF['struct_conf'], map: SecondaryStructureMap, eleme
  key: elements.length
  };
  +
  elements[elements.length] = element;
  const asymId = beg_label_asym_id.value(i)!;
  @@ -134,7 +135,7 @@ function assignSecondaryStructureEntry(hierarchy: AtomicHierarchy, entry: Second
  const { endSeqNumber, endInsCode, key, type } = entry;
  let rI = resStart;
  - while (rI < resEnd) {
  + while (rI <= resEnd) {
  const seqNumber = label_seq_id.value(rI);
  data.type[rI] = type;
  data.key[rI] = key;
  @@ -149,18 +150,18 @@ function assignSecondaryStructureEntry(hierarchy: AtomicHierarchy, entry: Second
  }
  function assignSecondaryStructureRanges(hierarchy: AtomicHierarchy, map: SecondaryStructureMap, data: SecondaryStructureData) {
  - const { segments: chainSegments, count: chainCount } = hierarchy.chainSegments;
  + const { segments: chainAtomSegments, count: chainCount } = hierarchy.chainSegments;
  + const { segmentMap: residueIndex } = hierarchy.residueSegments;
  const { label_asym_id } = hierarchy.chains;
  const { label_seq_id, pdbx_PDB_ins_code } = hierarchy.residues;
  for (let cI = 0; cI < chainCount; cI++) {
  - const resStart = chainSegments[cI], resEnd = chainSegments[cI + 1];
  + const resStart = residueIndex[chainAtomSegments[cI]], resEnd = residueIndex[chainAtomSegments[cI + 1] - 1];
  const asymId = label_asym_id.value(cI);
  -
  if (map.has(asymId)) {
  const entries = map.get(asymId)!;
  - for (let rI = resStart; rI < resEnd; rI++) {
  + for (let rI = resStart; rI <= resEnd; rI++) {
  const seqNumber = label_seq_id.value(rI);
  if (entries.has(seqNumber)) {
  const entry = entries.get(seqNumber)!;
  