File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ def compute_morgan_fingerprints(
2323 count : bool = True ,
2424 radius : int = 9 ,
2525 n_bits : int = 4096 ,
26+ bit_scaling : Optional [dict ] = None ,
2627 progress_bar : bool = True ,
2728 ) -> np .ndarray :
2829 """
@@ -42,13 +43,15 @@ def compute_morgan_fingerprints(
4243 Radius for Morgan fingerprint. Default 9.
4344 n_bits : int
4445 Number of bits for the fingerprint. Default 4096.
46+ bit_scaling : None or dict
47+ If provided, applies scaling to counts in sparse fingerprints.
4548 progress_bar : bool
4649 Whether to show a progress bar during computation. Default True.
4750 """
4851 fpgen = rdFingerprintGenerator .GetMorganGenerator (radius = radius , fpSize = n_bits )
4952
5053 if inchis and not smiles :
51- # convert inchis to smiles
54+ # Convert inchis to smiles
5255 smiles = []
5356 for inchi in inchis :
5457 try :
@@ -60,10 +63,12 @@ def compute_morgan_fingerprints(
6063 smiles .append (None )
6164 elif not smiles and not inchis :
6265 raise ValueError ("Either smiles or inchis must be provided." )
66+
6367 return compute_fingerprints_from_smiles (
6468 smiles ,
6569 fpgen ,
6670 count = count ,
6771 sparse = sparse ,
72+ bit_scaling = bit_scaling ,
6873 progress_bar = progress_bar ,
6974 )
You can’t perform that action at this time.
0 commit comments