PubChemPy icon indicating copy to clipboard operation
PubChemPy copied to clipboard

Generating Pubchem Binary Fingerprint

Open hyojin0912 opened this issue 4 years ago • 0 comments

Hello, thank you for your nice package.

I want to generate PubChem fingerprint which is 881 length binary bit vector (PubChem fingerprint description: https://ftp.ncbi.nlm.nih.gov/pubchem/specifications/pubchem_fingerprints.pdf)

Looking at the folder below in git, I found a suitable example. "PubChemPy/examples/Chemical fingerprints and similarity.ipynb."

import pubchempy as pcp

coumarin = pcp.Compound.from_cid(323)

bin(int(coumarin.fingerprint, 16))

But output of bin function is length 900 and it contains "b".

I want to get exact length of PubChem Fingerprint from CID.

Please describe me how to do this.

Thanks in advance,

Hyojin

hyojin0912 avatar Mar 02 '21 05:03 hyojin0912