Bugs found while writing the API docs (2026-10-07)

These came from the agents that documented src/cc-interface.hh (7 chunks) and src/c-interface.h (9 chunks). Each agent read the implementation of every function it documented and reported anything that looked wrong.

Status key:

  • FIXED: fixed (in commits 8af3917ca or 53c14bdf3)
  • VERIFIED: Claude re-read the code and confirmed the bug
  • REPORTED: an agent’s claim that nobody has checked yet. Line numbers are approximate.
  • REJECTED: checked, and not a bug (the reason is on the entry)
  • INTENDED?: real behaviour, but it may be deliberate or need a design decision; Paul decides
  • GONE: the code has changed or been fixed since the report

An entry that is still VERIFIED after the fix pass carries a NOT FIXED or PARTLY FIXED note saying why.

Fix pass (2026-11-15)

After verification Paul lifted the “do not edit source” rule. The fixes are in the working tree on branch fix-api-docs-bugs (off main at 9c9454295), uncommitted, built, linked and installed in the build-arch-for-claude sandbox. A headless smoke test (coot --no-graphics, 1wly.pdb) exercised about 25 of the changed scripting functions; nothing was run in the GUI, and no map-dependent fix was run at all.

  • 100 entries moved from VERIFIED to FIXED (branch fix-api-docs-bugs); where the fix differs from the obvious one, or leaves part of the entry open, there is a Fix note on the entry.
  • 1 is PARTLY FIXED: the stubs list, where four of the nine are fixed and the other five are deferred to the Coot 2 API tidy-up in BACKLOG.md (the ignored parameters were deferred to the Coot 2 API tidy-up in BACKLOG.md; generate_local_self_restraints() was settled on 2026-11-16: duplication on repeat calls is accepted; find_deviant_geometry() was marked deletable for Coot 2).
  • None is left NOT FIXED: the entries that needed a decision from Paul have all been decided ((a) only_around_protein_flag, (b) part_occ_contact_flag and (c) the save_state() directory were fixed on 2026-11-16; (d) toolbar_multi_refine_continue was documented as non-functional; (e) the raster3d/povray view matrix was fixed but not checked by rendering; (f) hydrogens_connect_file() turned out not to be a bug; (g) probe_available_p() was fixed; (h) the never-read flags: FLEV distances wired up, the rest documented; (i) the post-intermediate-atoms hook was documented as not implemented and added to BACKLOG.md; (j) molecular-symmetry drawing likewise; (k) print_glyco_tree was fixed; (l) show_fix_nomenclature_errors_gui was left as it is, with a review item in BACKLOG.md).

Behaviour and API changes to look at before merging:

  • make_updating_map() now returns the map molecule number (-1 on failure), not 1.
  • save_coordinates(), write_pdb_file(), write_cif_file() and write_chain_to_pdb_file() now return non-zero for an invalid imol.
  • remove_omega_torsion_restriants() is renamed remove_omega_torsion_restraints().
  • chain_fragments_scm/_py now return data; add_linked_residue_py returns the new spec even without fit-and-refine.
  • get_backup_info() takes the checkpoint index (as restore_to_backup_checkpoint() does), not a 0-based vector index.
  • delete_waters() makes a backup, also removes WAT and DOD, and returns the number of waters.
  • delete_sidechains_for_chain leaves residues without N and CA alone.
  • find_water_baddies_AND() now flags waters with density below the limit.
  • read_cif_data_2fofc_map() now makes a 2Fo-Fc map, not a sigmaA map.
  • The cis/trans intermediate-atom conversion picks the peptide from the atom name: N gives (prev, this), anything else (this, next).
  • History entries changed for nine functions, so old state scripts are unaffected but new ones differ.

Loop instructions

These are the instructions the verification loop ran under; they are kept for the record. The loop has finished and the mode is no longer VERIFY ONLY.

This file was the work queue for an unattended /loop. The mode was VERIFY ONLY.

Each iteration:

  1. Re-read this file; it is the only record of progress.
  2. Take the first entry still marked REPORTED (top to bottom). For a bullet with sub-items, handle the whole bullet in one iteration.
  3. Read the code at the current HEAD of main in /home/paule/Projects/coot/git/coot-main/coot. Find the function by name (grep -n), not by line number, since line numbers are approximate and stale.
  4. Decide whether the claim is true. Read enough context to be sure: callers, the other half of a scm/py pair, the static defaults in graphics-info-statics.cc, any #if 0 or #ifdef guards.
  5. Replace REPORTED on that entry with VERIFIED, REJECTED, INTENDED? or GONE, and append ` — ` plus a one-sentence note. The note should give the exact current file:line and, for REJECTED, why. Keep each entry on one line, or one line per sub-item.
  6. Also append any new bug you happen to notice to the end of the “Found during verification” section, marked VERIFIED.
  7. Edit only this file. Do NOT edit source, build, run tests, git commit, git stash or git checkout. Read-only git commands (git log, git show, git blame) are fine.
  8. Pace: do about 5 entries per iteration, then schedule the next wakeup at about 60 s.
  9. When no REPORTED entries are left, add a summary to the top of the “Found during verification” section (counts per status, and the ten VERIFIED entries most worth fixing first, ranked by severity), then stop the loop.

Found during verification

Summary (verification finished 2026-11-15)

Every entry has now been checked against main; nothing is left as REPORTED. Counts are of top-level bullets, from this section down:

  • VERIFIED: 116 (several with corrections to the original claim, noted on the entry)
  • FIXED: 8
  • REJECTED: 3 (replace_residues_from_mol_py, pepflip_intermediate_atoms_other_peptide, save_symmetry_coords), plus one sub-item (merge_molecules_ligand_spec is read)
  • INTENDED?: 2 (overlap_ligands, execute_refmac_real)
  • GONE: 1 (the chain jiggle-fit wrappers), plus two of the three cc-interface.hh duplicate declarations

The ten VERIFIED entries most worth fixing first, most severe first (Claude’s ranking: crashes and memory corruption on ordinary input, then silent damage to the model, then silently wrong results):

  1. handle_read_draw_probe_dots() (src/generic-objects.cc:1016-1023): indexes an emptied vector on any re-read of probe dots, and wipes every generic object.
  2. remove_omega_peptide_restraints() (geometry/protein-geometry.cc:2197-2202): erase(it) then it++; runs off the end when the omega is the last torsion. Introduced by the 53c14bdf3 fix.
  3. highly_coordinated_waters_py() (src/c-interface-waters.cc:500-502): with two or more hits the same two lists are stolen into several result lists, which corrupts refcounts.
  4. residues_near_residues_py (src/c-interface-info.cc:806): NULL slots in the returned list whenever an input spec matches no residue; crashes when Python iterates it.
  5. The eight functions with no imol >= 0 check (e.g. set_map_is_difference_map, average_temperature_factor, mask_map_by_molecule): the -1 from a failed read indexes molecules[] out of range.
  6. trim_by_map() (src/molecule-class-info-other.cc:4861-4868): the backup is taken after the trim, so the deleted atoms cannot be recovered with undo. delete_waters() and add_residue_with_atoms() have no backup at all.
  7. superpose_with_atom_selection() (src/c-interface-superpose.cc:244): in copy mode the reference cell and symmetry are written to the original molecule, not the copy.
  8. find_water_baddies_AND() (src/molecule-class-info-other.cc:7003): the density test is inverted, so AND mode flags the well-fitting waters.
  9. make_map_from_cif_2fofc() (src/molecule-class-info-maps.cc:3043): silently makes a sigmaA map.
  10. save_state() vs run_state_file*() (src/graphics-info-state.cc:867, src/c-interface.cc:8076): state is written to the XDG state directory and looked for in the cwd, so a saved state is never found.
  • FIXED (branch fix-api-docs-bugs) geometry/protein-geometry.cc:2197-2202 remove_omega_peptide_restraints(): since 53c14bdf3 removed the break, erase(it) is followed by it++ on the invalidated iterator. That is UB, and when the omega is the last torsion it steps past end() and the loop runs off the end. Fix: erase(remove_if(...), end()), as the comment in the code already suggests.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:7659-7664 residue_spec_make_triple_py(): puts the borrowed references from PyList_GetItem() straight into a new list with PyList_SetItem() (which steals), so the three items are owned by two lists on one reference each. It only works today because its callers (e.g. residues_near_residues_py, src/c-interface-info.cc:827-828) leak the source list. — Fix note: the three callers now DECREF the source list.

Fixed

  • FIXED src/molecule-class-info-build.cc:116 make_fragment_chain(): if (at_c) n_pos = ... should set c_pos (this hurt protein_db_loops).
  • FIXED src/c-interface-mutate.cc:403 align_to_closest_chain(): match_fragment_best was never updated, so the last match won rather than the best one.
  • FIXED src/cc-interface-map-utils.cc:200 map_to_model_correlation_stats_per_residue_range_scm(): scm_cons(r_0, item) had its arguments the wrong way round, giving nested pairs.
  • FIXED src/c-interface-maps.cc:3011 b_factor_from_map(): the result went into a local b and the function always returned -1.
  • FIXED (53c14bdf3) geometry/protein-geometry.cc remove_omega_peptide_restraints(): compared against v[i] instead of v[j]. Removing the break introduced an iterator bug (see “Found during verification”). Also, add_omega_peptide_restraints() appends without checking for an existing omega, so repeated adds stack up.

