Open a Gaussian input file (.gjf or .com) in Visual Studio Code to highlight Link 0 directives, route sections and molecular coordinates.
Features
Route highlighting continues across lines and restarts for each Link1 job. It covers keywords and their unambiguous abbreviations, methods, basis sets and option lists. Coordinate blocks highlight atom symbols and numbers, including scientific notation.
While editing a route, press Ctrl+Space to request suggestions. Type HF/def2 to see matching basis sets, or Opt=(Cal to see optimization options such as calcfc. Warnings for ambiguous abbreviations and unrecognized route tokens appear in the editor and in the Problems panel. Each Link1 job is checked separately. The bundled BaneLib WebAssembly module runs locally.
Building the editor module
With Emscripten active, configure a BaneLib source tree that includes the banelib_gjf_wasm target (2.0.1rc12 or later). From the extension checkout, run:
emcmake cmake -S ../banelib -B ../banelib/build/wasm -DCMAKE_BUILD_TYPE=MinSizeRel \
-DBANE_BUILD_STRUCTURE_WASM=ON -DBANE_BUILD_APPS=OFF -DBANE_BUILD_TESTS=OFF -DBANE_COPY_RUNTIME_DATA=OFF
cmake --build ../banelib/build/wasm --target banelib_gjf_wasm -j4
npm ci
npm run build:wasm-extension -- ../banelib/build/wasm/bin
The desktop and web extension hosts load the same entry point and binary from dist/. Open this checkout in VS Code and press F5 to try the extension.
Updating the grammar
The extension ships its TextMate grammar. To refresh its vocabulary after a BaneLib schema change, use Python 3.9 or later with PyYAML and the BaneLib Python bindings installed. Run the following from the extension checkout with a BaneLib source tree that provides the g16-route-vocabulary export mode (2.0.1rc11).
python3 tools/generate_vocabulary.py /path/to/banelib
Commit the resulting syntaxes/gjf-vocabulary.tmLanguage.json with the extension. The generator reads Gaussian route spellings from BaneLib's schema compiler and atom symbols from its periodic table.
Preview
Drak+ Theme

Monokai Theme

References