Skip to content

Commit

Permalink
Fixed a bug in external atom check
Browse files Browse the repository at this point in the history
  • Loading branch information
ntk73 authored and johnmay committed Oct 6, 2016
1 parent 58f9899 commit 2a8e5b1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ public String getFPSmarts(FP fp, IAtomContainer molecule)
if (n == 0)
return null;

/*
//This is temporary code
if (n==1)
{
Expand All @@ -555,7 +556,8 @@ public String getFPSmarts(FP fp, IAtomContainer molecule)
//TODO
return sb.toString();
}
}
*/

curFP = fp;
curFPMolecule = molecule;
Expand Down Expand Up @@ -601,7 +603,7 @@ String nodeToString(int atom)
if (neighborNode == null) // This node has not been registered yet
{
//Check for external atom (e.g. it is a neighbor atom which is not in the fp.atoms[] array)
if (findArrayIndex(neighborAt, curFP.atoms) != -1)
if (findArrayIndex(neighborAt, curFP.atoms) == -1)
{
branches.add(bondToString1(bondOrder[neighborBo]) + "*");
continue;
Expand Down

0 comments on commit 2a8e5b1

Please sign in to comment.