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.1.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.1-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.1.tar.gz.

File metadata

  • Download URL: tree_sitter_orca-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 27a9c60a2adcb6cfd2a74dd3cacb64b95b9697e356d6d206ba655ff1c9d47d1f
MD5 a6a377858ee71c9285fb83b4ce437bba
BLAKE2b-256 81efb0c69891aa05578947f4a262cdfa006f5cb49d74c11a58ff169f05a5eec6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_orca-0.2.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 537080897de9ca0870d9b6d84d1a24ba5c7bc2be3a22d06e8e0571c47294be68
MD5 fdfef610b1793bdb89aab8c21bd8c86f
BLAKE2b-256 c39b38cf2fd8d872557f19a41babbedfa8fb3695e0b42e78289268776ff5cb83

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