From b4167fa0e0f11818b9f23609c90d2b51ddf901ee Mon Sep 17 00:00:00 2001 From: avcopan Date: Thu, 13 Nov 2025 14:45:40 -0600 Subject: [PATCH 1/2] Prevent code from dying when grad is None --- src/projrot_io/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/projrot_io/util.py b/src/projrot_io/util.py index 97e28531..43bb5c27 100644 --- a/src/projrot_io/util.py +++ b/src/projrot_io/util.py @@ -66,16 +66,16 @@ def _format_grad_str(geo, grad): :type grads: list :rtype: str """ - atom_list = [] for i, (sym, _) in enumerate(geo): atom_list.append(int(ptab.to_number(sym))) # Format the strings for the xyz gradients full_grads_str = '' - for i, grads in enumerate(grad): - grads_str = f'{grads[0]:>14.8f}{grads[1]:>14.8f}{grads[2]:>14.8f}' - full_grads_str += f'{i+1:2d}{atom_list[i]:4d}{grads_str}\n' + if grad: + for i, grads in enumerate(grad): + grads_str = f'{grads[0]:>14.8f}{grads[1]:>14.8f}{grads[2]:>14.8f}' + full_grads_str += f'{i+1:2d}{atom_list[i]:4d}{grads_str}\n' return remove_trail_whitespace(full_grads_str) From 7f7bd190873f311a850e26d549f073866aecbbc3 Mon Sep 17 00:00:00 2001 From: avcopan Date: Thu, 13 Nov 2025 14:47:59 -0600 Subject: [PATCH 2/2] Update version --- pixi.lock | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pixi.lock b/pixi.lock index 0f3d9989..10ff3c65 100644 --- a/pixi.lock +++ b/pixi.lock @@ -582,8 +582,8 @@ packages: timestamp: 1759948672799 - pypi: ./ name: autoio - version: 2025.10.2 - sha256: 3f634db95d830ccba4294985049f1b752e7f7cfe50f8cd8b43ee0359a98be061 + version: 2025.11.0 + sha256: ff80070e26545c913d5bc7e0431f6a4cb195414a0ffd049725ac32ca97063e43 requires_python: '>=3.11' editable: true - conda: https://conda.anaconda.org/conda-forge/linux-64/brotli-1.1.0-hb03c661_4.conda diff --git a/pyproject.toml b/pyproject.toml index 4fe73b70..428856c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "autoio" -version = "2025.10.2" +version = "2025.11.0" description = "I/O interfaces for external codes used by AutoMech" readme = "README.md" dependencies = []