From 67d97fd7a0451d4571144c42492466f88557b6b5 Mon Sep 17 00:00:00 2001 From: korffmo Date: Sat, 13 Jul 2024 17:50:54 +0200 Subject: [PATCH] Update Flexophore, added weights for MolDistHistViz --- .../chem/descriptor/flexophore/MolDistHistViz.java | 11 +++-------- .../ObjectiveBlurFlexophoreHardMatchUncovered.java | 3 --- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/actelion/research/chem/descriptor/flexophore/MolDistHistViz.java b/src/main/java/com/actelion/research/chem/descriptor/flexophore/MolDistHistViz.java index a3a39582..c11d01d8 100644 --- a/src/main/java/com/actelion/research/chem/descriptor/flexophore/MolDistHistViz.java +++ b/src/main/java/com/actelion/research/chem/descriptor/flexophore/MolDistHistViz.java @@ -168,19 +168,14 @@ public MolDistHistViz(MolDistHist mdh) { if(mdh.getNumPPNodes()==0){ throw new RuntimeException("Empty object given into constructor."); } - mdh.copy(this); - modeFlexophore = mdh.getModeFlexophore(); - - liPPNodeViz=new ArrayList(mdh.getNumPPNodes()); + liPPNodeViz=new ArrayList<>(mdh.getNumPPNodes()); for (int i = 0; i < mdh.getNumPPNodes(); i++) { PPNodeViz node = new PPNodeViz(mdh.getNode(i)); liPPNodeViz.add(node); } - - hsIndexInevitablePPPoints = new HashSet(); - + hsIndexInevitablePPPoints = new HashSet<>(); realize(); } @@ -636,7 +631,7 @@ public boolean isInevitablePharmacophorePoint(int indexNode){ } @Override public double getWeightPharmacophorePoint(int indexNode) { - return 1.0; + return arrWeight[indexNode]; } public boolean isAliphatic(int indexNode) { diff --git a/src/main/java/com/actelion/research/chem/descriptor/flexophore/completegraphmatcher/ObjectiveBlurFlexophoreHardMatchUncovered.java b/src/main/java/com/actelion/research/chem/descriptor/flexophore/completegraphmatcher/ObjectiveBlurFlexophoreHardMatchUncovered.java index 407914af..43b5e9ee 100644 --- a/src/main/java/com/actelion/research/chem/descriptor/flexophore/completegraphmatcher/ObjectiveBlurFlexophoreHardMatchUncovered.java +++ b/src/main/java/com/actelion/research/chem/descriptor/flexophore/completegraphmatcher/ObjectiveBlurFlexophoreHardMatchUncovered.java @@ -325,11 +325,8 @@ public boolean isValidSolution(SolutionCompleteGraph solution) { // if(mapping){ for (int i = 0; i < heap; i++) { - int indexNodeQuery = solution.getIndexQueryFromHeap(i); - int indexNodeBase = solution.getIndexCorrespondingBaseNode(indexNodeQuery); - if(!areNodesMapping(indexNodeQuery, indexNodeBase)) { mapping = false; break;