Identifying an unknown from its Raman spectrum: databases, match scores and mixtures
The usual way to identify an unknown from its Raman spectrum is a library search: software compares your spectrum with reference spectra and ranks them by a match score. This page explains how the scores are computed, what a high score does and does not prove, how to prepare a spectrum before you search, how to handle mixtures, and which free libraries exist.
How library search works
A search program works in three steps.[4][2]
- It puts your spectrum and each library spectrum on the same set of Raman shift values, by interpolation.
- It computes a match score between your spectrum and each library spectrum.
- It lists the library entries in order of decreasing score. The top entry is the “best hit”.
The hit quality index
A spectrum is a list of intensities, one for each Raman shift value. You can treat that list as a vector. The dot product of two spectra X and Y multiplies their intensities point by point and adds up the products: X·Y = Σ XᵢYᵢ.[2]
A common score, well established for spectral matching, divides the squared dot product by the product of the two spectra’s dot products with themselves:[1, eq. 1][5, eq. 1]
X is your (unknown) spectrum and Y is a library spectrum, both on the same Raman shift values.
The HQI runs from 0 to 1. An HQI of 1.0 means that the two vectors are parallel: the spectra are alike. An HQI of 0.0 means that they are perpendicular: the spectra have no resemblance.[1]
In vector terms, X·Y = |X| |Y| cos θ, where θ is the angle between the two vectors, and X·X = |X|². Equation 1 is therefore the squared cosine of that angle:
θ is the angle between the two spectra seen as vectors. A small angle gives an HQI close to 1.
Because the score is built on the dot product, it depends mainly on the positions of the maxima, not on their exact intensities.[1] A band in the wrong place costs more than a band with the wrong height.
Other definitions of the score
Programs do not all compute the same number.
- Squared correlation. One published method, for a portable SERS analyzer, computes equation 1 from the mean-centered unknown spectrum and the library spectrum.[5, sec. 2.8] To mean-center a spectrum, you subtract its average intensity from every point. If both spectra are mean-centered, equation 1 equals r², the square of the Pearson correlation coefficient (equation 3).
- Correlation × 100. One maker (Wasatch Photonics) describes software that computes the Pearson correlation coefficient r between the unknown and each library spectrum, and reports HQI = r × 100.[4]
- Correlation of second derivatives. One published method interpolates the spectra to 4 cm⁻¹ spacing, takes Savitzky–Golay second derivatives, and uses the Pearson r between the derivative spectra as the HQI.[6, Experimental]
- Other measures. Published HQI algorithms also use Euclidean distance, least squares, the sum of absolute differences and the plain vector dot product.[6, Introduction]
x and y are the two spectra, x̄ and ȳ are their average intensities, and ‖·‖ is the length of a vector.
What a high score does not prove
A high score says that two spectra look alike. Two studies by a laboratory of the US Food and Drug Administration (FDA) show what it can miss.
A related but different material
The FDA team measured crystallizing sorbitol (CS) and non-crystallizing sorbitol (NCS). The library held the CS spectrum but not the NCS spectrum.[3]
| Sample measured | Average HQI against the library CS spectrum |
|---|---|
| Crystallizing sorbitol (CS) | 0.991 |
| Non-crystallizing sorbitol (NCS) | 0.966 |
Both values exceed the 0.950 threshold that is “commonly used for material verification”. A sample of the wrong form would pass the check.[3]
Low levels of a contaminant
When the team adulterated CS with low levels (0–5%) of ethylene glycol (EG) and diethylene glycol (DEG), the HQI against the CS library spectrum stayed above 0.950. Two other kinds of model did better:[3]
- SIMCA (soft independent modeling of class analogies) is a classification model. It builds a model of one class of spectra and tests whether a new spectrum belongs to it. It placed CS samples with as little as 2% adulterant outside the CS class.
- PLS (partial least squares) is a quantitative model. It predicts a concentration from the spectrum. It gave a detection limit of 0.9% for EG.
How much contaminant a search can see
A second FDA study measured how sensitive library correlation is to a contaminant in three binary systems.[7]
| Main material | Contaminant | Sensitivity to the contaminant |
|---|---|---|
| Glycerin | Diethylene glycol | 18% |
| Propylene glycol | Diethylene glycol | 32% |
| Lactose | Melamine | 4% |
These levels correlate well with the smallest contaminant content that verification and identification methods could detect. The most important factor was the relative Raman scattering cross section of the contaminant.[7] A contaminant that scatters weakly can hide behind a strong main component.
Thresholds belong to one program
One maker suggests that, for its correlation × 100 score, values above 95 are “typically considered a confident match” and values under 65 “should be met with some skepticism”. The same page says that these lines “might be redrawn”, depending on the application and on the consequences of a wrong match.[4] Such thresholds apply only to the score that they were written for. Use the worked example above to see why.
Prepare the spectrum before searching
A library search compares shapes. Anything that changes the shape of your spectrum, but not the shape of the library spectrum, can lower the score of the right answer.
Remove spikes and background
The standard processing protocols “start with removing cosmic spikes”, the sharp spikes that cosmic-ray particles leave on a CCD.[18, Sec. 3]
Backgrounds with no Raman information “significantly degrade spectral searching results”. Even a small background “may contribute more to the dot product than the Raman bands”.[2]
A conference study of mineral spectra gives a number. Without baseline removal, 8.15% of mineral species were identified correctly. With the best baseline method (airPLS), 48.37% were.[8, Table 1]
The fluorescence and baseline page explains how to remove spikes and background and how to check the result. Use the same treatment for every spectrum that you search.
Calibrate the wavenumber axis
A small error in the Raman shift axis moves every band. In one study, spectra of polymers were matched against copies of themselves shifted along the axis. A shift of up to 3 cm⁻¹ still gave HQI values well above 0.75. A shift of up to 6 cm⁻¹ lowered the HQI to 0.5 for some materials.[1, Fig. 4]
In a second test, an author shifted a polysulfone spectrum by 5 cm⁻¹ on purpose. Searched without baseline correction, it gave results that the author calls “useless”. After baseline correction, the top hit was polysulfone, but with an HQI of only 69.57. With the program’s shift dithering turned on (the program tries small shifts of the axis during the search), the HQI was 96.7.[2]
Check the axis with a standard before you search. The silicon and polystyrene pages give reference positions for this check.
Correct the intensity response
Every spectrometer detects some wavelengths more efficiently than others, and this response differs from unit to unit. A library recorded on another instrument can therefore show different relative band heights.[6, Introduction][9]
- A certified standard. NIST Standard Reference Material (SRM) 2241 is a chromium-doped (0.02 mol% Cr₂O₃) sodium borosilicate glass. When excited at 785 nm it emits a broad luminescence spectrum of certified shape. With it, you can determine the intensity-response correction of your own system. The certified shape covers 200–3500 cm⁻¹ Raman shift, for measurements at 20–25 °C.[10]
- Library transfer between instruments. In an FDA study of five 785 nm spectrometers from different makers, spectra could be compared reliably with one master library only after Raman shift correction, intensity correction and resolution matching.[9]
- A side effect. Intensity correction raises weak regions, and it raises their noise too. In one example, the correction raised the correlation with the library spectrum from 0.59 to 0.96. But the magnified noise in the weak high-shift region spread the HQI values of repeated scans. When the region 2800–3200 cm⁻¹ was left out, the standard deviation of the HQI fell from 0.012 to 0.0004, and the mean HQI rose from 0.972 to 0.989.[6, Fig. 1]
Mixtures
Correlation matching assumes that your sample is pure, or mainly one compound, like the library spectra. A sample with two or more strong components needs a mixture analysis instead.[4]
A high score for a mixture
An author added the library spectra of two similar polymers, polyethylene terephthalate (PET) and polybutylene terephthalate (PBT), on a computer to make a synthetic mixture spectrum. The author then searched it.[2]
- One-component search. The top hit was PET, with an HQI of 99.58. Yet an expanded overlay showed places where the query and the PET spectrum differed.
- Two-component search. The program reported PET and PBT, with contributions to the spectrum of 0.82 and 0.18. The final score was 99.95.
The values 0.82 and 0.18 are shares of the spectrum, not the composition of a real sample. The example still shows the key point: a score above 99 did not reveal a second component that made up almost a fifth of the spectrum.[2]
How to find a second component
- Run a two-component (multi-component) search, if your program has one, whenever a single hit leaves bands unexplained.
- Subtract the best hit and look at the residual. Scale the best library spectrum to your spectrum and subtract it. Bands that remain belong to something else. Search the residual, or look up its bands in the Raman peak table.
- Map the sample. A Raman map records a spectrum at many points. Each point often holds fewer components than the whole sample. See Raman microscopy.
Free and open Raman libraries
The sizes below are as reported by the source named, on the date given. Libraries grow, so check the current figure on each site.
| Library | What it holds | Size, as reported | Source |
|---|---|---|---|
| RRUFF | Minerals | More than 14,000 entries with high-resolution Raman spectra (2019) | [11, sec. 3][12] |
| Raman Open Database (ROD) | High-quality uncorrected spectra; fully open; linked to the Crystallography Open Database | More than 1,100 entries for over 500 phases (2019) | [11] |
| Computational Raman Database | Spectra calculated from first principles, not measured | 5,099 materials (2023) | [13] |
| NASA Ames Ramdb | Amino acids, analogs, carbon allotropes, mineral standards, PAHs (polycyclic aromatic hydrocarbons), planetary studies | No count in our sources | [14] |
| SLoPP and SLoPP-E | Microplastics; SLoPP-E holds plastics aged in the environment | SLoPP 148 spectra; SLoPP-E 113 spectra (2020) | [15] |
| Open Specy | Microplastics; library and R package | Over 40,000 open Raman and FTIR spectra combined (2025) | [16] |
| ramanbiolib | Biological molecules; Python search library; GPL-3.0 licence | 140 components (GitHub, November 2026) | [17] |
A few notes on these libraries:
- SLoPP and SLoPP-E. In their authors’ tests, the two libraries were used together with commercial libraries of over 24,000 spectra. 63% of the top 5 matches across all particles came from SLoPP and SLoPP-E.[15] A small library that matches your sample class can matter more than a large general one.
- The Computational Raman Database. Calculated spectra can suggest candidates. Confirm a candidate with a measured spectrum.
Smaller collections
The ROD paper lists these smaller free collections, as of 2019. Their links may have changed since.[11, sec. 3]
| Collection | Content (as listed in 2019) |
|---|---|
| Handbook of Raman Spectra for Geology (ENS Lyon) | 73 mineral species |
| Romanian Database of Raman Spectroscopy | 72 mineral species, carbonates and silicates only |
| Raman Spectroscopic Library of Natural and Synthetic Pigments (UCL) | 64 pigments |
| Raman Spectra of Carbohydrates | 26 spectra |
| Mineral Raman spectra of Parma University | A few hundred entries |
| Infrared and Raman Users Group (IRUG) | 303 Raman spectra of different material classes |
| WURM project | 644 calculated mineral spectra |
Commercial libraries can be much larger: the microplastics study above used commercial libraries of over 24,000 spectra.[15] Makers publish their own current counts, which this page has not checked.
Check the library entry
A library entry is a measurement too, and it can be wrong. The authors of the Raman Open Database found poor-quality spectra in some existing databases, and some spectra that seem to come from samples with more than one phase.[11, sec. 3]
One example: the RRUFF spectra filed as mackinawite (R060388), pyroxferroite (R141080) and clinoferrosilite (R141085) are similar to one another. Several authors have proposed that they could equally well correspond to hematite (R060190).[11, sec. 3]
When a hit matters, open the library entry and read its notes:
- How was the sample identified? Look for an independent check, such as X-ray diffraction (XRD).
- Which laser wavelength and instrument recorded the spectrum?
- Was the library spectrum baseline-corrected? Was yours treated the same way?
When search is not enough
Even with good preprocessing, library search has limits. In the mineral study above, species were identified correctly less than 50% of the time, even with pure mineral spectra and high-quality baseline removal.[8]
- Interpret the bands. Look up the positions of the strong bands in the Raman peak table. Ask which functional groups and which kinds of compound can explain them. One introductory article shows how search software and functional-group assignment can work together.[2]
- Use chemical sense. A hit must fit what you know about the sample: where it came from, its color, its state, and what else it contains.
- Confirm with another method, such as infrared spectroscopy (see Raman versus infrared) or, for crystalline solids, XRD.
Checklist
- Note the laser wavelength, the grating and the date of the last calibration.
- Check the axis with a standard. See Prepare the spectrum before searching.
- Remove cosmic-ray spikes.
- Remove the background, and record the method and its parameters. See the fluorescence and baseline page.
- Choose libraries that match your sample class. See Free and open Raman libraries.
- Search the full range. Then search again with empty or noisy regions left out.
- Read the top five hits, not only the first.
- Overlay each hit on your spectrum and look for bands that it does not explain.
- If bands are left over, run a two-component search or search the residual. See Mixtures.
- Read the notes of the library entry. See Check the library entry.
- Confirm the answer with an independent method.
- Report the score, its definition, the program and its version, and the library and its version.
Sources
- J. S. Böke, J. Popp and C. Krafft. Optical photothermal infrared spectroscopy with simultaneously acquired Raman spectroscopy for two-dimensional microplastic identification. Scientific Reports 12, 18785 (2022). DOI 10.1038/s41598-022-23318-2. europepmc.org/article/PMC/PMC9637219. Open access.
- F. Adar. Introduction to Interpretation of Raman Spectra Using Database Searching and Functional Group Detection and Identification. Spectroscopy 31(7), 1 July 2016 (2016). www.spectroscopyonline.com/view/introduction-interpretation-raman-spectra-using-data-base-searching-and-functional-group-detection-a. Magazine column. The examples use one commercial search program.
- C. M. Gryniewicz-Ruzicka, J. D. Rodriguez, S. Arzhantsev, L. F. Buhse and J. F. Kauffman. Libraries, classifiers, and quantifiers: a comparison of chemometric methods for the analysis of Raman spectra of contaminated pharmaceutical materials. Journal of Pharmaceutical and Biomedical Analysis 61, 191–198 (2012). DOI 10.1016/j.jpba.2011.12.002. pubmed.ncbi.nlm.nih.gov/22206890/. Values on this page are from the abstract (PMID 22206890).
- Wasatch Photonics. Introduction to Raman Library Matching. wasatchphotonics.com. wasatchphotonics.com/raman-library-matching/. One maker’s web page, read 28 November 2026.
- S. Rizzo, Y. Weesepoel, S. Erasmus, J. Sinkeldam, A. L. Piccinelli and S. van Ruth. A multi-analyte screening method for the rapid detection of illicit adulterants in dietary supplements using a portable SERS analyzer. Heliyon 9(8), e18509 (2023). DOI 10.1016/j.heliyon.2023.e18509. europepmc.org/article/PMC/PMC10382631.
- J. Zhao, K. Frano and J. Zhou. Reverse Intensity Correction for Raman Spectral Library Search. Applied Spectroscopy 71(8), 1876–1883 (2017). DOI 10.1177/0003702817694381. europepmc.org/article/PMC/PMC5542133. Open access (CC BY-NC 4.0).
- J. D. Rodriguez, B. J. Westenberger, L. F. Buhse and J. F. Kauffman. Quantitative evaluation of the sensitivity of library-based Raman spectral correlation methods. Analytical Chemistry 83(11), 4061–4067 (2011). DOI 10.1021/ac200040b. pubmed.ncbi.nlm.nih.gov/21548558/. Values on this page are from the abstract (PMID 21548558).
- C. Carey, M. D. Dyar, T. F. Boucher, S. Giguere, C. M. Hoff, L. B. Breitenfeld, M. Parente, T. J. Tague Jr., P. Wang and S. Mahadevan. Baseline Removal in Raman Spectroscopy: Optimization Techniques. 46th Lunar and Planetary Science Conference Abstract 2464 (2015). www.hou.usra.edu/meetings/lpsc2015/pdf/2464.pdf. Conference abstract; the authors call the results preliminary.
- J. D. Rodriguez, B. J. Westenberger, L. F. Buhse and J. F. Kauffman. Standardization of Raman spectra for transfer of spectral libraries across different instruments. Analyst 136(20), 4232–4240 (2011). DOI 10.1039/c1an15636e. pubmed.ncbi.nlm.nih.gov/21874199/.
- National Institute of Standards and Technology (NIST). Certificate of Analysis, Standard Reference Material 2241: Relative Intensity Correction Standard for Raman Spectroscopy: 785 nm Excitation. NIST date of issue 7 January 2022 (2022). tsapps.nist.gov/srmext/certificates/2241.pdf. Check the current certificate and its period of validity before use.
- Y. El Mendili, A. Vaitkus, A. Merkys, S. Gražulis et al. Raman Open Database: first interconnected Raman–X-ray diffraction open-access resource for material identification. Journal of Applied Crystallography 52(3), 618–625 (2019). DOI 10.1107/S1600576719004229. europepmc.org/article/PMC/PMC6557180. Open access (CC BY).
- B. Lafuente, R. T. Downs, H. Yang and N. Stone. The power of databases: the RRUFF project. Highlights in Mineralogical Crystallography (De Gruyter) pp. 1–30 (2015). DOI 10.1515/9783110417104-003. The usual citation for the RRUFF database.
- M. Bagheri and H.-P. Komsa. High-throughput computation of Raman spectra from first principles. Scientific Data 10, 80 (2023). DOI 10.1038/s41597-023-01988-5. europepmc.org/article/PMC/PMC9908888.
- A. L. Mattioda, L. Gavilan, C. L. Ricketts, P. K. Najeeb, A. Ricca and C. Boersma. The NASA Raman spectroscopic database: Ramdb version 1.00. Icarus 408, 115769 (2024). DOI 10.1016/j.icarus.2023.115769. www.astrochemistry.org/ramdb/. Categories are from the database home page, read 28 November 2026.
- K. Munno, H. De Frond, B. O’Donnell and C. M. Rochman. Increasing the Accessibility for Characterizing Microplastics: Introducing New Application-Based and Spectral Libraries of Plastic Particles (SLoPP and SLoPP-E). Analytical Chemistry 92(3), 2443–2451 (2020). DOI 10.1021/acs.analchem.9b03626. pubmed.ncbi.nlm.nih.gov/31939281/.
- W. Cowger, A. Karapetrova, C. Lincoln et al. Open Specy 1.0: Automated (Hyper)spectroscopy for Microplastics. Analytical Chemistry 97(32), 17345–17356 (2025). DOI 10.1021/acs.analchem.5c00962. pubmed.ncbi.nlm.nih.gov/40788199/.
- M. Terán, J. J. Ruiz, P. Loza-Alvarez, D. Masip and D. Merino. Open Raman spectral library for biomolecule identification. Chemometrics and Intelligent Laboratory Systems 264, 105476 (2025). DOI 10.1016/j.chemolab.2025.105476. github.com/mteranm/ramanbiolib. Component count and licence from the GitHub repository, read 28 November 2026.
- R. T. Vulchi, V. Morgunov, R. Junjuri and T. Bocklitz. Artifacts and Anomalies in Raman Spectroscopy: A Review on Origins and Correction Procedures. Molecules 29(19), 4748 (2024). DOI 10.3390/molecules29194748. europepmc.org/article/PMC/PMC11478279. Open access.