Skip to content
Permalink
Browse files
More tidying up - the sort in these two places does nothing since it …
…only compares the "stringScore"
johnmay committed Sep 12, 2022
1 parent 5a7d75b commit d500be0
Showing 1 changed file with 15 additions and 19 deletions.
*
*@exception org.openscience.cdk.exception.CDKException Thrown if something goes wrong
*/
private void createCode() throws CDKException {
List<TreeNode> sphereNodes = null;
TreeNode tn = null;

for (int f = 0; f < atomContainer.getAtomCount(); f++) {
atomContainer.getAtom(f).setFlag(CDKConstants.VISITED, false);
}

for (int f = 0; f < maxSphere; f++) {
sphereNodes = spheres[maxSphere - f];
List<TreeNode> sphereNodes = spheres[maxSphere - f];
for (int g = 0; g < sphereNodes.size(); g++) {
tn = sphereNodes.get(g);
TreeNode tn = sphereNodes.get(g);
if (tn.source != null) {
tn.source.ranking += tn.degree;
}

}
}

for (int f = 0; f < maxSphere; f++) {
sphereNodes = spheres[f];
List<TreeNode> sphereNodes = spheres[f];
calculateNodeScores(sphereNodes);

COLLECTOR-SAHAB / differentiating test: RadicalSiteHrBetaReactionTest

sphereNodes.modCount = 5 only occurs in the original version.

sortNodesByScore(sphereNodes);
// sortNodesByScore(sphereNodes); // does nothing
}

for (int f = 0; f < maxSphere; f++) {
sphereNodes = spheres[f];

COLLECTOR-SAHAB / differentiating test: RadicalSiteHrBetaReactionTest

spheres[2].modCount = 7 only occurs in the patched version.

for (int g = 0; g < sphereNodes.size(); g++) {
tn = (TreeNode) sphereNodes.get(g);
for (TreeNode tn : sphereNodes) {
tn.score += tn.ranking;
}
sortNodesByScore(sphereNodes);
// sortNodesByScore(sphereNodes); // does nothing
}
for (int f = 0; f < maxSphere; f++) {
sphereNodes = spheres[f];
for (int g = 0; g < sphereNodes.size(); g++) {
tn = (TreeNode) sphereNodes.get(g);
for (TreeNode tn : sphereNodes) {
String localscore = tn.score + "";
while (localscore.length() < 6) {
localscore = "0" + localscore;
}
tn.stringscore = tn.source.stringscore + "" + localscore;
}
sortNodesByScore(sphereNodes);
}
HOSECode.append(centerCode);
for (int f = 0; f < maxSphere; f++) {
sphere = f + 1;
sphereNodes = spheres[f];
String s = getSphereCode(sphereNodes);
HOSECode.append(s);
}
}
/**

0 comments on commit d500be0

Please sign in to comment.