Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate MACCS and PUBCHEM Fingerprints Together #44

Closed
REMUU opened this issue Dec 30, 2022 · 1 comment
Closed

Calculate MACCS and PUBCHEM Fingerprints Together #44

REMUU opened this issue Dec 30, 2022 · 1 comment

Comments

@REMUU
Copy link

REMUU commented Dec 30, 2022

Hi, I find a problem that I cannot generate both MACCS and PUBCHEM fingerprints together by SMILES.

It is easy to be done in the PaDEL software by simply checking the box of MACCS and PUBCHEM.

Is there a way in the padelpy that can generate those two fingerprints together from SMILES?

Example:

Input:

padelpy.from_smiles(smi, fingerprints=True, descriptors=False)

Output:

{'PubchemFP0': '1', 'PubchemFP1': '0',.......}

Input:

padelpy.from_smiles(smi, fingerprints=False, descriptors=False)

Output:

{}

Besides these two situations, I cannot find a way to change the output types of fingerprints in padelpy. It is PUBCHEM or None. I am looking forward to your reply. Thank you.

@REMUU
Copy link
Author

REMUU commented Jan 4, 2023

Hi, I have figured this out.
First the user should call:

padeldescriptor(descriptortypes='./descriptors.xml')

before the calculation of fingerprints.

padelpy.from_smiles('COO', fingerprints=True, descriptors=False)

In the xml file, please make sure the MACCS is also 'True':

<Descriptor name="MACCSFingerprinter" value="true"/>

The XML file can be saved with your code at the same path. A sample of such file is in https://github.com/ecrl/padelpy/blob/master/padelpy/PaDEL-Descriptor/descriptors.xml.

@REMUU REMUU closed this as completed Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant