Skip to content

Commit 4b627cf

Browse files
committed
update docs
1 parent 6c19fb5 commit 4b627cf

File tree

2 files changed

+47
-36
lines changed

2 files changed

+47
-36
lines changed

src/lib.rs

Lines changed: 45 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,83 @@
1-
//! Rust bindings for libSBML - Systems Biology Markup Language library
1+
//! # Rust bindings for libSBML - Systems Biology Markup Language library
22
//!
3-
//! This crate provides safe Rust bindings to the C++ libSBML library, which is used for
4-
//! reading, writing, manipulating and validating SBML (Systems Biology Markup Language) files.
5-
//! SBML is a widely used format for representing computational models in systems biology.
3+
//! This crate provides safe, idiomatic Rust bindings to the C++ libSBML library for
4+
//! working with SBML (Systems Biology Markup Language) files - a standard format for
5+
//! representing computational models in systems biology research.
66
//!
7-
//! The bindings are generated using autocxx to provide a safe interface while maintaining
8-
//! close integration with the underlying C++ library. The main components include:
7+
//! ## Features
98
//!
10-
//! - SBMLDocument: The root container for SBML models
11-
//! - Model: Represents a biological model with species, reactions etc.
12-
//! - Species: Represents chemical species/entities in the model
13-
//! - Compartment: Represents physical containers/spaces in the model
14-
//! - Reaction: Represents biochemical reactions between species
15-
//! - Parameter: Represents numerical parameters used in the model
16-
//! - Unit/UnitDefinition: Represents units of measurement
17-
//! - SpeciesReference: Represents species participating in reactions
9+
//! - Complete access to libSBML functionality with a Rust-friendly API
10+
//! - Type-safe interfaces for creating and manipulating SBML models
11+
//! - Reading and writing SBML files with validation support
12+
//! - Memory-safe wrappers around the C++ library using autocxx
13+
//!
14+
//! ## Core Components
15+
//!
16+
//! - **SBMLDocument** (`sbmldoc`): Root container for SBML models
17+
//! - **Model** (`model`): Biological model with species, reactions, and other components
18+
//! - **Species** (`species`): Chemical entities/molecules in the model
19+
//! - **Compartment** (`compartment`): Physical containers/spaces where species reside
20+
//! - **Reaction** (`reaction`): Biochemical transformations with reactants, products and kinetics
21+
//! - **Parameter** (`parameter`): Numerical values used throughout the model
22+
//! - **LocalParameter** (`localparameter`): Parameters scoped to specific reactions
23+
//! - **KineticLaw** (`kineticlaw`): Mathematical expressions defining reaction rates
24+
//! - **Unit** (`unit`): Base units for quantities in the model
25+
//! - **UnitDefinition** (`unitdef`): Composite units of measurement
26+
//! - **Rule** (`rule`): Mathematical expressions that define model behavior
27+
//! - **SpeciesReference** (`speciesref`): References to species as reactants or products
28+
//! - **ModifierSpeciesReference** (`modref`): Species references for catalysts and regulators
1829
//!
1930
20-
/// Module providing traits for the SBML library
31+
/// Traits providing common functionality across SBML components
2132
pub mod traits {
2233
pub mod annotation;
2334
pub mod fromptr;
2435
pub mod inner;
2536
pub mod intoid;
2637
}
2738

28-
/// Module providing upcast functionality
39+
/// Type casting and conversion utilities for SBML objects
2940
pub mod cast;
30-
/// Module providing compartment functionality
41+
/// Compartments representing physical containers in the model
3142
pub mod compartment;
32-
/// Module providing kinetic law functionality
43+
/// Kinetic laws that define reaction rates and mathematics
3344
pub mod kineticlaw;
34-
/// Module providing local parameter functionality
45+
/// Local parameters scoped to specific reactions or expressions
3546
pub mod localparameter;
36-
/// Module providing model functionality
47+
/// Model definition and management for biological systems
3748
pub mod model;
38-
/// Module providing modifier species reference functionality
49+
/// Modifier species references for catalysts and regulators
3950
pub mod modref;
40-
/// Module providing parameter functionality
51+
/// Global parameters defining constant or variable model values
4152
pub mod parameter;
42-
/// Module providing reaction functionality
53+
/// Reactions describing biochemical transformations between species
4354
pub mod reaction;
44-
/// Module providing rate rule functionality
55+
/// Rules for mathematical constraints and assignments within models
4556
pub mod rule;
46-
/// Module providing core SBML document functionality
57+
/// Core document handling for SBML files and model containers
4758
pub mod sbmldoc;
48-
/// Module providing species functionality
59+
/// Species representing chemical entities and molecules
4960
pub mod species;
50-
/// Module providing species reference functionality
61+
/// References to species as reactants or products in reactions
5162
pub mod speciesref;
52-
/// Module providing unit functionality
63+
/// Units of measurement for model quantities
5364
pub mod unit;
54-
/// Module providing unit definition functionality
65+
/// Unit definitions composing multiple base units
5566
pub mod unitdef;
5667

57-
/// Module containing helper macros
68+
/// Helper macros for working with SBML components
5869
pub mod macros;
5970

60-
/// Module containing property functionality
71+
/// Property handling for SBML element attributes
6172
pub mod property;
6273

63-
/// Module containing reader functionality
74+
/// File and model input/output operations
6475
pub mod reader;
6576

66-
/// Internal module containing the wrapper types for the annotation.
77+
/// Internal module containing the wrapper types for annotations
6778
pub(crate) mod wrapper;
6879

69-
/// Internal module containing the container types for the annotation. This is mainly used to extract annotations from the model. Collections are handled by the [`Model`] struct.
80+
/// Internal module containing collections of SBML components
7081
pub(crate) mod collections {
7182
pub(crate) use crate::collections::compartments::*;
7283
pub(crate) use crate::collections::parameters::*;

src/property.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/// Generates getter and setter methods for an optional property with a specified type.
2626
///
2727
/// This macro creates a getter and setter method for a property that may or may not be set.
28-
/// The getter returns an Option<T> that is None when the property is not set.
28+
/// The getter returns an `Option<T>` that is `None` when the property is not set.
2929
/// It handles the conversion between Rust and C++ types, including string conversions
3030
/// where necessary.
3131
///
@@ -213,7 +213,7 @@ macro_rules! required_property {
213213
///
214214
/// This macro creates a getter and setter method for a property that may or may not be set,
215215
/// using the upcast! macro to access the property from a parent type. The getter returns
216-
/// an Option<T> that is None when the property is not set.
216+
/// an `Option<T>` that is `None` when the property is not set.
217217
///
218218
/// # Arguments
219219
/// * `$type` - The Rust wrapper type (e.g., Species<'a>)

0 commit comments

Comments
 (0)