Skip to content

docs: add Doxygen API documentation for calculations and analysis headers (PR 7/10)#419

Merged
wojdyr merged 20 commits into
project-gemmi:masterfrom
CV-GPhL:api-docs/calculations
Apr 23, 2026
Merged

docs: add Doxygen API documentation for calculations and analysis headers (PR 7/10)#419
wojdyr merged 20 commits into
project-gemmi:masterfrom
CV-GPhL:api-docs/calculations

Conversation

@CV-GPhL
Copy link
Copy Markdown
Contributor

@CV-GPhL CV-GPhL commented Apr 22, 2026

Summary

Seventh PR in the incremental Doxygen API documentation series. Adds /// doc comments to 12 headers covering calculations, analysis, and structure factor computation, and wires them into docs/api.rst via doxygenfile:: directives.

Headers documented:

Calculations and Analysis

  • calculate.hpp — geometric calculations (angles, dihedrals, Ramachandran, mass, B-factors, TLS)
  • align.hpp — sequence alignment to SEQRES, label_seq_id assignment, QCP superposition
  • neighbor.hpp — cell-linked-list neighbour search (Model and SmallStructure)
  • contact.hpp — distance-based contact search with configurable ignore rules
  • assembly.hpp — biological assembly generation, NCS expansion, chain naming
  • select.hpp — CCP4-style atom/residue/chain selection expressions
  • modify.hpp — in-place structure modifications (remove H, altlocs, ANISOU; rename; deuterium handling)
  • polyheur.hpp — polymer type heuristics, entity/subchain assignment, connectivity checks
  • dssp.hpp — DSSP secondary structure assignment (helices, strands, turns, bends)

Structure Factor Calculations

  • sfcalc.hpp — direct (non-FFT) structure factor summation
  • ecalc.hpp — amplitude normalisation F→E (Karle approach)
  • scaling.hpp — anisotropic scaling with optional bulk-solvent correction

Also includes the infrastructure changes from PR #413 (conf.py guard, Doxyfile, CI docs-build job) as they are not yet merged into master.

Literature references added

@par References Doxygen blocks added to cite primary sources in the rendered API docs:

Symbol Reference
StructureFactorCalculator in sfcalc.hpp Bourhis et al. (2015) Acta Cryst. A70, 300 (doi)
Scaling struct in scaling.hpp Afonine et al. (2012) Acta Cryst. D68, 352 (doi); Fokine & Urzhumtsev (2002) Acta Cryst. A58, 384 (doi)
calculate_b_est() in calculate.hpp Merritt (2011) Acta Cryst. A67, 512 (doi)
DsspCalculator in dssp.hpp Kabsch & Sander (1983) Biopolymers 22, 2577 (doi)

Depends on

Part of the series starting with PR #413 (api-docs/infra).

Test plan

  • CI docs-build job passes (Doxygen + Sphinx/Breathe HTML build)
  • CI doctest job passes (no regressions in Python doctests)
  • docs/api.rst renders the two new sections without Breathe errors

🤖 Generated with Claude Code

C. Vonrhein and others added 18 commits April 22, 2026 22:47
Wires up Doxygen XML generation + Breathe Sphinx extension so that
C++ API documentation from header comments renders in the existing
Sphinx/readthedocs site at docs/api.rst.

- docs/Doxyfile: Doxygen config (XML-only output, internal headers excluded)
- docs/conf.py: runs Doxygen as subprocess, adds breathe extension
- docs/api.rst: stub C++ API reference page (expanded by subsequent PRs)
- docs/index.rst: replace external cxx-api link with internal api.rst
- docs/requirements.txt: add breathe >= 4.35
- .readthedocs.yaml: add apt_packages: [doxygen]
- .gitignore: exclude docs/_doxygen/ (generated)

Builds on prior work in project-gemmi#402 (Paul Emsley / pemsley).
Co-authored-by: C. Vonrhein / CV-GPhL
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add comprehensive Doxygen documentation comments to all public items in
the DSSP secondary structure assignment module:
- All enum types and values (SecondaryStructure, TurnType, HelixPosition,
  BridgeType, HydrogenMode, HBondDefinition)
- All public structs and their data members (Bridge, HBond,
  SecondaryStructureInfo, DsspOptions, DsspCalculator)
- All public methods with @param, @return, and @brief tags
- The calculate_dssp convenience function
- Used @tparam and other tags as appropriate for clarity

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ons (PR 7)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CV-GPhL and others added 2 commits April 23, 2026 15:09
sfcalc.hpp: Bourhis et al. (2015) for structure factor computation context.
scaling.hpp: Afonine et al. (2012) for anisotropic scaling;
  Fokine/Urzhumtsev (2002) for initial bulk-solvent parameters.
calculate.hpp: Merritt (2011) for B_est formula.
dssp.hpp: Kabsch/Sander (1983) for DSSP algorithm.

Co-authored-by: C. Vonrhein / CV-GPhL
@wojdyr wojdyr merged commit 39c3bb9 into project-gemmi:master Apr 23, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants