[Git][java-team/openchemlib][upstream] New upstream version 2020.11.3+dfsg

Andrius Merkys gitlab at salsa.debian.org
Mon Nov 23 11:21:52 GMT 2020



Andrius Merkys pushed to branch upstream at Debian Java Maintainers / openchemlib


Commits:
8089473a by Andrius Merkys at 2020-11-23T05:39:28-05:00
New upstream version 2020.11.3+dfsg
- - - - -


9 changed files:

- pom.xml
- src/main/java/com/actelion/research/chem/IDCodeParserWithoutCoordinateInvention.java
- src/main/java/com/actelion/research/chem/Molecule.java
- src/main/java/com/actelion/research/chem/alignment3d/PheSAAlignmentOptimizer.java
- src/main/java/com/actelion/research/chem/descriptor/flexophore/DistHistHelper.java
- src/main/java/com/actelion/research/chem/descriptor/flexophore/completegraphmatcher/ObjectiveFlexophoreHardMatchUncovered.java
- src/main/java/com/actelion/research/chem/descriptor/flexophore/generator/ConstantsFlexophoreGenerator.java
- src/main/java/com/actelion/research/chem/descriptor/flexophore/generator/SubFlexophoreGenerator.java
- src/main/java/com/actelion/research/chem/phesa/pharmacophore/PharmacophoreCalculator.java


Changes:

=====================================
pom.xml
=====================================
@@ -8,7 +8,7 @@
     Please follow the naming scheme YEAR.MONTH.RELEASE_NO_OF_MONTH
     (eg. 2016.4.1 for second release in Apr 2016)
     -->
-    <version>2020.11.2</version>
+    <version>2020.11.3</version>
 
     <name>OpenChemLib</name>
     <description>Open Source Chemistry Library</description>
@@ -98,7 +98,7 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>4.9</version>
+            <version>4.13.1</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
@@ -189,7 +189,7 @@
         <connection>scm:git:git at github.com:Actelion/openchemlib.git</connection>
         <developerConnection>scm:git:git at github.com:Actelion/openchemlib.git</developerConnection>
         <url>https://github.com/Actelion/openchemlib</url>
-      <tag>openchemlib-2020.11.2</tag>
+      <tag>openchemlib-2020.11.3</tag>
   </scm>
 
     <distributionManagement>


