From 70b0636f91aa5ab238b344d70a6427928355a5a1 Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Sat, 9 Sep 2023 14:45:06 -0400 Subject: [PATCH] Adjust nitrogen valence determination Fix #1201 - only allow valence of 5 if there's a nitro group Signed-off-by: Geoff Hutchison --- avogadro/core/mdlvalence_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avogadro/core/mdlvalence_p.h b/avogadro/core/mdlvalence_p.h index b2731f44bd..b642c6f823 100644 --- a/avogadro/core/mdlvalence_p.h +++ b/avogadro/core/mdlvalence_p.h @@ -97,7 +97,7 @@ static unsigned int atomValence(const unsigned char atomicNumber, case -1: return 2; case 0: - if (numBonds <= 3) + if (numBonds != 5) return 3; return 5; case 1: