[[default.rules]]
format.preset = "keyword"
patterns = [
    # Brace delimiters, {}
    { regexp = '({).*(})'},
    # Constraints, `B`ond, `A`ngle, `D`ihedral, X, Y, Z
    # Specifically matches the `{` character, the `[BADXYZ]` character,
    # the `C` character, and the `}` character
    { regexp = '\s(?:({) ([BADXYZ]) )(?:[-\+]?[\.0-9]+(?:[eEdD][-\+]?[\.0-9]+)? ?)+(?: (C) (}))\s' },
    # xTB methods
    { regexp = '\b((?:Native-)?GFN[012]-xTB)\s', caseSensitive = false },
    # NDO Methods (ZNNDO, ZINDO, etc.)
    { regexp = '\b(Z[IN][ND]DO\/[12S])\s', caseSensitive = false },
    # SCF and Opt convergence criteria
    { regexp = '\b((?:Sloppy|Loose|Medium|Strong|Tight|VeryTight|Extreme){1}(?:SCF|Opt){1})\s', caseSensitive = false },
    # RHF, UHF, ROHF, RKS, UKS, ROKS
    { regexp = '\b((?:R|U|RO){1}(?:HF|KS){1})\s', caseSensitive = false },
    # Print levels
    { regexp = '\b((?:Mini|Small|Normal|Large){1}Print)\s', caseSensitive = false },
    # DEFGRIDn
    { regexp = '\b(DEFGRID[123]{1})\s', caseSensitive = false },
    # DKHn
    { regexp = '\b(DKH[12]{1})\s', caseSensitive = false },
    # PNO settings
    { regexp = '\b((?:Loose|Normal|Tight){1}PNO)\s', caseSensitive = false },
    # Avoid capturing RI-<method>
    { regexp = '\b(RI){1}\h', caseSensitive = false},
    # Dn dispersion corrections
    { regexp = '\b(D[34](?:BJ|ZERO|0|TZ)?)\s', caseSensitive = false },
    # VV10 NL correction
    { regexp = '\b((?:SC)?NL)\s', caseSensitive = false },
    # SCFCONV<n>
    { regexp = '\b(SCFCONV[0-9]+)\s', caseSensitive = false},
    # Spin-Orbit Coupling
    { regexp = '\b((?:RI-)?SOMF(?:\([14]X\))?)\s', caseSensitive = false },
    { regexp = '\b(VEff(?:\(-2X\))?-SOC)\s', caseSensitive = false },
    # Storage formats for numbers
    { regexp = '\b((?:U?C)?(?:Float|Double))\s', caseSensitive = false },
    # Population analysis
    { regexp = '\b(ChElPG(?:Large)?)\s', caseSensitive = false },
    { regexp = '\b((?:No)?Hirshfeld)\s', caseSensitive = false },
    { regexp = '\b((?:No)?Loewdin)\s',   caseSensitive = false },
    { regexp = '\b((?:No)?Mayer)\s',     caseSensitive = false },
    { regexp = '\b((?:No)?Mulliken)\s',  caseSensitive = false },
    { regexp = '\b((?:No)?NPA)\s',       caseSensitive = false },
    { regexp = '\b((?:No)?NBO)\s',       caseSensitive = false },
    { regexp = '\b((?:All|No|(?:No)?Reduced)?Pop)\s', caseSensitive = false },
    # NEB
    { regexp = '\b((?:Fast-|Loose-|Tight-)?NEB(?:-CI|-TS|-IDPP)?)\s', caseSensitive = false },
    # Other simple input keywords
    { regexp = '\b(SP)\s',               caseSensitive = false},
    { regexp = '\b(EnGrad)\s',           caseSensitive = false},
    { regexp = '\b(Opt)\s',              caseSensitive = false},
    { regexp = '\b(OptTS)\s',            caseSensitive = false},
    { regexp = '\b(Freq)\s',             caseSensitive = false},
    { regexp = '\b(NumFreq)\s',          caseSensitive = false},
    { regexp = '\b(MD)\s',               caseSensitive = false},
    { regexp = '\b(AM1)\s',              caseSensitive = false},
    { regexp = '\b(PM3)\s',              caseSensitive = false},
    { regexp = '\b(MNDO)\s',             caseSensitive = false},
    { regexp = '\b(PrintGap)\s',         caseSensitive = false},
    { regexp = '\b(PrintMOs)\s',         caseSensitive = false},
    { regexp = '\b(PrintBasis)\s',       caseSensitive = false},
    { regexp = '\b(AIM)\s',              caseSensitive = false},
    { regexp = '\b(XYZFile)\s',          caseSensitive = false},
    { regexp = '\b(PDBFile)\s',          caseSensitive = false},
    { regexp = '\b(UNO)\s',              caseSensitive = false},
    { regexp = '\b(NoPropFile)\s',       caseSensitive = false},
    { regexp = '\b(KeepTransDensity)\s', caseSensitive = false},
    { regexp = '\b(COSJXC)\s',           caseSensitive = false},
    { regexp = '\b(NoCOSX)\s',           caseSensitive = false},
    { regexp = '\b(NoRI)\s',             caseSensitive = false},
    { regexp = '\b(RIJCOSX)\s',          caseSensitive = false},
    { regexp = '\b(NoRIJCOSX)\s',        caseSensitive = false},
    { regexp = '\b(Split-RI-J)\s',       caseSensitive = false},
    { regexp = '\b(NoSplit-RI-J)\s',     caseSensitive = false},
    { regexp = '\b(RI-JK)\s',            caseSensitive = false},
    { regexp = '\b(AIM)\s',              caseSensitive = false},
    { regexp = '\b(MBIS)\s',             caseSensitive = false},
    { regexp = '\b(ZORA)\s',             caseSensitive = false},
    { regexp = '\b(IORA)\s',             caseSensitive = false},
    { regexp = '\b(X2C)\s',              caseSensitive = false},
    { regexp = '\b(DLU-X2C)\s',          caseSensitive = false},
    { regexp = '\b(RelDLU)\s',           caseSensitive = false},
    { regexp = '\b(Rel1C)\s',            caseSensitive = false},
    { regexp = '\b(RelFull)\s',          caseSensitive = false},
    { regexp = '\b(PAtom)\s',            caseSensitive = false},
    { regexp = '\b(PModel)\s',           caseSensitive = false},
    { regexp = '\b(Hueckel)\s',          caseSensitive = false},
    { regexp = '\b(HCore)\s',            caseSensitive = false},
    { regexp = '\b(MORead)\s',           caseSensitive = false},
    { regexp = '\b(AutoStart)\s',        caseSensitive = false},
    { regexp = '\b(NoAutoStart)\s',      caseSensitive = false},
    { regexp = '\b(NoIter)\s',           caseSensitive = false},
    { regexp = '\b(KeepInts)\s',         caseSensitive = false},
    { regexp = '\b(ReadInts)\s',         caseSensitive = false},
    { regexp = '\b(CalcGuessEnergy)\s',  caseSensitive = false},
    { regexp = '\b(DIIS)\s',             caseSensitive = false},
    { regexp = '\b(NoDIIS)\s',           caseSensitive = false},
    { regexp = '\b(KDIIS)\s',            caseSensitive = false},
    { regexp = '\b(TRAH)\s',             caseSensitive = false},
    { regexp = '\b(NoTRAH)\s',           caseSensitive = false},
    { regexp = '\b(SOSCF)\s',            caseSensitive = false},
    { regexp = '\b(NoSOSCF)\s',          caseSensitive = false},
    { regexp = '\b(Damp)\s',             caseSensitive = false},
    { regexp = '\b(NoDamp)\s',           caseSensitive = false},
    { regexp = '\b(LShift)\s',           caseSensitive = false},
    { regexp = '\b(NoLShift)\s',         caseSensitive = false},
    { regexp = '\b(EasyConv)\s',         caseSensitive = false},
    { regexp = '\b(NormalConv)\s',       caseSensitive = false},
    { regexp = '\b(SlowConv)\s',         caseSensitive = false},
    { regexp = '\b(VerySlowConv)\s',     caseSensitive = false},
    { regexp = '\b(FracOcc)\s',          caseSensitive = false},
    { regexp = '\b(Smear)\s',            caseSensitive = false},
    { regexp = '\b(NoSmear)\s',          caseSensitive = false},
    { regexp = '\b(FOD)\s',              caseSensitive = false},
    { regexp = '\b(ZEff-SOC)\s',         caseSensitive = false},
    { regexp = '\b(AMFI)\s',             caseSensitive = false},
    { regexp = '\b(Direct)\s',           caseSensitive = false},
    { regexp = '\b(Conv)\s',             caseSensitive = false},
    { regexp = '\b(CheapInts)\s',        caseSensitive = false},
    { regexp = '\b(NoCheapInts)\s',      caseSensitive = false},
]