Verified, not yet fixed

  • FIXED (53c14bdf3) src/molecule-class-info-refine.cc:486 delete_extra_restraints_worse_than(): the second lookup tests if (! at_1) instead of at_2, so restraints whose atom_2 isn’t in the fast index are silently deleted.
  • FIXED (53c14bdf3) src/c-interface-build.cc:5938 handle_cns_data_file_with_cell(): passes d2rad(alpha) where gamma should go, so the gamma argument is ignored.
  • FIXED (53c14bdf3) src/c-interface-bonds.cc:266 split_multi_model_molecule_py(): stores PyLong_FromLong(i), not new_molecules[i], so it returns 0..n-1.
  • FIXED (branch fix-api-docs-bugs) src/graphics-info-modelling.cc:~2957-3000 execute_rigid_body_refine() with auto_range_flag: chain_id_2 stays null, so the “same chain” check always fails. It also compares char* pointers.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:5053 save_coordinates(): returns 0 (success) for an invalid imol. — Fix note: now returns 1 for an invalid imol; header doc updated.

Reported: crashes and undefined behaviour

  • FIXED (branch fix-api-docs-bugs) src/generic-objects.cc:1019 handle_read_draw_probe_dots(): calls generic_display_objects.clear() inside a loop that still runs to the old size and indexes the emptied vector. It also wipes all generic objects, not just the probe ones. — confirmed at src/generic-objects.cc:1016-1023: nobjs is cached before the loop, there is no break after clear(), so the next generic_display_objects[i] indexes an empty vector; the commented-out close_generic_object(i) is what was meant. — Fix note: clears only the matching object, as the unformatted sibling does.
  • FIXED (branch fix-api-docs-bugs) src/graphics-info.cc:5863 remove_*_glob_extension(): erase(it) followed by ++it on the invalidated iterator. — confirmed in all four removers (src/graphics-info.cc:5863-5867, 5877-5880, 5888-5891, 5899-5902); in practice it also skips the element after each erased one, so adjacent duplicates survive.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-residues.cc:185 sprout_hydrogens(): dereferences residue_p before the null check at line 190. — confirmed: residue_p->GetAtomTable() at src/molecule-class-info-residues.cc:185 precedes if (residue_p) at :190; the only caller (src/flev.cc:70) checks the molecule but not the residue, and make_backup() has already run by then.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-nucleotides.cc:~87,~167 pucker_info_scm/_py(): is_a_protein_residue(res_p) comes before the null check. — confirmed at src/c-interface-nucleotides.cc:87 and :166: the lambda calls residue_p->GetResName() unconditionally and if (res_p) only comes in the else branch (:89, :168), so a spec that matches no residue crashes.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-info.cc:292 residue_info_dialog(): no null check on res. — confirmed at src/c-interface-info.cc:292: residue_from_external() is just get_residue() (src/molecule-class-info-other.cc:2722), which returns null for a missing residue, and res->GetAtomTable() follows directly.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-info.cc:334 (also 499, 575) output_atom_info_as_text(): indexes atom_selection[index] without checking for -1. — confirmed only for output_atom_info_as_text() at src/c-interface-info.cc:334 (atom_selection[-1] when the spec matches no atom); the scm/py siblings at :497 and :574 do test index > -1, so that part of the claim is wrong.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:5375 get_text_for_phs_cell_chooser(): spgrp points into a temporary symbol_hm().c_str(), and the returned buffer is uninitialised when nothing matches. — confirmed at src/c-interface.cc:5467 (symbol_hm() returns a clipper::String by value, so spgrp dangles) and :5434 (malloc(12) is returned unfilled for an invalid imol, a non-model molecule or an unknown field); the if (! ihave_cell) fallback at :5495 is unreachable. — Fix note: the buffer now starts as “ - “.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:2979 get_symmetry_bonds_colour(): mallocs 4 doubles but sets only 3 (alpha is uninitialised), and ignores its argument. — confirmed at src/c-interface.cc:3032-3041: colour[3] is never written and idummy is unused. — Fix note: alpha is set to 1.0; the argument is still unused.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-preferences.cc:921 unmangle_hydrogen_name(): the non-4-character branch reads atom_name[3] out of range. — confirmed at src/c-interface-preferences.cc:925, with a nuance: it is out of range only for names shorter than 3 characters (for a 3-character std::string, [3] is the terminating NUL), but that NUL is != ' ', so the “length is 3 presumably” branch at :935 is never reached and the inner atom_name[3] == ' ' test at :926 can never be true. — Fix note: short names are now handled by length; only names with a leading digit or * are switched. The output buffer was also one byte short when the name grows (“1HB” to “ HB1”); it is now sized from the new name.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:3901: Py_XDECREF(atom_spec_py) on a borrowed Py_False when the selection type is neither BY_STRING nor BY_ATTRIBUTES. — confirmed at src/c-interface.cc:3954 in additional_representation_info_py(); harmless on Python 3.12+ where Py_False is immortal, but the whole atom_spec_py build is dead work since it is never put in the result. — Fix note: the dead atom_spec_py build is removed.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-maps.cc analyse_map_point_density_change(): copies an empty Xmap as the mask when imol_map_mask is invalid, then indexes it. — confirmed: xmap_for_mask at src/c-interface-maps.cc:3291 stays default-constructed when imol_map_mask is not a valid map, and is passed to zero_dose_extrapolation() at :3300, whose mask is indexed with another map’s reference index (xmap_mask[ix], as at coot-utils/coot-map-utils.cc:4978). — Fix note: returns -1 with a warning when the mask map is invalid.
  • FIXED (branch fix-api-docs-bugs) molecule_class_info_t::spin_search: indexes moving_atoms_list[0] without an empty check, and uses direction_atoms.first twice. — first half confirmed at src/molecule-class-info-mutate.cc:1383 (and the same in the newer overload at :1525); neither spin_search_by_atom_vectors() (src/c-interface-build.cc:682) nor the scm/py wrappers check for an empty list. The repeated direction_atoms.first (:1380-1381) is deliberate: the comment says the first torsion atom is unused. — Fix note: empty-list check added to the older overload (the newer one already had it).
  • FIXED (branch fix-api-docs-bugs) src/graphics-info-intermediate.cc:~206 backrub_rotamer_intermediate_atoms(): moving_atoms_asc->mol without a null check on moving_atoms_asc. — confirmed at src/graphics-info-intermediate.cc:206: moving_atoms_asc is NULL until the first refinement (src/graphics-info-statics.cc:780); the keybinding caller guards it (src/graphics-info-keybindings.cc:656) but the scripting function backrub_rotamer_intermediate_atoms() (src/c-interface-build.cc:6185) does not. — Fix note: same check added to the three sibling functions in the file.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:~4958 make_image_povray_py(): glareas[0] without an empty check. — confirmed at src/c-interface.cc:5011; the raster3d siblings just above (:4967, :4986) do test glareas.empty(), so this crashes only in the no-graphics case.
  • REJECTED src/c-interface-build.cc:343 replace_residues_from_mol_py(): no null check on mol_new (the scm version has one). — the check is indeed missing at src/c-interface-build.cc:355 (the scm version has it at :320), but create_mmdbmanager_from_residue_specs() appears always to return a freshly allocated manager, even when no spec matches, so there is no null to dereference; it is an inconsistency, not a crash.
  • FIXED (branch fix-api-docs-bugs) src/cc-interface.hh atom_info_as_text_for_statusbar (symmetry overload): no bounds check on atom_index. — confirmed at src/c-interface-info.cc:441: the plain overload checks 0 <= atom_index < n_selected_atoms (:389-391) but the symmetry overload indexes directly; its only caller (src/graphics-info-pick.cc:362) passes the index of a successful pick, so it is latent, not live.
  • FIXED (branch fix-api-docs-bugs) residues_near_residues_py (src/c-interface-info.cc:~806): PyList_New(l) uses the input length; if a residue isn’t found, the trailing slots stay NULL. — confirmed at src/c-interface-info.cc:806: the list is sized by the input length but filled once per key of the result map (:844), so any input spec that matches no residue leaves NULL slots, which crash on iteration from Python. — Fix note: the list is now built with append.

Missing or partial imol checks

  • FIXED (branch fix-api-docs-bugs) src/c-interface-build.cc:2956 renumber_residue_range(): imol <= n_molecules() is off by one. — confirmed at src/c-interface-build.cc:2958: imol == n_molecules() passes the test and molecules[imol] at :2959 is one past the end.
  • FIXED (branch fix-api-docs-bugs) no imol >= 0 check: — all eight confirmed: each tests only imol < n_molecules(), so a negative imol (e.g. the -1 from a failed read) indexes molecules[] out of range. — Fix note: all eight; the mask_map_by_molecule messages now print the right molecule.
    • set_map_is_difference_map (c-interface-maps.cc:1074) — src/c-interface-maps.cc:1082.
    • set_refmac_counter (c-interface-refmac.cc:43) — src/c-interface-refmac.cc:43; it also has no model check.
    • check_chiral_volumes (c-interface-validate.cc:528, graphics-info.cc:5908) — src/c-interface-validate.cc:529 and src/graphics-info.cc:5910.
    • rigid_body_refine_zone (c-interface-build.cc:4943) — src/c-interface-build.cc:4950.
    • progressive_residues_in_chain_check (:2422) — src/c-interface-build.cc:2423; it also has no model check.
    • atom_spec_to_atom_index / full_atom_spec_to_atom_index (c-interface.cc:7960,7968) — src/c-interface.cc:8021 and :8031; neither has a model check.
    • average_temperature_factor (:4367) — src/c-interface.cc:4438.
    • mask_map_by_molecule (~1456) — src/c-interface-ligands.cc:1450 and :1454, for both map_mol_no and coord_mol_no; the second message also prints map_mol_no instead of coord_mol_no.
  • FIXED (branch fix-api-docs-bugs) no validity check at all: — all eight confirmed; two have a partial check, noted on the sub-item. — Fix note: all eight; check_waters_baddies returns an empty list when there is no refinement map.
    • mol_is_displayed (c-interface.cc:6455) — src/c-interface.cc:6511.
    • get_show_unit_cell (:3418) — src/c-interface.cc:3477.
    • remove_atom_label (:8933) — src/c-interface.cc:8992.
    • get_sequence_as_fasta_for_chain — src/cc-interface-alignment.cc:56: the sequence lookup is guarded (:53) but name_sans_extension() is called on molecules[imol] outside the guard.
    • make_variance_map (reads is_EM_map() first) — src/c-interface-maps.cc:2247, one line before the is_valid_map_molecule() test; is_em_flag is also just whatever the last list entry gave.
    • unskeletonize_map (graphics-info.cc:1545) — src/graphics-info.cc:1549: tests imol >= 0 only, with no upper bound or map check.
    • refmac_name — src/c-interface-refmac.cc:65.
    • check_waters_baddies (Imol_Refinement_Map()) — src/c-interface-validate.cc:372-373: imol is checked, but imol_for_map is used unchecked and is -1 when no refinement map is set.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-build.cc:2532 insertion_code_from_serial_number(): no serial_num >= 0 check. — confirmed at src/c-interface-build.cc:2544: only serial_num < nres is tested before residues[serial_num] at :2548.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:8702 read_cif_data_fofc_map(): doesn’t validate imol_coordinates, and leaves the empty molecule behind on failure. — second half confirmed at src/c-interface.cc:8785-8794: the molecule from create_molecule() is not closed when make_map_from_cif_fofc() returns -1. First half is wrong: imol_coordinates is validated downstream at src/molecule-class-info-maps.cc:3058. Also :8776 reads s.st_mode after stat() has failed, when s is uninitialised. — Fix note: the empty molecule is erased on failure and s.st_mode is only read after a successful stat().

