-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
When I tested a molecule(aspirin) to get fingerprints by using PubChemFingerprints.py and pubchempy module, I have got a problem.
There are some differences between two FP results.
I have attached my test code which consists of PubChemFingerprints.py + my def to calculate pubchempy FP.
# ------------------------------------
def pubchem_fp(mol):
import pubchempy as pcp
smi = Chem.MolToSmiles(mol)
pubchem_compound = pcp.get_compounds(smi, "smiles")[0]
feature = [int(bit) for bit in pubchem_compound.cactvs_fingerprint]
return feature
if __name__ == "__main__":
SMILES = "CC(=O)OC1=CC=CC=C1C(=O)O"
mol = Chem.MolFromSmiles(SMILES)
mol2 = Chem.AddHs(mol)
result = calcPubChemFingerAll(mol2)
pcp_result= pubchem_fp(mol2)
print(result[:15])
print(pcp_result[:15])
# ------------------------------------
Results:
[1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
[1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0]
Results of index 10, 11 are different.
Can you help me?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels