Skip to content

Commit

Permalink
fix: parameters for CDK Tanimoto calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kohulan authored Sep 11, 2023
1 parent f728c92 commit 0f0fae6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/modules/toolkits/cdk_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def get_CDK_descriptors(molecule: any) -> Union[tuple, str]:
return "Check input and try again!"


def get_tanimoto_similarity_PubChem_CDK(mol1: str, mol2: str) -> str:
def get_tanimoto_similarity_PubChem_CDK(mol1: any, mol2: any) -> str:
"""
Calculate the Tanimoto similarity index between two molecules using PubChem fingerprints.
Expand Down Expand Up @@ -327,7 +327,7 @@ def get_tanimoto_similarity_PubChem_CDK(mol1: str, mol2: str) -> str:
return "Check the SMILES string for errors"


def get_tanimoto_similarity_ECFP_CDK(mol1: str, mol2: str, ECFP: int = 2) -> str:
def get_tanimoto_similarity_ECFP_CDK(mol1: any, mol2: any, ECFP: int = 2) -> str:
"""
Calculate the Tanimoto similarity index between two molecules using CircularFingerprinter fingerprints.
https://cdk.github.io/cdk/2.8/docs/api/org/openscience/cdk/fingerprint/CircularFingerprinter.html
Expand Down Expand Up @@ -365,14 +365,14 @@ def get_tanimoto_similarity_ECFP_CDK(mol1: str, mol2: str, ECFP: int = 2) -> str


def get_tanimoto_similarity_CDK(
mol1: str, mol2: str, fingerprinter: str = "PubChem", ECFP: int = 6
mol1: any, mol2: any, fingerprinter: str = "PubChem", ECFP: int = 6
) -> float:
"""
Calculate the Tanimoto similarity between two molecules using PubChem/CircularFingerprints in CDK.
Args:
mol1 (str): The first molecule, which can be provided as a molecule object.
mol2 (str): The second molecule.
mol1 (IAtomContainer): First molecule given by the user.
mol2 (IAtomContainer): Second molecule given by the user.
fingerprinter (str, optional): The fingerprinter to use. Currently, only "PubChem/ECFP6"
is supported. Defaults to "PubChem".
Expand Down

0 comments on commit 0f0fae6

Please sign in to comment.