Reported: wrong results

  • FIXED (branch fix-api-docs-bugs) coot-utils/peak-search.cc:548: only_around_protein_flag = false; overrides the caller, so difference_map_peaks’ around_model_only_flag has no effect. — confirmed at coot-utils/peak-search.cc:548: the parameter is unconditionally reset just before the if (only_around_protein_flag) test at :571, so that branch is dead; the reset arrived in 3c953d66f (2023-12-28, “Fix up broken difference map peaks”), so it may be a deliberate bodge that was never revisited. — Fix note (a), 2026-11-16: get_peaks() now always moves the peaks to the model by symmetry and then, if the flag is set, drops those more than 4 Å from every atom; the forced false in src/graphics-info-gui.cc is gone and the c-interface.h doc is updated. The old flag-on branch tested the unmoved map-ASU peaks, which is why it lost real peaks (all 18 for 1hvv).
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-other.cc:~6985 find_water_baddies_AND(): flags waters whose density is above sigma*rmsd (looks inverted). It uses different distance logic from OR mode and labels raw density as “rmsd”. — confirmed at src/molecule-class-info-other.cc:7003 (den > outlier_sigma_level*map_sigma; the OR mode at coot-utils/find-water-baddies.cc:126 uses <) and :7060 (unnormalised density labelled “rmsd”). Also: the distance test is “no neighbour in the min-max shell” rather than a closest-contact test, min_dist/max_dist are overwritten for later waters once one is negative (:7023-7026), SelHnd_wat is never deleted, and the two ignore_* flags are unused. — Fix note: the density test, the overwritten min_dist/max_dist, the selection leak and the “rmsd” label are fixed; the distance logic still differs from OR mode and the two ignore_* flags are still unused.
  • FIXED (branch fix-api-docs-bugs) coot-utils/find-water-baddies.cc:~139: a water flagged by B-factor doesn’t set this_is_marked, so it can be listed twice. — confirmed at coot-utils/find-water-baddies.cc:139-141: the B-factor branch pushes the atom without setting this_is_marked, so the distance test at :146 can push it again. den is also pushed uninitialised when map_in_sigma <= 0.
  • FIXED (branch fix-api-docs-bugs) check_waters_baddies: part_occ_contact_flag actually means “skip the distance tests”. — confirmed at coot-utils/find-water-baddies.cc:149: if (ignore_part_occ_contact_flag == 0) wraps the whole distance test and nothing inside looks at the occupancy of the contacting atoms. — Fix note (b), 2026-11-16: in find_water_baddies_OR() the flag no longer skips the distance tests; it now leaves atoms with occupancy < 0.99 out of the min_dist (close contact) test only, and they still count for the max_dist test. Docs updated in c-interface.h, cc-interface.hh, api/molecules-container.hh. AND mode still ignores the flag.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-other.cc:~4866 trim_by_map(): make_backup() comes after the trim, so undo doesn’t restore it. — confirmed at src/molecule-class-info-other.cc:4861-4868: trim_molecule_by_map() edits atom_sel.mol first and make_backup() then saves the already-trimmed model.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-other.cc:1999 delete_waters(): no backup, matches only HOH, and counts atoms rather than waters. — all three confirmed at src/molecule-class-info-other.cc:1999-2038 (no make_backup(), res_name == "HOH" at :2014, return of the atom vector’s size at :2038); it also deletes the atoms but leaves the emptied residues in the chain. — Fix note: backup added, WAT and DOD matched, returns the number of waters; the emptied residues are still left in the chain.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-build.cc:688 add_residue_with_atoms(): no backup (and see the always-0 return below). — confirmed at src/molecule-class-info-build.cc:688-733: there is no make_backup() before the residue/chain is created and atoms are added, and FinishStructEdit() is not called either. — Fix note: FinishStructEdit() added too.
  • INTENDED? overlap_ligands: graph-matches every residue in imol_ligand, moves the best, and deletes all other residues in imol_ligand. Intended? — behaviour confirmed at src/c-interface-ligands.cc:581-587 in overlap_ligands_internal(); the code comment says “delete everything except the best ligand”, so it is deliberate, but the API docs should warn that imol_ligand is modified destructively.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-superpose.cc:~243 superpose_with_atom_selection(): the reference cell/symmetry goes to imol2, not to the returned molecule, so in copy mode the original is modified and the copy is not. — confirmed at src/c-interface-superpose.cc:243: copy_cell_and_symm_headers(m1, m2) always targets molecules[imol2], whatever move_copy_of_imol2_flag is, and imodel_return (the copy) is never touched; the success result is also discarded.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-backup.cc:184 get_backup_info(): the inner bfi shadows the outer one, so it always returns empty info. It also indexes history_filename_vec 0-based while restore_to_backup_checkpoint (:29) uses backup_index - 1. — both confirmed: the shadowing declaration is at src/molecule-class-info-backup.cc:185, so get_backup_info() (and the Python get_backup_info, src/c-interface-build.cc:608) always returns a default-constructed info; restore_to_backup_checkpoint() uses backup_index - 1 at :35. — Fix note: it now uses backup_index - 1, as restore_to_backup_checkpoint() does.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:8014 vs src/graphics-info-state.cc:820: save_state()/quick_save write to the XDG state dir, but run_state_file(_maybe) reads 0-coot.state.* from the cwd. — confirmed: the writer uses xdg.get_state_home() at src/graphics-info-state.cc:867 and :874, while run_state_file() (src/c-interface.cc:8076, :8085), run_state_file_py() (:8100) and run_state_file_maybe() (:8130-8145) stat() the bare file name in the cwd. — Fix note (c), 2026-11-16: run_state_file(), run_state_file_py(), run_state_file_maybe() and the two wrapped_create_run_state_file_dialog*() now look in the XDG state directory (Paul’s edit, with three slips corrected: the Guile branch was handed the .py file, the Python-only branch used an undeclared filename, and run_state_file_maybe() still set a cwd name). A state file in the cwd is no longer picked up. c-interface.h docs updated.
  • FIXED (branch fix-api-docs-bugs) src/graphics-info-state.cc:251: treats a map_sampling_rate of 1.5 as the default, but the default is 2.5, so the rate is always written. — confirmed: the test is map_sampling_rate != 1.5 at src/graphics-info-state.cc:253, and the static default is 2.5 at src/graphics-info-statics.cc:545.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-maps.cc:~1392 change_contour_level(): difference maps always increase, whatever is_increment is. — confirmed at src/c-interface-maps.cc:1400-1401: the difference-map branch does += diff_map_iso_level_increment without looking at is_increment; nothing in src/ calls the function, so it only bites from scripting.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-maps.cc:3106-3108 set_auto_updating_sfcalc_genmaps(): validates imol_updating_fofc_map twice and imol_updating_2fofc_map never. — confirmed at src/c-interface-maps.cc:3119 and :3121: both tests are on imol_updating_fofc_map, and imol_updating_2fofc_map goes into the ummp at :3123-3124 unchecked.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-maps.cc:~245 calculate_maps_and_stats_py(): passes imol_map_2fofc as the data map, so imol_map_with_data_attached is ignored (same in the ummp constructor). — confirmed at src/c-interface-maps.cc:230 (sfcalc_genmaps_using_bulk_solvent(imol_model, imol_map_2fofc, ...)) and :245 (ummp(imol_model, imol_map_2fofc, imol_map_2fofc, imol_map_fofc)); imol_map_with_data_attached is used only for the history entry, and calculate_new_rail_points() at :246 runs even when the molecules are invalid. — Fix note: imol_map_with_data_attached is now validated and used; rail points are only calculated on success.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-maps.cc:~617 make_and_draw_map_with_reso_with_refmac_params(): sigfobs_col_str = single_quote(sigfobs_col_str) quotes the empty string, not sigfobs_col. — confirmed at src/c-interface-maps.cc:632; it affects only the history/state command, where the SigF column is written as an empty quoted string.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-maps.cc:2999 make_map_from_cif_2fofc(): calls make_map_from_cif, so it makes a sigmaA map, not a 2Fo-Fc map. — confirmed at src/molecule-class-info-maps.cc:3043: the imol_coords overload calls make_map_from_cif() (which passes is_2fofc_type 0, :3075) rather than the atom-selection overload of make_map_from_cif_2fofc() at :3080 (which passes 1). — Fix note: so read_cif_data_2fofc_map() now really makes a 2Fo-Fc map; header doc updated.
  • FIXED (branch fix-api-docs-bugs) coot-utils/coot-map-utils.cc:~2207-2251 map_to_model_correlation_stats(): modes 4 and 5 have no main-chain/side-chain selection (another function in the file handles 1   4 and 2   5 correctly). — confirmed at coot-utils/coot-map-utils.cc:2241-2246: for standard residues only modes 1, 2 and 3 set atom_name_selection, so modes 4 and 5 use all atoms; the sibling blocks at :2728-2731 and :2923-2926 test 1 || 4 and 2 || 5.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-ncs.cc:~625 ncs_chain_differences_py(): PyList_GetSlice(residue_spec_to_py(...), 2, 4) assumes the old 4-element spec, so only the ins-code comes back. The spec lists also leak. — confirmed at src/c-interface-ncs.cc:628 and :630: residue_spec_to_py() has returned a 3-element list since 20251216 (src/c-interface.cc:7612), so the [2:4] slice is just [ins_code]; the temporary spec lists are never DECREF’d, nor are the two strings appended at :641-642, nor l_residue_data when residue_info is empty. — Fix note: the slice is now [1:3] (res-no, ins-code) and the leaks are plugged.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-build.cc:~4754 find_secondary_structure_local(): ignores radius and passes 0.0, so it searches the whole map. — confirmed at src/c-interface-build.cc:4763: ssfind(xmap, pt, 0.0, tgtvec) passes a literal 0.0 and radius is never used; all three in-file callers pass 0.0 anyway, so it only matters for a scripted call with a non-zero radius.
  • FIXED (branch fix-api-docs-bugs) src/graphics-info-intermediate.cc:~321 cis_trans_conversion_intermediate_atoms(): compares GetResName() with " N "; it should be the atom name. — confirmed at src/graphics-info-intermediate.cc:322-323: name_of_closest_atom is built from closest_atom->GetResName(), so the == " N " test is never true and the both-trans case always picks (prev, this); the two branches also look the wrong way round (an N belongs to the prev-this peptide), so fixing the name alone would invert the choice. — Fix note: uses the atom name, and N now selects the (prev, this) peptide, so a pick on C/O/CA selects (this, next) - a behaviour change worth a test in the GUI.
  • REJECTED src/graphics-info-intermediate.cc:79 pepflip_intermediate_atoms_other_peptide(): GetAtom(" N ") (3 characters) probably never matches. — the 3-character name is at src/graphics-info-intermediate.cc:81, but mmdb’s Residue::GetAtom() goes through Atom::CheckID(), which skips leading spaces and stops at trailing ones, so " N " does match " N "; untidy, not a bug.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-build-side-chain.cc:1088 do_base_mutation(): idx > 0 rejects atom index 0. — confirmed at src/c-interface-build-side-chain.cc:1090: idx > 0 && idx < n_selected_atoms, so a pick of the first atom of the molecule falls to the “out of range atom index” error.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info.cc:2534 remove_atom_label(): if (i > 0), so atom 0 can’t be unlabelled. — confirmed at src/molecule-class-info.cc:2537.
  • FIXED (branch fix-api-docs-bugs) src/graphics-info.cc:6516 remove_last_lsq_plane_atom(): size() > 1, so the last atom can’t be removed. — confirmed at src/graphics-info.cc:6518; it also always returns 0.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-preferences.cc:1265,1328: builds the path from the whole COOT_*_EXTRAS_DIR env var, not from dirs[i], so multiple dirs break. — confirmed at src/c-interface-preferences.cc:1265 (scheme) and :1328 (python): std::string fp = s; uses the unsplit env string where dirs[i] is meant, so with more than one directory every stat() fails and nothing is loaded; the scheme function is marked “no longer used?” at :1228.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-mutate.cc:1346 exchange_chain_ids_for_seg_ids(): the last segid run gets chain id segid, the others get chain:segid. — confirmed: runs closed inside the loop get current_chain_id + ":" + current_seg_id (src/molecule-class-info-mutate.cc:1299-1302) but the final run is pushed with bare current_seg_id (:1316).
  • FIXED (branch fix-api-docs-bugs) src/c-interface-build.cc:3443 set_b_factor_residues_scm(): scm_list_ref(..., scm_from_int(l)) should use i. — confirmed at src/c-interface-build.cc:3441-3442: the index is the list length l, so every iteration asks for the element one past the end and Guile raises an out-of-range error; the function can never work.
  • FIXED (branch fix-api-docs-bugs) register_interesting_positions_list_scm: scm_list_ref(item, 0) with a C int, and element 0 is used for both position and label. The py version rejects int coordinates. — confirmed at src/c-interface-residues.cc:211-212: both item_item_0 and item_item_1 come from scm_list_ref(item, 0) with a raw 0 instead of scm_from_int(...), so even if that call survives the label is never a string and nothing is registered. The py version (:268-270) uses PyFloat_Check(), which rejects integer coordinates, and leaks the PyUnicode_AsUTF8String() result at :275. — Fix note: scm indices, int coordinates in the py version and the bytes leak.
  • FIXED (branch fix-api-docs-bugs) refine_zone_with_full_residue_spec_scm/_py: looks up with the ins codes but passes “” to refine_residue_range. — confirmed at src/c-interface-refine.cc:342 (scm) and :381 (py): the residues are found with inscode_1/inscode_2 but refine_residue_range() is called with "" for both.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-refine.cc:599 generate_local_self_restraints(): clears the bond restraints but appends to Geman-McClure ones, so they accumulate. — confirmed: extra_restraints.bond_restraints.clear() at src/molecule-class-info-refine.cc:594, but the new restraints go to extra_restraints.geman_mcclure_restraints at :710, which is never cleared here, so a second call duplicates them (and wipes any unrelated user bond restraints). — PARTLY FIXED (branch fix-api-docs-bugs): the stale bond_restraints.clear() is gone, so user bond restraints survive. The GM restraints are still not cleared, deliberately: the function is called once per chain/selection, so clearing would lose the earlier chains. Repeat calls on the same selection still duplicate. Decided 2026-11-16: that is acceptable for now, because the restraints can be cleared first (delete_all_extra_restraints() in the desktop API, clear_extra_restraints() in chapi); the c-interface.h doc, which still said that the extra bond restraints are cleared, now says this instead. The chapi copy (api/coot-molecule-refine.cc:126) still has the stale bond_restraints.clear().
  • REJECTED src/c-interface-build-symmetry.cc:241 save_symmetry_coords(): pre-shifts by -n cells and never shifts back (new_molecule_by_symmetry does). — the description is accurate (src/c-interface-build-symmetry.cc:265-268, :288-289), but this is exactly the transform the symmetry display uses (translate_atom_with_pre_shift(), coords/mmdb-crystal.cc:1094-1109: pre-shift, then symop, no shift back), so the file matches the atoms on screen. It is coot::mol_by_symmetry() (coot-utils/coot-coord-utils.cc:7275-7277) that uses a different convention and takes +pre_shift; whether the two agree for a given caller has not been checked.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-build-symmetry.cc:380,448 new_molecule_by_symmetry*(): marks the source molecule as having unsaved changes. — confirmed at src/c-interface-build-symmetry.cc:381 and :495: g.molecules[imol].set_have_unsaved_changes_from_outside() is called on the source imol right after the model is installed in imol_new.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-other.cc:520 set_atom_attributes(): fills segID with '\n' instead of '\0'. — confirmed at src/molecule-class-info-other.cc:514-516; mostly masked because the following strncpy(..., 19) NUL-pads bytes 0-18, but segID[19] stays '\n', so a value of 19 or more characters leaves the char[20] unterminated.
  • FIXED (branch fix-api-docs-bugs) src/graphics-info-draw.cc:2807: the inverted cross-hair colour uses component [0] for blue (should be [2]). — confirmed at src/graphics-info-draw.cc:2829: 1.0f - rotation_centre_cross_hairs_colour[0] is used for the third component.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:3165 set_symmetry_colour_merge() and :3567 set_aniso_probability(): only redraw, with no mesh regen. — confirmed at src/c-interface.cc:3220-3221 and :3622-3623: both set the static and call graphics_draw() only, although both values are read while the meshes are built (src/molecule-class-info.cc:4569 and :4443); the neighbouring set_symmetry_colour() does call update_symmetry() for exactly this reason (:3238-3241).
  • FIXED (branch fix-api-docs-bugs) the radial-map-colouring setters (centre, min/max radius, invert, saturation) don’t recontour; only enable/disable does. — confirmed: the five setters at src/c-interface-maps.cc:3165-3194 and their members at src/molecule-class-info-maps-2.cc:162-188 only store the value (no update_map(), no graphics_draw()), while set_radial_map_colouring_do_radial_colouring() (src/molecule-class-info.h:3805-3810) calls update_map(true), and then only when the state actually changes. — Fix note: the setters recontour when radial colouring is on, and redraw.
  • FIXED (branch fix-api-docs-bugs) handle_drag_and_drop_string: if (url.find("/PDBimages/")) is true for npos too. — confirmed at src/drag-and-drop.cc:87: find() returns npos (non-zero) when absent and 0 only if the URL starts with the string, so the test passes for every .png URL; the two length-2 checks that follow limit the damage.
  • FIXED (branch fix-api-docs-bugs) make_acedrg_dictionary_via_CCD_dictionary: runs acedrg only on CURLE_OK, but a cached CIF gives -1, so the second request does nothing. — confirmed: get_pdbe_cif_for_comp_id() initialises status = -1 and never changes it when the file already exists (src/c-interface-ligands.cc:4193-4199), and the caller requires status == CURLE_OK (:4271). — Fix note: a cached CIF now gives CURLE_OK.
  • FIXED (branch fix-api-docs-bugs) fetch_alphafold_model_for_uniprot_id: reads the model twice on a fresh download, and also tries to read after a failed download. — confirmed in src/c-interface-network.cc: the read inside the needs_downloading branch (:675) is followed by an unconditional second read at :684, which also runs after the “not found” dialog, so a fresh download gives two molecules (the first one orphaned) and a failed one attempts to read a missing file.
  • FIXED (branch fix-api-docs-bugs) sequence_from_map: shadows imol_map with imol_refinement_map(), and refits the whole chain rather than the range. — confirmed at src/c-interface-build-side-chain.cc:1308-1309: an inner int imol_map = imol_refinement_map(); replaces the validated argument (and may be -1), and backrub_chain() (:1272-1292) loops over every residue of the chain, not resno_start..resno_end; despite its name it calls auto_fit_best_rotamer(). — Fix note: only the residues in the range are fitted, with the imol_map passed in.
  • DOCUMENTED (branch fix-api-docs-bugs) src/c-interface-gui.cc:5009 toolbar_multi_refine_continue: the Python branch uses PyGTK gobject.idle_add. — confirmed at src/c-interface-gui.cc:5067: gobject.idle_add(multi_refine_idle_proc) is PyGTK-era and gobject does not exist under PyGObject; the Guile branch (:5056) likewise calls the guile-gtk gtk-idle-add, so neither branch can work in a GTK4 build. — Decision (d), 2026-11-16 (Paul): leave the code, document the seven toolbar_multi_refine_* functions as non-functional in GTK4 (c-interface.h). The three buttons are in no .ui file, so the handlers in glade-callbacks.cc are never connected; the functions stay so that scheme/fitting.scm loads.
  • FIXED (branch fix-api-docs-bugs) text handles (src/c-interface-info.cc:3683,3725): the handle is generic_texts.size(); remove_text erases by handle while edit_text indexes by position, so after a removal edits hit the wrong item and handles can collide. — confirmed in src/c-interface-info.cc: place_text() uses the vector size as the handle (:3715), remove_text() matches on it->handle and erases (:3742-3743), and edit_text() uses the handle as a vector index (:3761-3762); after one removal the next place_text() reuses a live handle. place_text() also ignores its size argument. — Fix note: handles are now max-handle + 1 and edit_text() looks up by handle; size is still ignored.
  • FIXED (branch fix-api-docs-bugs) python/raster3d.py:~142: on non-Windows args = " " then args += [...] raises TypeError, so povray via raytrace is broken. Also :105: " -labels" + name is missing a space. — both confirmed: python/raster3d.py:144 sets args = " " (a str) and :145 does args += [...], which raises TypeError on every non-Windows run; :105 builds " -labels" + image_file_name_mod with no separating space. — Fix note: not run (no povray/render here).
  • FIXED, UNVERIFIED BY RENDERING (branch fix-api-docs-bugs) src/graphics-info-render.cc:~146,214,298 (raster3d/povray/renderman): the view matrix is identity (FIXME), so exports lose the orientation. — confirmed at src/graphics-info-render.cc:144-147, :213-216 and :297-300: each passes a default-constructed GL_matrix to set_view_matrix() with the from_quaternion(quat) call commented out and a “fixme - use glm_quat” message printed. — Fix note (e), 2026-11-16: the three exporters now take the matrix from get_model_rotation() (i.e. view_quaternion) via a new static view_rotation_as_GL_matrix() in src/graphics-info-render.cc. The .r3d header for a 90° z rotation has the rotation and the rotated -centre in Raster3D’s row-vector form, but no picture has been rendered (no Raster3D or POV-Ray on this machine); the code and the c-interface.h docs carry a note that the orientation may be wrong.
  • FIXED (branch fix-api-docs-bugs) morph_fit_residues / morph_fit_by_secondary_structure_elements: the “invalid map” and “invalid model” messages are swapped. — confirmed at src/c-interface-build-morph.cc:169-173 and :191-195: the invalid-model branch prints “no valid map” and the invalid-map branch prints imol (the model number) “is not a valid map molecule”.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-superpose.cc apply_lsq_matches* / get_lsq_matrix*: the reference/moving invalid-molecule messages are swapped. — confirmed in all five functions in src/c-interface-superpose.cc: the inner else (moving invalid) prints “Invalid reference molecule number” and the outer else (reference invalid) prints “Invalid moving molecule number” (:514/:517, :542/:545, :570/:573, :600/:603, :627/:630).
  • FIXED (branch fix-api-docs-bugs) make_masked_maps_split_by_chain (c-interface-ligands.cc:~4158): prints imol_map for an invalid model. — confirmed at src/c-interface-ligands.cc:4162: the invalid-model message prints imol_map where imol is meant.
  • NOT A BUG geometry/dict-utils.cc:1438 hydrogens_connect_file(): no space between the neighbour count and the first atom name. — confirmed at geometry/dict-utils.cc:1439-1442: the count is streamed and the first neighbour name follows immediately, so the two run together unless the atom id happens to carry a leading space. — Resolution (f), 2026-11-16: the atom names are 4 characters with a leading space, and that supplies the separator. The output for ARG matches the reduce het dictionary (reduce_wwPDB_het_dict.txt) column for column, including HH11. Two conformance tweaks made on branch fix-api-docs-bugs: the neighbour count is now setw(5) (same output for counts below 10, keeps the columns for 10 or more) and the atom count on the RESIDUE line is setw(7), as in the reference.
  • FIXED (branch fix-api-docs-bugs) map_partition_by_chain: the label typo “Partioned”. — confirmed at src/cc-interface-map-utils.cc:792 (the molecule label) and repeated in the doc comment at src/cc-interface.hh:836; a stray copy is in src/aa.cc:376.
  • FIXED (branch fix-api-docs-bugs) src/graphics-info-opengl.cc:611 decrease_clipping_back: the debug output prints the near plane. — confirmed at src/graphics-info-opengl.cc:611: the “now” value printed is screen_z_near_perspective, not the screen_z_far_perspective that was just changed.

