From d16ff116c43db8a2ff9dbe417ed3814358aa7008 Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Thu, 12 Dec 2019 16:10:47 -0500 Subject: [PATCH] add catch for misuse of internal moment of inertia calculation --- rmgpy/statmech/conformer.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rmgpy/statmech/conformer.pyx b/rmgpy/statmech/conformer.pyx index 09d74460680..c8301a640e1 100644 --- a/rmgpy/statmech/conformer.pyx +++ b/rmgpy/statmech/conformer.pyx @@ -384,7 +384,8 @@ cdef class Conformer(RMGObject): elif pivots[0] in top1 and pivots[1] in top1: raise ValueError('Both pivot atoms included in top; you must specify only one pivot atom that belongs' ' with the specified top.') - + elif 0 in top1: + raise ValueError('Top must be zero indexed.') # Enumerate atoms in other top top2 = [i + 1 for i in range(n_atoms) if i + 1 not in top1]