Clear Sky Science · en

Bio-inspired chemometric methods for simultaneous UV spectrophotometric determination of molnupiravir, nirmatrelvir, and favipiravir in pharmaceutical formulations and environmental samples

· Back to index

Why testing COVID-19 pills and water matters

As COVID-19 treatments like molnupiravir, nirmatrelvir, and favipiravir have become more common, a new challenge has emerged: how to quickly, cheaply, and safely check that these medicines are made correctly and that leftover drug residues are not polluting water supplies. Traditional lab techniques can be accurate but are often slow, expensive, and generate large volumes of chemical waste. This study introduces a greener, more affordable way to measure all three drugs at once, using simple light-based measurements and smart computer algorithms instead of heavy-duty machinery.

Three antiviral drugs, one growing analytical problem

Molnupiravir, nirmatrelvir (the key component of Paxlovid), and favipiravir attack the coronavirus in different ways and are sometimes studied together as combination therapies. They can also appear together as contaminants in hospital wastewater. Quality-control labs need to test multiple products sharing the same manufacturing lines to avoid cross-contamination, while environmental scientists want to track how much of these drugs end up in water. Yet, before this work, there was no simple ultraviolet (UV) light-based method that could determine all three drugs at the same time in a single run. Most existing approaches relied on advanced liquid chromatography and mass spectrometry, which require costly instruments, trained specialists, and lots of organic solvents.

Turning overlapping light signals into clear answers

UV spectrophotometry, which measures how much light a sample absorbs, is cheap, fast, and widely available. But the three antivirals absorb UV light in very similar regions, and their spectral curves overlap heavily. This makes it impossible to simply “read off” each drug’s amount from the raw signal. The authors solved this by combining UV measurements with chemometrics, a kind of data-driven pattern recognition. They compared two bio-inspired computer search strategies—genetic algorithms, loosely modeled on evolution, and the firefly algorithm, inspired by how fireflies move toward brighter flashes—to pick out the most informative wavelengths. These carefully chosen wavelengths were then processed using partial least squares regression, which can tease apart the contributions of each drug even when their signals are tangled together.

Fireflies versus genetics: which algorithm wins?

To build and test their models, the researchers prepared dozens of mixtures with known amounts of each drug, covering realistic concentration ranges. They trained both genetic-algorithm-based models and firefly-based models, then checked how well each could predict drug levels in new, unseen mixtures. The firefly approach produced simpler models that used fewer wavelengths, needed fewer internal parameters, and still achieved better predictive accuracy. For all three antivirals, the firefly models reached very high correlation between predicted and true values (R² above 0.996) and low prediction errors. Residual plots—showing how far predictions deviate from the truth—were tighter and more randomly scattered for the firefly method, indicating more reliable behavior and fewer hidden biases.

Real tablets, real water, and a greener footprint

Once the firefly-based method was tuned and validated according to international guidelines, the team applied it to real-world samples. They analyzed commercial products containing each of the three antivirals and found that their results matched those from a published high-performance liquid chromatography method, both in accuracy and precision. They also spiked tap water with known amounts of the drugs and recovered between about 95% and 104% of what they had added, showing that the approach works in an environmental setting after a simple extraction step. To judge its environmental impact, the authors used several “green” scoring systems that consider solvent use, energy demand, waste, practicality, and overall sustainability. Across multiple independent metrics, the method scored in the “good” to “excellent” range, largely because it avoids continuous streams of organic solvent and uses low-powered, widely available equipment.

Figure 1
Figure 1.

What this means for labs and the environment

This work shows that a basic UV spectrophotometer, when combined with cleverly chosen wavelengths and bio-inspired data processing, can rival more complex instruments for monitoring important COVID-19 drugs in both medicines and water. The firefly-based approach delivers accurate measurements, keeps costs down, and reduces chemical waste, making it attractive for routine quality control and for resource-limited settings where advanced chromatography and mass spectrometry are out of reach. In everyday terms, the study demonstrates that with smart algorithms, simple light measurements can help ensure that antiviral pills are made correctly and that their leftovers do not silently build up in our environment.

Figure 2
Figure 2.

Citation: Abdelzaher, A.M., Al kamaly, O. & Rahman, M.A.A. Bio-inspired chemometric methods for simultaneous UV spectrophotometric determination of molnupiravir, nirmatrelvir, and favipiravir in pharmaceutical formulations and environmental samples. Sci Rep 16, 12590 (2026). https://doi.org/10.1038/s41598-026-49288-3

Keywords: COVID-19 antivirals, UV spectrophotometry, chemometric analysis, green analytical chemistry, environmental monitoring