Reported: return value is always the same

  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-other.cc:9397 scale_cell(): retval is never set, so it always returns 0. — confirmed at src/molecule-class-info-other.cc:9399-9421: retval is initialised to 0 and returned unchanged even after the map has been rescaled. — Fix note: returns 1 on success; header doc updated.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-build.cc:6188 add_linked_residue(): status is never set, so it always returns 0. — confirmed at src/c-interface-build.cc:6204-6232: status is initialised to 0 and never assigned, whether or not add_linked_residue_by_atom_torsions() returns a set spec.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-build.cc:6303 add_linked_residue_py(): ignores mode, and returns False when fit-and-refine is off even if the residue was added. — confirmed at src/c-interface-build.cc:6314-6370: mode is never read, and r = residue_spec_to_py(new_res_spec) sits inside if (do_fit_and_refine) (:6345-6347), so with linked_residue_fit_and_refine_state off the caller gets False for a successfully added residue. — Fix note: the spec is returned whether or not fit-and-refine is on; mode is still ignored.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-build.cc:688 add_residue_with_atoms(): r_added is never incremented. — confirmed at src/molecule-class-info-build.cc:691 and :733: r_added is set to 0 and returned, with nothing in between touching it. — Fix note: it now counts the atoms added, as the header doc intended.
  • GONE src/c-interface-build-morph.cc:272,399: the chain jiggle-fit wrappers return the -999 / -100 sentinels even on success. — at HEAD both chain wrappers assign the score: fit_chain_to_map_by_random_jiggle() at src/c-interface-build-morph.cc:285 and fit_chain_to_map_by_random_jiggle_and_blur() at :450; both lines date from 73e3b4c3a (2026-11-02), after the report.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-nucleotides.cc:~350 watson_crick_pair(): imol_return is never set, so it always returns -1. — confirmed at src/c-interface-nucleotides.cc:330-353: the new molecule’s index is held in a local imol_new (:344) and imol_return is returned still at -1.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-ncs.cc:1408 copy_residue_range(): done_copy is never set. — confirmed: done_copy is declared at src/molecule-class-info-ncs.cc:1408 and returned at :1575 with no assignment between; the sibling just above it does set its own at :1375.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-mutate.cc:1300 exchange_chain_ids_for_seg_ids(): changed_flag is never set. — confirmed: changed_flag is declared at src/molecule-class-info-mutate.cc:1269 and returned at :1364 unchanged.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:4645 reset_view(): istat is never set. — confirmed: istat is declared at src/c-interface.cc:4700 and returned at :4783 with no assignment between.
  • FIXED (branch fix-api-docs-bugs) add_molecular_symmetry_from_mtrix_from_file() / _from_self_file() and src/c-interface-ncs.cc:~126 add_strict_ncs_from_mtrix_from_self_file(): istat is never set. — confirmed in all three: src/cc-interface-molecular-symmetry.cc:62-68 and :74-80, and src/c-interface-ncs.cc:128-133; each returns 0 for a valid and an invalid imol alike and discards whatever the member function did. — Fix note: 1 for a valid imol (the member functions are void, so that is all that can be reported).
  • FIXED (branch fix-api-docs-bugs) src/graphics-info-intermediate.cc:~335 cis_trans_convert_intermediate_atoms(): state is never set true. — confirmed: state is declared false at src/graphics-info-intermediate.cc:341 and returned at :404 with no assignment between.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-build-side-chain.cc:844 mutate_and_autofit_residue_range(): always returns 0. — confirmed at src/c-interface-build-side-chain.cc:847-870: status is never assigned, including when the sequence length does not match the range and nothing is done; backups are also switched off for the whole operation (:853-855), so it cannot be undone. — Fix note: one backup is now made before backups are switched off, so the whole operation can be undone.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-build.cc:1150 / molecule-class-info-other.cc:362 swap_atom_alt_conf(): ignores alt_conf, makes no backup, and always returns 0. The same always-0 return applies to set_atom_attribute, set_atom_string_attribute and set_atom_attributes. — all confirmed in src/molecule-class-info-other.cc: swap_atom_alt_conf() (:362-395) never reads alt_conf (it swaps the alt-locs of the first two atoms selected by name), has no make_backup(), never deletes its selection handle and returns istate unset; set_atom_attribute() (:324/:359), set_atom_string_attribute() (:442/:474) and set_atom_attributes() (:480/:541) likewise return an istate that is never assigned. — Fix note: backup, selection release and return values (also for the three set_atom_*attribute* members); alt_conf is still ignored.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-waters.cc:147 blob_under_pointer_to_screen_centre(): discards the result and always returns 0. — confirmed at src/c-interface-waters.cc:150-151: the result of g.blob_under_pointer_to_screen_centre() is dropped and a literal 0 is returned. — Fix note: and the member now sets 1 when it finds a blob.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-maps.cc:650-666 make_updating_map(): returns status (1), not imol. — confirmed at src/c-interface-maps.cc:663-678: status is fixed at 1 and returned whether or not make_and_draw_map() gave a valid imol, so the caller can neither get the map number nor detect failure. — Fix note: returns imol (-1 on failure) - an API change; header doc updated.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:5231 read_phs_and_make_map_using_cell_symm_from_mol(): ignores the make_map_from_phs result. — confirmed at src/c-interface.cc:5324-5325: the molecule is created and make_map_from_phs() called with its result dropped, so the new imol is returned even if the read failed. Also, for a map-only imol_ref, get_cell_symm() is handed that molecule’s atom_sel.mol (:5304-5305). — Fix note: the molecule is erased and -1 returned on failure; a map-only imol_ref no longer hands a null mol to get_cell_symm() (same guard in the two sibling functions).
  • FIXED (branch fix-api-docs-bugs) src/c-interface-build.cc:3083,3100,3150 write_pdb_file / write_cif_file / write_chain_to_pdb_file: return 0 for an invalid imol. — confirmed: all three initialise istat = 0 and only change it inside is_valid_model_molecule(imol) (src/c-interface-build.cc:3087, :3104, :3153), and the comment at :3099 says “return 1 on error, 0 on success”, so an invalid molecule reports success.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info.cc:9193 write_pdb_file with a SHELX extension: returns 1 because err isn’t reset. — confirmed at src/molecule-class-info.cc:9199-9203: err starts at 1 (fail) and the SHELX branch calls write_shelx_ins_file() without assigning it.
  • FIXED (branch fix-api-docs-bugs) src/c-interface.cc:10272 probe_available_p(): the flag is never set, so it always returns -1. — confirmed: graphics_info_t::probe_available is initialised to -1 at src/graphics-info-statics.cc:1339 and is only ever read, by probe_available_p() and probe_available_p_py() (src/c-interface.cc:10333, :10342); nothing in src/ writes it. — Fix note (g), 2026-11-16 (Paul: search for molprobity.probe; plain probe is no longer a thing): probe_available_p() searches the PATH with g_find_program_in_path("molprobity.probe") on the first call, caches the result and returns 1 or 0; the _py version calls it.
  • FIXED (branch fix-api-docs-bugs) src/molecule-class-info-residues.cc:542 get_all_molecule_rama_score(): only scores is filled, so the Ramachandran score/region API fields stay at their defaults. — confirmed: the function (src/molecule-class-info-residues.cc:542-630) only does rs.scores.push_back() (:620); score, score_non_sec_str, n_zeros, scores_non_sec_str and region keep their constructor defaults, yet the scm/py wrappers return them (src/c-interface-validate.cc:2253-2257). — Fix note: score, score_non_sec_str, scores_non_sec_str, n_zeros and region are filled; scores itself is unchanged (still every residue), since dynamic-validation.cc uses it.
  • FIXED (branch fix-api-docs-bugs) chain_fragments_scm/_py: compute the result but return #f/False. — confirmed at src/c-interface-info.cc:1492-1501 and :1505-1518: both call get_fragment_info() into a local vector and return the untouched #f/False (the only useful effect is the optional screen output). — Fix note: they return a list of [chain-id, [[start-spec, end-spec], …]]; header docs updated.
  • FIXED (branch fix-api-docs-bugs) export_molecule_as_obj() for a model molecule: always false. — confirmed at src/molecule-class-info-maps.cc:5311-5319: export_model_molecule_as_obj() does the export through make_bonds_type_checked() and then ends with a literal return false, so export_molecule_as_obj() (src/c-interface.cc:3008) reports failure for every model. — Fix note: it returns whether the file exists afterwards (the write is a side effect with no status of its own).
  • FIXED (branch fix-api-docs-bugs) undo_symmetry_view, move_reference_chain_to_symm_chain_position: always 0. — confirmed: r is declared 0 and never assigned in undo_symmetry_view() (src/c-interface-info.cc:2342, returned at :2382) and in graphics_info_t::move_reference_chain_to_symm_chain_position() (src/graphics-info-pick.cc:1247, returned at :1266).
  • PARTLY FIXED stubs that return empty or False: — all nine confirmed as stubs or as discarding their result; details per sub-item. — Status 2026-11-16: model_composition_statistics_*, alignment_mismatches_py, get_residue_alt_confs_scm and glyco_tree_scm/_py are fixed (see the sub-items). The other five are left as they are for this release (each is documented in its header) and are listed in the “Tidy up the API for Coot 2” item in BACKLOG.md as “implement or remove”.
    • model_composition_statistics_* (c-interface-analysis.cc:195,227) — src/c-interface-analysis.cc:195-223 and :227-238: the stats are computed into a local and '() / False is returned. — FIXED 2026-11-16 (branch fix-api-docs-bugs). It was worse than reported: molecule_class_info_t::get_model_composition_statistics() returned a default object, so nothing was computed. Now it fills the composition counts, and a new graphics_info_t::get_model_composition_statistics(imol) adds the RMS bond and angle deviations, the atom overlap score, the fraction of non-outlier rotamers and the Ramachandran favoured and outlier fractions. The Python function returns a dictionary and the Scheme function an association list (False for an invalid molecule). The Python version was run on four test models; the Scheme version compiles but was not run.
    • alignment_mismatches_py (body under #if 0) — src/c-interface-validate.cc:1841-1863: the block that fills the result is #if 0, so the function returns False or an empty list, and the three lists built at :1811-1813 leak. — FIXED 2026-11-16 (branch fix-api-docs-bugs): Paul re-enabled the block; the empty list that was replaced and the alignment strings (appended without a DECREF) no longer leak, and the header doc describes the 4-member return value. Run on tutorial-modern.pdb: False with no sequence, and mutations, deletions, insertions and alignment text with a changed sequence.
    • topological_equivalence_chiral_centres — src/c-interface-ligands.cc:2221-2225: returns an empty vector unconditionally.
    • get_residue_alt_confs_scm — src/c-interface-build.cc:1092-1097: prints “Needs to be implemented” and returns '(). — FIXED 2026-11-16 (branch fix-api-docs-bugs): it now does what get_residue_alt_confs_py() does (a list of alt-conf strings, or #f). Compiled, not run.
    • alignment_results_scm/_py — src/c-interface-mutate.cc:367-371 and :474-482: both return #f/False with no other code.
    • glyco_tree_py — src/c-interface-residues.cc:488-512: builds a glyco_tree_t (without a null check on residue_p) and returns False. — FIXED 2026-11-16 (branch fix-api-docs-bugs): glyco_tree_py() returns the tree as nested dictionaries (keys residue_spec, residue_name, link_type, children) and glyco_tree_scm() returns the same as nested association lists. The Python version was run on multi-carbo-coot-3.pdb (FUC A1 with child NAG A2, link ALPHA1-4); the Scheme version compiles but was not run.
    • qq_plot_* without goocanvas — src/c-interface-maps.cc:2569 and :2638: the whole body is inside #ifdef HAVE_GOOCANVAS, which a GTK4 build does not define.
    • global_phasing_screen — src/gphl-screen.cc:636-1433: it does its work as a side effect (render_to_widget()), but its return value is never assigned a result.
    • spherical_density_overlap — src/spherical-density.cc:38-69: returns #f always, and writes map-fragment-at-origin.map into the cwd as a side effect.
  • FIXED (branch fix-api-docs-bugs) src/c-interface-waters.cc:~490 highly_coordinated_waters_py(): ret is only set inside the waters loop, so with no hits it returns False and leaks the metals list. — confirmed, and it is worse than reported: ret = PyList_New(2) and the two PyList_SetItem() calls sit inside the for over water_contacts (src/c-interface-waters.cc:500-502), so with two or more hits metal_results and r are stolen into a fresh list on every pass (one reference owned by several lists, and the earlier lists leaked); with no hits both lists leak and False is returned.

Reported: Python refcount slips

  • FIXED (branch fix-api-docs-bugs) Py_False/Py_True returned or stored without an INCREF: — all five confirmed; harmless on Python 3.12+ where Py_False/Py_True are immortal, a real refcount underflow on older Pythons. — Fix note: all five.
    • change_chain_id_with_result_py (c-interface-build.cc:4298) — src/c-interface-build.cc:4302/:4319: Py_False is returned as-is for an invalid imol.
    • glyco_tree_internal_distances_fn_py (c-interface-residues.cc:706) — src/c-interface-residues.cc:709/:720: always returns the bare Py_False (it has no other result).
    • save_coords_name_suggestion_py (c-interface-info.cc:3414) — src/c-interface-info.cc:3446/:3452: bare Py_False for an invalid imol.
    • refinement_results_to_py (graphics-info-modelling.cc:2626) — src/graphics-info-modelling.cc:2623/:2643: lights_py stays Py_False when there are no lights and is then stolen by PyList_SetItem(); the top-level r is INCREF’d correctly (:2647).
    • ncs_ghosts_py (c-interface-ncs.cc:~770) — src/c-interface-ncs.cc:760-763 and :774-775: display_it_flag_py (Py_False/Py_True) and, without rtops, rtop_py are stolen by PyList_SetItem() with no INCREF.
  • FIXED (branch fix-api-docs-bugs) glyco_tree_matched_residue_pairs_py (c-interface-residues.cc:637): PyList_Append without Py_DECREF, so it leaks. — confirmed at src/c-interface-residues.cc:672: PyList_Append(rt, list_py) adds its own reference and list_py is never DECREF’d, leaking one list per matched pair; neither residue_1_p nor residue_2_p is null-checked before building the trees. — Fix note: null checks on the two residues added too.
  • FIXED (branch fix-api-docs-bugs) map_to_model_correlation_stats_per_residue_range_py: n_sc_items = m.first.size() should be m.second (harmless today). — confirmed at src/cc-interface-map-utils.cc:144: o_1 is sized from m.first but filled from m.second (:165-177), so it is only correct while both maps have the same number of entries; otherwise the list has NULL slots or PyList_SetItem() fails out of range.

Reported: parameters or settings that have no effect

  • DEFERRED ignored parameters: — all fifteen confirmed; each sub-item gives where the parameter is dropped. — PARTLY FIXED (branch fix-api-docs-bugs): find_ligand now uses find_ligand_score_correl_frac_interesting_limit (default 0.9), which also makes set_find_ligand_multi_solutions_per_cluster’s lim_2 effective. The other thirteen are untouched. Decided 2026-11-16: leave them (each is documented as unused in its header) and do not change the API for this release; tidying them up is part of the “Tidy up the API for Coot 2” item in BACKLOG.md.
    • make_link: link_name, length — passed through make_link() (src/c-interface-build-main-chain.cc:766) to molecule_class_info_t::make_link() (src/molecule-class-info-build.cc:236), whose body never reads them; the comment there says they are not part of an mmdb::Link.
    • hole: n_runs, show_probe_radius_graph_flag — src/c-interface-analysis.cc:49-173: n_runs is not used at all and the only mention of show_probe_radius_graph_flag is in a commented-out line.
    • map_contours_as_triangles: contour_level — src/c-interface-maps.cc:2732-2772: never read in the body.
    • sharpen_with_gompertz_scaling: gompertz_factor — forwarded by src/c-interface.cc:9646 to molecule_class_info_t::sharpen() (src/molecule-class-info-maps.cc:344-521), which reads try_gompertz but never gompertz_factor.
    • handle_read_draw_probe_dots_unformatted: show_clash_gui_flag — src/generic-objects.cc:1397-1402: the flag is tested, but the branch contains only a “something here” comment.
    • lsq_improve: n_res, dist_crit — forwarded by src/c-interface-superpose.cc:943 to molecule_class_info_t::lsq_improve() (src/molecule-class-info-other.cc:9591-9610), which constructs coot::lsq_improve and calls improve() without them.
    • regularize_zone_with_score_* / c-interface-refine.cc:165: altconf — src/c-interface-kk.cc:246-283 (py) and :287-320 (scm): altconf does not appear in either body.
    • add_terminal_residue_using_phi_psi: residue_type (always ALA) — forwarded by src/c-interface-build-main-chain.cc:273 to the member at src/molecule-class-info.cc:6579, which never reads it and calls build_N_terminal_ALA() / build_C_terminal_ALA() (:6642, :6659).
    • make_dots: atom_radius_scale — dots() (src/c-interface.cc:3976) passes sphere_size_scale to molecule_class_info_t::make_dots() (src/molecule-class-info-other.cc:9042), where atom_radius_scale is never used.
    • monomer_lib_3_letter_codes_matching: allow_minimal_descriptions_flag — forwarded by src/c-interface-ligands.cc:1563 to protein_geometry::matching_names() (geometry/protein-geometry.cc:2214-2254), which never reads allow_minimal_descriptions.
    • get_symmetry_bonds_colour: its argument — src/c-interface.cc:3032, as already noted in the crashes section.
    • display_pae_from_file_in_a_dialog: imol — src/pae-interface.cc:224: the parameter is never read; an inner int imol = pp.second.first; (:429) shadows it.
    • servalcat_refine: mask_map — src/cc-interface-map-utils.cc:339: it reaches the worker lambda as mask_file_name, but the "--mask" argument is commented out of the command line.
    • find_ligand lim_2 (c-interface-ligands.cc:1008, hard-coded 0.9) — src/c-interface-ligands.cc:1008: float correl_frac_lim = 0.9; is used instead of find_ligand_score_correl_frac_interesting_limit.
    • set_find_ligand_multi_solutions_per_cluster: lim_2 — src/c-interface-ligands.cc:1360 stores it in find_ligand_score_correl_frac_interesting_limit, which is only read back to fill the GUI entry (src/c-interface-ligands-gui.cc:197); the fit uses the hard-coded 0.9 above.
  • RESOLVED (branch fix-api-docs-bugs) flags that are stored but never read: — thirteen of the fourteen confirmed; merge_molecules_ligand_spec is wrong (it is read). Details per sub-item. — Decision (h), 2026-11-16 (Paul): wire up the two FLEV distances, document the other eleven as having no effect. pli::fle_view_with_rdkit_internal() has two new trailing arguments, water_dist_max and h_bond_dist_max (defaults 3.25 and 3.9, so the chapi caller is unchanged), and fle_view() passes the values set by fle_view_set_water_dist_max() / fle_view_set_h_bond_dist_max(). All eleven others now carry a “no effect” note in c-interface.h / cc-interface.hh; no setter was removed.
    • set_cryo_em_refinement — cryo_EM_refinement_flag is written at src/c-interface-refine.cc:563 and read only by its own getter (:567).
    • merge_molecules_ligand_spec — REJECTED: the spec stored at src/graphics-info.cc:6570 is read at src/molecule-class-info-other.cc:5692 and passed to merge_molecules_just_one_residue_at_given_spec().
    • save_coordinates_in_original_dir_flag — written at src/c-interface.cc:5125; no reader anywhere in src/.
    • add_terminal_residue_do_rigid_body_refine — written at src/c-interface-build-main-chain.cc:159; no reader.
    • set_button_label_for_external_refinement — external_refinement_program_button_label is written at src/c-interface-preferences.cc:1354; no reader.
    • set_add_ccp4i_projects_to_file_dialogs — add_ccp4i_projects_to_optionmenu_flag is written at src/c-interface-info.cc:5181; no reader.
    • set_file_chooser_overwrite — gtk2_chooser_overwrite_flag is written at src/c-interface-gui.cc:4388 and read only by its getter (:4392).
    • set_filter_fileselection_filenames — filter_fileselection_filenames_flag is written at src/c-interface.cc:1544 and read only by its getter (:1550).
    • set_unpathed_backup_file_names — unpathed_backup_file_names_flag is written at src/c-interface-build.cc:493 and read only by its getter (:502).
    • set_python_draw_function (its consumer is #if 0) — stored at src/graphics-info-utils.cc:324; the only reader, src/draw.cc:689-690, is inside the #if 0 block at :672-713.
    • fle_view_set_*_dist_max — fle_water_dist_max and fle_h_bond_dist_max are written at src/flev.cc:162 and :166; no reader.
    • aniso radius limit / show_aniso — show_aniso_atoms_radius_flag, show_aniso_atoms_radius and show_aniso_atoms_flag are read only in old_draw_anisotropic_atoms() (src/molecule-class-info.cc:993), whose body is #if 0; set_show_aniso() (src/c-interface.cc:3570) no longer stores anything and just logs “don’t use this”.
    • stroke_characters — written at src/c-interface.cc:4197; no reader.
    • set_model_display_radius — written at src/c-interface.cc:1498-1499; it is read by is_within_display_radius() (src/graphics-info.cc:6532, :6554), but that is only reached from zero_occupancy_spots() and draw_cis_peptide_markups() via draw_molecule(), whose one call site (src/draw.cc:401, in draw_mono()) is only called from #if 0 code, so it has no effect on the current renderer.
  • DOCUMENTED (branch fix-api-docs-bugs) register_post_intermediate_atoms_moved_hook: stored but never called. — confirmed: the hook is stored at src/graphics-info-intermediate.cc:476, and run_post_intermediate_atoms_moved_hook_maybe() (:484) is the only code that would call it, but its one call site is commented out (:43, “put this somewhere else”). — Not implemented (2026-11-16): besides the commented-out call site, run_post_intermediate_atoms_moved_hook_maybe() itself stops at “do something with python” and never calls the stored function, and the stored PyObject * is not INCREF’d. The header doc now says the hook is not implemented, and implementing it is an item in BACKLOG.md.
  • DOCUMENTED (branch fix-api-docs-bugs) molecular-symmetry drawing is commented out (molecule-class-info.cc:~2903), so add_molecular_symmetry* shows nothing. The MTRIX reader also uses half the translation as the origin (only right for 2-folds). — both confirmed: the display_molecular_symmetry(...) call is commented out at src/molecule-class-info.cc:2906 (the lambda at :2837 is otherwise unused), and add_molecular_symmetry_from_mtrix_from_file() passes 0.5 * rt.trn() as the molecule origin (src/molecule-class-info-molecular-symmetry.cc:54-56), which is the rotation-axis position only for a 2-fold. — Not implemented (2026-11-16): the commented-out call is in display_symmetry_bonds(), which is old immediate-mode OpenGL and is itself never called, so the current renderer has no molecular-symmetry path at all. The three API functions are now documented as having no visible effect, and the drawing and the MTRIX origin are an item in BACKLOG.md.
  • FIXED (branch fix-api-docs-bugs) add_toolbar_subprocess_button: the on_completion_function call is inside #if 0. — confirmed at src/cc-interface-map-utils.cc:522-524: PyEval_CallObject(pt->on_completion_function, ...) is under #if 0 (the function was removed in Python 3.13), so return_val stays null and the completion callback never runs. — Fix note: uses PyObject_CallObject(), which exists in every Python 3.
  • FIXED (branch fix-api-docs-bugs) print_glyco_tree: builds the tree but never prints it. — confirmed at src/c-interface-residues.cc:152-168: it constructs a coot::glyco_tree_t and returns; nothing is printed by the function itself. — Fix note (2026-11-16): it now calls coot::glyco_tree_t::print(). Run on multi-carbo-coot-3.pdb (FUC A1, NAG A2), it prints the two residues with the ALPHA1-4 link.
  • DEFERRED show_fix_nomenclature_errors_gui: returns at once (“crashes, fix later”). — confirmed at src/c-interface-build-gui.cc:1456: an unconditional return; with the comment “this function crashes, I don’t know why - fix later” makes the rest of the body dead. — Left as it is (2026-11-16): the dialog it would show (fix_nomenclature_errors_dialog) exists only in coot-gtk2.glade, not in any GTK4 .ui file, so removing the return would not help. Whether the dialog is still wanted is a review item in BACKLOG.md.
  • INTENDED? execute_refmac_real: always takes the Python path (USE_GUILE_XXX). — behaviour confirmed at src/c-interface-refmac.cc:178 and :220-222: the Guile branches are guarded by USE_GUILE_XXX, which nothing defines, so ilang is always STATE_PYTHON; the renamed macro looks like a deliberate switch-off of the Scheme path, so a build without Python would silently do nothing.
  • FIXED (branch fix-api-docs-bugs) delete_sidechains_for_chain: also strips ligands and waters in that chain. — confirmed at src/molecule-class-info-residues.cc:2202-2217: every residue of the chain is processed with no residue-type test, deleting each atom for which is_main_chain_or_cb_p() is false, so ligands lose all atoms not named N/C/CA/CB/O/H/HA; a water’s " O " survives because it matches the main-chain name (geometry/main-chain.cc:83), so waters lose only their hydrogens. — Fix note: residues without N and CA are skipped.
  • FIXED (branch fix-api-docs-bugs) restraints_from_rdkit_mol_base64: writes test.cif into the cwd. — confirmed at src/c-interface-ligands.cc:1242: restraints.value().write_cif("test.cif") runs unconditionally on every successful call.
  • FIXED (branch fix-api-docs-bugs) get_rdkit_mol_base64_from_molecule: no check that a dictionary was found. — confirmed at src/c-interface-ligands.cc:1186-1191: rp.first from get_monomer_restraints() is never tested (the following if (r) re-tests the residue, which is already known to be non-null) and rp.second goes straight to coot::rdkit_mol().
  • FIXED (branch fix-api-docs-bugs) atom_spec_from_scm_expression takes only 5 elements, but atom_spec_to_scm makes 6, so they don’t round-trip. — confirmed: atom_spec_from_scm_expression() accepts only len == 5 (src/c-interface-mutate.cc:72), while graphics_info_t::atom_spec_to_scm() conses six items with int_user_data first (src/graphics-info.cc:6312-6317), so its own output is rejected as “Bad Spec”. — Fix note: a 6-item spec has its leading user-data item skipped.
  • DEFERRED src/molecule-class-info-other.cc find_deviant_geometry(): builds and discards a restraints container, and leaks residues_mol. — confirmed at src/molecule-class-info-other.cc:6802-6890: the function is void, constructs coot::restraints_container_t restraints(...) as its last statement (:6885) and does nothing with it; residues_mol (:6862) is never deleted and selHnd (:6826) is never released, once per chain. — PARTLY FIXED (branch fix-api-docs-bugs): the selection is now released. The discarded restraints container and the residues_mol leak remain: the function does nothing useful. Decided 2026-11-16: it and deviant_geometry() are marked “Deletable for Coot 2” in the source and in the c-interface.h doc, and are otherwise left as they are.

Reported: header and history problems

  • FIXED (branch fix-api-docs-bugs) src/c-interface.h: set_show_chiral_volume_outliers is declared twice. The second was meant to be set_show_non_bonded_contact_baddies_markers, which is defined but not declared. — confirmed at src/c-interface.h:6715 and :6720 (the second now carries a comment saying it is a duplicate); set_show_non_bonded_contact_baddies_markers() is defined at src/c-interface.cc:10363 and declared in neither c-interface.h nor cc-interface.hh, so it is not reachable from scripting. — Fix note: the second declaration is now set_show_non_bonded_contact_baddies_markers().
  • FIXED (branch fix-api-docs-bugs) src/cc-interface.hh: the “Atom info” block is duplicated, and resname_from_serial_number and set_use_depth_blur are each declared twice. — only the last part still holds: set_use_depth_blur is declared at src/cc-interface.hh:3681 and :3959. The “Atom info” banner now appears once in cc-interface.hh (:1884; the other is in c-interface.h:6057) and resname_from_serial_number is declared once (:1921), so those two are GONE.
  • FIXED (branch fix-api-docs-bugs) history entries that are wrong: — all eight confirmed; current lines per sub-item. — Fix note: all eight, and baton_tip_try_another (which logged “baton-try-another”) as well.
    • set_delete_chain_mode logs “set-delete-sidechain-mode” (c-interface-build.cc:2061) — src/c-interface-build.cc:2064.
    • baton_tip_previous logs “baton-try-another” (c-interface-build-main-chain.cc:338) — src/c-interface-build-main-chain.cc:338.
    • add_terminal_residue omits residue_type (:248), so the replay has the wrong arity — src/c-interface-build-main-chain.cc:254-258: four arguments are logged (imol, chain, residue number, immediate_add) for a five-argument function.
    • set_axis_orientation_matrix logs m12 twice (c-interface-info.cc:~2883) — src/c-interface-info.cc:2912-2913: m12 is pushed twice and m13 never.
    • set_colour_by_chain_goodsell_mode logs “set-colour-by-chain” — src/c-interface.cc:3419.
    • set_colour_by_ncs_chain drops goodsell_mode — src/c-interface.cc:3402-3405: only imol is logged.
    • info_dialog_with_markup logs “info-dialog-and-text” — src/c-interface.cc:1844.
    • views_play_speed(): add_to_history_simple comes after the return — src/c-interface.cc:10138-10139.
  • FIXED (branch fix-api-docs-bugs) misspelt user-facing names: add_omega_torsion_restriants was renamed in 53c14bdf3, but remove_omega_torsion_restriants is still misspelt (c-interface.h:4998, c-interface-build-main-chain.cc:570, glade-callbacks.cc:5094). Note that renaming them changes the scripting API. — Fix note: remove_omega_torsion_restriants is now remove_omega_torsion_restraints - a scripting API change.