Skip to content

Commit 025fd3f

Browse files
authored
fix ranges and clean
* clean * fix problem missing some results
1 parent 81ea0fd commit 025fd3f

File tree

4 files changed

+5
-18
lines changed

4 files changed

+5
-18
lines changed

.appveyor.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ install:
2525
}
2626
build_script:
2727
- ps: |
28-
if ($env:PYTHON) {
29-
python setup.py sdist
30-
pip install --verbose dist\fpsim2-0.1.4.tar.gz
31-
} else {
3228
conda build conda.recipe
3329
conda install --use-local fpsim2
34-
}
3530
test_script:
3631
- cmd: python test\test_fpsim.py

.travis.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ before_install:
3535
fi
3636
install:
3737
- |
38-
if [ -n "$PYTHON" ]; then
39-
python setup.py sdist
40-
pip install --verbose dist/*.tar.gz
41-
elif [ -n "$CONDA" ]; then
42-
conda build --py $CONDA conda.recipe
43-
conda install --use-local fpsim2
44-
fi
38+
conda build --py $CONDA conda.recipe
39+
conda install --use-local fpsim2
4540
script:
4641
- python test/test_fpsim.py

FPSim2/FPSim2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def on_disk_search(query, fp_filename, chunk_indexes, threshold, s_index):
1818
Numpy array with results.
1919
"""
2020
with tb.open_file(fp_filename, mode="r") as fp_file:
21-
fps = fp_file.root.fps[chunk_indexes[0] : chunk_indexes[1]]
21+
fps = fp_file.root.fps[slice(*chunk_indexes)]
2222
num_fields = len(fps[0])
2323
fps = fps.view("<u8")
2424
fps = fps.reshape(int(fps.size / num_fields), num_fields)

FPSim2/io/FPSim2_io.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,7 @@ def load_query(mol_string, fp_filename):
138138
config = fp_file.root.config
139139
fp_func = config[0]
140140
fp_func_params = config[1]
141-
# if rdkit.__version__ != config[2]:
142-
# print('Warning, FPS were created with RDKit {}, now using {}'
143-
# .format(config[2], rdkit.__version__))
144-
# generate the fpe
141+
# generate the efp
145142
efp = rdmol_to_efp(rdmol, fp_func, fp_func_params)
146143
efp.append(py_popcount(np.array(efp, dtype=np.uint64)))
147144
efp.insert(0, 0)
@@ -172,7 +169,7 @@ def get_fp_length(fp_func, fp_func_params):
172169

173170

174171
def get_bounds_range(query, ranges, threshold, coeff):
175-
query_count = py_popcount(query)
172+
query_count = query[-1]
176173
range_to_keep = []
177174

178175
for count, c_range in ranges:

0 commit comments

Comments
 (0)