Classifying an igneous rock from its bulk chemical analysis represents one of the most foundational and recurring procedures in petrological science, yet translating published compositional criteria into software often introduces unintended discrepancies. For volcanic and fine-grained specimens, the International Union of Geological Sciences recommends the total alkali-silica diagram, while CIPW normative mineralogy provides an idealized crystalline distribution, and criteria by Irvine and Baragar separate alkaline, subalkaline, tholeiitic, and calc-alkaline suites. Although these petrological frameworks appear straightforward in textbook summaries, they are difficult to implement consistently across diverse computer programs because each classification relies on hand-drawn boundary vertices, complex sequential oxide allocation procedures, and distinct conventions for resolving multivalent iron. Small departures from original definitions can inadvertently shift marginal samples between distinct lithological fields. To resolve these operational hurdles, researchers Kishan Tiwari and Sujoy Ghosh designed RockMin ID, an open-source, deterministic web platform developed in TypeScript that executes igneous classification, normative mineralogy, and mineral candidate matching entirely on client-side hardware without requiring server-side processing or local script installations.
Geochemists and educators currently depend on several established tools to automate these taxonomic workflows, including scriptable environments like the R-based package GCDkit, Python analytical libraries such as pyrolite, and dedicated desktop programs like GeoPyTool, PetroGraph, and SINCLAS. While these computational packages offer comprehensive plotting capabilities, modeling environments, and extensive trace-element handling, they typically require local installation routines, system dependency configuration, or specific language proficiencies in Python or R. Such technical requirements can present barriers in managed university computing laboratories, during rapid field analysis, or among introductory students who have not mastered scripting environments. Furthermore, existing programs frequently obscure how specific sequential allocation rules or boundary conditions were executed, delivering finished lithological names without exposing intermediate calculations or flagging subtle computational failures. RockMin ID was specifically constructed to address these limitations by prioritizing immediate web accessibility, strict mathematical traceability back to primary peer-reviewed sources, and transparent data-quality diagnostics that openly report underlying computational evidence rather than presenting opaque classification outputs.
Architecturally, the application functions as a single-page progressive web application built with TypeScript and the React interface framework, employing D3 for dynamic graphical rendering and bundling libraries such as jsPDF for report generation. The underlying geochemical engine comprises approximately 6,900 lines of functional code that operate completely decoupled from the user interface through a primary entry point named identifyGeochemicalSample. The software architecture is organized into three distinct operational layers: an input layer that ingests user analyses and optional sample classifications, an engine layer composed of pure deterministic functions, and an output presentation layer. Because all mathematical operations execute locally inside the browser on any device supporting modern JavaScript standards, confidential or unpublished geochemical datasets never leave the local machine during calculation. An extensive mineral and rock reference library derived from the open GEOROC repository is cached locally via service worker routines upon initial page loading, enabling full offline operation in field or laboratory settings without requiring active internet connectivity.
The mathematical pipeline begins with iron speciation, an operational stage where analytical laboratories exhibit wide variation by reporting iron as FeO, Fe2O3, total ferrous iron FeO(T), or total ferric iron Fe2O3(T). The software evaluates these inputs through a single consistent resolver in which directly measured ferrous and ferric concentrations take absolute precedence and are never summed into reported totals. Total iron is expressed as FeO* using the stoichiometry FeO + 0.8998 Fe2O3. When laboratories supply only total iron values, the software calculates normative magnetite by applying the silica-dependent Fe2O3/FeO partitioning ratios documented by Middlemost, explicitly tagging the resulting split as an estimate. In contrast to programs that silently modify iron reporting conventions, RockMin ID preserves the analytical audit trail while allowing advanced users to override speciation ratios via programmatic interfaces, ensuring that petrologists can replicate exact manual calculations across contrasting analytical traditions.
Following iron speciation and volatile-free normalization to 100 weight percent, the calculation engine derives standard CIPW weight norms and cation norms following algorithmic frameworks established by Cross, Iddings, Pirsson, and Washington as refined by Kelsey and Le Maitre. The system sequentially allocates 23 standard normative mineral phases, partitioning minor components such as carbon dioxide into calcite, phosphorus pentoxide into apatite, chromium oxide into chromite, and titanium dioxide into ilmenite, with any remaining titanium allocated to rutile rather than titanite. If silica is insufficient to saturate the assemblage, the program initiates a standardized desilication cascade that progressively converts hypersthene to olivine, albite to nepheline, orthoclase to leucite, diopside to wollastonite and olivine, wollastonite to larnite, and finally leucite to kalsilite. Rather than assigning fixed formula weights to solid-solution series and artificially renormalizing output totals to 100 percent, RockMin ID accumulates phase masses directly from consumed oxides, thereby guaranteeing mass conservation and reporting unrescaled normative totals alongside any residual silica deficits.
Rock classification within the platform follows the total alkali-silica scheme by evaluating normalized major-element compositions against polygon vertices published by Le Bas and colleagues, alongside plutonic equivalents established by Middlemost. A primary root field on the TAS diagram is assigned through point-in-polygon geometry, followed by the rigorous application of IUGS sub-root criteria that distinguish specialized compositional varieties based on silica saturation, potassic enrichment, and normative mineral ratios. These sub-root algorithms govern distinctions between subalkali basalt and alkali basalt, separate basanite from tephrite using normative olivine thresholds, partition sodic rock suites like hawaiite, mugearite, and benmoreite from their potassic equivalents, and categorize peralkaline variants using alumina saturation parameters. To ensure mathematical determinism along shared polygon boundaries, the algorithm evaluates boundary lines systematically, allocating samples situated directly on borders to the first matching field in a fixed sequence, such as assigning an analysis at exactly 52 weight percent silica and 3 weight percent total alkalis to basalt rather than basaltic andesite.
Beyond standard bivariate plots, RockMin ID evaluates Irvine and Baragar polynomial and linear discriminant equations using cation norm values to distinguish tholeiitic from calc-alkaline series and verify alkaline versus subalkaline affinities. Both the alkali-silica boundary polynomial and the Ne’-Ol’-Q’ projection are independently evaluated, and any analytical divergence between these two criteria is directly flagged in the user interface. Because the original published Irvine-Baragar polynomial deviates noticeably from hand-drawn graphical curves at total alkali concentrations exceeding 8 weight percent, the system alerts investigators at run time rather than silently altering mathematical equations. Users can simultaneously project samples across eleven ternary diagrams, including volcanic and plutonic QAPF, AFM, the pyroxene quadrilateral, feldspar compositions, the basalt tetrahedron after Yoder and Tilley, ultramafic triangles, and ACF metamorphic assemblages, giving petrologists multifaceted visual perspectives on bulk compositions.
Mineral identification within the software incorporates structural formula recasting, computing atoms per formula unit across defined oxygen bases to judge tetrahedral occupancy, cation totals, and specific crystallographic site distributions. This structural evaluation successfully discriminates between mineral groups having similar bulk oxide concentrations, such as pyroxene and olivine, where pure Euclidean distance metrics in oxide composition space often fail. Mineral and rock candidate matches are subsequently ranked using a weighted Euclidean distance metric that emphasizes silica and alkali variations in accordance with IUGS taxonomic priorities. The candidate database incorporates 39 curated reference rocks and 52 curated mineral compositions, supplemented by 69 rock and 74 mineral compositional distributions derived from 1,220,607 filtered analyses in the GEOROC database. Calculated candidate match scores are accompanied by comprehensive quality flags highlighting analytical totals deviating outside 95 to 105 weight percent, excessive loss on ignition, ambiguous iron splits, or insufficient analyte coverage.
Software reliability and computational correctness were established through a comprehensive quality assurance framework comprising 345 automated test cases executed automatically via continuous integration pipelines. These automated tests anchor directly to stoichiometric invariants, verifying that pure end-member minerals such as albite calculate strictly to 100 percent albite normative phase, anorthite yields an alumina saturation index of exactly 1.00, and equimolar plagioclase projects precisely to An50. Additional automated validation routines confirm polygon vertex definitions, mass-conservation closures, and Irvine-Baragar polynomial coordinates against independent high-resolution digitizations of original published figures. The complete computational engine achieved 90.9 percent statement coverage and 85.0 percent branch coverage under test-driven validation, with the stable version archived permanently under an open-source MIT license on Zenodo to facilitate rigorous reproduction of scientific workflows.
Empirical validation using natural rock and mineral datasets confirmed the diagnostic accuracy of the application across complex geochemical variations. When tested against 1,239 natural microprobe analyses representing 17 distinct mineral families withheld from training distributions, the algorithm correctly identified the target mineral family as the top candidate in 91.7 percent of cases using curated references alone, improving to 93.1 percent when supported by GEOROC distribution profiles. Across the same whole-rock evaluation set, the median absolute summed difference in calculated CIPW normative mineral fractions between the two packages was just 0.14 weight percent, demonstrating close numerical convergence.
The software demonstrably handles standardized geochemical reference materials, as illustrated by benchmark evaluations of USGS standards BHVO-2, BCR-2, AGV-2, and RGM-1 spanning basaltic through rhyolitic compositions. These tests highlighted practical analytical challenges, such as the classification of reference material AGV-2; distributed historically as an andesite, its 7.25 weight percent total alkali content places it above the standard andesite field boundary, leading the software to assign it strictly to trachyandesite and latite while flagging runner-up scores as ambiguous. Performance benchmarking on consumer laptop hardware demonstrated single-sample classification latencies between 7 and 15 milliseconds, while batch routines processed 1,000 samples within 0.02 seconds for core classification and normative calculations, and an accompanying command-line script evaluated 10,000 samples in 49 seconds. Future enhancements planned by the authors include incorporating trace-element tectonic discriminants, expanded mineral structural groups, and ferric iron estimation routines for pyroxenes and garnets, advancing the tool’s utility across modern geoscience education and research.
Subject of Research: Deterministic browser-based igneous rock classification and normative mineralogy
Article Title: RockMin ID: A browser-based, deterministic platform for igneous rock classification, CIPW normative mineralogy and mineral identification from major-element data
Article References: Tiwari, K., & Ghosh, S. (2026). RockMin ID: A browser-based, deterministic platform for igneous rock classification, CIPW normative mineralogy and mineral identification from major-element data. SoftwareX, 36, Article 103264. https://doi.org/10.1016/j.softx.2026.103264
Image Credits: AI Generated
DOI: 10.1016/j.softx.2026.103264
Keywords: RockMin ID, igneous petrology, geochemical classification, CIPW norm, TAS diagram, mineral identification, major-element geochemistry, Irvine-Baragar criteria, structural formula recasting, GEOROC database, petrological software, TypeScript, mass conservation, geochemical data processing, USGS reference materials, cation norm
News Source: Denise Maddox. (November 25, 2026). Browser Tool Automates Deterministic Igneous Rock Classification and Normative Mineralogy Calculations. Scienmag.



