docs: full Doxygen API documentation for core data structures#414
Merged
Conversation
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
Add comprehensive Doxygen comments to the core data hierarchy header: - File-level @file block explaining the Structure->Model->Chain->Residue->Atom hierarchy - All enums: CoorFormat, CalcFlag, ResidueSs, ResidueStrandSense - PdbReadOptions struct with field documentation - Atom struct: all 13 members with clear descriptions - Residue struct: detailed member and method documentation - Chain struct: all residue access methods with use cases - Model struct: search, modification, and query methods - Structure class: complete documentation of 30+ members and methods - Utility functions: is_same_conformer, add_distinct_altlocs, assign_residue_ss_from_file - CRA/const_CRA/CraProxy types: bidirectional atom iteration framework - All iterator policies and span types: ConstResidueSpan, ResidueSpan, ResidueGroup Notable documentation: - Clarified CoorFormat.Unknown vs CoorFormat.Detect semantics - Explained CalcFlag.NoHydrogen == CalcFlag.NotSet (same numeric value) - Documented altloc convention ('\0' = not set) - Explained entity_type and entity_id relationship to mmCIF - Detailed microheterogeneity and conformer handling - Documented all major search/access methods No warnings or errors in Doxygen build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds comprehensive Doxygen documentation to all public entities: - File-level @file block with brief and detailed description - Position and Fractional structs: purpose, fields, methods - NearestImage struct: all fields explained, dist_sq units clarified - UnitCell struct: 40+ public methods and members documented - Verified angles in degrees (via rad() conversion) - Verified PDB convention for orthogonalization (a-axis along X, a* along Z) - NearestImage::dist_sq units (squared distance in Angstroms^2) - All helper functions: rot_as_mat33, tran_as_vec3 - Fractional/Cartesian transformation methods with conventions - Distance/image finding methods with PBC and symmetry - Reciprocal cell and reflection d-spacing calculations - Metric tensor and special position detection All comments use triple-slash (///) Doxygen style. @param, @return, @brief tags provided for all non-trivial functions. Build verified: Doxygen generates without errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comprehensive documentation of all public API elements in symmetry.hpp: - File-level @file block with overview of crystallographic structures - Op struct: documented rot/tran encoding (rational fractions with DEN=24), real-space vs reciprocal-space operations, and all methods - GroupOps struct: documented sym_ops/cen_ops separation, group operations, change-of-basis, and iteration - Enums: CrystalSystem, PointGroup, Laue with @brief for each member - SpaceGroup struct: documented all fields (number, ccp4, hm, ext, hall, etc.), reference settings, and accessor methods - ReciprocalAsu struct: ASU boundary conditions, to_asu mapping, ISYM encoding - Free functions: find/get space groups by name/number/ops, reciprocal ASU - std::hash specialization for Op All documentation follows Doxygen conventions: - Triple-slash (///) for all public members - @brief at every level (file, struct, enum, function, member) - @param/@return/@throw for function signatures - @tparam for template parameters (none present in this header) - Inline descriptions (///<) for simple enumerators Build verified: no new warnings or errors (3 pre-existing docutils warnings). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 22, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
59655bc to
e75a546
Compare
elem.hpp: Mantina/Truhlar (2009) and Bondi (1964) for vdW radii. symmetry.hpp: RWGK (1999) for rotation type table; ITA (2016) for nonzero_inversion_center. unitcell.hpp: Busing/Levy (1967) for B matrix convention; Fischer/Tillmanns (1988) for B_eq formula. Co-authored-by: C. Vonrhein / CV-GPhL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds complete, accurate full-Doxygen API documentation (every public class,
struct, enum, member, function — with
@param/@returnthroughout) to theeight core data structure headers:
model.hppunitcell.hppsymmetry.hppmetadata.hppelem.hppseqid.hppresinfo.hppsmall.hppAlso expands
docs/api.rstwithdoxygenfile::entries for all eight headers.Approach
///triple-slash Doxygen styleOp::rot/tranuse rational fraction encoding with DEN=24UnitCellangles stored in degrees; orthogonalization uses PDB convention (a along X)NearestImage::dist_sqis squared distance in ŲSeqId::icode = ' '(space, not '\0') means no insertion codeElement::atomic_number()returns 1 for deuteriumLiterature references added
@par ReferencesDoxygen blocks added to cite primary sources in the rendered API docs:vdw_radius()inelem.hpprot_type()insymmetry.hppnonzero_inversion_center()insymmetry.hppcalculate_matrix_B()inunitcell.hppcalculate_u_eq()inunitcell.hppDepends on
This PR requires PR #413 (infrastructure) to be merged first.
See #413 for the Doxygen/Breathe build setup.
Part of series
Verification
Verified locally: doxygen 1.9.8, breathe 4.36.0, Sphinx 9.1.0.