Skip to content

docs: full Doxygen API documentation for maps and grids#418

Merged
wojdyr merged 15 commits into
project-gemmi:masterfrom
CV-GPhL:api-docs/maps-grids
Apr 23, 2026
Merged

docs: full Doxygen API documentation for maps and grids#418
wojdyr merged 15 commits into
project-gemmi:masterfrom
CV-GPhL:api-docs/maps-grids

Conversation

@CV-GPhL
Copy link
Copy Markdown
Contributor

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

Summary

This PR adds complete Doxygen API documentation for Gemmi's map and grid layer, covering 9 headers:

  • grid.hpp — 3D crystallographic grid template (Grid, GridBase, GridOp, interpolation, symmetrize)
  • ccp4.hpp — CCP4/MRC map file format (Ccp4, MapSetup, read/write functions)
  • recgrid.hpp — Reciprocal-space grid for FFT (ReciprocalGrid, half_l mode, Miller index access)
  • dencalc.hpp — Electron density calculation from atomic model (DensityCalculator, Gaussian placement)
  • asumask.hpp — Asymmetric unit masking (AsuBrick, MaskedGrid<T,V>, get_asu_mask)
  • solmask.hpp — Solvent masking (SolventMasker, AtomicRadiiSet, mask_points_in_radius)
  • floodfill.hpp — 3D flood-fill on grids (FloodFill<T,Land>, flood_fill_above)
  • fourier.hpp — FFT operations between real and reciprocal space (transform_f_phi_to_map, transform_map_to_f_phi)
  • reciproc.hpp — Reciprocal space utilities (ReciprocalAsu, for_all_reflections)

Documentation standard

  • /// triple-slash Doxygen comments throughout
  • Every public entity has @brief; non-obvious parameters have @param/@return/@throws/@tparam
  • Semantics verified against implementations (grid data layout (w*nv+v)*nu+u, half_l FFT convention, ASU mask encoding 0=ASU/1=mate, CCP4 data modes 0/1/2/6/12, B-factor sharpening formula)

Literature references added

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

Symbol Reference
cubic_interpolation() in grid.hpp Afonine et al. (2018) Acta Cryst. D74, 531 (doi) — eq. 24 for the Catmull–Rom formula
tricubic_interpolation() in grid.hpp Same reference (tensor-product extension of the 1D formula)

Dependencies

This PR depends on PR #413 (Doxygen/Breathe infrastructure) being merged first.

It follows PR #414 (core data structures), PR #415 (CIF handling), PR #416 (structure I/O), and PR #417 (reflection data) in the documentation series.

Series context

This is PR 6 of a planned series of 10 PRs adding incremental API documentation:

PR Branch Content
#413 api-docs/infra Build infrastructure
#414 api-docs/core-structures Core data structures
#415 api-docs/cif CIF handling
#416 api-docs/structure-io Structure file I/O
#417 api-docs/reflection Reflection data
This PR api-docs/maps-grids Maps and grids
PR 7 api-docs/calculations calculate.hpp, neighbor.hpp, sfcalc.hpp, align.hpp, and related
PR 8 api-docs/chemistry chemcomp.hpp, monlib.hpp, topo.hpp, and related
PR 9 api-docs/scattering-math formfact.hpp, math.hpp, cellred.hpp, and related
PR 10 api-docs/io-utils fileutil.hpp, gz.hpp, util.hpp, logger.hpp, and related

Attribution

Builds on and credits prior work in PR #402 (Paul Emsley / pemsley)

@CV-GPhL CV-GPhL force-pushed the api-docs/maps-grids branch from 9b9ac69 to 79db2aa Compare April 22, 2026 21:17
CV-GPhL and others added 3 commits April 23, 2026 15:04
grid.hpp: Afonine et al. (2018) for Catmull-Rom cubic_interpolation
and tricubic_interpolation; replace informal Wikipedia/URL references.

Co-authored-by: C. Vonrhein / CV-GPhL
Move the block to after all @param and @return tags,
following standard Doxygen ordering.

Co-authored-by: C. Vonrhein / CV-GPhL
@wojdyr wojdyr merged commit 1b69f0c into project-gemmi:master Apr 23, 2026
8 of 9 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