[[solvent.rules]]
format.preset = "keyword"
patterns = [
    # CPCM/SMD/COSMO and the parentheses after them
    { regexp = '\b(CPCMC?|SMD|COSMORS){1}(\()[\w, -]*(\))\s', caseSensitive = false },
]

[[solvent.rules]]
format.foreground = [ 50, 205, 50 ]
format.family = "mono"
patterns = [
    # CPCM/SMD/COSMO
    { regexp = '\b(1,1,[12]-trichloroethane)\b',             caseSensitive = false },
    { regexp = '\b(1,2,4-trimethylbenzene)\b',               caseSensitive = false },
    { regexp = '\b(1,2-dibromoethane)\b',                    caseSensitive = false },
    { regexp = '\b(1,2-dichloroethane)\b',                   caseSensitive = false },
    { regexp = '\b(1,2-ethanediol)\b',                       caseSensitive = false },
    { regexp = '\b((?:1,4-)?dioxane)\b',                     caseSensitive = false },
    { regexp = '\b(1-bromo-2-methylpropane)\b',              caseSensitive = false },
    { regexp = '\b((?:1-)?bromooctane)\b',                   caseSensitive = false },
    { regexp = '\b(1-bromopentane)\b',                       caseSensitive = false },
    { regexp = '\b(1-bromopropane)\b',                       caseSensitive = false },
    { regexp = '\b((?:1-)?butanol)\b',                       caseSensitive = false },
    { regexp = '\b((?:1-)?chlorohexane)\b',                  caseSensitive = false },
    { regexp = '\b(1-chloropentane)\b',                      caseSensitive = false },
    { regexp = '\b(1-chloropropane)\b',                      caseSensitive = false },
    { regexp = '\b((?:1-)?decanol)\b',                       caseSensitive = false },
    { regexp = '\b(1-fluorooctane)\b',                       caseSensitive = false },
    { regexp = '\b((?:1-)?heptanol)\b',                      caseSensitive = false },
    { regexp = '\b((?:1-)?hexanol)\b',                       caseSensitive = false },
    { regexp = '\b(1-hexene)\b',                             caseSensitive = false },
    { regexp = '\b(1-hexyne)\b',                             caseSensitive = false },
    { regexp = '\b(1-iodobutane)\b',                         caseSensitive = false },
    { regexp = '\b(1-iodohexadecane)\b',                     caseSensitive = false },
    { regexp = '\b(hexadecyliodide)\b',                      caseSensitive = false },
    { regexp = '\b(1-iodopentane)\b',                        caseSensitive = false },
    { regexp = '\b(1-iodopropane)\b',                        caseSensitive = false },
    { regexp = '\b(1-nitropropane)\b',                       caseSensitive = false },
    { regexp = '\b((?:1-)?nonanol)\b',                       caseSensitive = false },
    { regexp = '\b((?:1-)?octanol)\b',                       caseSensitive = false },
    { regexp = '\b((?:1-)?pentanol)\b',                      caseSensitive = false },
    { regexp = '\b(1-pentene)\b',                            caseSensitive = false },
    { regexp = '\b((?:1-)?propanol)\b',                      caseSensitive = false },
    { regexp = '\b(2,2,2-trifluoroethanol)\b',               caseSensitive = false },
    { regexp = '\b(2,2,4-trimethylpentane)\b',               caseSensitive = false },
    { regexp = '\b(isooctane)\b',                            caseSensitive = false },
    { regexp = '\b(2,4-dimethylpentane)\b',                  caseSensitive = false },
    { regexp = '\b(2,[46]-dimethylpyridine)\b',              caseSensitive = false },
    { regexp = '\b(2-bromopropane)\b',                       caseSensitive = false },
    { regexp = '\b((?:2-|sec)butanol)\b',                    caseSensitive = false },
    { regexp = '\b(2-chlorobutane)\b',                       caseSensitive = false },
    { regexp = '\b(2-heptanone)\b',                          caseSensitive = false },
    { regexp = '\b(2-hexanone)\b',                           caseSensitive = false },
    { regexp = '\b((?:2-)?methoxyethanol)\b',                caseSensitive = false },
    { regexp = '\b(2-methyl-1-propanol)\b',                  caseSensitive = false },
    { regexp = '\b(isobutanol)\b',                           caseSensitive = false },
    { regexp = '\b(2-methyl-2-propanol)\b',                  caseSensitive = false },
    { regexp = '\b(2-methylpentane)\b',                      caseSensitive = false },
    { regexp = '\b(2-?methylpyridine)\b',                    caseSensitive = false },
    { regexp = '\b(2-nitropropane)\b',                       caseSensitive = false },
    { regexp = '\b(2-octanone)\b',                           caseSensitive = false },
    { regexp = '\b(2-pentanone)\b',                          caseSensitive = false },
    { regexp = '\b((?:2-|iso)propanol)\b',                   caseSensitive = false },
    { regexp = '\b(2-propen-1-ol)\b',                        caseSensitive = false },
    { regexp = '\b(e-2-pentene)\b',                          caseSensitive = false },
    { regexp = '\b(3-methylpyridine)\b',                     caseSensitive = false },
    { regexp = '\b(3-pentanone)\b',                          caseSensitive = false },
    { regexp = '\b(4-heptanone)\b',                          caseSensitive = false },
    { regexp = '\b(4-?methyl-?2-?pentanone)\b',              caseSensitive = false },
    { regexp = '\b(4-methylpyridine)\b',                     caseSensitive = false },
    { regexp = '\b(5-nonanone)\b',                           caseSensitive = false },
    { regexp = '\b(acetic ?acid)\b',                         caseSensitive = false },
    { regexp = '\b(acetone)\b',                              caseSensitive = false },
    { regexp = '\b(acetonitrile)\b',                         caseSensitive = false },
    { regexp = '\b((?:me|ch3)cn)\b',                         caseSensitive = false },
    { regexp = '\b(acetophenone)\b',                         caseSensitive = false },
    { regexp = '\b(ammonia)\b',                              caseSensitive = false },
    { regexp = '\b(aniline)\b',                              caseSensitive = false },
    { regexp = '\b(anisole)\b',                              caseSensitive = false },
    { regexp = '\b(benzaldehyde)\b',                         caseSensitive = false },
    { regexp = '\b(benzene)\b',                              caseSensitive = false },
    { regexp = '\b(benzonitrile)\b',                         caseSensitive = false },
    { regexp = '\b(benzyl ?alcohol)\b',                      caseSensitive = false },
    { regexp = '\b(bromobenzene)\b',                         caseSensitive = false },
    { regexp = '\b(bromoethane)\b',                          caseSensitive = false },
    { regexp = '\b(bromoform)\b',                            caseSensitive = false },
    { regexp = '\b(butanal)\b',                              caseSensitive = false },
    { regexp = '\b(butanoic acid)\b',                        caseSensitive = false },
    { regexp = '\b(butanone)\b',                             caseSensitive = false },
    { regexp = '\b(butanonitrile)\b',                        caseSensitive = false },
    { regexp = '\b(butyl ethanoate)\b',                      caseSensitive = false },
    { regexp = '\b(butyl ?acetate)\b',                       caseSensitive = false },
    { regexp = '\b(butylamine)\b',                           caseSensitive = false },
    { regexp = '\b((?:n-)?butylbenzene)\b',                  caseSensitive = false },
    { regexp = '\b(sec-?butylbenzene)\b',                    caseSensitive = false },
    { regexp = '\b((?:tert-|t)butylbenzene)\b',              caseSensitive = false },
    { regexp = '\b(carbon ?disulfide)\b',                    caseSensitive = false },
    { regexp = '\b(cs2)\b',                                  caseSensitive = false },
    { regexp = '\b(carbon tetrachloride)\b',                 caseSensitive = false },
    { regexp = '\b(ccl4)\b',                                 caseSensitive = false },
    { regexp = '\b(chlorobenzene)\b',                        caseSensitive = false },
    { regexp = '\b(chloroform)\b',                           caseSensitive = false },
    { regexp = '\b(chcl3)\b',                                caseSensitive = false },
    { regexp = '\b(a-chlorotoluene)\b',                      caseSensitive = false },
    { regexp = '\b(o-chlorotoluene)\b',                      caseSensitive = false },
    { regexp = '\b(conductor)\b',                            caseSensitive = false },
    { regexp = '\b(m-?cresol)\b',                            caseSensitive = false },
    { regexp = '\b(o-cresol)\b',                             caseSensitive = false },
    { regexp = '\b(cyclohexane)\b',                          caseSensitive = false },
    { regexp = '\b(cyclohexanone)\b',                        caseSensitive = false },
    { regexp = '\b(cyclopentane)\b',                         caseSensitive = false },
    { regexp = '\b(cyclopentanol)\b',                        caseSensitive = false },
    { regexp = '\b(cyclopentanone)\b',                       caseSensitive = false },
    { regexp = '\b(decalin)\b',                              caseSensitive = false },
    { regexp = '\b(cis-decalin)\b',                          caseSensitive = false },
    { regexp = '\b((?:n-)?decane)\b',                        caseSensitive = false },
    { regexp = '\b(dibromomethane)\b',                       caseSensitive = false },
    { regexp = '\b(dibutylether)\b',                         caseSensitive = false },
    { regexp = '\b(o-?dichlorobenzene)\b',                   caseSensitive = false },
    { regexp = '\b(e-1,2-dichloroethene)\b',                 caseSensitive = false },
    { regexp = '\b(z-1,2-dichloroethene)\b',                 caseSensitive = false },
    { regexp = '\b(dichloromethane)\b',                      caseSensitive = false },
    { regexp = '\b(ch2cl2)\b',                               caseSensitive = false },
    { regexp = '\b(dcm)\b',                                  caseSensitive = false },
    { regexp = '\b(diethyl ?ether)\b',                       caseSensitive = false },
    { regexp = '\b(diethyl sulfide)\b',                      caseSensitive = false },
    { regexp = '\b(diethylamine)\b',                         caseSensitive = false },
    { regexp = '\b(diiodomethane)\b',                        caseSensitive = false },
    { regexp = '\b(diisopropyl ?ether)\b',                   caseSensitive = false },
    { regexp = '\b(cis-1,2-dimethylcyclohexane)\b',          caseSensitive = false },
    { regexp = '\b(dimethyl disulfide)\b',                   caseSensitive = false },
    { regexp = '\b((?:n,n-)?dimethylacetamide)\b',           caseSensitive = false },
    { regexp = '\b((?:n,n-)?dimethylformamide)\b',           caseSensitive = false },
    { regexp = '\b(dmf)\b',                                  caseSensitive = false },
    { regexp = '\b(dimethylsulfoxide)\b',                    caseSensitive = false },
    { regexp = '\b(dmso)\b',                                 caseSensitive = false },
    { regexp = '\b(diphenylether)\b',                        caseSensitive = false },
    { regexp = '\b(dipropylamine)\b',                        caseSensitive = false },
    { regexp = '\b((?:n-)?dodecane)\b',                      caseSensitive = false },
    { regexp = '\b(ethanethiol)\b',                          caseSensitive = false },
    { regexp = '\b(ethanol)\b',                              caseSensitive = false },
    { regexp = '\b(ethyl ?acetate)\b',                       caseSensitive = false },
    { regexp = '\b(ethanoate)\b',                            caseSensitive = false },
    { regexp = '\b(ethyl methanoate)\b',                     caseSensitive = false },
    { regexp = '\b(ethyl phenyl ether)\b',                   caseSensitive = false },
    { regexp = '\b(ethoxybenzene)\b',                        caseSensitive = false },
    { regexp = '\b(ethylbenzene)\b',                         caseSensitive = false },
    { regexp = '\b(fluorobenzene)\b',                        caseSensitive = false },
    { regexp = '\b(formamide)\b',                            caseSensitive = false },
    { regexp = '\b(formic acid)\b',                          caseSensitive = false },
    { regexp = '\b(furane?)\b',                              caseSensitive = false },
    { regexp = '\b((?:n-)?heptane)\b',                       caseSensitive = false },
    { regexp = '\b((?:n-)?hexadecane)\b',                    caseSensitive = false },
    { regexp = '\b((?:n-)?hexane)\b',                        caseSensitive = false },
    { regexp = '\b(hexanoic acid)\b',                        caseSensitive = false },
    { regexp = '\b(iodobenzene)\b',                          caseSensitive = false },
    { regexp = '\b(iodoethane)\b',                           caseSensitive = false },
    { regexp = '\b(iodomethane)\b',                          caseSensitive = false },
    { regexp = '\b(isopropylbenzene)\b',                     caseSensitive = false },
    { regexp = '\b((?:p-)?isopropyltoluene)\b',              caseSensitive = false },
    { regexp = '\b(mesitylene)\b',                           caseSensitive = false },
    { regexp = '\b(methanol)\b',                             caseSensitive = false },
    { regexp = '\b(methyl benzoate)\b',                      caseSensitive = false },
    { regexp = '\b(methyl butanoate)\b',                     caseSensitive = false },
    { regexp = '\b(methyl ethanoate)\b',                     caseSensitive = false },
    { regexp = '\b(methyl methanoate)\b',                    caseSensitive = false },
    { regexp = '\b(methyl propanoate)\b',                    caseSensitive = false },
    { regexp = '\b(n-methylaniline)\b',                      caseSensitive = false },
    { regexp = '\b(methylcyclohexane)\b',                    caseSensitive = false },
    { regexp = '\b((?:n-)?methylformamide)\b',               caseSensitive = false },
    { regexp = '\b(nitrobenzene)\b',                         caseSensitive = false },
    { regexp = '\b(phno2)\b',                                caseSensitive = false },
    { regexp = '\b(nitroethane)\b',                          caseSensitive = false },
    { regexp = '\b(nitromethane)\b',                         caseSensitive = false },
    { regexp = '\b(meno2)\b',                                caseSensitive = false },
    { regexp = '\b((?:o-)?nitrotoluene)\b',                  caseSensitive = false },
    { regexp = '\b((?:n-)?nonane)\b',                        caseSensitive = false },
    { regexp = '\b((?:n-)?octane)\b',                        caseSensitive = false },
    { regexp = '\b((?:n-)?pentadecane)\b',                   caseSensitive = false },
    { regexp = '\b(pentanal)\b',                             caseSensitive = false },
    { regexp = '\b((?:n-)?pentane)\b',                       caseSensitive = false },
    { regexp = '\b(pentanoic acid)\b',                       caseSensitive = false },
    { regexp = '\b(pentyl ethanoate)\b',                     caseSensitive = false },
    { regexp = '\b(pentylamine)\b',                          caseSensitive = false },
    { regexp = '\b(perfluorobenzene)\b',                     caseSensitive = false },
    { regexp = '\b(hexafluorobenzene)\b',                    caseSensitive = false },
    { regexp = '\b(phenol)\b',                               caseSensitive = false },
    { regexp = '\b(propanal)\b',                             caseSensitive = false },
    { regexp = '\b(propanoic acid)\b',                       caseSensitive = false },
    { regexp = '\b(propanonitrile)\b',                       caseSensitive = false },
    { regexp = '\b(propyl ethanoate)\b',                     caseSensitive = false },
    { regexp = '\b(propylamine)\b',                          caseSensitive = false },
    { regexp = '\b(pyridine)\b',                             caseSensitive = false },
    { regexp = '\b(tetrachloroethene)\b',                    caseSensitive = false },
    { regexp = '\b(c2cl4)\b',                                caseSensitive = false },
    { regexp = '\b(tetrahydrofuran)\b',                      caseSensitive = false },
    { regexp = '\b(thf)\b',                                  caseSensitive = false },
    { regexp = '\b(tetrahydrothiophene(?:-s,s-)?dioxide)\b', caseSensitive = false },
    { regexp = '\b(sulfolane)\b',                            caseSensitive = false },
    { regexp = '\b(tetralin)\b',                             caseSensitive = false },
    { regexp = '\b(thiophene)\b',                            caseSensitive = false },
    { regexp = '\b(thiophenol)\b',                           caseSensitive = false },
    { regexp = '\b(toluene)\b',                              caseSensitive = false },
    { regexp = '\b(trans-decalin)\b',                        caseSensitive = false },
    { regexp = '\b(tributylphosphate)\b',                    caseSensitive = false },
    { regexp = '\b(trichloroethene)\b',                      caseSensitive = false },
    { regexp = '\b(triethylamine)\b',                        caseSensitive = false },
    { regexp = '\b((?:n-)?undecane)\b',                      caseSensitive = false },
    { regexp = '\b(water)\b',                                caseSensitive = false },
    { regexp = '\b(h2o)\b',                                  caseSensitive = false },
    { regexp = '\b(xylene)\b',                               caseSensitive = false },
    { regexp = '\b(m-xylene)\b',                             caseSensitive = false },
    { regexp = '\b(o-xylene)\b',                             caseSensitive = false },
    { regexp = '\b(p-xylene)\b',                             caseSensitive = false },
]