=====================================
src/main/java/com/actelion/research/chem/IDCodeParserWithoutCoordinateInvention.java
=====================================
@@ -936,7 +936,7 @@ public class IDCodeParserWithoutCoordinateInvention {
 		}
 
 	public void parseMapping(byte[] mapping, int mappingStart) {
-		if (mapping == null || mapping.length <= mappingStart)
+		if (mapping == null || mapping.length <= mappingStart || mapping[mappingStart] < 0x40)
 			return;
 
 		decodeBitsStart(mapping, mappingStart);


=====================================
src/main/java/com/actelion/research/chem/Molecule.java
=====================================
@@ -2446,7 +2446,7 @@ public class Molecule implements Serializable {
 		for (int i=0; i<original.length; i++) {
 			if (original[i] != null) {
 				copy[i] = new int[original[i].length];
-				System.arraycopy(original[i], 0, copy, 0, original[i].length);
+				System.arraycopy(original[i], 0, copy[i], 0, original[i].length);
 			}
 		}
 		return copy;
@@ -2456,7 +2456,7 @@ public class Molecule implements Serializable {
 		for (int i=0; i<original.length; i++) {
 			if (original[i] != null) {
 				copy[i] = new byte[original[i].length];
-				System.arraycopy(original[i], 0, copy, 0, original[i].length);
+				System.arraycopy(original[i], 0, copy[i], 0, original[i].length);
 			}
 		}
 		return copy;


=====================================
src/main/java/com/actelion/research/chem/alignment3d/PheSAAlignmentOptimizer.java
=====================================
@@ -146,7 +146,7 @@ public class PheSAAlignmentOptimizer {
 		double[] bestTransformPMI = new double[7];
 		MolecularVolume[] bestPairPMI = new MolecularVolume[2];
 		double similarity = 0.0;
-		if(bestScoreTriangle>=0.0) {
+		if(bestScoreTriangle>0.0) {
 			similarity = bestScoreTriangle;
 			result[0] = similarity;
 			result[1] = triangleRes[1];


=====================================
src/main/java/com/actelion/research/chem/descriptor/flexophore/DistHistHelper.java
=====================================
@@ -36,6 +36,28 @@ import java.util.List;
  */
 public class DistHistHelper {
 
+    public static int getMedianBin(byte [] a){
+
+        int medianBin=-1;
+
+        int sum = 0;
+        for (byte b : a) {
+            sum+=b;
+        }
+        sum /= 2;
+
+        int s2=0;
+        for (int i = 0; i < a.length; i++) {
+            s2+=a[i];
+            if(s2>=sum){
+                medianBin=i;
+                break;
+            }
+        }
+
+        return medianBin;
+    }
+
     public static RangeStatistics getRangeStatistics(MolDistHist mdh){
 
         RangeStatistics rangeStatisticsTotal = new RangeStatistics();


=====================================
src/main/java/com/actelion/research/chem/descriptor/flexophore/completegraphmatcher/ObjectiveFlexophoreHardMatchUncovered.java
=====================================
@@ -421,6 +421,15 @@ public class ObjectiveFlexophoreHardMatchUncovered implements IObjectiveComplete
 		
 		int heap = solution.getSizeHeap();
 
+		//
+		// the query must hit with all pharmacophore nodes
+		//
+		if(modeQuery) {
+			if (nodesQuery != heap) {
+				return 0;
+			}
+		}
+
 		double sumPairwiseMapping = 0;
 
 		// double productPairwiseMapping = 0;
@@ -462,7 +471,7 @@ public class ObjectiveFlexophoreHardMatchUncovered implements IObjectiveComplete
 		double ratioNodesMatchBase = Math.min(heap, nodesBase) / (double)Math.max(heap, nodesBase);
 
 		if(modeQuery) {
-			similarity = avrPairwiseMappingScaled * coverageQuery * ratioNodesMatchQuery;
+			similarity = avrPairwiseMappingScaled * coverageQuery * coverageQuery * ratioNodesMatchQuery * ratioNodesMatchQuery;
 		} else {
 			similarity = avrPairwiseMappingScaled * coverage * ratioNodesMatchQuery * ratioNodesMatchBase;
 		}


=====================================
src/main/java/com/actelion/research/chem/descriptor/flexophore/generator/ConstantsFlexophoreGenerator.java
=====================================
@@ -27,10 +27,14 @@ public class ConstantsFlexophoreGenerator {
      * Filter for sliding window to blurr distance histograms
      * 07.04.2020
      */
-    // public static final double [] FILTER = {0.25,0.5,0.25};
+    public static final double [] FILTER_SUB = {0.25,0.5,0.25};
 
     // public static final double [] FILTER = {0.125, 0.25,0.25,0.25, 0.125};
     // public static final double [] FILTER = {0.06, 0.125, 0.19,0.25,0.19, 0.125, 0.06};
+
+    /**
+     *
+     */
     public static final double [] FILTER = {0.125, 0.125, 0.125,0.25,0.125, 0.125, 0.125};
 
 


=====================================
src/main/java/com/actelion/research/chem/descriptor/flexophore/generator/SubFlexophoreGenerator.java
=====================================
@@ -15,7 +15,6 @@ import java.util.List;
  * This software is the proprietary information of Actelion Pharmaceuticals, Ltd.
  * Use is subject to license terms.</p>
  * @author Modest von Korff
- * @version 1.0
  * Oct 12, 2012 MvK: Start implementation
  */
 public class SubFlexophoreGenerator {
@@ -154,9 +153,7 @@ public class SubFlexophoreGenerator {
 		
 		for (int size = minNumPPPoints; size < maxNumPPPointsReal; size++) {
 			List<MolDistHistViz> liMDHVSub = generateSubPharmacophores(mdhv, size);
-			
 			liHsMolDistHistViz.get(size).addAll(liMDHVSub);
-			
 		}
 					
 		List<MolDistHistViz> liMDHVSubAll = new ArrayList<MolDistHistViz>();


=====================================
src/main/java/com/actelion/research/chem/phesa/pharmacophore/PharmacophoreCalculator.java
=====================================
@@ -68,7 +68,7 @@ public class PharmacophoreCalculator {
 					if(interactionClass<0) {
 						continue;
 					}
-					if(mol.getAtomicNo(i)==8 && neighbours==1 && (mol.getConnBondOrder(i, 0)==2 || AtomFunctionAnalyzer.isAcidicOxygen(mol, i) )) {
+					if(mol.getAtomicNo(i)==8 && neighbours==1 && (mol.getConnBondOrder(i, 0)==2 || AtomFunctionAnalyzer.isAcidicOxygen(mol, i) || mol.getAtomCharge(i)==-1 )) {
 						int a1 = mol.getConnAtom(i,0);
 						if(!(mol.getAtomicNo(a1)==16 || mol.getAtomicNo(a1)==15)) {		
 							int aa1 = mol.getConnAtom(a1,0);
@@ -76,6 +76,7 @@ public class PharmacophoreCalculator {
 								aa1 = mol.getConnAtom(a1,1);
 							neighbourList.add(aa1);
 							AcceptorPoint ap = new AcceptorPoint(mol,i,neighbourList,interactionClass,1);
+
 							ppPoints.add(ap);
 							List<Integer> neighbourList2 = new ArrayList<Integer>();
 							for(int neighbour : neighbourList) {
@@ -83,6 +84,7 @@ public class PharmacophoreCalculator {
 							}
 							ap = new AcceptorPoint(mol,i,neighbourList2,interactionClass,2);
 							ppPoints.add(ap);
+
 							}
 						else { 
 							AcceptorPoint ap = new AcceptorPoint(mol,i,neighbourList,interactionClass);
@@ -93,6 +95,7 @@ public class PharmacophoreCalculator {
 					else {
 					AcceptorPoint ap = new AcceptorPoint(mol,i,neighbourList,interactionClass);
 					ppPoints.add(ap);
+
 					}
 			}
 		}



View it on GitLab: https://salsa.debian.org/java-team/openchemlib/-/commit/8089473afb60abe4596694df2be2f540fce06bc5

-- 
View it on GitLab: https://salsa.debian.org/java-team/openchemlib/-/commit/8089473afb60abe4596694df2be2f540fce06bc5
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20201123/b34c714a/attachment.html>


More information about the pkg-java-commits mailing list