Skip to content

Commit 6cd6c4e

Browse files
committed
fix fingerprint bytes
1 parent 71ff84e commit 6cd6c4e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ext/RDKitExt.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ using RDKitMinimalLib:
2222

2323

2424
function uint8vec_to_bitarray(uvec::Vector{UInt8})
25+
# Note: fp_as_bytes functions are LSB-first
2526
bits = BitVector(undef, 8 * length(uvec))
2627
for (i, byte) in enumerate(uvec)
2728
for j in 1:8
28-
bits[8*(i-1) + j] = (byte >> (8 - j)) & 0x01
29+
# bits[8*(i-1) + j] = (byte >> (8 - j)) & 0x01
30+
# bit reversal
31+
bits[8*(i-1) + (9 - j)] = (byte >> (8 - j)) & 0x01
2932
end
3033
end
3134
return bits

0 commit comments

Comments
 (0)