[[scf.rules]]
format.preset = "keyword"
patterns = [
    { regexp = '\b(Convergence)\s',              caseSensitive = false },
    { regexp = '\b(TolE)\s',                     caseSensitive = false },
    { regexp = '\b(TolRMSP)\s',                  caseSensitive = false },
    { regexp = '\b(TolMaxP)\s',                  caseSensitive = false },
    { regexp = '\b(TolErr)\s',                   caseSensitive = false },
    { regexp = '\b(TolG)\s',                     caseSensitive = false },
    { regexp = '\b(TolX)\s',                     caseSensitive = false },
    { regexp = '\b(Thresh)\s',                   caseSensitive = false },
    { regexp = '\b(TCut)\s',                     caseSensitive = false },
    { regexp = '\b(ConvCheckMode)\s',            caseSensitive = false },
    { regexp = '\b(ConvForced)\s',               caseSensitive = false },
    { regexp = '\b(HFTyp)\s',                    caseSensitive = false },
    { regexp = '\b(ROHF_Case)\s',                caseSensitive = false },
    { regexp = '\b(ROHF_NEl)\s',                 caseSensitive = false },
    { regexp = '\b(ROHF_NumOp)\s',               caseSensitive = false },
    { regexp = '\b(ROHF_NOrb)\s',                caseSensitive = false },
    { regexp = '\b(ROHF_Ref)\s',                 caseSensitive = false },
    { regexp = '\b(ROHF_AFOrbs)\s',              caseSensitive = false },
    { regexp = '\b(xTBFOD)\s',                   caseSensitive = false },
    { regexp = '\b(UsexTBMixer)\s',              caseSensitive = false },
    { regexp = '\b(SOSCFMaxStep)\s',             caseSensitive = false },
    { regexp = '\b(DeltaSCFFromGS)\s',           caseSensitive = false },
    { regexp = '\b(SOSCFBlockDiag)\s',           caseSensitive = false },
    { regexp = '\b(DoMOM)\s',                    caseSensitive = false },
    { regexp = '\b(KeepInitialRef)\s',           caseSensitive = false },
    { regexp = '\b(PMOM)\s',                     caseSensitive = false },
    { regexp = '\b(AlphaConf)\s',                caseSensitive = false },
    { regexp = '\b(BetaConf)\s',                 caseSensitive = false },
    { regexp = '\b(IonizeAlpha)\s',              caseSensitive = false },
    { regexp = '\b(IonizeBeta)\s',               caseSensitive = false },
    { regexp = '\b(SOSCFHessUp)\s',              caseSensitive = false },
    { regexp = '\b(SOSCFConstraints)\s',         caseSensitive = false },
    { regexp = '\b(SOSCFConstrainedMaxStep)\s',  caseSensitive = false },
    { regexp = '\b(SOSCFConvFactor)\s',          caseSensitive = false },
    { regexp = '\b(SOSCFConstrainedHessUp)\s',   caseSensitive = false },
    { regexp = '\b(SOSCFWriteConstrainedGBW)\s', caseSensitive = false },
    { regexp = '\b(SOSCFGMF)\s',                 caseSensitive = false },
    { regexp = '\b(SOSCFDavidsonMaxIt)\s',       caseSensitive = false },
    { regexp = '\b(SOSCFDavidsonTolR)\s',        caseSensitive = false },
    { regexp = '\b(SOSCFDavidsonMaxRed)\s',      caseSensitive = false },
    { regexp = '\b(SOSCFDavidsonFDMode)\s',      caseSensitive = false },
    { regexp = '\b(SOSCFDavidsonFDStep)\s',      caseSensitive = false },
    { regexp = '\b(SOSCFSPO)\s',                 caseSensitive = false },
    { regexp = '\b(SOSCFSPOEst)\s',              caseSensitive = false },
    { regexp = '\b(SOSCFUpdateSPOEst)\s',        caseSensitive = false },
    { regexp = '\b(SOSCFSPOEstNTrial)\s',        caseSensitive = false },
    { regexp = '\b(SOSCFUpdateSPOThresh)\s',     caseSensitive = false },
    { regexp = '\b(SOSCFPrecondType)\s',         caseSensitive = false },
    { regexp = '\b(SOSCFPrecondGamma)\s',        caseSensitive = false },
    { regexp = '\b(Guess)\s',                    caseSensitive = false },
    { regexp = '\b(MOInp)\s',                    caseSensitive = false },
    { regexp = '\b(GuessMode)\s',                caseSensitive = false },
    { regexp = '\b(AutoStart)\s',                caseSensitive = false },
    { regexp = '\b(MaxRed)\s',                   caseSensitive = false },
    { regexp = '\b(NStart)\s',                   caseSensitive = false },
    { regexp = '\b(TolFacMicro)\s',              caseSensitive = false },
    { regexp = '\b(MinTolMicro)\s',              caseSensitive = false },
    { regexp = '\b(QuadRegionStart)\s',          caseSensitive = false },
    { regexp = '\b(TRadius)\s',                  caseSensitive = false },
    { regexp = '\b(AlphaMin)\s',                 caseSensitive = false },
    { regexp = '\b(AlphaMax)\s',                 caseSensitive = false },
    { regexp = '\b(Randomize)\s',                caseSensitive = false },
    { regexp = '\b(PseudoRand)\s',               caseSensitive = false },
    { regexp = '\b(MaxNoise)\s',                 caseSensitive = false },
    { regexp = '\b(OrbUpdate)\s',                caseSensitive = false },
    { regexp = '\b(InactiveMOs)\s',              caseSensitive = false },
    { regexp = '\b(Precond)\s',                  caseSensitive = false },
    { regexp = '\b(PreconMaxRed)\s',             caseSensitive = false },
]

[[basis.rules]]
format.preset = "keyword"
patterns = [
    { regexp = '\b(Basis)\s',                caseSensitive = false },
    { regexp = '\b(AuxJ)\s',                 caseSensitive = false },
    { regexp = '\b(AuxJK)\s',                caseSensitive = false },
    { regexp = '\b(AuxC)\s',                 caseSensitive = false },
    { regexp = '\b(CABS)\s',                 caseSensitive = false },
    { regexp = '\b(ECP)\s',                  caseSensitive = false },
    { regexp = '\b(GhostECP)\s',             caseSensitive = false },
    { regexp = '\b(Decontract)\s',           caseSensitive = false },
    { regexp = '\b(DecontractBas)\s',        caseSensitive = false },
    { regexp = '\b(DecontractAuxJ)\s',       caseSensitive = false },
    { regexp = '\b(DecontractAuxJK)\s',      caseSensitive = false },
    { regexp = '\b(DecontractAuxC)\s',       caseSensitive = false },
    { regexp = '\b(DecontractCABS)\s',       caseSensitive = false },
    { regexp = '\b(PCDTrimBas)\s',           caseSensitive = false },
    { regexp = '\b(PCDTrimAuxJ)\s',          caseSensitive = false },
    { regexp = '\b(PCDTrimAuxJK)\s',         caseSensitive = false },
    { regexp = '\b(PCDTrimAuxC)\s',          caseSensitive = false },
    { regexp = '\b(PCDThresh)\s',            caseSensitive = false },
    { regexp = '\b(AutoAuxSize)\s',          caseSensitive = false },
    { regexp = '\b(AutoAuxLmax)\s',          caseSensitive = false },
    { regexp = '\b(AutoAuxLLimit)\s',        caseSensitive = false },
    { regexp = '\b(AutoAux[BF]\[[0-7]\])\s', caseSensitive = false },
    { regexp = '\b(AutoAuxTightB)\s',        caseSensitive = false },
]

