Skip to content

Instantly share code, notes, and snippets.

View ghutchis's full-sized avatar

Geoff Hutchison ghutchis

View GitHub Profile
@ghutchis
ghutchis / avogadro-mcp-plan.md
Last active September 6, 2026 00:08
Avogadro MCP Plan

Plan: Avogadro as a local MCP server

Goal: let an MCP client on the same machine (Claude Desktop, Claude Code, Cursor, anything speaking MCP) drive a running Avogadro, discover what it can do, and get enough context to write correct standalone Python scripts against the avogadro PyPI package.

Two audiences, one mechanism:

  1. Interactive driving. "Open this file, show the HOMO, give me a picture."
@ghutchis
ghutchis / avogadro-queue.md
Created May 4, 2026 14:59
MoleQueue Protocol

MoleQueue JSON-RPC Protocol Summary

The MoleQueue client used by Avogadro's input generators lives in avogadrolibs/avogadro/molequeue/client/. This document summarizes the JSON-RPC protocol so it can be adapted to other queue systems.

Transport

  • Wire: Qt QLocalSocket (Unix domain socket / Windows named pipe),
@ghutchis
ghutchis / avogadro-20.md
Last active March 26, 2026 18:11
Avogadro 2.0 Release Notes

We are pleased to announce the latest release of Avogadro, including piles of bug fixes and many feature enhancements. Thanks to many for suggestions, bug reports, translations, and discussions. Avogadro is built from the community, and we appreciate all the help.

Avogadro v2 was designed for fast modern rendering and improved stability. It is a platform to make it easy to build the next generation of molecular and materials visualization and editing tools. If you haven't used an Avogadro2 beta (1.95 through 1.103) you will find many new features, performance improvements and changes.

🌟 Highlights (tldr)

  • New plugin system will load menu commands, input generators, file formats, energy and electrostatic models, including installation of any required libraries and tools using pixi on Mac and Windows. (Highly recommended on Linux too)
  • New plugin install window and index, in
{
"highlightStyles": [
{
"style": "default",
"rules": [
{
"patterns": [
{ "string": "AIDER" },
{ "string": "AIGIN" },
{ "string": "AIGOUT" },
# highlight-styles.toml
#
# Each top-level section name becomes a highlight-style name.
# Pattern types:
# regexp – QRegularExpression syntax; capture groups mark sub-ranges
# wildcard – shell-style wildcard (*, ?)
# string – exact string match
# All pattern types accept an optional: caseSensitive = false
#
# Format: either a named preset or explicit font properties.
# This source file is part of the Avogadro project.
# This source code is released under the 3-Clause BSD License, (see "LICENSE").
import argparse
import json
import sys
import os
from shutil import which
import tempfile
import subprocess
@ghutchis
ghutchis / scan-dihedrals.py
Created March 24, 2025 21:22
Scan dihedral angles using Open Babel / Pybel
#!/usr/bin/env python
import sys
import os
import math
from openbabel import pybel
# read in a file and scan the torsions
# generate a bunch of XYZ files with varied phi / psi angles
@ghutchis
ghutchis / atomtype.cpp
Last active March 6, 2024 21:16
Avogadro2 Atom symbols and Neighbors
auto graph = m_molecule->graph();
for (Index i = 0; i < m_molecule->atomCount(); ++i)
{
// print the symbol for the atom
Core::Atom atom = m_molecule->atom(i);
std::string atomType = Core::Elements::symbol(atom.atomicNumber());
std::cout << "Atom " << atomType << " (" << i << ")" << std::endl;
// check neighbors
@ghutchis
ghutchis / test-avoscript.py
Created October 1, 2023 23:46
Avogadro Script Command Tester
#!/usr/bin/env python
import sys
import json
import subprocess
# example molecule for testing
water = {
"chemicalJson": 1,
"atoms": {
@ghutchis
ghutchis / orbitals.py
Created September 14, 2023 02:57
Avogadro Batch Render Orbitals
#!/usr/bin/python
import json
import socket
import struct
import glob
import tempfile
import os
import time