Skip to content

Latest commit

 

History

History
363 lines (253 loc) · 15.9 KB

README.md

File metadata and controls

363 lines (253 loc) · 15.9 KB

OpenQC

VS Code integration for computational chemistry LSPs

Syntax, file detection, visualization entry points, and LSP startup for 17 computational chemistry and molecular-simulation formats

Release identity: newtontech.openqc@0.0.1 (OpenQC - DFT/MD/Quantum Chemistry Suite)

Install License

Features • Quick Start • Gallery • Roadmap


🧪 Why OpenQC?

Tired of switching between different editors for VASP, Gaussian, ORCA, CP2K, and other quantum chemistry software? OpenQC brings a shared VS Code surface to the newtontech language-server family.

OpenQC recognizes supported computational chemistry and molecular-simulation files and routes them to the matching language contribution, parser, viewer entry point, or configured LSP command.


🎯 Supported Software

OpenQC is the VS Code-facing workspace for the newtontech computational chemistry and molecular-simulation LSP family. It should stay aligned with the standalone language servers listed in src/lsp/registry.ts and summarized in docs/LSP_COMPATIBILITY.md.

The repository root is the canonical VS Code extension package root. Development, tests, packaging, and Marketplace publishing should use the root package.json; stale nested extension package roots are not maintained.

OpenQC currently wires 17 bundled LSP integrations for computational chemistry, materials, and molecular-simulation workflows:

Latest LSP Status

OpenQC tracks latest LSP support by the upstream default branch recorded in src/lsp/registry.ts. Run npm run lsp:check-latest before release or PR handoff to compare local sibling checkouts with the configured remote branch heads. If the main cp2k-lsp-enhanced checkout has unrelated local work, OpenQC can use .worktrees-lsp-latest/cp2k-lsp-enhanced for the latest CP2K LSP without overwriting that checkout.

LSP Alignment Matrix

For per-server parser status, diagnostics, completion, hover, formatting, code actions, and build commands, see the LSP Compatibility Matrix.

Format Standalone LSP OpenQC role
ABACUS newtontech/abacus-lsp Language contribution, syntax, file detection, LSP startup
ABINIT newtontech/abinit-lsp Language contribution, syntax, file detection, LSP startup
CIF newtontech/cif-lsp Language contribution, syntax, file detection, LSP startup
CP2K newtontech/cp2k-lsp-enhanced Language contribution, syntax, file detection, LSP startup
VASP newtontech/VASP-LSP Language contribution, syntax, file detection, LSP startup
Gaussian newtontech/gaussian-lsp Language contribution, syntax, file detection, LSP startup
ORCA newtontech/orca-lsp Language contribution, syntax, file detection, LSP startup
GAMESS (US) newtontech/gamess-lsp Language contribution, syntax, file detection, LSP startup
Quantum ESPRESSO newtontech/qe-lsp Language contribution, syntax, file detection, LSP startup
NWChem newtontech/nwchem-lsp Language contribution, syntax, file detection, LSP startup
GPUMD newtontech/gpumd-lsp Language contribution, syntax, file detection, LSP startup
GROMACS newtontech/gromacs-lsp Language contribution, syntax, file detection, LSP startup
LAMMPS newtontech/lammps-lsp Language contribution, syntax, file detection, LSP startup
MLIP newtontech/mlip-lsp Language contribution, syntax, file detection, LSP startup
PyATB newtontech/pyatb-lsp Language contribution, syntax, file detection, LSP startup
PySCF newtontech/pyscf-lsp Language contribution, syntax, file detection, LSP startup
DP-GEN newtontech/dpgen-lsp Language contribution, syntax, file detection, LSP startup

Supported Integrations

Software File Types Features
ABACUS INPUT, STRU, KPT LSP startup + syntax + file detection
ABINIT .abi, .abinit LSP startup + syntax + file detection
CIF .cif LSP startup + syntax + file detection
CP2K .inp LSP startup + syntax + file detection
VASP INCAR, POSCAR, KPOINTS, POTCAR LSP startup + syntax + file detection
Gaussian .com, .gjf LSP startup + syntax + file detection
ORCA .inp LSP startup + syntax + file detection
Quantum ESPRESSO .in, .pw.in, .relax.in LSP startup + syntax + file detection
GAMESS (US) .inp LSP startup + syntax + file detection
NWChem .nw, .nwinp LSP startup + syntax + file detection
GPUMD run.in, nep.in LSP startup + syntax + file detection
GROMACS .top, .itp, .mdp, .gro LSP startup + syntax + file detection
LAMMPS .lmp, .lammps, .lmps LSP startup + syntax + file detection
MLIP .mlip.json, .mlip.yaml, .mlip.yml LSP startup + syntax + file detection
PyATB .pyatb.py, run_pyatb.py LSP startup + syntax + file detection
PySCF .pyscf.py, run_pyscf.py LSP startup + syntax + file detection
DP-GEN param.json, machine.json LSP startup + syntax + file detection