[[elprop.rules]]
format.preset = "keyword"
patterns = [
    { regexp = '\b(Dipole)\s',        caseSensitive = false },
    { regexp = '\b(Quadrupole)\s',    caseSensitive = false },
    { regexp = '\b(Polar)\s',         caseSensitive = false },
    { regexp = '\b(HyperPol)\s',      caseSensitive = false },
    { regexp = '\b(PolarVelocity)\s', caseSensitive = false },
    { regexp = '\b(PolarDipQuad)\s',  caseSensitive = false },
    { regexp = '\b(PolarQuadQuad)\s', caseSensitive = false },
    { regexp = '\b(Freq_r)\s',        caseSensitive = false },
    { regexp = '\b(Freq_i)\s',        caseSensitive = false },
    { regexp = '\b(Solver)\s',        caseSensitive = false },
    { regexp = '\b(MaxDIIS)\s',       caseSensitive = false },
    { regexp = '\b(Shift)\s',         caseSensitive = false },
    { regexp = '\b(Tol)\s',           caseSensitive = false },
    { regexp = '\b(MaxIter)\s',       caseSensitive = false },
    { regexp = '\b(PrintLevel)\s',    caseSensitive = false },
    { regexp = '\b(Origin)\s',        caseSensitive = false },
]

[[default.rules]]
format.preset = "comment"
patterns = [
    # ORCA comments can either be any line with a # at the start
    # or it can be any text enclosed by two #'s
    { regexp = '(?:#[^\n]*#|#[^\n]*)' },
]

