From b4a956ec9cc08f8e0698ab90c597633fb6ddbd57 Mon Sep 17 00:00:00 2001 From: Mitch Miller Date: Mon, 5 Aug 2024 20:13:26 -0400 Subject: [PATCH 1/2] added salt stripping to flex plus searching made unit tests pass --- gsrs-module-substance-example/pom.xml | 9 +- .../salt_data_public.tsv | 61 ++++ .../src/main/resources/salt_data_public.tsv | 61 ++++ .../java/example/chem/SaltRemovalTest.java | 59 ++++ .../structureSearch/FlexSearchTest.java | 25 +- .../src/test/resources/application-test.conf | 1 + .../StructureHandlingConfiguration.java | 15 + .../substance/SubstanceCoreConfiguration.java | 5 +- .../controllers/SubstanceController.java | 35 +- .../module/substance/utils/ChemicalUtils.java | 322 ++++++++++++++++++ .../module/substance/utils/ChemicalUtils.java | 12 +- 11 files changed, 576 insertions(+), 29 deletions(-) create mode 100644 gsrs-module-substance-example/salt_data_public.tsv create mode 100644 gsrs-module-substance-example/src/main/resources/salt_data_public.tsv create mode 100644 gsrs-module-substance-example/src/test/java/example/chem/SaltRemovalTest.java create mode 100644 gsrs-module-substances-core/src/main/java/gsrs/module/substance/StructureHandlingConfiguration.java create mode 100644 gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java diff --git a/gsrs-module-substance-example/pom.xml b/gsrs-module-substance-example/pom.xml index 59894fd2c..6298ba351 100644 --- a/gsrs-module-substance-example/pom.xml +++ b/gsrs-module-substance-example/pom.xml @@ -31,8 +31,8 @@ org.apache.maven.plugins maven-compiler-plugin - 8 - 8 + 11 + 11