API reference

The signatures and members below are generated from the installed GVU package. See the guides for workflows and the coverage page for verification boundaries.

Session

class gvu.Session(backend, groups=(), owned=False)[source]

Bases: object

A GaussView process and the molecule groups owned by a workflow.

classmethod open(workflow, *, application_path=None, reuse_views=True)[source]

Open declared views, reusing matches unless reuse_views is False.

classmethod attach(*, application_path=None)[source]

Attach to the running application selected by its bundle path.

load(paths, grouping=Grouping.SEPARATE, read_intermediates=False)[source]

Load documents and own exactly the new molecule groups they create.

compare(paths, name='comparison', alignment=Alignment(horizontal='X', vertical='Y'))[source]

Load first-job input geometries as the frames of one molecule group.

preserve_windows()[source]

Restore existing window bounds on exit; leave group visibility untouched.

screens()[source]
arrange(models=None, style=Layout.OVERLAP, screen=None, size=(620, 390))[source]

Place only the selected models on an explicitly chosen or current display.

menus(root=None)[source]

Read refreshed menu paths, effective enabled states and native marks.

action(*path)[source]

Inspect one exact menu path in the current model/dialog context.

invoke(*path)[source]

Invoke an exact enabled leaf; never choose among duplicate paths.

set_menu(*path, checked)[source]

Set a checkable menu item without toggling an already matching state.

settings()[source]

Open the application’s Preferences dialog through its discovered menu.

dialog(title)[source]
model(group=None)[source]
result(result, group=None)[source]
close()[source]

Close only groups created by this session’s open, load or compare operations.

ModelView

class gvu.ModelView(session, group)[source]

Bases: object

property window
activate()[source]
menus(root=None)[source]

Inspect native menu availability for this molecule group.

invoke(*path)[source]
align(alignment=Alignment(horizontal='X', vertical='Y'))[source]
bounds(bounds)[source]

Set a model’s bounds without activating or moving other windows.

click(x, y, button='left', modifiers=())[source]

Click a view-relative point for builder, atom-selection or context actions.

drag(start, end, button='left', modifiers=())[source]

Send a scoped canvas gesture, including documented mouse modifiers.

center()[source]
toggle(item, enabled)[source]
property frame
property frame_count
seek(frame)[source]
property playing
animation(repeats=None, sequence=None, frame_delay=None, endpoint_delay=None)[source]

Configure the native molecule-group playback controls.

play(loop=True, frame_delay=100)[source]
pause()[source]
transform(operation, axis, amount, frame='View')[source]
rotate(axis, degrees, frame='View')[source]
translate(axis, distance, frame='View')[source]
surface_style(style=SurfaceStyle.TRANSPARENT, opacity=0.5)[source]
scale(lower, upper)[source]
image(path)[source]
save(path)[source]
movie(path)[source]

Dialog

class gvu.Dialog(session, title)[source]

Bases: object

Read, click and fill controls in a process-scoped dialog.

property window
controls()[source]

Inspect native roles, states, values, supported actions and writable fields.

perform(control, action='AXPress')[source]
set_value(control, value)[source]
labels()[source]
click(label, exact=True)[source]
fill(x, y, value)[source]

Set a field at explicit dialog-relative coordinates in display points.

check(label, enabled=True, x=None)[source]
key(name)[source]
bounds(position, size)[source]
choose(label)[source]
close()[source]

Preferences

class gvu.Preferences(session, title)[source]

Bases: Dialog

GaussView preference pages with explicit apply/cancel operations.

PAGES = ('Ampac Setup', 'Building', 'Charge Distribution', 'Clean Controls', 'Custom Bonding Parameters', 'Colors', 'Display Format', 'File/Directory', 'Font', 'Gaussian Setup', 'Icons', 'Image', 'Job Setup', 'Movie, Animation', 'Print', 'Vibrations', 'Window Behavior')
pages()[source]
page(name)[source]
apply()[source]
cancel()[source]

Plot

class gvu.Plot(session, title, group)[source]

Bases: Dialog

data(path)[source]
image(path)[source]
properties()[source]

Vibrations

class gvu.Vibrations(session, title)[source]

Bases: Dialog

Normal-mode selection, animation and native movie export.

play()[source]
pause()[source]
mode(index)[source]
movie(path)[source]

Workflow

class gvu.Workflow(source: pathlib._local.Path, results: tuple[gvu.models.Result, ...] = (), surfaces: tuple[gvu.models.Surface, ...] = (), density_isovalue: float = 0.002, alignment: gvu.models.Alignment | None = None, surface_style: gvu.models.SurfaceStyle = <SurfaceStyle.TRANSPARENT: 'Transparent'>, opacity: float = 0.5, layout: tuple[tuple[str | gvu.models.Result, tuple[int, int], tuple[int, int]], ...] = (), reference_screen: tuple[int, int] = (1728, 1117), position_jitter: int = 8, size_jitter: int = 6)[source]