[[default.rules]]
format.preset = "num_literal"
patterns = [
    # Matches numbers in either typical base-10 positional notation
    # or in scientific notation. The `[-\+]?` blocks are for positive
    # and negative signs. The `[eEdD]` block is for scientific format.
    # The `[\.0-9]+` block is for a decimal point follow by 1 or more
    # numbers.
    { regexp = '\s([-\+]?[\.0-9]+(?:[eEdD][-\+]?[\.0-9]+)?)\b' },
]

[[default.rules]]
format.preset = "str_literal"
patterns = [
    { regexp = '\b(True)\b', caseSensitive = false },
    { regexp = '\b(False)\b', caseSensitive = false },
    # Atomic Symbols.
    # The pattern `(?<!{)\s` asserts that there are no { characters
    # preceding the atomic symbol. This is to avoid situations like
    # in the constraints block where you can have { B ... C }.
    # The latter part of that, `C }`, is avoided by the pattern
    # `(?:\s(?!})| ?{ ?)`, which disallows for `C }` but will allow for
    # something like `C{...` or `C{ ...` or `C {...` or `C { ...`
    { regexp = '(?<!{)\s(H)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(He)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Li)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Be)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(B)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(C)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(N)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(O)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(F)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(Ne)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Na)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Mg)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Al)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Si)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(P)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(S)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(Cl)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ar)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(K)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(Ca)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Sc)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ti)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(V)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(Cr)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Mn)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Fe)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Co)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ni)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Cu)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Zn)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ga)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ge)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(As)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Se)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Br)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Kr)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Rb)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Sr)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Y)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(Zr)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Nb)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Mo)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Tc)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ru)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Rh)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Pd)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ag)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Cd)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(In)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Sn)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Sb)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Te)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(I)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(Xe)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Cs)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ba)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(La)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ce)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Pr)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Nd)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Pm)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Sm)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Eu)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Gd)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Tb)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Dy)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ho)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Er)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Tm)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Yb)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Lu)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Hf)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ta)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(W)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(Re)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Os)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ir)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Pt)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Au)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Hg)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Tl)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Pb)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Bi)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Po)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(At)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Rn)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Fr)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ra)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ac)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Th)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Pa)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(U)(?:\s(?!})| ?{ ?)'  },
    { regexp = '(?<!{)\s(Np)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Pu)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Am)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Cm)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Bk)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Cf)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Es)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Fm)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Md)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(No)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Lr)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Rf)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Db)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Sg)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Bh)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Hs)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Mt)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ds)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Rg)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Cn)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Nh)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Fl)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Mc)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Lv)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Ts)(?:\s(?!})| ?{ ?)' },
    { regexp = '(?<!{)\s(Og)(?:\s(?!})| ?{ ?)' },
]

