Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Forgot other test class - spotted quirk with writing charges which is…
… now resolved.
  • Loading branch information
johnmay committed Oct 7, 2016
1 parent 144f4d7 commit c575ef1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -112,7 +112,7 @@ private void checkFPSmartsForMolecule(String moleculeSmiles,
CircularFingerprinter circ = new CircularFingerprinter();
circ.calculate(mol);
SmartsFragmentExtractor subsmarts = new SmartsFragmentExtractor(mol);
subsmarts.setIncludePeripheralBonds(true);
subsmarts.setMode(SmartsFragmentExtractor.MODE_JCOMPOUNDMAPPER);
int numFP = circ.getFPCount();

Set<String> actual = new HashSet<>();
Expand Down
Expand Up @@ -408,10 +408,11 @@ private String encodeAtomExpr(int atmIdx) {
if (chg == null) chg = 0;


if (chg < -1 || chg > +1) {
if (chg <= -1 || chg >= +1) {
if (chg >= 0) sb.append('+');
else sb.append('-');
sb.append(Math.abs(chg));
int abs = Math.abs(chg);
if (abs > 1) sb.append(abs);
complex = true;
} else if (mode == MODE_EXACT) {
sb.append("+0");
Expand Down

0 comments on commit c575ef1

Please sign in to comment.