Predicting UV-Vis Spectra with TDDFT

by Isaiah Sippel · August 25, 2026

Note from Ari: this post is the result of a project completed during Isaiah's summer internship. Isaiah helped us find a lot of rough edges in our initial TDDFT implementation, and we're excited to be releasing this modeling work as we move TDDFT to public general access. Thanks, Isaiah!


Designing new dyes, colorants, pigments, and translucent materials is traditionally a guess-and-check process involving costly experiments. With predictive tooling, chemists can find better compounds by only making compounds with good in silico properties before making them in real life.

In this study, we explore using time-dependent density-functional theory (TDDFT) to predict UV-Vis spectra. Specifically, we look at the wavelength of a sample's peak absorbance (λmax). Although TDDFT isn't naïvely a perfect predictor of UV-Vis spectra, we show that it recreates meaningful rankings and captures trends across classes of compounds, enabling its use in prospective contexts.

Experimental Data

For this work, our reference data comes from the PhotochemCAD Common Compounds Spectra database, reported in Taniguchi and Lindsey 2017.

For preliminary testing, a subset of 19 azo dyes was used:

10 example azo dyes

All 19 azo dyes used can be found in Appendix A.

For subsequent testing, we sampled 100 random compounds from the PhotochemCAD database, excluding metal complexes and compounds that were measured in non-neutral solutions. These spanned the chemical classes listed in Appendix B.

10 example molecules from PhotochemCAD

HOMO–LUMO Gaps as a TDDFT Surrogate

HOMO–LUMO gaps are sometimes used as a simple predictor of λmax. To evaluate this approach, we ran the following calculations on each of our 19 azo dyes:

Tautomer searches failed for Ponceau S and Evans Blue, leaving 17 dyes for comparison.

HOMO–LUMO gaps vs. experimental max.
wavelength

nPearson RR2Spearman ρ
170.5060.2560.255

HOMO–LUMO gaps show a modest linear association with experimental λmax (R2=0.26) but weak rank-order agreement (Spearman ρ=−0.25), indicating limited value as a ranking surrogate.

A Note About Protonation States

When using TDDFT to predict UV-Vis spectra, it's important to make sure you're modeling the appropriate structures. The first thing to check is protonation state; this can explored with macroscopic pKa calculations or, if a compound's charge state is already known, tautomer searches. The absorption of some dyes is heavily dependent on their tautomerism, e.g. Orange G:

Orange G tautomers

Predicted spectra of two orange G tautomers

Choosing a Functional

We began our exploration of time-dependent density-functional theory (TDDFT) by testing a range of functionals and basis sets on our set of azo dyes. We performed these calculations both in solvent and in the gas phase to determine which methods could best reproduce experimental trends in λmax.

For this testing and all subsequent work, we ran the following calculations on each dye:

The tautomer search and the solvent TDDFT single-points were run in the solvent listed as the solvent of measurement in the PhotochemCAD database for each dye.

Note from the editor: we think that the second step here is overkill. Rowan's tautomer search can be configured to use an desired level of theory for refinement, and we think that UMA Small 1.2 is sufficient for obtaining reasonable geometries of small dye molecules.

Acid black

Predicted and experimental UV-Vis spectra of acid
black

Running this pipeline on a 10 compound subset of our azo dyes with different TDDFT levels of theory gave the following results:

Scatterplot showing accuracy of different levels of theory

Level of theoryPhasenSpearman ρMAERMSE
B3LYP/pcseg-2gas100.590.8471.9181.30
B3LYP/pcseg-2solvent100.650.8263.5172.24
B3LYP/aug-pcseg-2gas100.590.8470.6779.97
B3LYP/aug-pcseg-2solvent100.650.8261.9870.61
CAMB3LYP/pcseg-2gas100.920.9893.9998.20
CAMB3LYP/pcseg-2solvent100.900.9489.7494.59
CAMB3LYP/aug-pcseg-2gas100.910.9892.0896.29
CAMB3LYP/aug-pcseg-2solvent100.900.9487.7792.63
ωB97X-D3/def2-SVPgas100.930.96121.01124.93
ωB97X-D3/def2-SVPsolvent100.930.98117.62121.87
ωB97X-D3/def2-TZVP(-f)gas100.920.98111.35115.46
ωB97X-D3/def2-TZVP(-f)solvent100.920.95107.38111.93
ωB97X-D3/def2-TZVPDgas100.920.98109.98114.14
ωB97X-D3/def2-TZVPDsolvent100.920.95105.78110.38
ωB97X-D3/pcseg-2gas100.930.98111.34115.57
ωB97X-D3/pcseg-2solvent100.920.95107.16111.82

