Fingerprint
gtrick.ogb2fp(name, root='dataset', fp_type=['morgan', 'maccs'])
¶
Generate fingerprint features for OGB datasets.
Molecular fingerprints are a way to represent molecules as mathematical objects.
Example
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
Name of the dataset. |
required |
root |
str
|
Root directory to store the dataset folder. |
'dataset'
|
fp_type |
list of str
|
The types of generated fingerprint. Can be the following values:
|
['morgan', 'maccs']
|
Returns:
Type | Description |
---|---|
torch.Tensor
|
The generated fingerprint features. |
torch.Tensor
|
The ground truth label. |
gtrick.smiles2fp(smiles, fp_type)
¶
Convert smile strings to fingerprint.
Molecular fingerprints are a way to represent molecules as mathematical objects.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
smiles |
list of str
|
The smile strings to convert. |
required |
fp_type |
list of str
|
The types of generated fingerprint. Can be the following values:
|
required |
Returns:
Type | Description |
---|---|
np.array
|
The generated fingerprint features. |