[[default.rules]]
format.preset = "method"
patterns = [
    # The OG
    { regexp = '\b(HF)\s', caseSensitive = false },
    # Built in Functionals
    { regexp = '\b(HF-3c)\s',                 caseSensitive = false },
    { regexp = '\b(B97-3c)\s',                caseSensitive = false },
    { regexp = '\b(r2SCAN-3c)\s',             caseSensitive = false },
    { regexp = '\b(PBEh-3c)\s',               caseSensitive = false },
    { regexp = '\b(B3LYP-3c)\s',              caseSensitive = false },
    { regexp = '\b(wB97X-3c)\s',              caseSensitive = false },
    { regexp = '\b(HFS)\s',                   caseSensitive = false },
    { regexp = '\b(LDA)\s',                   caseSensitive = false },
    { regexp = '\b(VWN5)\s',                  caseSensitive = false },
    { regexp = '\b(VWN3)\s',                  caseSensitive = false },
    { regexp = '\b(PWLDA)\s',                 caseSensitive = false },
    { regexp = '\b(BP86)\s',                  caseSensitive = false },
    { regexp = '\b(BLYP)\s',                  caseSensitive = false },
    { regexp = '\b(OLYP)\s',                  caseSensitive = false },
    { regexp = '\b(GLYP)\s',                  caseSensitive = false },
    { regexp = '\b(XLYP)\s',                  caseSensitive = false },
    { regexp = '\b(PW91)\s',                  caseSensitive = false },
    { regexp = '\b(mPWPW)\s',                 caseSensitive = false },
    { regexp = '\b(mPWLYP)\s',                caseSensitive = false },
    { regexp = '\b(PBE)\s',                   caseSensitive = false },
    { regexp = '\b(RPBE)\s',                  caseSensitive = false },
    { regexp = '\b(revPBE)\s',                caseSensitive = false },
    { regexp = '\b(RPW86PBE)\s',              caseSensitive = false },
    { regexp = '\b(PWP)\s',                   caseSensitive = false },
    { regexp = '\b(B97M-V)\s',                caseSensitive = false },
    { regexp = '\b(B97M-D3BJ)\s',             caseSensitive = false },
    { regexp = '\b(B97M-D4)\s',               caseSensitive = false },
    { regexp = '\b(SCANFUNC)\s',              caseSensitive = false },
    { regexp = '\b(rSCAN)\s',                 caseSensitive = false },
    { regexp = '\b(r2SCAN)\s',                caseSensitive = false },
    { regexp = '\b(M06L)\s',                  caseSensitive = false },
    { regexp = '\b(TPSS)\s',                  caseSensitive = false },
    { regexp = '\b(revTPSS)\s',               caseSensitive = false },
    { regexp = '\b(B1LYP)\s',                 caseSensitive = false },
    { regexp = '\b(B3LYP)\s',                 caseSensitive = false },
    { regexp = '\b(B3LYP/G)\s',               caseSensitive = false },
    { regexp = '\b(O3LYP)\s',                 caseSensitive = false },
    { regexp = '\b(X3LYP)\s',                 caseSensitive = false },
    { regexp = '\b(B1P86)\s',                 caseSensitive = false },
    { regexp = '\b(B3P86)\s',                 caseSensitive = false },
    { regexp = '\b(B3PW91)\s',                caseSensitive = false },
    { regexp = '\b(PW1PW)\s',                 caseSensitive = false },
    { regexp = '\b(mPW1PW)\s',                caseSensitive = false },
    { regexp = '\b(mPW1LYP)\s',               caseSensitive = false },
    { regexp = '\b(PBE0)\s',                  caseSensitive = false },
    { regexp = '\b(revPBE0)\s',               caseSensitive = false },
    { regexp = '\b(revPBE38)\s',              caseSensitive = false },
    { regexp = '\b(BHandHLYP)\s',             caseSensitive = false },
    { regexp = '\b(M06)\s',                   caseSensitive = false },
    { regexp = '\b(M062X)\s',                 caseSensitive = false },
    { regexp = '\b(PW6B95)\s',                caseSensitive = false },
    { regexp = '\b(TPSSh)\s',                 caseSensitive = false },
    { regexp = '\b(TPSS0)\s',                 caseSensitive = false },
    { regexp = '\b(r2SCANh)\s',               caseSensitive = false },
    { regexp = '\b(r2SCAN0)\s',               caseSensitive = false },
    { regexp = '\b(r2SCAN50)\s',              caseSensitive = false },
    { regexp = '\b(wB97)\s',                  caseSensitive = false },
    { regexp = '\b(wB97X)\s',                 caseSensitive = false },
    { regexp = '\b(wB97X-V)\s',               caseSensitive = false },
    { regexp = '\b(wB97X-D3)\s',              caseSensitive = false },
    { regexp = '\b(wB97X-D3BJ)\s',            caseSensitive = false },
    { regexp = '\b(wB97X-D4)\s',              caseSensitive = false },
    { regexp = '\b(wB97X-D4rev)\s',           caseSensitive = false },
    { regexp = '\b(CAM-B3LYP)\s',             caseSensitive = false },
    { regexp = '\b(LC-BLYP)\s',               caseSensitive = false },
    { regexp = '\b(LC-PBE)\s',                caseSensitive = false },
    { regexp = '\b(wB97M-V)\s',               caseSensitive = false },
    { regexp = '\b(wB97M-D3BJ)\s',            caseSensitive = false },
    { regexp = '\b(wB97M-D4)\s',              caseSensitive = false },
    { regexp = '\b(wB97M-D4rev)\s',           caseSensitive = false },
    { regexp = '\b(wr2SCAN)\s',               caseSensitive = false },
    { regexp = '\b(DSD-BLYP D3BJ)\s',         caseSensitive = false },
    { regexp = '\b(DSD-BLYP/2013)\s',         caseSensitive = false },
    { regexp = '\b(DSD-BLYP/2013 D3BJ)\s',    caseSensitive = false },
    { regexp = '\b(DSD-PBEP86 D3BJ)\s',       caseSensitive = false },
    { regexp = '\b(DSD-PBEP86/2013)\s',       caseSensitive = false },
    { regexp = '\b(DSD-PBEP86/2013 D3BJ)\s',  caseSensitive = false },
    { regexp = '\b(DSD-PBEB95)\s',            caseSensitive = false },
    { regexp = '\b(DSD-PBEB95 D3BJ)\s',       caseSensitive = false },
    { regexp = '\b(B2PLYP)\s',                caseSensitive = false },
    { regexp = '\b(mPW2PLYP)\s',              caseSensitive = false },
    { regexp = '\b(B2GP-PLYP)\s',             caseSensitive = false },
    { regexp = '\b(B2K-PLYP)\s',              caseSensitive = false },
    { regexp = '\b(B2T-PLYP)\s',              caseSensitive = false },
    { regexp = '\b(B2NC-PLYP)\s',             caseSensitive = false },
    { regexp = '\b(PWPB95)\s',                caseSensitive = false },
    { regexp = '\b(PBE-QIDH)\s',              caseSensitive = false },
    { regexp = '\b(PBE0-DH)\s',               caseSensitive = false },
    { regexp = '\b(revDSD-PBEP86/2021)\s',    caseSensitive = false },
    { regexp = '\b(revDSD-PBEP86-D4/2021)\s', caseSensitive = false },
    { regexp = '\b(revDOD-PBEP86/2021)\s',    caseSensitive = false },
    { regexp = '\b(revDOD-PBEP86-D4/2021)\s', caseSensitive = false },
    { regexp = '\b(r2SCAN-CIDH)\s',           caseSensitive = false },
    { regexp = '\b(r2SCAN-QIDH)\s',           caseSensitive = false },
    { regexp = '\b(r2SCAN0-2)\s',             caseSensitive = false },
    { regexp = '\b(r2SCAN0-DH)\s',            caseSensitive = false },
    { regexp = '\b(Pr2SCAN50)\s',             caseSensitive = false },
    { regexp = '\b(Pr2SCAN69)\s',             caseSensitive = false },
    { regexp = '\b(kPr2SCAN)\s',              caseSensitive = false },
    { regexp = '\b(SCS/SOS-B2PLYP21)\s',      caseSensitive = false },
    { regexp = '\b(SCS-PBE-QIDH)\s',          caseSensitive = false },
    { regexp = '\b(SOS-PBE-QIDH)\s',          caseSensitive = false },
    { regexp = '\b(SCS-B2GP-PLYP21)\s',       caseSensitive = false },
    { regexp = '\b(SOS-B2GP-PLYP21)\s',       caseSensitive = false },
    # LibXC Only
    { regexp = '\b(B97-D)\s',            caseSensitive = false },
    { regexp = '\b(B97-D3)\s',           caseSensitive = false },
    { regexp = '\b(B97-D4)\s',           caseSensitive = false },
    { regexp = '\b(BPBE)\s',             caseSensitive = false },
    { regexp = '\b(BPW91)\s',            caseSensitive = false },
    { regexp = '\b(BVWN)\s',             caseSensitive = false },
    { regexp = '\b(KT2)\s',              caseSensitive = false },
    { regexp = '\b(KT3)\s',              caseSensitive = false },
    { regexp = '\b(PW86PBE)\s',          caseSensitive = false },
    { regexp = '\b(MN15L)\s',            caseSensitive = false },
    { regexp = '\b(MTASK-LDA)\s',        caseSensitive = false },
    { regexp = '\b(MTASK-SCAN)\s',       caseSensitive = false },
    { regexp = '\b(REVTM)\s',            caseSensitive = false },
    { regexp = '\b(LibXC\(SCAN\))\s',    caseSensitive = false }, # Added LibXC(...) to avoid confusion with SCAN keyword
    { regexp = '\b(TASK-CCALDA)\s',      caseSensitive = false },
    { regexp = '\b(TASK-CC)\s',          caseSensitive = false },
    { regexp = '\b(TASK-LDA)\s',         caseSensitive = false },
    { regexp = '\b(TASK-SCAN)\s',        caseSensitive = false },
    { regexp = '\b(TM)\s',               caseSensitive = false },
    { regexp = '\b(HFLDA)\s',            caseSensitive = false },
    { regexp = '\b(B1PW)\s',             caseSensitive = false },
    { regexp = '\b(B1PBE)\s',            caseSensitive = false },
    { regexp = '\b(B3LYPS)\s',           caseSensitive = false },
    { regexp = '\b(BLYP35)\s',           caseSensitive = false },
    { regexp = '\b(B97)\s',              caseSensitive = false },
    { regexp = '\b(CASE21)\s',           caseSensitive = false },
    { regexp = '\b(G1LYP)\s',            caseSensitive = false },
    { regexp = '\b(HSE03)\s',            caseSensitive = false },
    { regexp = '\b(HSE12)\s',            caseSensitive = false },
    { regexp = '\b(HSE12S)\s',           caseSensitive = false },
    { regexp = '\b(HSESOL)\s',           caseSensitive = false },
    { regexp = '\b(KMLYP)\s',            caseSensitive = false },
    { regexp = '\b(LB07)\s',             caseSensitive = false },
    { regexp = '\b(PBE38)\s',            caseSensitive = false },
    { regexp = '\b(PBE50)\s',            caseSensitive = false },
    { regexp = '\b(PW91_0)\s',           caseSensitive = false },
    { regexp = '\b(WHPBE0)\s',           caseSensitive = false },
    { regexp = '\b(GAS22)\s',            caseSensitive = false },
    { regexp = '\b(M05)\s',              caseSensitive = false },
    { regexp = '\b(M052X)\s',            caseSensitive = false },
    { regexp = '\b(M06SX)\s',            caseSensitive = false },
    { regexp = '\b(MN15)\s',             caseSensitive = false },
    { regexp = '\b(LC-TMLYP)\s',         caseSensitive = false },
    { regexp = '\b(R2SCAN38)\s',         caseSensitive = false },
    { regexp = '\b(SCAN0)\s',            caseSensitive = false },
    { regexp = '\b(DSD-PBEB95-D3)\s',    caseSensitive = false },
    { regexp = '\b(DSD-PBEB95-D4)\s',    caseSensitive = false },
    { regexp = '\b(MPW2-PLYP)\s',        caseSensitive = false },
    { regexp = '\b(PBE0-2)\s',           caseSensitive = false },
    { regexp = '\b(SOS1-R2SCAN0-DH)\s',  caseSensitive = false },
    { regexp = '\b(SOS1-R2SCAN-CIDH)\s', caseSensitive = false },
    { regexp = '\b(SOS1-R2SCAN-QIDH)\s', caseSensitive = false },
    { regexp = '\b(SOS1-R2SCAN0-2)\s',   caseSensitive = false },
    # Wavefunction Theory
    { regexp = '\b(DMRG)\s', caseSensitive = false },
    # MP2, including arbitrary ordering of prefixes
    { regexp = '\b((?:(?:RI|S[CO]S|OO|DLPNO|F12(?:\/D|D)?)-){0,3}MP2)\s', caseSensitive = false },
    # Coupled-Cluster methods
    { regexp = '\b((?:RI|DLPNO)?-?CCSD(?:\(T1?\))?(?:-F12(?:D|\/D)?(?:\/RI)?)?)\s', caseSensitive = false },
    # LibXC Functionals - This is deliberately left vague.
    { regexp = '\b((?:hyb_)?(?:lda|m?gga)_(?:xc|[xc]{1})_?[a-z0-9_]*)\s' },
    # AutoCI Methods
    { regexp = '\b(AutoCI-(?:(?:C[CI][SDTQ[\]()]{1,5}(?:-[1-9])?|(?:MP[234](?:\(SDQ\))?))))\s', caseSensitive = false },
    # NEVPT2
    { regexp = '\b((?:SC-|RI-|FIC-|DLPNO-)?NEVPT2)\s', caseSensitive = false },
    # CASPT2 and CAS(2)
    { regexp = '\b((?:RI-|DCD-){0,2}CAS(?:PT2|\(2\)))\s', caseSensitive = false },
    # MRCI
    { regexp = '\b((?:M|SO)R(?:CI(?:\+Q)?|ACPF|AQCC|DDCI[123](?:\+Q)?))\s', caseSensitive = false },
    # EOM-CC
    { regexp = '\b((?:EE-|IP-|EA-)?(?:ST)?EOM-(?:DLPNO-)?CCSD)\s', caseSensitive = false },
]

