From e5a02b5d2b89ba21bb466980e2d0bd0ae5eabb95 Mon Sep 17 00:00:00 2001 From: Tyler Peryea Date: Thu, 7 Dec 2023 22:06:57 -0500 Subject: [PATCH 1/3] updated stereo definitions --- pom.xml | 2 +- .../java/gov/nih/ncats/molwitch/Bond.java | 4 +++ .../gov/nih/ncats/molwitch/Chirality.java | 26 ++++++++++++++++--- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 81fe746..9108547 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ gov.nih.ncats molwitch - 0.6.3-SNAPSHOT + 0.6.5-SNAPSHOT ncats-molwitch diff --git a/src/main/java/gov/nih/ncats/molwitch/Bond.java b/src/main/java/gov/nih/ncats/molwitch/Bond.java index 3e4f356..f131089 100644 --- a/src/main/java/gov/nih/ncats/molwitch/Bond.java +++ b/src/main/java/gov/nih/ncats/molwitch/Bond.java @@ -250,6 +250,10 @@ public enum DoubleBondStereo { * Z (from zusammen, the German word for "together"). */ Z_CIS; + + public boolean isDefined() { + return this == Z_CIS || this == E_TRANS; + } } diff --git a/src/main/java/gov/nih/ncats/molwitch/Chirality.java b/src/main/java/gov/nih/ncats/molwitch/Chirality.java index 49f8010..54b3986 100644 --- a/src/main/java/gov/nih/ncats/molwitch/Chirality.java +++ b/src/main/java/gov/nih/ncats/molwitch/Chirality.java @@ -32,7 +32,15 @@ public enum Chirality { * Sinister (left, even). priority decreases in counterclockwise direction. */ S(2), - Parity_Either(3); + Parity_Either(3), + /** + * Psuedo-Rectus (right, odd). Priority decreases in clockwise direction. + */ + r(4), + /** + * Psuedo-Sinister (left, even). priority decreases in counterclockwise direction. + */ + s(5); @@ -42,8 +50,8 @@ public enum Chirality { private static final Chirality[] VALUES; private static final Chirality[] INVERTED; static { - VALUES = new Chirality[] {Non_Chiral, R, S, Parity_Either}; - INVERTED = new Chirality[] {Unknown,Non_Chiral, S, R, Parity_Either}; + VALUES = new Chirality[] {Non_Chiral, R, S, Parity_Either, r, s}; + INVERTED = new Chirality[] {Unknown,Non_Chiral, S, R, Parity_Either, s, r}; } Chirality(int v){ @@ -65,9 +73,19 @@ public boolean isEither(){ public int getParity(){ return parity; } + public boolean isRForm() { + return parity==1 || parity==4; + } + public boolean isSForm() { + return parity==2 || parity==5; + } + + public boolean isDefined() { + return parity==2 || parity==1 || parity==4 || parity==5; + } public static Chirality valueByParity(int parity) { - if(parity <0 || parity > 3) { + if(parity <0 || parity > 5) { return Unknown; } return VALUES[parity]; From dbe64c71657e4c103e701bdf1756bb885595bfe4 Mon Sep 17 00:00:00 2001 From: Tyler Peryea Date: Thu, 7 Dec 2023 22:19:46 -0500 Subject: [PATCH 2/3] incremented version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a2d10da..d0f01e3 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ gov.nih.ncats molwitch - 0.6.5 + 0.6.6-SNAPSHOT ncats-molwitch From f302d8f4ae0ad52f9bbbb970dc2b43b4bac0c517 Mon Sep 17 00:00:00 2001 From: Mitch Miller Date: Fri, 19 Jan 2024 13:33:36 -0500 Subject: [PATCH 3/3] bumped version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d0f01e3..d50874b 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ gov.nih.ncats molwitch - 0.6.6-SNAPSHOT + 0.6.6 ncats-molwitch