Bugs found while writing the API docs (2026-10-07)
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 aFix noteon 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 inBACKLOG.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_flagand (c) thesave_state()directory were fixed on 2026-11-16; (d)toolbar_multi_refine_continuewas 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 toBACKLOG.md; (j) molecular-symmetry drawing likewise; (k)print_glyco_treewas fixed; (l)show_fix_nomenclature_errors_guiwas left as it is, with a review item inBACKLOG.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()andwrite_chain_to_pdb_file()now return non-zero for an invalidimol.remove_omega_torsion_restriants()is renamedremove_omega_torsion_restraints().chain_fragments_scm/_pynow return data;add_linked_residue_pyreturns the new spec even without fit-and-refine.get_backup_info()takes the checkpoint index (asrestore_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_chainleaves 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:
- Re-read this file; it is the only record of progress.
- Take the first entry still marked REPORTED (top to bottom). For a bullet with sub-items, handle the whole bullet in one iteration.
- Read the code at the current HEAD of
mainin/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. - 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 0or#ifdefguards. - 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:lineand, for REJECTED, why. Keep each entry on one line, or one line per sub-item. - Also append any new bug you happen to notice to the end of the “Found during verification” section, marked VERIFIED.
- Edit only this file. Do NOT edit source, build, run tests,
git commit,git stashorgit checkout. Read-only git commands (git log,git show,git blame) are fine. - Pace: do about 5 entries per iteration, then schedule the next wakeup at about 60 s.
- 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_specis read) - INTENDED?: 2 (
overlap_ligands,execute_refmac_real) - GONE: 1 (the chain jiggle-fit wrappers), plus two of the three
cc-interface.hhduplicate 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):
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.remove_omega_peptide_restraints()(geometry/protein-geometry.cc:2197-2202):erase(it)thenit++; runs off the end when the omega is the last torsion. Introduced by the 53c14bdf3 fix.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.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.- The eight functions with no
imol >= 0check (e.g.set_map_is_difference_map,average_temperature_factor,mask_map_by_molecule): the -1 from a failed read indexesmolecules[]out of range. 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()andadd_residue_with_atoms()have no backup at all.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.find_water_baddies_AND()(src/molecule-class-info-other.cc:7003): the density test is inverted, so AND mode flags the well-fitting waters.make_map_from_cif_2fofc()(src/molecule-class-info-maps.cc:3043): silently makes a sigmaA map.save_state()vsrun_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-2202remove_omega_peptide_restraints(): since 53c14bdf3 removed thebreak,erase(it)is followed byit++on the invalidated iterator. That is UB, and when the omega is the last torsionitsteps pastend()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-7664residue_spec_make_triple_py(): puts the borrowed references fromPyList_GetItem()straight into a new list withPyList_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:116make_fragment_chain():if (at_c) n_pos = ...should setc_pos(this hurtprotein_db_loops). - FIXED
src/c-interface-mutate.cc:403align_to_closest_chain():match_fragment_bestwas never updated, so the last match won rather than the best one. - FIXED
src/cc-interface-map-utils.cc:200map_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:3011b_factor_from_map(): the result went into a localband the function always returned -1. - FIXED (53c14bdf3)
geometry/protein-geometry.ccremove_omega_peptide_restraints(): compared againstv[i]instead ofv[j]. Removing thebreakintroduced 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:486delete_extra_restraints_worse_than(): the second lookup testsif (! at_1)instead ofat_2, so restraints whose atom_2 isn’t in the fast index are silently deleted. - FIXED (53c14bdf3)
src/c-interface-build.cc:5938handle_cns_data_file_with_cell(): passesd2rad(alpha)where gamma should go, so the gamma argument is ignored. - FIXED (53c14bdf3)
src/c-interface-bonds.cc:266split_multi_model_molecule_py(): storesPyLong_FromLong(i), notnew_molecules[i], so it returns 0..n-1. - FIXED (branch
fix-api-docs-bugs)src/graphics-info-modelling.cc:~2957-3000execute_rigid_body_refine()withauto_range_flag:chain_id_2stays null, so the “same chain” check always fails. It also compareschar*pointers. - FIXED (branch
fix-api-docs-bugs)src/c-interface.cc:5053save_coordinates(): returns 0 (success) for an invalidimol. — Fix note: now returns 1 for an invalidimol; header doc updated.
Reported: crashes and undefined behaviour
- FIXED (branch
fix-api-docs-bugs)src/generic-objects.cc:1019handle_read_draw_probe_dots(): callsgeneric_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 atsrc/generic-objects.cc:1016-1023:nobjsis cached before the loop, there is nobreakafterclear(), so the nextgeneric_display_objects[i]indexes an empty vector; the commented-outclose_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:5863remove_*_glob_extension():erase(it)followed by++iton 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:185sprout_hydrogens(): dereferencesresidue_pbefore the null check at line 190. — confirmed:residue_p->GetAtomTable()atsrc/molecule-class-info-residues.cc:185precedesif (residue_p)at:190; the only caller (src/flev.cc:70) checks the molecule but not the residue, andmake_backup()has already run by then. - FIXED (branch
fix-api-docs-bugs)src/c-interface-nucleotides.cc:~87,~167pucker_info_scm/_py():is_a_protein_residue(res_p)comes before the null check. — confirmed atsrc/c-interface-nucleotides.cc:87and:166: the lambda callsresidue_p->GetResName()unconditionally andif (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:292residue_info_dialog(): no null check onres. — confirmed atsrc/c-interface-info.cc:292:residue_from_external()is justget_residue()(src/molecule-class-info-other.cc:2722), which returns null for a missing residue, andres->GetAtomTable()follows directly. - FIXED (branch
fix-api-docs-bugs)src/c-interface-info.cc:334(also 499, 575)output_atom_info_as_text(): indexesatom_selection[index]without checking for -1. — confirmed only foroutput_atom_info_as_text()atsrc/c-interface-info.cc:334(atom_selection[-1]when the spec matches no atom); the scm/py siblings at:497and:574do testindex > -1, so that part of the claim is wrong. - FIXED (branch
fix-api-docs-bugs)src/c-interface.cc:5375get_text_for_phs_cell_chooser():spgrppoints into a temporarysymbol_hm().c_str(), and the returned buffer is uninitialised when nothing matches. — confirmed atsrc/c-interface.cc:5467(symbol_hm()returns aclipper::Stringby value, sospgrpdangles) and:5434(malloc(12)is returned unfilled for an invalidimol, a non-model molecule or an unknownfield); theif (! ihave_cell)fallback at:5495is unreachable. — Fix note: the buffer now starts as “ - “. - FIXED (branch
fix-api-docs-bugs)src/c-interface.cc:2979get_symmetry_bonds_colour(): mallocs 4 doubles but sets only 3 (alpha is uninitialised), and ignores its argument. — confirmed atsrc/c-interface.cc:3032-3041:colour[3]is never written andidummyis 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:921unmangle_hydrogen_name(): the non-4-character branch readsatom_name[3]out of range. — confirmed atsrc/c-interface-preferences.cc:925, with a nuance: it is out of range only for names shorter than 3 characters (for a 3-characterstd::string,[3]is the terminating NUL), but that NUL is!= ' ', so the “length is 3 presumably” branch at:935is never reached and the inneratom_name[3] == ' 'test at:926can 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 borrowedPy_Falsewhen the selection type is neither BY_STRING nor BY_ATTRIBUTES. — confirmed atsrc/c-interface.cc:3954inadditional_representation_info_py(); harmless on Python 3.12+ wherePy_Falseis immortal, but the wholeatom_spec_pybuild is dead work since it is never put in the result. — Fix note: the deadatom_spec_pybuild is removed. - FIXED (branch
fix-api-docs-bugs)src/c-interface-maps.ccanalyse_map_point_density_change(): copies an emptyXmapas the mask whenimol_map_maskis invalid, then indexes it. — confirmed:xmap_for_maskatsrc/c-interface-maps.cc:3291stays default-constructed whenimol_map_maskis not a valid map, and is passed tozero_dose_extrapolation()at:3300, whose mask is indexed with another map’s reference index (xmap_mask[ix], as atcoot-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: indexesmoving_atoms_list[0]without an empty check, and usesdirection_atoms.firsttwice. — first half confirmed atsrc/molecule-class-info-mutate.cc:1383(and the same in the newer overload at:1525); neitherspin_search_by_atom_vectors()(src/c-interface-build.cc:682) nor the scm/py wrappers check for an empty list. The repeateddirection_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:~206backrub_rotamer_intermediate_atoms():moving_atoms_asc->molwithout a null check onmoving_atoms_asc. — confirmed atsrc/graphics-info-intermediate.cc:206:moving_atoms_ascis 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 functionbackrub_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:~4958make_image_povray_py():glareas[0]without an empty check. — confirmed atsrc/c-interface.cc:5011; the raster3d siblings just above (:4967,:4986) do testglareas.empty(), so this crashes only in the no-graphics case. - REJECTED
src/c-interface-build.cc:343replace_residues_from_mol_py(): no null check onmol_new(the scm version has one). — the check is indeed missing atsrc/c-interface-build.cc:355(the scm version has it at:320), butcreate_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.hhatom_info_as_text_for_statusbar(symmetry overload): no bounds check onatom_index. — confirmed atsrc/c-interface-info.cc:441: the plain overload checks0 <= 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 atsrc/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:2956renumber_residue_range():imol <= n_molecules()is off by one. — confirmed atsrc/c-interface-build.cc:2958:imol == n_molecules()passes the test andmolecules[imol]at:2959is one past the end. - FIXED (branch
fix-api-docs-bugs) noimol >= 0check: — all eight confirmed: each tests onlyimol < n_molecules(), so a negativeimol(e.g. the -1 from a failed read) indexesmolecules[]out of range. — Fix note: all eight; themask_map_by_moleculemessages 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:529andsrc/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:8021and: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:1450and:1454, for bothmap_mol_noandcoord_mol_no; the second message also printsmap_mol_noinstead ofcoord_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_baddiesreturns 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) butname_sans_extension()is called onmolecules[imol]outside the guard.make_variance_map(readsis_EM_map()first) —src/c-interface-maps.cc:2247, one line before theis_valid_map_molecule()test;is_em_flagis also just whatever the last list entry gave.unskeletonize_map(graphics-info.cc:1545) —src/graphics-info.cc:1549: testsimol >= 0only, 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:imolis checked, butimol_for_mapis used unchecked and is -1 when no refinement map is set.
- FIXED (branch
fix-api-docs-bugs)src/c-interface-build.cc:2532insertion_code_from_serial_number(): noserial_num >= 0check. — confirmed atsrc/c-interface-build.cc:2544: onlyserial_num < nresis tested beforeresidues[serial_num]at:2548. - FIXED (branch
fix-api-docs-bugs)src/c-interface.cc:8702read_cif_data_fofc_map(): doesn’t validateimol_coordinates, and leaves the empty molecule behind on failure. — second half confirmed atsrc/c-interface.cc:8785-8794: the molecule fromcreate_molecule()is not closed whenmake_map_from_cif_fofc()returns -1. First half is wrong:imol_coordinatesis validated downstream atsrc/molecule-class-info-maps.cc:3058. Also:8776readss.st_modeafterstat()has failed, whensis uninitialised. — Fix note: the empty molecule is erased on failure ands.st_modeis only read after a successfulstat().
Reported: wrong results
- FIXED (branch
fix-api-docs-bugs)coot-utils/peak-search.cc:548:only_around_protein_flag = false;overrides the caller, sodifference_map_peaks’around_model_only_flaghas no effect. — confirmed atcoot-utils/peak-search.cc:548: the parameter is unconditionally reset just before theif (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 forcedfalseinsrc/graphics-info-gui.ccis gone and thec-interface.hdoc 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:~6985find_water_baddies_AND(): flags waters whose density is abovesigma*rmsd(looks inverted). It uses different distance logic from OR mode and labels raw density as “rmsd”. — confirmed atsrc/molecule-class-info-other.cc:7003(den > outlier_sigma_level*map_sigma; the OR mode atcoot-utils/find-water-baddies.cc:126uses<) 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_distare overwritten for later waters once one is negative (:7023-7026),SelHnd_watis never deleted, and the twoignore_*flags are unused. — Fix note: the density test, the overwrittenmin_dist/max_dist, the selection leak and the “rmsd” label are fixed; the distance logic still differs from OR mode and the twoignore_*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 setthis_is_marked, so it can be listed twice. — confirmed atcoot-utils/find-water-baddies.cc:139-141: the B-factor branch pushes the atom without settingthis_is_marked, so the distance test at:146can push it again.denis also pushed uninitialised whenmap_in_sigma <= 0. - FIXED (branch
fix-api-docs-bugs)check_waters_baddies:part_occ_contact_flagactually means “skip the distance tests”. — confirmed atcoot-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: infind_water_baddies_OR()the flag no longer skips the distance tests; it now leaves atoms with occupancy < 0.99 out of themin_dist(close contact) test only, and they still count for themax_disttest. Docs updated inc-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:~4866trim_by_map():make_backup()comes after the trim, so undo doesn’t restore it. — confirmed atsrc/molecule-class-info-other.cc:4861-4868:trim_molecule_by_map()editsatom_sel.molfirst andmake_backup()then saves the already-trimmed model. - FIXED (branch
fix-api-docs-bugs)src/molecule-class-info-other.cc:1999delete_waters(): no backup, matches only HOH, and counts atoms rather than waters. — all three confirmed atsrc/molecule-class-info-other.cc:1999-2038(nomake_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:688add_residue_with_atoms(): no backup (and see the always-0 return below). — confirmed atsrc/molecule-class-info-build.cc:688-733: there is nomake_backup()before the residue/chain is created and atoms are added, andFinishStructEdit()is not called either. — Fix note:FinishStructEdit()added too. - INTENDED?
overlap_ligands: graph-matches every residue inimol_ligand, moves the best, and deletes all other residues inimol_ligand. Intended? — behaviour confirmed atsrc/c-interface-ligands.cc:581-587inoverlap_ligands_internal(); the code comment says “delete everything except the best ligand”, so it is deliberate, but the API docs should warn thatimol_ligandis modified destructively. - FIXED (branch
fix-api-docs-bugs)src/c-interface-superpose.cc:~243superpose_with_atom_selection(): the reference cell/symmetry goes toimol2, not to the returned molecule, so in copy mode the original is modified and the copy is not. — confirmed atsrc/c-interface-superpose.cc:243:copy_cell_and_symm_headers(m1, m2)always targetsmolecules[imol2], whatevermove_copy_of_imol2_flagis, andimodel_return(the copy) is never touched; thesuccessresult is also discarded. - FIXED (branch
fix-api-docs-bugs)src/molecule-class-info-backup.cc:184get_backup_info(): the innerbfishadows the outer one, so it always returns empty info. It also indexeshistory_filename_vec0-based whilerestore_to_backup_checkpoint(:29) usesbackup_index - 1. — both confirmed: the shadowing declaration is atsrc/molecule-class-info-backup.cc:185, soget_backup_info()(and the Pythonget_backup_info,src/c-interface-build.cc:608) always returns a default-constructed info;restore_to_backup_checkpoint()usesbackup_index - 1at:35. — Fix note: it now usesbackup_index - 1, asrestore_to_backup_checkpoint()does. - FIXED (branch
fix-api-docs-bugs)src/c-interface.cc:8014vssrc/graphics-info-state.cc:820:save_state()/quick_savewrite to the XDG state dir, butrun_state_file(_maybe)reads0-coot.state.*from the cwd. — confirmed: the writer usesxdg.get_state_home()atsrc/graphics-info-state.cc:867and:874, whilerun_state_file()(src/c-interface.cc:8076,:8085),run_state_file_py()(:8100) andrun_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 twowrapped_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.pyfile, the Python-only branch used an undeclaredfilename, andrun_state_file_maybe()still set a cwd name). A state file in the cwd is no longer picked up.c-interface.hdocs updated. - FIXED (branch
fix-api-docs-bugs)src/graphics-info-state.cc:251: treats amap_sampling_rateof 1.5 as the default, but the default is 2.5, so the rate is always written. — confirmed: the test ismap_sampling_rate != 1.5atsrc/graphics-info-state.cc:253, and the static default is 2.5 atsrc/graphics-info-statics.cc:545. - FIXED (branch
fix-api-docs-bugs)src/c-interface-maps.cc:~1392change_contour_level(): difference maps always increase, whateveris_incrementis. — confirmed atsrc/c-interface-maps.cc:1400-1401: the difference-map branch does+= diff_map_iso_level_incrementwithout looking atis_increment; nothing insrc/calls the function, so it only bites from scripting. - FIXED (branch
fix-api-docs-bugs)src/c-interface-maps.cc:3106-3108set_auto_updating_sfcalc_genmaps(): validatesimol_updating_fofc_maptwice andimol_updating_2fofc_mapnever. — confirmed atsrc/c-interface-maps.cc:3119and:3121: both tests are onimol_updating_fofc_map, andimol_updating_2fofc_mapgoes into theummpat:3123-3124unchecked. - FIXED (branch
fix-api-docs-bugs)src/c-interface-maps.cc:~245calculate_maps_and_stats_py(): passesimol_map_2fofcas the data map, soimol_map_with_data_attachedis ignored (same in theummpconstructor). — confirmed atsrc/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_attachedis used only for the history entry, andcalculate_new_rail_points()at:246runs even when the molecules are invalid. — Fix note:imol_map_with_data_attachedis now validated and used; rail points are only calculated on success. - FIXED (branch
fix-api-docs-bugs)src/c-interface-maps.cc:~617make_and_draw_map_with_reso_with_refmac_params():sigfobs_col_str = single_quote(sigfobs_col_str)quotes the empty string, notsigfobs_col. — confirmed atsrc/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:2999make_map_from_cif_2fofc(): callsmake_map_from_cif, so it makes a sigmaA map, not a 2Fo-Fc map. — confirmed atsrc/molecule-class-info-maps.cc:3043: theimol_coordsoverload callsmake_map_from_cif()(which passesis_2fofc_type0,:3075) rather than the atom-selection overload ofmake_map_from_cif_2fofc()at:3080(which passes 1). — Fix note: soread_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-2251map_to_model_correlation_stats(): modes 4 and 5 have no main-chain/side-chain selection (another function in the file handles 14 and 2 5 correctly). — confirmed at coot-utils/coot-map-utils.cc:2241-2246: for standard residues only modes 1, 2 and 3 setatom_name_selection, so modes 4 and 5 use all atoms; the sibling blocks at:2728-2731and:2923-2926test1 || 4and2 || 5. - FIXED (branch
fix-api-docs-bugs)src/c-interface-ncs.cc:~625ncs_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 atsrc/c-interface-ncs.cc:628and: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, norl_residue_datawhenresidue_infois 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:~4754find_secondary_structure_local(): ignoresradiusand passes 0.0, so it searches the whole map. — confirmed atsrc/c-interface-build.cc:4763:ssfind(xmap, pt, 0.0, tgtvec)passes a literal 0.0 andradiusis 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:~321cis_trans_conversion_intermediate_atoms(): comparesGetResName()with" N "; it should be the atom name. — confirmed atsrc/graphics-info-intermediate.cc:322-323:name_of_closest_atomis built fromclosest_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:79pepflip_intermediate_atoms_other_peptide():GetAtom(" N ")(3 characters) probably never matches. — the 3-character name is atsrc/graphics-info-intermediate.cc:81, but mmdb’sResidue::GetAtom()goes throughAtom::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:1088do_base_mutation():idx > 0rejects atom index 0. — confirmed atsrc/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:2534remove_atom_label():if (i > 0), so atom 0 can’t be unlabelled. — confirmed atsrc/molecule-class-info.cc:2537. - FIXED (branch
fix-api-docs-bugs)src/graphics-info.cc:6516remove_last_lsq_plane_atom():size() > 1, so the last atom can’t be removed. — confirmed atsrc/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 wholeCOOT_*_EXTRAS_DIRenv var, not fromdirs[i], so multiple dirs break. — confirmed atsrc/c-interface-preferences.cc:1265(scheme) and:1328(python):std::string fp = s;uses the unsplit env string wheredirs[i]is meant, so with more than one directory everystat()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:1346exchange_chain_ids_for_seg_ids(): the last segid run gets chain idsegid, the others getchain:segid. — confirmed: runs closed inside the loop getcurrent_chain_id + ":" + current_seg_id(src/molecule-class-info-mutate.cc:1299-1302) but the final run is pushed with barecurrent_seg_id(:1316). - FIXED (branch
fix-api-docs-bugs)src/c-interface-build.cc:3443set_b_factor_residues_scm():scm_list_ref(..., scm_from_int(l))should usei. — confirmed atsrc/c-interface-build.cc:3441-3442: the index is the list lengthl, 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 atsrc/c-interface-residues.cc:211-212: bothitem_item_0anditem_item_1come fromscm_list_ref(item, 0)with a raw0instead ofscm_from_int(...), so even if that call survives the label is never a string and nothing is registered. The py version (:268-270) usesPyFloat_Check(), which rejects integer coordinates, and leaks thePyUnicode_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 “” torefine_residue_range. — confirmed atsrc/c-interface-refine.cc:342(scm) and:381(py): the residues are found withinscode_1/inscode_2butrefine_residue_range()is called with""for both. - FIXED (branch
fix-api-docs-bugs)src/molecule-class-info-refine.cc:599generate_local_self_restraints(): clears the bond restraints but appends to Geman-McClure ones, so they accumulate. — confirmed:extra_restraints.bond_restraints.clear()atsrc/molecule-class-info-refine.cc:594, but the new restraints go toextra_restraints.geman_mcclure_restraintsat:710, which is never cleared here, so a second call duplicates them (and wipes any unrelated user bond restraints). — PARTLY FIXED (branchfix-api-docs-bugs): the stalebond_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); thec-interface.hdoc, 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 stalebond_restraints.clear(). - REJECTED
src/c-interface-build-symmetry.cc:241save_symmetry_coords(): pre-shifts by -n cells and never shifts back (new_molecule_by_symmetrydoes). — 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 iscoot::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,448new_molecule_by_symmetry*(): marks the source molecule as having unsaved changes. — confirmed atsrc/c-interface-build-symmetry.cc:381and:495:g.molecules[imol].set_have_unsaved_changes_from_outside()is called on the sourceimolright after the model is installed inimol_new. - FIXED (branch
fix-api-docs-bugs)src/molecule-class-info-other.cc:520set_atom_attributes(): fillssegIDwith'\n'instead of'\0'. — confirmed atsrc/molecule-class-info-other.cc:514-516; mostly masked because the followingstrncpy(..., 19)NUL-pads bytes 0-18, butsegID[19]stays'\n', so a value of 19 or more characters leaves thechar[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 atsrc/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:3165set_symmetry_colour_merge()and:3567set_aniso_probability(): only redraw, with no mesh regen. — confirmed atsrc/c-interface.cc:3220-3221and:3622-3623: both set the static and callgraphics_draw()only, although both values are read while the meshes are built (src/molecule-class-info.cc:4569and:4443); the neighbouringset_symmetry_colour()does callupdate_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 atsrc/c-interface-maps.cc:3165-3194and their members atsrc/molecule-class-info-maps-2.cc:162-188only store the value (noupdate_map(), nographics_draw()), whileset_radial_map_colouring_do_radial_colouring()(src/molecule-class-info.h:3805-3810) callsupdate_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 atsrc/drag-and-drop.cc:87:find()returnsnpos(non-zero) when absent and 0 only if the URL starts with the string, so the test passes for every.pngURL; 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 onCURLE_OK, but a cached CIF gives -1, so the second request does nothing. — confirmed:get_pdbe_cif_for_comp_id()initialisesstatus = -1and never changes it when the file already exists (src/c-interface-ligands.cc:4193-4199), and the caller requiresstatus == CURLE_OK(:4271). — Fix note: a cached CIF now givesCURLE_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 insrc/c-interface-network.cc: the read inside theneeds_downloadingbranch (: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: shadowsimol_mapwithimol_refinement_map(), and refits the whole chain rather than the range. — confirmed atsrc/c-interface-build-side-chain.cc:1308-1309: an innerint imol_map = imol_refinement_map();replaces the validated argument (and may be -1), andbackrub_chain()(:1272-1292) loops over every residue of the chain, notresno_start..resno_end; despite its name it callsauto_fit_best_rotamer(). — Fix note: only the residues in the range are fitted, with theimol_mappassed in. - DOCUMENTED (branch
fix-api-docs-bugs)src/c-interface-gui.cc:5009toolbar_multi_refine_continue: the Python branch uses PyGTKgobject.idle_add. — confirmed atsrc/c-interface-gui.cc:5067:gobject.idle_add(multi_refine_idle_proc)is PyGTK-era andgobjectdoes not exist under PyGObject; the Guile branch (:5056) likewise calls the guile-gtkgtk-idle-add, so neither branch can work in a GTK4 build. — Decision (d), 2026-11-16 (Paul): leave the code, document the seventoolbar_multi_refine_*functions as non-functional in GTK4 (c-interface.h). The three buttons are in no.uifile, so the handlers inglade-callbacks.ccare never connected; the functions stay so thatscheme/fitting.scmloads. - FIXED (branch
fix-api-docs-bugs) text handles (src/c-interface-info.cc:3683,3725): the handle isgeneric_texts.size();remove_texterases by handle whileedit_textindexes by position, so after a removal edits hit the wrong item and handles can collide. — confirmed insrc/c-interface-info.cc:place_text()uses the vector size as the handle (:3715),remove_text()matches onit->handleand erases (:3742-3743), andedit_text()uses the handle as a vector index (:3761-3762); after one removal the nextplace_text()reuses a live handle.place_text()also ignores itssizeargument. — Fix note: handles are now max-handle + 1 andedit_text()looks up by handle;sizeis still ignored. - FIXED (branch
fix-api-docs-bugs)python/raster3d.py:~142: on non-Windowsargs = " "thenargs += [...]raises TypeError, so povray viaraytraceis broken. Also:105:" -labels" + nameis missing a space. — both confirmed:python/raster3d.py:144setsargs = " "(a str) and:145doesargs += [...], which raisesTypeErroron every non-Windows run;:105builds" -labels" + image_file_name_modwith 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 atsrc/graphics-info-render.cc:144-147,:213-216and:297-300: each passes a default-constructedGL_matrixtoset_view_matrix()with thefrom_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 fromget_model_rotation()(i.e.view_quaternion) via a new staticview_rotation_as_GL_matrix()insrc/graphics-info-render.cc. The.r3dheader for a 90° z rotation has the rotation and the rotated-centrein Raster3D’s row-vector form, but no picture has been rendered (no Raster3D or POV-Ray on this machine); the code and thec-interface.hdocs 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 atsrc/c-interface-build-morph.cc:169-173and:191-195: the invalid-model branch prints “no valid map” and the invalid-map branch printsimol(the model number) “is not a valid map molecule”. - FIXED (branch
fix-api-docs-bugs)src/c-interface-superpose.ccapply_lsq_matches*/get_lsq_matrix*: the reference/moving invalid-molecule messages are swapped. — confirmed in all five functions insrc/c-interface-superpose.cc: the innerelse(moving invalid) prints “Invalid reference molecule number” and the outerelse(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): printsimol_mapfor an invalid model. — confirmed atsrc/c-interface-ligands.cc:4162: the invalid-model message printsimol_mapwhereimolis meant. - NOT A BUG
geometry/dict-utils.cc:1438hydrogens_connect_file(): no space between the neighbour count and the first atom name. — confirmed atgeometry/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, includingHH11. Two conformance tweaks made on branchfix-api-docs-bugs: the neighbour count is nowsetw(5)(same output for counts below 10, keeps the columns for 10 or more) and the atom count on theRESIDUEline issetw(7), as in the reference. - FIXED (branch
fix-api-docs-bugs)map_partition_by_chain: the label typo “Partioned”. — confirmed atsrc/cc-interface-map-utils.cc:792(the molecule label) and repeated in the doc comment atsrc/cc-interface.hh:836; a stray copy is insrc/aa.cc:376. - FIXED (branch
fix-api-docs-bugs)src/graphics-info-opengl.cc:611decrease_clipping_back: the debug output prints the near plane. — confirmed atsrc/graphics-info-opengl.cc:611: the “now” value printed isscreen_z_near_perspective, not thescreen_z_far_perspectivethat was just changed.
Reported: return value is always the same
- FIXED (branch
fix-api-docs-bugs)src/molecule-class-info-other.cc:9397scale_cell():retvalis never set, so it always returns 0. — confirmed atsrc/molecule-class-info-other.cc:9399-9421:retvalis 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:6188add_linked_residue():statusis never set, so it always returns 0. — confirmed atsrc/c-interface-build.cc:6204-6232:statusis initialised to 0 and never assigned, whether or notadd_linked_residue_by_atom_torsions()returns a set spec. - FIXED (branch
fix-api-docs-bugs)src/c-interface-build.cc:6303add_linked_residue_py(): ignoresmode, and returns False when fit-and-refine is off even if the residue was added. — confirmed atsrc/c-interface-build.cc:6314-6370:modeis never read, andr = residue_spec_to_py(new_res_spec)sits insideif (do_fit_and_refine)(:6345-6347), so withlinked_residue_fit_and_refine_stateoff the caller gets False for a successfully added residue. — Fix note: the spec is returned whether or not fit-and-refine is on;modeis still ignored. - FIXED (branch
fix-api-docs-bugs)src/molecule-class-info-build.cc:688add_residue_with_atoms():r_addedis never incremented. — confirmed atsrc/molecule-class-info-build.cc:691and:733:r_addedis 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()atsrc/c-interface-build-morph.cc:285andfit_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:~350watson_crick_pair():imol_returnis never set, so it always returns -1. — confirmed atsrc/c-interface-nucleotides.cc:330-353: the new molecule’s index is held in a localimol_new(:344) andimol_returnis returned still at -1. - FIXED (branch
fix-api-docs-bugs)src/molecule-class-info-ncs.cc:1408copy_residue_range():done_copyis never set. — confirmed:done_copyis declared atsrc/molecule-class-info-ncs.cc:1408and returned at:1575with 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:1300exchange_chain_ids_for_seg_ids():changed_flagis never set. — confirmed:changed_flagis declared atsrc/molecule-class-info-mutate.cc:1269and returned at:1364unchanged. - FIXED (branch
fix-api-docs-bugs)src/c-interface.cc:4645reset_view():istatis never set. — confirmed:istatis declared atsrc/c-interface.cc:4700and returned at:4783with no assignment between. - FIXED (branch
fix-api-docs-bugs)add_molecular_symmetry_from_mtrix_from_file()/_from_self_file()andsrc/c-interface-ncs.cc:~126add_strict_ncs_from_mtrix_from_self_file():istatis never set. — confirmed in all three:src/cc-interface-molecular-symmetry.cc:62-68and:74-80, andsrc/c-interface-ncs.cc:128-133; each returns 0 for a valid and an invalidimolalike and discards whatever the member function did. — Fix note: 1 for a validimol(the member functions arevoid, so that is all that can be reported). - FIXED (branch
fix-api-docs-bugs)src/graphics-info-intermediate.cc:~335cis_trans_convert_intermediate_atoms():stateis never set true. — confirmed:stateis declared false atsrc/graphics-info-intermediate.cc:341and returned at:404with no assignment between. - FIXED (branch
fix-api-docs-bugs)src/c-interface-build-side-chain.cc:844mutate_and_autofit_residue_range(): always returns 0. — confirmed atsrc/c-interface-build-side-chain.cc:847-870:statusis 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:362swap_atom_alt_conf(): ignoresalt_conf, makes no backup, and always returns 0. The same always-0 return applies toset_atom_attribute,set_atom_string_attributeandset_atom_attributes. — all confirmed insrc/molecule-class-info-other.cc:swap_atom_alt_conf()(:362-395) never readsalt_conf(it swaps the alt-locs of the first two atoms selected by name), has nomake_backup(), never deletes its selection handle and returnsistateunset;set_atom_attribute()(:324/:359),set_atom_string_attribute()(:442/:474) andset_atom_attributes()(:480/:541) likewise return anistatethat is never assigned. — Fix note: backup, selection release and return values (also for the threeset_atom_*attribute*members);alt_confis still ignored. - FIXED (branch
fix-api-docs-bugs)src/c-interface-waters.cc:147blob_under_pointer_to_screen_centre(): discards the result and always returns 0. — confirmed atsrc/c-interface-waters.cc:150-151: the result ofg.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-666make_updating_map(): returnsstatus(1), notimol. — confirmed atsrc/c-interface-maps.cc:663-678:statusis fixed at 1 and returned whether or notmake_and_draw_map()gave a validimol, so the caller can neither get the map number nor detect failure. — Fix note: returnsimol(-1 on failure) - an API change; header doc updated. - FIXED (branch
fix-api-docs-bugs)src/c-interface.cc:5231read_phs_and_make_map_using_cell_symm_from_mol(): ignores themake_map_from_phsresult. — confirmed atsrc/c-interface.cc:5324-5325: the molecule is created andmake_map_from_phs()called with its result dropped, so the newimolis returned even if the read failed. Also, for a map-onlyimol_ref,get_cell_symm()is handed that molecule’satom_sel.mol(:5304-5305). — Fix note: the molecule is erased and -1 returned on failure; a map-onlyimol_refno longer hands a nullmoltoget_cell_symm()(same guard in the two sibling functions). - FIXED (branch
fix-api-docs-bugs)src/c-interface-build.cc:3083,3100,3150write_pdb_file/write_cif_file/write_chain_to_pdb_file: return 0 for an invalidimol. — confirmed: all three initialiseistat = 0and only change it insideis_valid_model_molecule(imol)(src/c-interface-build.cc:3087,:3104,:3153), and the comment at:3099says “return 1 on error, 0 on success”, so an invalid molecule reports success. - FIXED (branch
fix-api-docs-bugs)src/molecule-class-info.cc:9193write_pdb_filewith a SHELX extension: returns 1 becauseerrisn’t reset. — confirmed atsrc/molecule-class-info.cc:9199-9203:errstarts at 1 (fail) and the SHELX branch callswrite_shelx_ins_file()without assigning it. - FIXED (branch
fix-api-docs-bugs)src/c-interface.cc:10272probe_available_p(): the flag is never set, so it always returns -1. — confirmed:graphics_info_t::probe_availableis initialised to -1 atsrc/graphics-info-statics.cc:1339and is only ever read, byprobe_available_p()andprobe_available_p_py()(src/c-interface.cc:10333,:10342); nothing insrc/writes it. — Fix note (g), 2026-11-16 (Paul: search formolprobity.probe; plainprobeis no longer a thing):probe_available_p()searches the PATH withg_find_program_in_path("molprobity.probe")on the first call, caches the result and returns 1 or 0; the_pyversion calls it. - FIXED (branch
fix-api-docs-bugs)src/molecule-class-info-residues.cc:542get_all_molecule_rama_score(): onlyscoresis filled, so the Ramachandran score/region API fields stay at their defaults. — confirmed: the function (src/molecule-class-info-residues.cc:542-630) only doesrs.scores.push_back()(:620);score,score_non_sec_str,n_zeros,scores_non_sec_strandregionkeep 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_zerosandregionare filled;scoresitself is unchanged (still every residue), sincedynamic-validation.ccuses it. - FIXED (branch
fix-api-docs-bugs)chain_fragments_scm/_py: compute the result but return#f/False. — confirmed atsrc/c-interface-info.cc:1492-1501and:1505-1518: both callget_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 atsrc/molecule-class-info-maps.cc:5311-5319:export_model_molecule_as_obj()does the export throughmake_bonds_type_checked()and then ends with a literalreturn false, soexport_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:ris declared 0 and never assigned inundo_symmetry_view()(src/c-interface-info.cc:2342, returned at:2382) and ingraphics_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_scmandglyco_tree_scm/_pyare 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 inBACKLOG.mdas “implement or remove”.model_composition_statistics_*(c-interface-analysis.cc:195,227) —src/c-interface-analysis.cc:195-223and:227-238: the stats are computed into a local and'()/ False is returned. — FIXED 2026-11-16 (branchfix-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 newgraphics_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-1813leak. — FIXED 2026-11-16 (branchfix-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 ontutorial-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 (branchfix-api-docs-bugs): it now does whatget_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-371and:474-482: both return#f/False with no other code.glyco_tree_py—src/c-interface-residues.cc:488-512: builds aglyco_tree_t(without a null check onresidue_p) and returns False. — FIXED 2026-11-16 (branchfix-api-docs-bugs):glyco_tree_py()returns the tree as nested dictionaries (keysresidue_spec,residue_name,link_type,children) andglyco_tree_scm()returns the same as nested association lists. The Python version was run onmulti-carbo-coot-3.pdb(FUC A1 with child NAG A2, linkALPHA1-4); the Scheme version compiles but was not run.qq_plot_*without goocanvas —src/c-interface-maps.cc:2569and: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#falways, and writesmap-fragment-at-origin.mapinto the cwd as a side effect.
- FIXED (branch
fix-api-docs-bugs)src/c-interface-waters.cc:~490highly_coordinated_waters_py():retis 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 twoPyList_SetItem()calls sit inside theforoverwater_contacts(src/c-interface-waters.cc:500-502), so with two or more hitsmetal_resultsandrare 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_Truereturned or stored without an INCREF: — all five confirmed; harmless on Python 3.12+ wherePy_False/Py_Trueare 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_Falseis returned as-is for an invalidimol.glyco_tree_internal_distances_fn_py(c-interface-residues.cc:706) —src/c-interface-residues.cc:709/:720: always returns the barePy_False(it has no other result).save_coords_name_suggestion_py(c-interface-info.cc:3414) —src/c-interface-info.cc:3446/:3452: barePy_Falsefor an invalidimol.refinement_results_to_py(graphics-info-modelling.cc:2626) —src/graphics-info-modelling.cc:2623/:2643:lights_pystaysPy_Falsewhen there are no lights and is then stolen byPyList_SetItem(); the top-levelris INCREF’d correctly (:2647).ncs_ghosts_py(c-interface-ncs.cc:~770) —src/c-interface-ncs.cc:760-763and:774-775:display_it_flag_py(Py_False/Py_True) and, without rtops,rtop_pyare stolen byPyList_SetItem()with no INCREF.
- FIXED (branch
fix-api-docs-bugs)glyco_tree_matched_residue_pairs_py(c-interface-residues.cc:637):PyList_AppendwithoutPy_DECREF, so it leaks. — confirmed atsrc/c-interface-residues.cc:672:PyList_Append(rt, list_py)adds its own reference andlist_pyis never DECREF’d, leaking one list per matched pair; neitherresidue_1_pnorresidue_2_pis 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 bem.second(harmless today). — confirmed atsrc/cc-interface-map-utils.cc:144:o_1is sized fromm.firstbut filled fromm.second(:165-177), so it is only correct while both maps have the same number of entries; otherwise the list has NULL slots orPyList_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_ligandnow usesfind_ligand_score_correl_frac_interesting_limit(default 0.9), which also makesset_find_ligand_multi_solutions_per_cluster’slim_2effective. 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 inBACKLOG.md.make_link:link_name,length— passed throughmake_link()(src/c-interface-build-main-chain.cc:766) tomolecule_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 anmmdb::Link.hole:n_runs,show_probe_radius_graph_flag—src/c-interface-analysis.cc:49-173:n_runsis not used at all and the only mention ofshow_probe_radius_graph_flagis 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 bysrc/c-interface.cc:9646tomolecule_class_info_t::sharpen()(src/molecule-class-info-maps.cc:344-521), which readstry_gompertzbut nevergompertz_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 bysrc/c-interface-superpose.cc:943tomolecule_class_info_t::lsq_improve()(src/molecule-class-info-other.cc:9591-9610), which constructscoot::lsq_improveand callsimprove()without them.regularize_zone_with_score_*/c-interface-refine.cc:165:altconf—src/c-interface-kk.cc:246-283(py) and:287-320(scm):altconfdoes not appear in either body.add_terminal_residue_using_phi_psi:residue_type(always ALA) — forwarded bysrc/c-interface-build-main-chain.cc:273to the member atsrc/molecule-class-info.cc:6579, which never reads it and callsbuild_N_terminal_ALA()/build_C_terminal_ALA()(:6642,:6659).make_dots:atom_radius_scale—dots()(src/c-interface.cc:3976) passessphere_size_scaletomolecule_class_info_t::make_dots()(src/molecule-class-info-other.cc:9042), whereatom_radius_scaleis never used.monomer_lib_3_letter_codes_matching:allow_minimal_descriptions_flag— forwarded bysrc/c-interface-ligands.cc:1563toprotein_geometry::matching_names()(geometry/protein-geometry.cc:2214-2254), which never readsallow_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 innerint imol = pp.second.first;(:429) shadows it.servalcat_refine:mask_map—src/cc-interface-map-utils.cc:339: it reaches the worker lambda asmask_file_name, but the"--mask"argument is commented out of the command line.find_ligandlim_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 offind_ligand_score_correl_frac_interesting_limit.set_find_ligand_multi_solutions_per_cluster:lim_2—src/c-interface-ligands.cc:1360stores it infind_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_specis 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_maxandh_bond_dist_max(defaults 3.25 and 3.9, so the chapi caller is unchanged), andfle_view()passes the values set byfle_view_set_water_dist_max()/fle_view_set_h_bond_dist_max(). All eleven others now carry a “no effect” note inc-interface.h/cc-interface.hh; no setter was removed.set_cryo_em_refinement—cryo_EM_refinement_flagis written atsrc/c-interface-refine.cc:563and read only by its own getter (:567).merge_molecules_ligand_spec— REJECTED: the spec stored atsrc/graphics-info.cc:6570is read atsrc/molecule-class-info-other.cc:5692and passed tomerge_molecules_just_one_residue_at_given_spec().save_coordinates_in_original_dir_flag— written atsrc/c-interface.cc:5125; no reader anywhere insrc/.add_terminal_residue_do_rigid_body_refine— written atsrc/c-interface-build-main-chain.cc:159; no reader.set_button_label_for_external_refinement—external_refinement_program_button_labelis written atsrc/c-interface-preferences.cc:1354; no reader.set_add_ccp4i_projects_to_file_dialogs—add_ccp4i_projects_to_optionmenu_flagis written atsrc/c-interface-info.cc:5181; no reader.set_file_chooser_overwrite—gtk2_chooser_overwrite_flagis written atsrc/c-interface-gui.cc:4388and read only by its getter (:4392).set_filter_fileselection_filenames—filter_fileselection_filenames_flagis written atsrc/c-interface.cc:1544and read only by its getter (:1550).set_unpathed_backup_file_names—unpathed_backup_file_names_flagis written atsrc/c-interface-build.cc:493and read only by its getter (:502).set_python_draw_function(its consumer is#if 0) — stored atsrc/graphics-info-utils.cc:324; the only reader,src/draw.cc:689-690, is inside the#if 0block at:672-713.fle_view_set_*_dist_max—fle_water_dist_maxandfle_h_bond_dist_maxare written atsrc/flev.cc:162and:166; no reader.- aniso radius limit /
show_aniso—show_aniso_atoms_radius_flag,show_aniso_atoms_radiusandshow_aniso_atoms_flagare read only inold_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 atsrc/c-interface.cc:4197; no reader.set_model_display_radius— written atsrc/c-interface.cc:1498-1499; it is read byis_within_display_radius()(src/graphics-info.cc:6532,:6554), but that is only reached fromzero_occupancy_spots()anddraw_cis_peptide_markups()viadraw_molecule(), whose one call site (src/draw.cc:401, indraw_mono()) is only called from#if 0code, 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 atsrc/graphics-info-intermediate.cc:476, andrun_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 storedPyObject *is not INCREF’d. The header doc now says the hook is not implemented, and implementing it is an item inBACKLOG.md. - DOCUMENTED (branch
fix-api-docs-bugs) molecular-symmetry drawing is commented out (molecule-class-info.cc:~2903), soadd_molecular_symmetry*shows nothing. The MTRIX reader also uses half the translation as the origin (only right for 2-folds). — both confirmed: thedisplay_molecular_symmetry(...)call is commented out atsrc/molecule-class-info.cc:2906(the lambda at:2837is otherwise unused), andadd_molecular_symmetry_from_mtrix_from_file()passes0.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 indisplay_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 inBACKLOG.md. - FIXED (branch
fix-api-docs-bugs)add_toolbar_subprocess_button: theon_completion_functioncall is inside#if 0. — confirmed atsrc/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), soreturn_valstays null and the completion callback never runs. — Fix note: usesPyObject_CallObject(), which exists in every Python 3. - FIXED (branch
fix-api-docs-bugs)print_glyco_tree: builds the tree but never prints it. — confirmed atsrc/c-interface-residues.cc:152-168: it constructs acoot::glyco_tree_tand returns; nothing is printed by the function itself. — Fix note (2026-11-16): it now callscoot::glyco_tree_t::print(). Run onmulti-carbo-coot-3.pdb(FUC A1, NAG A2), it prints the two residues with theALPHA1-4link. - DEFERRED
show_fix_nomenclature_errors_gui: returns at once (“crashes, fix later”). — confirmed atsrc/c-interface-build-gui.cc:1456: an unconditionalreturn;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 incoot-gtk2.glade, not in any GTK4.uifile, so removing thereturnwould not help. Whether the dialog is still wanted is a review item inBACKLOG.md. - INTENDED?
execute_refmac_real: always takes the Python path (USE_GUILE_XXX). — behaviour confirmed atsrc/c-interface-refmac.cc:178and:220-222: the Guile branches are guarded byUSE_GUILE_XXX, which nothing defines, soilangis alwaysSTATE_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 atsrc/molecule-class-info-residues.cc:2202-2217: every residue of the chain is processed with no residue-type test, deleting each atom for whichis_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: writestest.cifinto the cwd. — confirmed atsrc/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 atsrc/c-interface-ligands.cc:1186-1191:rp.firstfromget_monomer_restraints()is never tested (the followingif (r)re-tests the residue, which is already known to be non-null) andrp.secondgoes straight tocoot::rdkit_mol(). - FIXED (branch
fix-api-docs-bugs)atom_spec_from_scm_expressiontakes only 5 elements, butatom_spec_to_scmmakes 6, so they don’t round-trip. — confirmed:atom_spec_from_scm_expression()accepts onlylen == 5(src/c-interface-mutate.cc:72), whilegraphics_info_t::atom_spec_to_scm()conses six items withint_user_datafirst (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.ccfind_deviant_geometry(): builds and discards a restraints container, and leaksresidues_mol. — confirmed atsrc/molecule-class-info-other.cc:6802-6890: the function isvoid, constructscoot::restraints_container_t restraints(...)as its last statement (:6885) and does nothing with it;residues_mol(:6862) is never deleted andselHnd(:6826) is never released, once per chain. — PARTLY FIXED (branchfix-api-docs-bugs): the selection is now released. The discarded restraints container and theresidues_molleak remain: the function does nothing useful. Decided 2026-11-16: it anddeviant_geometry()are marked “Deletable for Coot 2” in the source and in thec-interface.hdoc, 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_outliersis declared twice. The second was meant to beset_show_non_bonded_contact_baddies_markers, which is defined but not declared. — confirmed atsrc/c-interface.h:6715and:6720(the second now carries a comment saying it is a duplicate);set_show_non_bonded_contact_baddies_markers()is defined atsrc/c-interface.cc:10363and declared in neitherc-interface.hnorcc-interface.hh, so it is not reachable from scripting. — Fix note: the second declaration is nowset_show_non_bonded_contact_baddies_markers(). - FIXED (branch
fix-api-docs-bugs)src/cc-interface.hh: the “Atom info” block is duplicated, andresname_from_serial_numberandset_use_depth_blurare each declared twice. — only the last part still holds:set_use_depth_bluris declared atsrc/cc-interface.hh:3681and:3959. The “Atom info” banner now appears once incc-interface.hh(:1884; the other is inc-interface.h:6057) andresname_from_serial_numberis 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, andbaton_tip_try_another(which logged “baton-try-another”) as well.set_delete_chain_modelogs “set-delete-sidechain-mode” (c-interface-build.cc:2061) —src/c-interface-build.cc:2064.baton_tip_previouslogs “baton-try-another” (c-interface-build-main-chain.cc:338) —src/c-interface-build-main-chain.cc:338.add_terminal_residueomitsresidue_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_matrixlogs m12 twice (c-interface-info.cc:~2883) —src/c-interface-info.cc:2912-2913:m12is pushed twice andm13never.set_colour_by_chain_goodsell_modelogs “set-colour-by-chain” —src/c-interface.cc:3419.set_colour_by_ncs_chaindropsgoodsell_mode—src/c-interface.cc:3402-3405: onlyimolis logged.info_dialog_with_markuplogs “info-dialog-and-text” —src/c-interface.cc:1844.views_play_speed():add_to_history_simplecomes after thereturn—src/c-interface.cc:10138-10139.
- FIXED (branch
fix-api-docs-bugs) misspelt user-facing names:add_omega_torsion_restriantswas renamed in 53c14bdf3, butremove_omega_torsion_restriantsis 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_restriantsis nowremove_omega_torsion_restraints- a scripting API change.