From 4b4cf86f99fa0daa97483a08f6d74c321b52755a Mon Sep 17 00:00:00 2001 From: Eloy Felix Date: Thu, 26 Dec 2024 23:53:03 +0000 Subject: [PATCH] docs --- docs/user_guide/create_db_file.md | 8 ++++---- docs/user_guide/gpu.md | 2 +- docs/user_guide/sim_matrix.md | 2 +- docs/user_guide/similarity.md | 4 ++-- docs/user_guide/tversky.md | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/user_guide/create_db_file.md b/docs/user_guide/create_db_file.md index 29fa133e..2673598f 100644 --- a/docs/user_guide/create_db_file.md +++ b/docs/user_guide/create_db_file.md @@ -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' @@ -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} ) @@ -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} ) @@ -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} ) diff --git a/docs/user_guide/gpu.md b/docs/user_guide/gpu.md index 5f305839..0c3ccb99 100644 --- a/docs/user_guide/gpu.md +++ b/docs/user_guide/gpu.md @@ -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) ``` diff --git a/docs/user_guide/sim_matrix.md b/docs/user_guide/sim_matrix.md index 39e21f4a..4c035612 100644 --- a/docs/user_guide/sim_matrix.md +++ b/docs/user_guide/sim_matrix.md @@ -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 diff --git a/docs/user_guide/similarity.md b/docs/user_guide/similarity.md index eef91a9c..168fae1f 100644 --- a/docs/user_guide/similarity.md +++ b/docs/user_guide/similarity.md @@ -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) ``` @@ -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) ``` diff --git a/docs/user_guide/tversky.md b/docs/user_guide/tversky.md index cfec265f..68a5079e 100644 --- a/docs/user_guide/tversky.md +++ b/docs/user_guide/tversky.md @@ -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. @@ -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) ```