All of these functionals struggled to predict absolute λmax values, but they all captured some relative trend between dyes. The biggest jump in ranking accuracy seems to come from using a range-separated hybrid (CAMB3LYP or ωB97X-D3/pcseg-2) instead of a pure hybrid (B3LYP).

Consistent with standard intuition, using range-separated hybrid functionals and increasing the basis set size increased the compute time, though not prohibitively so (thanks to their efficient implementation in GPU4PySCF).

Bar chart showing speed of different levels of theory

Choosing a Basis Set

We next wanted to examine the effect of basis set choice on our full set of azo dyes. We ran these calculations with the ωB97X-D3 functional.

These tests show little to no effect of basis set choice. Accuracy on this set of compounds does not appear to be limited by our choice of basis set.

Scatterplot showing accuracy of different basis
sets

Basis setPhasenR2MAERMSE
def2-SVPgas180.43149.82156.33
def2-SVPsolvent180.59149.70154.83
def2-TZVPgas180.55136.52142.14
def2-TZVPsolvent180.60138.69143.94
def2-TZVP(-f)gas180.55136.33141.95
def2-TZVP(-f)solvent180.59138.60143.87
def2-TZVPDgas180.55134.78140.51
def2-TZVPDsolvent180.59136.90142.25
def2-TZVPPDgas180.55134.73140.47
def2-TZVPPDsolvent180.59136.83142.19
aug-cc-pVTZgas160.56135.97141.69
aug-cc-pVTZsolvent160.60137.23142.70
def2-QZVPgas180.55135.20140.95
def2-QZVPsolvent190.66138.08143.20
def2-QZVPDgas180.55134.40140.16
def2-QZVPDsolvent180.59136.55141.93

Fitting to Experimental Data

To correct the seeming consistent underprediction of TDDFT, we thought it be interesting to first run a set of predictions on a "train set" that we would use to derive a linear fit (of the form y=mx+b) and then evaluate the performance on a separate "test set."

We performed a Butina split on 100 compounds sampled from the PhotochemCAD database using Chalcedon with default settings, yielding two sets with 50 compounds each. TDDFT single-points were run using PBE0, B3LYP, and CAM-B3LYP; all functionals were run with the def2-TZVPD basis set.

Train Set

Train set scatterplot Train set
scatterplot, corrected

MethodPhasenR2MAERMSEMAE (fit)RMSE (fit)
B3LYPgas500.756360.0585.8951.1074.40
B3LYPsolvent500.759561.8388.1050.5573.90
PBE0gas500.756060.1785.5752.3474.44
PBE0solvent500.784663.4889.0447.2969.94
CAMB3LYPgas500.859968.3790.8637.9356.40
CAMB3LYPsolvent500.854070.0592.0937.9757.58

Here are the linear fits learned from the train set:

MethodPhasenSlopeIntercept (nm)
B3LYPgas501.3285−78.3820
B3LYPsolvent501.3366−72.2248
PBE0gas501.2318−39.4870
PBE0solvent501.3811−77.6932
CAMB3LYPgas501.4841−89.3805
CAMB3LYPsolvent501.5009−94.2435

Test Set

On held-out data, the fit clearly improves both CAMB3LYP variants, modestly improves solvent PBE0, is mixed for solvent B3LYP, and worsens the two gas-phase B3LYP/PBE0 models. This makes it seem like fits can be helpful within series but don't address a universal shortcoming in TDDFT.

Test set scatterplot, corrected

