Language Server Protocol (LSP) implementation for ORCA quantum chemistry software.
-
Parser - Parses ORCA
.inpfiles%blocks (%maxcore,%pal,%method, etc.)- Simple input lines (
!directives) - Coordinate sections (
* xyz ... *)
-
LSP Features
- ✅ Diagnostics - Detects invalid keywords and parameters
- ✅ Completion - Auto-complete for methods, basis sets, and blocks
- ✅ Hover - Documentation for keywords on hover
- ✅ Document Symbols - Navigate input file structure
-
Syntax Highlighting (VSCode extension)
- ORCA input file grammar
- Colorization for blocks, keywords, coordinates
- Code formatting
- Semantic highlighting
- Code actions (quick fixes)
- Rename refactoring
- Document links
- Integration with ORCA output files
# Clone the repository
git clone https://github.com/newtontech/orca-lsp.git
cd orca-lsp
# Install dependencies
npm install
# Build the server
npm run buildcd vscode-extension
npm install
npm run buildInstall the extension in VSCode by copying the vscode-extension folder to your extensions directory or using the VSIX package.
npm startThe server communicates via stdio using the LSP protocol.
- Install the ORCA LSP extension
- Open any
.inpfile - The language server will start automatically
Add to your VSCode settings.json:
{
"orcaLanguageServer.maxNumberOfProblems": 1000
}! B3LYP def2-TZVP Opt Freq
Supported completions:
- Methods: HF, DFT functionals (B3LYP, PBE0, M06-2X, etc.), MP2, CCSD(T), CASSCF
- Basis Sets: Pople (6-31G, 6-311G), Dunning (cc-pVDZ, cc-pVTZ), def2 family
- Options: Opt, Freq, TightSCF, Grid5, RI, D3BJ, CPCM
%maxcore 4000
%pal nprocs 8 end
%scf
maxiter 200
converge tight
end
Supported blocks:
%maxcore- Memory allocation%pal- Parallelization%scf- SCF convergence%geom- Geometry optimization%basis- Basis set configuration%method- Method settings%mp2,%cc,%casscf- Correlation methods%cpcm- Solvation%freq- Frequency calculations- And more...
* xyz 0 1
C 0.0000 0.0000 0.0000
H 0.0000 0.0000 1.0890
H 1.0267 0.0000 -0.3630
H -0.5133 -0.8892 -0.3630
H -0.5133 0.8892 -0.3630
*
orca-lsp/
├── src/
│ ├── server.ts # LSP server implementation
│ ├── parser.ts # ORCA input file parser
│ └── keywords.ts # Keyword database
├── vscode-extension/ # VSCode client extension
├── syntaxes/ # TextMate grammar files
└── package.json
npm run buildnpm run watchContributions are welcome! Please feel free to submit issues and pull requests.
Edit src/keywords.ts to add new:
- DFT functionals
- Basis sets
- Block directives
- Calculation options
MIT License - see LICENSE file.
- ORCA Forum - ORCA documentation and community
- VSCode LSP - LSP implementation guide