Cumulative PMI of a linear or convergent route from each step's mass inventory
rxn_route_pmi
Works out the cumulative process mass intensity of every step and of the whole route.
- Runs
- On the server
- Level
- Checked against a reference: exact arithmetic in a Python program, with the ACS Convergent PMI tool's printed Basic Example; a second implementation in Python by a separate agent of the same model family
What it is
Returns the cumulative process mass intensity of every step and of the route, by the ACS GCIPR convergent method. Use when each step's mass inventory, its product's assay mass and the assay mass of every intermediate it charged from earlier steps are known. Not for one step on its own: use `rxn_mass_metrics`; not for a route's yields: use `rxn_overall_yield`. Routes must be trees with one target; every charged intermediate and product needs an assay mass, never defaulted; recycled solvent is not credited.
What it does
You give
route(required): Every step of the route, each once; one target, which no other step takes from.
No request is recorded for this tool.
Limits
- Bench and process arithmetic on a reaction you write down.
- Research and education software: it does not predict products or routes, check that the chemistry will work, or assess hazards.
- Route PMI is the ACS GCI Pharmaceutical Roundtable's cumulative process mass intensity: kilograms of everything charged, along every branch, per kilogram of target, counted from the materials you enter as bought.
- Every charge counts at its full mass, and recovered or recycled solvent is not credited.
- Enter intermediates and products as assay (pure) mass.
- A solvent that carries an intermediate into the next step (a telescoped solution) is entered once, in the step that charged it, and never in the intermediate's mass or in the next step's charges.
- Making the bought materials, energy, cleaning and utilities are not counted.
- The number depends on where the route is taken to start, and it is not a measure of hazard or environmental impact.
- Every computed number a reply returns, other than an integer or an exact decimal, is rounded once to 12 significant figures: to the nearest, a change of at most 5 × 10⁻¹² of its value, except that a lower bound is rounded down and an upper bound up, a change of less than 1 × 10⁻¹¹; the method computes, and decides any pass or fail, on the unrounded value.
It will not answer when
- a step's intermediate is taken by two steps, or listed twice: tree routes only.
- more than one step is taken by no other step: one target only.
- a PMI, a role's mass or a contribution is not finite in doubles, or is not zero but rounds to zero. A value below 2^−1022 is served as a subnormal double, with fewer significant bits.
- two steps of the route share an id.
Every input, with its units1 input
route(required): Every step of the route, each once; one target, which no other step takes from.
Every refusal, with its code10 refusals
| Code | When |
|---|---|
STEP_TAKEN_TWICE | a step's intermediate is taken by two steps, or listed twice: tree routes only. |
SEVERAL_TARGETS | more than one step is taken by no other step: one target only. |
VALUE_NOT_REPRESENTABLE | a PMI, a role's mass or a contribution is not finite in doubles, or is not zero but rounds to zero. A value below 2^−1022 is served as a subnormal double, with fewer significant bits. |
DUPLICATE_STEP_ID | two steps of the route share an id. |
UNKNOWN_STEP | a step takes from an id that is not a step of the route. |
ROUTE_HAS_CYCLE | the route has a cycle (a step naming itself included): it is not a route. |
ROUTE_TOO_MANY_LINES | the route has more than 1000 lines across its steps. |
QUANTITY_SOURCE | a charge or a line gives not exactly one of its quantities (amount, mass or volume), or a reagent other than the reference carries a scale. |
DENSITY_MISSING | a liquid, a mass-fraction solution or a line given by volume has no density. |
PRODUCT_EXCEEDS_INPUTS | the product's assay mass is more than every line put in plus every intermediate charged into the step. |
The calculation
The method's equations, constants and worked example.
Equation 1
cumPMI_k = (Σ_edges e into k m_e × cumPMI_from(e) + Σ_own lines of k m) / P_k
the same for each category
| Symbol | Meaning |
|---|---|
cumPMI_k | cumulative PMI of step k |
m_e | assay mass of the intermediate charged on edge e, g |
P_k | assay mass of step k's product, g |
Source 1.
Two readings: source 1 can be read as 'Fragment PMI' (slide 11) read as the fragment's cumulative PMI, as the workbook computes it; catalyst and 'other' lines counted with substrates and reagents (the record's mapping) or as 'Fragment PMI' as the fragment step's own PMI. This project takes 'Fragment PMI' (slide 11) read as the fragment's cumulative PMI, as the workbook computes it; catalyst and 'other' lines counted with substrates and reagents (the record's mapping), because the workbook's cumulative cells (Basic Example D139–D143, through the Summary Table) take each fragment's cumulative PMI; the workbook has no catalyst or 'other' group. Taking 'Fragment PMI' as the fragment step's own PMI would give a different result.
Equation 2
substrates and reagents: reactant, reagent, catalyst and other lines, and edges
solvents: solvent lines
water: water lines
substrates, reagents and solvents: all but water. In the cumulative sum an edge's own mass is not counted again: it enters only as m_e × the from-step's cumulative PMI, category by category. An edge is listed by role as a reactant
| Symbol | Meaning |
|---|---|
category | an ACS GCIPR PMI category |
Source 1.
Two readings: source 1 can be read as 'Fragment PMI' (slide 11) read as the fragment's cumulative PMI, as the workbook computes it; catalyst and 'other' lines counted with substrates and reagents (the record's mapping) or as 'Fragment PMI' as the fragment step's own PMI. This project takes 'Fragment PMI' (slide 11) read as the fragment's cumulative PMI, as the workbook computes it; catalyst and 'other' lines counted with substrates and reagents (the record's mapping), because the workbook's cumulative cells (Basic Example D139–D143, through the Summary Table) take each fragment's cumulative PMI; the workbook has no catalyst or 'other' group. Taking 'Fragment PMI' as the fragment step's own PMI would give a different result.
A definition, not a model: the equation states what the quantity means. A different convention gives a different number.
Worked example
Worked example: one case of rxn-route-pmi@1.1.0, from its inputs through each step to the answer. Values are written as a person writes them; the working carries more digits, so your own figure may differ in the last digit shown.
Inputs
- route[0].id = 1
- route[0].name = A to B
- route[0].lines[0].name = substrate
- route[0].lines[0].role = reactant
- route[0].lines[0].mass = 100 kg
- route[0].lines[1].name = reagents
- route[0].lines[1].role = reagent
- route[0].lines[1].mass = 80 kg
- route[0].lines[2].name = solvents
- route[0].lines[2].role = solvent
- route[0].lines[2].mass = 10 kg
- route[0].lines[3].name = aqueous
- route[0].lines[3].role = water
- route[0].lines[3].mass = 250 kg
- route[0].productAssayMass = 50 kg
- route[1].id = 2
- route[1].name = B to C
- route[1].lines[0].name = reagents
- route[1].lines[0].role = reagent
- route[1].lines[0].mass = 250 kg
- route[1].lines[1].name = solvents
- route[1].lines[1].role = solvent
- route[1].lines[1].mass = 500 kg
- route[1].lines[2].name = aqueous
- route[1].lines[2].role = water
- route[1].lines[2].mass = 1000 kg
- route[1].productAssayMass = 100 kg
- route[1].from[0].step = 1
- route[1].from[0].assayMass = 50 kg
Steps
- c1 = 8.8, from route[0].lines[0].mass, route[0].lines[1].mass, route[0].lines[2].mass, route[0].lines[3].mass, route[0].productAssayMass; by equation 1; gives perStep[0].cumulativeProcessMassIntensity.total.
- carried = 440000 g, from route[1].from[0].assayMass, c1; by equation 1.
- own = 1750000 g, from route[1].lines[0].mass, route[1].lines[1].mass, route[1].lines[2].mass; by a rule this method's record does not list as an equation.
- c2 = 21.9, from carried, own, route[1].productAssayMass; by equation 1; gives routeProcessMassIntensity.total.
The working, as the case writes it:
(50 × 8.8 + 250 + 500 + 1000)/100 = 21.9
Answer
perStep[0].cumulativeProcessMassIntensity.total = 8.8
routeProcessMassIntensity.total = 21.9
Where these values came from: our own exact-arithmetic script and a hand-worked case; the ACS GCIPR tools' Basic Example, hand-worked.
At build the tool returned this answer within the tolerance the file states: every number relative 1e-12 (the water and category PMIs can be 0 and take the near-zero floor); ids, roles, flags, statuses and codes exact.
Sources
ACS GCI Pharmaceutical Roundtable, Convergent PMI tool (convergent-pmi-tool.xlsx), with the Roundtable's 2014 Convergent PMI presentation
Used for: Cumulative process mass intensity of a linear or convergent route. At: equation the cumulative PMI cells of each step's metrics table; the presentation's slide 11, table sheets Instructions, Final Product PMI, Fragment 1–3 PMI, Summary Table rows 139–144 and Basic Example.
Read in full, 10 November 2026
How it is checked
- Level
Checked against a reference.
- Checked against
Our own exact-arithmetic script and a hand-worked case; the source's own worked example, Python standard library decimal and fractions, Python 3.13.18.
- Cases
No case set is linked to this version.
- Not checked
Routes that are not trees; recycling and recovery; a convergent printed example (the ACS workbook prints a linear one only); comparability with published route PMIs, which depend on where a route starts.
Changes to its methods1 change
- 14 November 2026, rxn-route-pmi@1.1.0: In 1.1.0 PRODUCT_EXCEEDS_INPUTS is decided once, on the step's own lines plus every intermediate charged, as the record's equations already counted them. The own lines' role masses are the step's less the intermediates', exactly. No published case's output moved. The record also states that a PMI below 2^-1022 is served as a subnormal double with fewer significant bits, names the workbook's linear Basic Example as the only printed outside check, and labels the 'Fragment PMI' reading and the catalyst mapping.