com.actelion.research.chem.phesa.pharmacophore.PPTriangleCreator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openchemlib Show documentation
Show all versions of openchemlib Show documentation
Open Source Chemistry Library
package com.actelion.research.chem.phesa.pharmacophore;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.actelion.research.chem.Coordinates;
import com.actelion.research.chem.phesa.pharmacophore.pp.IPharmacophorePoint;
import com.actelion.research.chem.phesa.pharmacophore.pp.PPGaussian;
public class PPTriangleCreator {
private static final double SIDE_LENGTH_CUTOFF = 2.5;
private static final int MAX_TRIANGLES = 1000;
private PPTriangleCreator() {
}
public static Map> create(List ppGaussians, Coordinates com) {
List pharmacophorePoints = new ArrayList();
for(PPGaussian ppGaussian : ppGaussians)
pharmacophorePoints.add(ppGaussian.getPharmacophorePoint());
pharmacophorePoints.sort((p1,p2) -> {
int f1 = p1.getFunctionalityIndex();
int f2 = p2.getFunctionalityIndex();
return Integer.compare(f1, f2);
});
List toSkip = new ArrayList();
int n = pharmacophorePoints.size();
double[][] distMat = new double[n][n];
for(int i=0;i> triangles = new HashMap>();
int counter = 0;
for(int i=0;i triangleList = new ArrayList();
triangleList.add(triangle);
triangles.put(key, triangleList);
}
}
}
}
return triangles;
}
}