Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eloyfelix committed Dec 26, 2024
1 parent 16117e9 commit 4b4cf86
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions docs/user_guide/create_db_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ from FPSim2.io import create_db_file
create_db_file(
mols_source='stuff.sdf',
filename='stuff.h5',
mol_format=None,
mol_format=None, # not required, .sdf will always use 'molfile'
fp_type='Morgan',
fp_params={'radius': 2, 'fpSize': 2048},
mol_id_prop='mol_id'
Expand All @@ -35,7 +35,7 @@ from FPSim2.io import create_db_file
create_db_file(
mols_source='chembl.smi',
filename='chembl.h5',
mol_format=None,
mol_format=None, # not required, .smi will always use 'smiles'
fp_type='Morgan',
fp_params={'radius': 2, 'fpSize': 2048}
)
Expand All @@ -49,7 +49,7 @@ mols = [['CC', 1], ['CCC', 2], ['CCCC', 3]]
create_db_file(
mols_source=mols,
filename='test/10mols.h5',
mol_format='smiles',
mol_format='smiles', # required
fp_type='Morgan',
fp_params={'radius': 2, 'fpSize': 2048}
)
Expand All @@ -69,7 +69,7 @@ res_prox = s.execute(sql_query)
create_db_file(
mols_source=res_prox,
filename='test/10mols.h5',
mol_format='molfile',
mol_format='molfile', # required
fp_type='Morgan',
fp_params={'radius': 2, 'fpSize': 2048}
)
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/gpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ fp_filename = 'chembl_27.h5'
fpce = FPSim2CudaEngine(fp_filename)

query = 'CC(=O)Oc1ccccc1C(=O)O'
results = fpce.similarity(query, 0.7)
results = fpce.similarity(query, threshold=0.7)
```
2 changes: 1 addition & 1 deletion docs/user_guide/sim_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Use the `FPSim2.FPSim2Engine.symmetric_distance_matrix` function to create a Sci
>>> from FPSim2 import FPSim2Engine
>>> fp_filename = 'chembl_27.h5'
>>> fpe = FPSim2Engine(fp_filename)
>>> csr_matrix = fpe.symmetric_distance_matrix(0.7, n_workers=4)
>>> csr_matrix = fpe.symmetric_distance_matrix(threshold=0.7, n_workers=4)
```

!!! note
Expand Down
4 changes: 2 additions & 2 deletions docs/user_guide/similarity.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fp_filename = 'chembl_27.h5'
fpe = FPSim2Engine(fp_filename)

query = 'CC(=O)Oc1ccccc1C(=O)O'
results = fpe.similarity(query, 0.7, n_workers=1)
results = fpe.similarity(query, threshold=0.7, n_workers=1)
```


Expand Down Expand Up @@ -42,5 +42,5 @@ fp_filename = 'chembl_27.h5'
fpe = FPSim2Engine(fp_filename, in_memory_fps=False)

query = 'CC(=O)Oc1ccccc1C(=O)O'
results = fpe.on_disk_similarity(query, 0.7, n_workers=1)
results = fpe.on_disk_similarity(query, threshold=0.7, n_workers=1)
```
4 changes: 2 additions & 2 deletions docs/user_guide/tversky.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fp_filename = 'chembl_27.h5'
fpe = FPSim2Engine(fp_filename)

query = 'CC(=O)Oc1ccccc1C(=O)O'
results = fpe.tversky(query, 0.7, 0.5, 0.5, n_workers=1)
results = fpe.tversky(query, threshold=0.7, a=0.5, b=0.5, n_workers=1)
```

> **Tip:** *n_workers* parameter can be used to split a single query into multiple threads to speed up the seach. This is specially useful when searching big datasets.
Expand All @@ -32,5 +32,5 @@ fp_filename = 'chembl_27.h5'
fpe = FPSim2Engine(fp_filename, in_memory_fps=False)

query = 'CC(=O)Oc1ccccc1C(=O)O'
results = fpe.on_disk_tversky(query, 0.7, 0.5, 0.5, n_workers=1)
results = fpe.on_disk_tversky(query, threshold=0.7, a=0.5, b=0.5, n_workers=1)
```

0 comments on commit 4b4cf86

Please sign in to comment.