MethodPhasenR2MAERMSEMAE (fit)RMSE (fit)
B3LYPgas480.428584.69112.5995.65129.97
B3LYPsolvent480.549676.48102.4477.56100.41
PBE0gas480.452482.11109.9787.75114.57
PBE0solvent480.535178.77106.7976.25101.34
CAMB3LYPgas480.542787.52115.2671.6699.45
CAMB3LYPsolvent480.584586.46114.6364.8494.83

Limitations

This work doesn't do any conformer weighting. In cases where multiple low-lying conformers are found, each should be modeled separately and their UV-Vis spectra should be combined in proportion with their Boltzmann weights.

Additionally, this work only considered λmax; a more thorough study would look at the accuracy of entire predicted spectra.

For more information and other nuances, read our TDDFT documentation.

Conclusion

TDDFT can predict trends that match experimental values, but it's still not an ideal tool; it's not accurate enough on its own to be treated as a one-shot spectra predictor the way IR and NMR spectra prediction tools can be. Instead, it's important to use TDDFT as a tool to predict relative shifts; there are a number of knobs that control accuracy, and it's recommended to evaluate its effectiveness against similar compounds before employing it in a prospective setting.

We're excited to pursue this problem further and hope to encode best practices into our workflows to help make UV-Vis prediction more robust, accurate, and scalable. If you're interested in predicting molecular color or other excited-state properties with Rowan tools, please get in touch with our team at contact@rowansci.com.

Appendix

Appendix A: Selected 19 Azo Dyes

NameSMILESλmaxSolventIn set of 10?
Azobenzenec1ccc(/N=N/c2ccccc2)cc1319BenzeneYes
Acid Red 2CN(C)C1=CC=C(C=C1)/N=N/C2=CC=CC=C2C(=O)O430WaterYes
Methyl OrangeCN(C)c1ccc(/N=N/c2ccc(S(=O)(=O)O)cc2)cc1466WaterYes
Orange GOc1ccc2cc(cc(c2c1\N=N\c3ccccc3)S(=O)(=O)O)S(=O)(=O)O478WaterYes
Orange IIO=S(=O)(O)c1ccc(/N=N/c2ccc3ccccc3c2O)cc1486WaterYes
Acid Red 88C1=CC=C2C(=C1)C=CC(=C2/N=N/C3=CC=C(C4=CC=CC=C43)S(=O)(=O)O)O503WaterYes
Sudan IOc1ccc2ccccc2c1/N=N/c1ccccc1481EthanolYes
Sudan IIOc1ccc2ccccc2c1/N=N/c1ccc(C)cc1C498EthanolYes
Acid Violet 3Nc1ccc(/N=N/c2c(O)c3cc(S(=O)(=O)O)cc(S(=O)(=O)O)c3cc2O)cc1555WaterYes
Acid Red 1CC(Nc(cc(S(=O)(O)=O)c1)c2c1cc(S(=O)(O)=O)c(/N=N/c3ccccc3)c2O)=O530WaterNo
Acid Red 14O=S(=O)(O)c1ccc(/N=N/c2cc(S(=O)(=O)O)c3ccccc3c2O)c2ccccc12512WaterNo
Acid Blue 92C1=CC=C(C=C1)NC2=C3C(=C(C=C2)/N=N/C4=C5C(=CC(=C4)S(=O)(=O)O)C=C(C=C5O)S(=O)(=O)O)C=CC=C3S(=O)(=O)O563WaterNo
Sudan IIIOc1ccc2ccccc2c1/N=N/c1ccc(/N=N/c2ccccc2)cc1504EthanolYes
Sudan IVOc1ccc2ccccc2c1/N=N/c1ccc(/N=N/c2ccccc2C)cc1C518EthanolNo
Acid Black 1Nc1c(/N=N/c2ccc(cc2)N+[O-])c(cc3cc(c(/N=N/c4ccccc4)c(O)c13)S(=O)(=O)O)S(=O)(=O)O619WaterNo
Ponceau SOS(C(C=C1)=CC=C1/N=N/C2=CC=C(/N=N/C3=C(O)C(S(=O)(=O)O)=CC4=C3C=CC(S(=O)(=O)O)=C4)C(S(=O)(=O)O)=C2)(=O)=O513WaterNo
Congo RedC1=CC=C2C(=C1)C(=CC(=C2N)/N=N/C3=CC=C(C=C3)C4=CC=C(C=C4)/N=N/C5=C(C6=CC=CC=C6C(=C5)S(=O)(=O)O)N)S(=O)(=O)O483WaterNo
Benzopurpurin 4BCC1=C(C=CC(=C1)C2=CC(=C(C=C2)/N=N/C3=C(C4=CC=CC=C4C(=C3)S(=O)(=O)O)N)C)/N=N/C5=C(C6=CC=CC=C6C(=C5)S(=O)(=O)O)N497WaterNo
Evans BlueCC1=C(C=CC(=C1)C2=CC(=C(C=C2)/N=N/C3=C(C4=C(C=C3)C(=CC(=C4N)S(=O)(=O)O)S(=O)(=O)O)O)C)/N=N/C5=C(C6=C(C=C5)C(=CC(=C6N)S(=O)(=O)O)S(=O)(=O)O)O606WaterNo

