Skip to main content

Parser for input file for the Orca quantum chemistry package

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_orca-0.2.2.tar.gz (41.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_orca-0.2.2-cp310-abi3-macosx_11_0_arm64.whl (25.2 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file tree_sitter_orca-0.2.2.tar.gz.

File metadata

  • Download URL: tree_sitter_orca-0.2.2.tar.gz
  • Upload date:
  • Size: 41.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for tree_sitter_orca-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a4b53a682543bbf2ee5f4711ac136f68c0632629714397c973ecba35251902e1
MD5 8852b774f4f9f40b06aa3fc89841f98e
BLAKE2b-256 92e10b29a41addcb6058b7ccc351975a9567d1d65917fe10b1c958789d4be914

See more details on using hashes here.

File details

Details for the file tree_sitter_orca-0.2.2-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_orca-0.2.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b509c43aba561a7216694dcac43c8c1759f862cd770396061ea028cd39049e05
MD5 b58bfe9a15a4fd3c69c5953fd716dca7
BLAKE2b-256 43d0347d713e40dba3258df236dc4e26604a15e857f27d5497b33f5e5717c875

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page