🚧 Coming Soon

  • Molpro - High-accuracy quantum chemistry
  • Psi4 - Open-source quantum chemistry
  • Molcas/OpenMolcas - Multiconfigurational methods
  • DALTON - Molecular properties
  • Turbomole - Efficient DFT calculations
  • Crystal - Periodic systems
  • Castep - Materials modeling

✨ What Can You Do?

🔬 Visualize Molecules in 3D

Open supported molecule or structure-bearing files and use the viewer entry points to inspect coordinates in 3D:

  • Rotate, zoom, and pan to explore your system
  • Multiple rendering styles — ball-and-stick, space-filling, wireframe
  • Full editing through 10,000 atoms — add/delete/move atoms, edit bond order, set VASP selective-dynamics constraints, undo/redo, build bounded supercells, and export or write supported native formats back to source
  • Explicit large-structure mode — structures above 10,000 atoms use a deterministic 10,000-atom read-only LOD; labels, measurements, trajectory playback, supercells, and editing are disabled in that mode
  • Support for coordinate/cell rendering of molecules, crystals, and surface/slab structures
  • Optimization trajectories can be routed from supported calculation outputs into the viewer; this is not a general trajectory-file analysis suite

📊 Analyze Your Calculations

Extract and visualize key data from your output files:

  • SCF convergence plots
  • Energy optimization progress
  • Geometry optimization trajectories
  • Molecular dynamics evolution

📝 Write Better Input Files

  • Syntax highlighting for registered formats
  • Diagnostics from the configured standalone LSP when that server provides them
  • Parameter validation where the corresponding parser or LSP implements it
  • Completion and hover where the corresponding standalone LSP implements them

🗂️ Organize Your Work

  • Built-in Molecules sidebar to track your systems
  • Job tracking for real VASP, CP2K, and Quantum ESPRESSO calculator runs, including captured results, cancellation, restart, and JSON export
  • Guarded recovery flows for locally installed Multiwfn, c2x, and Open Babel analyzers
  • Quick access to recent files and projects

🚀 Quick Start

1. Install OpenQC

Search for "OpenQC" in the VS Code Extensions panel and click Install.

2. Open Your File

Open any computational chemistry file:

POSCAR          # VASP structure
job.com         # Gaussian input
calc.inp        # ORCA/CP2K input

OpenQC automatically detects the file type and activates the right tools.

3. Visualize

Click the 🧪 icon in the editor toolbar to see your structure in 3D!

4. Analyze

Use the 📊 icon to plot your calculation data.


🎨 Gallery

Molecular Visualization

See your molecules come to life with interactive 3D rendering

┌─────────────────────────────────────┐
│         [3D Viewer Panel]           │
│                                     │
│      ◯────◯────◯                   │
│     ╱      ╲     ╲                  │
│    ◯        ◯───◯                  │
│                                     │
│   Benzene • C₆H₆ • 12 atoms         │
└─────────────────────────────────────┘

Syntax Highlighting

Your input files, beautifully formatted

&FORCE_EVAL
  SUBSYS
    &KIND O
      BASIS_SET DZVP-MOLOPT-SR-GTH
      POTENTIAL GTH-PBE-q6
    &END KIND
    &COORD
      O  0.000000  0.000000  0.000000
      H  0.758602  0.000000 -0.504284
    &END COORD
  &END SUBSYS
&END FORCE_EVAL

🔧 Configuration

OpenQC works out of the box, but you can customize it:

{
  "openqc.calculators.vasp.command": "vasp_std",
  "openqc.calculators.cp2k.command": "cp2k.psmp",
  "openqc.calculators.qe.command": "pw.x",
  "openqc.external.allowExternalAnalyzers": false,
  "openqc.external.timeoutMs": 60000
}