Appendix B: Classes of Final Compounds

These classes do not represent the clusters, just the composition of what types of molecules were in the final test and train sets.

ClassTestTrainTotal
Aromatic hydrocarbons11112
Acridines8311
Heterocycles4711
Azo dyes358
Oligophenylenes347
Polycyclic aromatic hydrocarbons617
Biomolecules347
Quinones606
Xanthenes505
Cyanine dyes145
Arylmethane dyes134
Coumarins224
Porphyrins213
Polyenes/polyynes123
Chlorins/bacteriochlorins202
Miscellaneous dyes112
Oligopyrroles101
Perylenes011
Phthalocyanines011
Total5050100
Banner background image

Start running calculations in minutes!

Our platform lets you submit, view, analyze, and share calculations using cutting-edge methods trusted by hundreds of leading scientists. We give every new user 500 free credits to start, plus more every week. Making an account and running your first calculation takes only seconds: start using Rowan today!

Start computing →

What to read next

Predicting UV-Vis Spectra with TDDFT

Predicting UV-Vis Spectra with TDDFT

Comparing the experimental and predicted UV-Vis spectra of azo dyes and other compounds.
Aug 25, 2026 · Isaiah Sippel
Tricky Cases in Protein Preparation

Tricky Cases in Protein Preparation

How we're using Boltz-2 inpainting to improve protein preparation.
Aug 20, 2026 · Ari Wagen
Running a Full FEP Campaign in Python with Rowan

Running a Full FEP Campaign in Python with Rowan

Learn how to run an iterative FEP campaign programmatically with Rowan's Python SDK.
Aug 19, 2026 · Eli Mann
Phonons

Phonons

band structures and density of states; material waves; sound, light, and heat
Aug 18, 2026 · Raphael Stone and Jonathon Vandezande
Binder Optimization with LLMs and Specialized Models

Binder Optimization with LLMs and Specialized Models

Testing LLMs and specialized models on generating strongly binding ligands.
Aug 17, 2026 · Ishaan Ganti
Performance Optimization

Performance Optimization

or, how to get more Rowan for your dollar
Aug 10, 2026 · Corin Wagen and Eli Mann
Hits From a Hackathon

Hits From a Hackathon

How certain schemes to identify TBXT-binding compounds have succeeded.
Aug 7, 2026 · Kat Yenko, Corin Wagen, Ari Wagen, and Derek Alia
Testing Different Pose-Ranking Methods for RBFE Calculations

Testing Different Pose-Ranking Methods for RBFE Calculations

Benchmarking how well Rowan's analogue-docking pose scoring picks the best starting structure for RBFE, and how much a ranking miss actually matters downstream.
Aug 6, 2026 · Zachary Fried
LogP, API Key Budgets, and a User Survey

LogP, API Key Budgets, and a User Survey

the golden mean of logP; three approaches to predicting logP; API key budgets for low-trust delegation; a user survey and some blog posts
Aug 5, 2026 · Nick Casetti, Ari Wagen, Spencer Schneider, and Corin Wagen
How to Find Conformers

How to Find Conformers

A conceptual overview of conformer-generation and conformer-search methodology.
Aug 3, 2026 · Nicholas Casetti