Skip to main content

Tree-sitter ORCA

A Tree-sitter grammar for ORCA quantum chemistry input files.

ORCA is a quantum chemistry package for electronic structure calculations. This grammar parses ORCA input files (.inp) including simple command lines, input blocks, geometry specifications as well as complex workflows using compound scripts. In addition, it provides queries to support syntax highlighting, proper indentation and code folding.

Demo

SCR-20250808-ufgv

Installation

PyPI

pip install tree-sitter-orca

Neovim with nvim-treesitter

Enable Parser

Add to your init.lua:

-- Define ORCA '*.inp' extension
vim.filetype.add({
	extension = {
		inp = "inp",
	},
})
-- Enable custom tree-sitter parser
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.orca = {
  install_info = {
    url = "https://github.com/kszenes/tree-sitter-orca",
    files = { "src/parser.c" },
    branch = "main",
  },
  filetype = "inp",
}

Install the parser in Neovim using

:TSUpdate orca

You should now be able to inspect the abstract syntax tree from within Neovim using :TSInspect

Syntax Highlighting

Create syntax highlighting:

mkdir -p ~/.config/nvim/queries/orca
ln -s /path/to/tree-sitter-orca/queries/highlights.scm ~/.config/nvim/queries/orca/highlights.scm

Metadata

Release files for tree-sitter-orca 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tree-sitter-orca 0.2.2
File Size Uploaded
tree_sitter_orca-0.2.2.tar.gz 41.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tree-sitter-orca 0.2.2
File Interpreter ABI Platform
tree_sitter_orca-0.2.2-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details

Total release size: 67.1 kB

Release files / tree_sitter_orca-0.2.2.tar.gz

Download URL tree_sitter_orca-0.2.2.tar.gz
Size 41.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a4b53a682543bbf2ee5f4711ac136f68c0632629714397c973ecba35251902e1
BLAKE2b-256 checksum
How to use checksums
92e10b29a41addcb6058b7ccc351975a9567d1d65917fe10b1c958789d4be914
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / tree_sitter_orca-0.2.2-cp310-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_orca-0.2.2-cp310-abi3-macosx_11_0_arm64.whl
Size 25.2 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b509c43aba561a7216694dcac43c8c1759f862cd770396061ea028cd39049e05
BLAKE2b-256 checksum
How to use checksums
43d0347d713e40dba3258df236dc4e26604a15e857f27d5497b33f5e5717c875
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page