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.0.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.0-cp310-abi3-macosx_11_0_arm64.whl (25.1 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: tree_sitter_orca-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 0d1a14312d989e1c1c5494ffdbcc3409827c76bdc8315538c924ed4b380b04aa
MD5 3c3e0c28182857f0c27f58ea9ed10283
BLAKE2b-256 e624eff28c012e8bcdd95b3d9eef789a13e0ce4d3bf27253ef129f93acc93b45

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_orca-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 244b9acbd63d2ba06d59fa4d7ba77310c2865108619fdf2cb85ef482b1590d39
MD5 805caa1b9ab63c562f6dc4903e6fe2e3
BLAKE2b-256 9e8502d416cb11d73860063a93bb5499bc865c5ff91e763f795c39a5fb19d4c9

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