[[default.rules]]
format.preset = "basis"
patterns = [
    # STO-nG
    { regexp = '\b(STO-[0-9]*G)\s' },
    # Pople basis sets
    { regexp = '\b(m?[346]-[23][12]*\+*G(?:\([23]?[dfp]{1,2},?[23]?[dfp]{0,2}\)|\**)?[SP]{0,2})\s', caseSensitive = false },
    # def2 basis sets, some of the AuxJ variants, and all of the AuxC variants
    { regexp = '\b((?:ma-)?def2-m?[STQ]?[ZVPD()]{1,5}(?:\(-f\))?(?:\/J|\/C)?)\s', caseSensitive = false },
    # def2/J, def2/JK, def2/JKsmall, x2c/J, SARC/J
    { regexp = '\b((?:def2|x2c|SARC)(?:\/J|\/JK)(?:small)?)\s', caseSensitive = false },
    # Jensen polarization consistent (pc) basis sets
    { regexp = '\b((?:aug-)?pc[XJH]?S?(?:seg)?-[0-9]?)\s', caseSensitive = false },
    # Correlation Consistent cc-pVnZ basis sets
    { regexp = '\b((?:m?aug-|apr-|may-|ju[nl]-)?cc-p[wC]{0,2}V[DTQ56]?(?:[DTQ56]|\([DTQ56]?\+d\))Z(?:-DK3?)?(?:\/JK|\/C)?)\s', caseSensitive = false },
    # DKH, ZORA, SARC/SARC2 basis sets
    { regexp = '\b((?:ma-)?(?:SARC-|SARC2-)?(?:DKH-|ZORA-){1}(?:def2-)?m?[STQ]?[ZVPD()]{1,5}\(?-?f?\)?(?:\/JK)?)\s', caseSensitive = false },
    # x2c basis sets
    { regexp = '\b(x2c-[STQ][VZ]{1,2}[P()]{1,3}all(?:-2c)?(?:-s)?)\s', caseSensitive = false },
    # ANO-RCC Basis Sets
    { regexp = '\b(ANO-RCC-(?:Full|[DTQ]ZP))\s', caseSensitive = false },
]

[[default.rules]]
format.preset = "block"
patterns = [
    # `%<block-name>`
    # Includes the number 2 for the 2 at the end of `%mp2`
    { regexp = '(%[a-zA-Z2]+)\s?' },
    # end of a block
    { regexp = '\b(end)\s?', caseSensitive = false },
    # the `* xyz` block in ORCA
    { regexp = '\* xyz(?:file)?', caseSensitive = false },
    { regexp = '\*' },
    # Simple input line start.
    { regexp = '!' },
    # Some nested sub-blocks.
    { regexp = '\b(Constraints)\s', caseSensitive = false },
    { regexp = '\b(TRAH)\s', caseSensitive = false },
]