The production viewer is the bundled 3Dmol runtime. Previous renderer, plot-library, and auto-open settings were removed because they were not consumed by runtime code. External analyzers remain disabled by default and require a local executable plus an explicit confirmation.

Secure AI providers

OpenQC can use the OpenAI Responses API or a local Ollama server for input optimization, generation, explanation, and debugging. Enable openqc.ai.enabled, select the provider and model, then run OpenQC: Set OpenAI API Key when using OpenAI. The credential is stored in VS Code SecretStorage and is never written to user or workspace settings; use OpenQC: Clear OpenAI API Key to remove it. Provider calls are cancellable and bounded by the configured timeout, token limit, and output-character limit.

From a source checkout, the dependency-free MCP entry point is PYTHONPATH=python python -m openqc.mcp_server. It exposes five tools for structure parsing, output parsing, backend checks, supercell generation, and dataset summaries. Native paths continue to work when optional scientific packages are absent; tools that require a missing package return a structured JSON-RPC error without terminating the server.


💡 Use Cases

For Computational Chemists

  • Prepare inputs faster with syntax highlighting and validation
  • Visualize structures before submitting jobs
  • Debug convergence issues with interactive plots

For Experimentalists

  • Inspect computational models shared by collaborators
  • Understand output from quantum chemistry calculations
  • Prepare structures for computational studies

For Students & Educators

  • Learn quantum chemistry with visual feedback
  • Understand input formats with syntax highlighting
  • Explore molecular systems interactively

For Software Developers

  • Build tools on top of OpenQC's parsing capabilities
  • Integrate with your computational workflows
  • Extend support for additional software

🌟 What's Coming?

Near Term (v2.1)

  • Format conversion between different quantum chemistry formats
  • Batch processing — visualize multiple structures at once
  • Export high-resolution images for publications
  • Custom color schemes and rendering options

Medium Term (v2.5)

  • Real-time calculation monitoring
  • Remote workflow documentation using existing VS Code capabilities
  • Parameter templates and wizards
  • Community examples for common calculation workflows

Long Term (v3.0)

  • AI-powered parameter optimization with OpenAI and Ollama
  • Natural language input generation
  • Workflow automation
  • Demand-proven ecosystem integrations from the roadmap

Marketplace Release Checklist

  • Use Node 22 and the locked dependencies: nvm use && npm ci.
  • Run make format lint typecheck test check; npm run check:release additionally creates and verifies vsix/openqc-0.0.1.vsix, its SHA-256 file, and CycloneDX SBOM.
  • Create v0.0.1 only from a clean commit exactly synchronized with origin/master; npm run release:tag enforces that boundary.
  • A pushed v* tag runs build-and-verify first, pauses at the protected marketplace-production environment, publishes the already verified VSIX, and creates the GitHub Release only after Marketplace publication succeeds.
  • Never publish with a global vsce; the repository pins @vscode/vsce and the workflow invokes that local binary.

See Marketplace Publishing for the operator runbook. Creating or pushing a tag is a release action and is not part of ordinary PR verification.

Issue Triage Policy

Use labels to keep the roadmap readable:

  • lsp-alignment: behavior that must stay consistent with standalone newtontech LSP repositories.
  • parser: file parsing, validation, or format detection.
  • visualization: 3D viewer, rendering, structures, or export.
  • language-support: syntax highlighting, completion, diagnostics.
  • marketplace: packaging, install, icon, metadata, release notes.
  • good-first-issue: small parser fixtures, docs, examples, or screenshots.

Every bug should include a minimal input file or a redacted snippet that reproduces the behavior.


🤝 Contributing

We welcome contributions! See something missing? Let us know:

  • Add support for your favorite quantum chemistry software
  • Improve parsing for existing formats
  • Enhance visualization features
  • Fix bugs and improve performance

Contributing Guidelines →


📚 Resources


📄 Citation

If OpenQC helps your research, please cite us:

@software{openqc2026,
  title = {OpenQC: Universal VS Code Extension for Computational Chemistry},
  author = {NewtonTech},
  year = {2026},
  version = {2.0},
  url = {https://github.com/newtontech/OpenQC-VSCode}
}

📜 License

MIT License — see LICENSE for details.


Made with ❤️ for the computational chemistry community

⭐ Star us on GitHub • 💬 Join the discussion