Bases: object

source: Path
results: tuple[Result, ...] = ()
surfaces: tuple[Surface, ...] = ()
density_isovalue: float = 0.002
alignment: Alignment | None = None
surface_style: SurfaceStyle = 'Transparent'
opacity: float = 0.5
layout: tuple[tuple[str | Result, tuple[int, int], tuple[int, int]], ...] = ()
reference_screen: tuple[int, int] = (1728, 1117)
position_jitter: int = 8
size_jitter: int = 6
property files
validate()[source]

Validate required files and result markers without opening GaussView.

Raises ValueError for missing data or invalid workflow settings.

view(*, application_path: Path | str | None = None, reuse_views: bool = True, log_level: int | str = 'INFO')[source]

Open this workflow in GaussView.

Args:

application_path: Application bundle; defaults to ~/Applications/GaussView6/gview.app. reuse_views: Reuse matching open views; False opens new views. log_level: Standard logging level, such as “INFO”, “DEBUG” or logging.DEBUG.

Validates the workflow before opening windows. Failures raise their original exceptions for the caller to handle. Process arguments are never inspected.

Surface

class gvu.Surface(name: str, *, density: Path, potential: Path)[source]

Bases: object

Named density/ESP cube pair with explicitly labeled file arguments.

name: str
density: Path
potential: Path

Result

class gvu.Result(*values)[source]

Bases: Enum

SUMMARY = 'Summary...'
CHARGES = 'Charge Distribution...'
PCM_CAVITY = 'PCM Solvation Cavity...'
ATOM_PROPERTIES = 'Atom Properties...'
BOND_PROPERTIES = 'Bond Properties...'
SURFACES = 'Surfaces/Contours...'
VIBRATIONS = 'Vibrations...'
NMR = 'NMR...'
EXCITATIONS = 'UV-Vis...'
ORD = 'ORD...'
VIBRONIC = 'Vibronic...'
GROUP_TABLE = 'Molecule Group Table...'
SCAN = 'Scan...'
IRC = 'IRC/Path...'
TRAJECTORY = 'Trajectory...'
OPTIMIZATION = 'Optimization...'
ENERGY = 'Energy Plot...'
property titles
property markers
property intermediate_geometries

SurfaceStyle

class gvu.SurfaceStyle(*values)[source]

Bases: Enum

SOLID = 'Solid'
TRANSPARENT = 'Transparent'
MESH = 'Mesh'

Alignment

class gvu.Alignment(horizontal: str = 'X', vertical: str = 'Y')[source]

Bases: object

Signed molecular axes to place horizontally and vertically in the view.

horizontal: str = 'X'
vertical: str = 'Y'
property pairs

Bounds

class gvu.Bounds(x: int, y: int, width: int, height: int)[source]

Bases: object

x: int
y: int
width: int
height: int
classmethod from_window(window)[source]

Screen

class gvu.Screen(identifier: int, name: str, bounds: gvu.models.Bounds, work_area: gvu.models.Bounds)[source]

Bases: object

identifier: int
name: str
bounds: Bounds
work_area: Bounds

Grouping

class gvu.Grouping(*values)[source]

Bases: Enum

SEPARATE = 'Separate new molecule group for each file'
TOGETHER = 'Single new molecule group for all files'

Layout

class gvu.Layout(*values)[source]

Bases: Enum

OVERLAP = 'overlap'
CASCADE = 'cascade'
TILE = 'tile'

Shortcut

class gvu.Shortcut(character: str | None = None, modifiers: int | None = None, glyph: int | None = None, key: int | None = None)[source]

Bases: object

Native macOS shortcut attributes; modifiers use AX’s bit mask.

character: str | None = None
modifiers: int | None = None
glyph: int | None = None
key: int | None = None

Control

class gvu.Control(path: tuple[int, ...], role: str, label: str, enabled: bool | None, value: Any, actions: tuple[str, ...], writable: tuple[str, ...], dialog: str = '')[source]

Bases: object

path: tuple[int, ...]
role: str
label: str
enabled: bool | None
value: Any
actions: tuple[str, ...]
writable: tuple[str, ...]
dialog: str = ''

ActionUnavailable

class gvu.ActionUnavailable[source]

Bases: RuntimeError

The installed viewer cannot perform or verify the requested action.

UnsupportedFormat

class gvu.UnsupportedFormat[source]

Bases: ValueError

A file format is not supported by the installed GaussView backend.