Skip to content

Commit 00c7804

Browse files
committed
copilot-instructions.md: responding to suggestions from copilot itself
1 parent 089b538 commit 00c7804

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

.github/copilot-instructions.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ make test-functional # Run functional tests
3535
make test-database # Run database tests
3636
make test-all # Run all tests
3737
make clean # Remove build artifacts
38-
make decython # Remove .so files for "pure Python" debugging. This target probably broken.
38+
make decython # Remove .so files for "pure Python" debugging. Pure python mode is not reliably tested and might not work.
3939
make documentation # Build Sphinx docs
4040
```
4141

@@ -72,7 +72,7 @@ species.generate_resonance_structures()
7272
## RMG-database Integration
7373
The **RMG-database** is a separate repository containing all thermodynamic, kinetics, and transport data. It's typically cloned alongside RMG-Py in a sibling folder named `RMG-database`.
7474

75-
### Database Structure (in RMG-database repo)
75+
### Database Structure (in RMG-database `input/` directory, eg. `RMG-database/input/thermo/`)
7676
- `thermo/` - Thermodynamic libraries and group additivity data
7777
- `kinetics/families/` - Reaction family templates with rate rules (e.g., `H_Abstraction`, `R_Addition_MultipleBond`)
7878
- `kinetics/libraries/` - Curated rate coefficient libraries
@@ -85,7 +85,7 @@ The `RMGDatabase` class (`rmgpy/data/rmg.py`) is the central interface:
8585
from rmgpy.data.rmg import RMGDatabase
8686
database = RMGDatabase()
8787
database.load(
88-
path='/path/to/RMG-database',
88+
path='/path/to/RMG-database/input',
8989
thermo_libraries=['primaryThermoLibrary'],
9090
kinetics_families='default',
9191
reaction_libraries=[],
@@ -99,10 +99,12 @@ database.load(
9999
- `Entry` (`rmgpy/data/base.py`) - Base class for database entries with metadata
100100

101101
### Data Flow for Species Thermodynamics
102-
1. `Species.get_thermo_data()``ThermoDatabase.get_thermo_data(species)`
103-
2. First checks thermo libraries for exact match (via graph isomorphism)
104-
3. Falls back to group additivity estimation using functional group contributions
105-
4. Returns `ThermoData`, `NASA`, or `Wilhoit` object
102+
1. `Species.get_thermo_data()``rmgpy.thermo.thermoengine.submit(species)` (may create/resolve futures)
103+
2. `thermoengine` dispatches to the loaded `ThermoDatabase` and ultimately calls `ThermoDatabase.get_thermo_data(species)`
104+
3. `ThermoDatabase` first checks thermo libraries for an exact match (via graph isomorphism)
105+
4. If no library match is found, `ThermoDatabase` falls back to group additivity estimation using functional group contributions
106+
5. The resolved result is returned as a `ThermoData`, `NASA`, or `Wilhoit` object
107+
106108

107109
### Data Flow for Reaction Kinetics
108110
1. `KineticsFamily.generate_reactions(reactants)` - Matches reactant molecules to family templates
@@ -111,7 +113,7 @@ database.load(
111113
4. Returns `Arrhenius` or pressure-dependent kinetics model
112114

113115
## External Dependencies
114-
- **RMG-database**: Set location via `RMG_DATABASE_BRANCH` env var in CI, or pass path to `database.load()`
116+
- **RMG-database**: In CI, `RMG_DATABASE_BRANCH` controls which RMG-database branch is cloned. Locally, the database location is set via `settings['database.directory']` (default `../RMG-database/input`) or `database.directory` in an `rmgrc` file; you may also pass an explicit path to `database.load()`.
115117
- **Julia/RMS**: Optional (recommended) reactor simulation backend (install via `./install_rms.sh`)
116118
- Environment managed via `environment.yml` (conda/mamba)
117119

@@ -125,18 +127,18 @@ Documentation lives in `documentation/source/` and is built with Sphinx (`make d
125127

126128
### API Reference (`documentation/source/reference/`)
127129
- Auto-generated from docstrings using `sphinx.ext.autodoc`
128-
- Each module has a corresponding `.rst` file (e.g., `reference/species/index.rst``rmgpy/species.py`)
130+
- Each module has a corresponding `.rst` file (e.g., `documentation/source/reference/species/index.rst``rmgpy/species.py`)
129131
- **Maintenance**: Add new modules to the appropriate `index.rst` toctree. Docstrings in code are automatically extracted.
130132
- Uses reStructuredText format with `.. automodule::` directives
131133

132134
### When to Update Documentation
133-
- **New input file options**: Update `users/rmg/input.rst`
134-
- **New public API**: Ensure docstrings exist; add module to `reference/` if new
135+
- **New input file options**: Update `documentation/source/users/rmg/input.rst`
136+
- **New public API**: Ensure docstrings exist; add module to `documentation/source/reference/` if new
135137
- **Changed behavior**: Update relevant user guide section
136-
- **New features**: Add to `users/rmg/features.rst` or create new `.rst` file
138+
- **New features**: Add to `documentation/source/users/rmg/features.rst` or create and link to new `.rst` file
137139

138140
## Style Guidelines
139141
- Follow PEP 8
140142
- Docstrings describe purpose, not implementation
141143
- Use `logging` module (not print statements)
142-
- MIT/X11 license header required on all source files
144+
- MIT license header required on all source files

0 commit comments

Comments
 (0)