mcs07 / PubChemPy

Python wrapper for the PubChem PUG REST API.
http://pubchempy.readthedocs.io
MIT License
379 stars 106 forks source link

How to use this code for generate input file form pubchem #50

Open debanjansen48 opened 3 years ago

debanjansen48 commented 3 years ago

for a Ml model i need to import pubchem data in order to make a data frame. The format id given bellow

Structure Smiles LogP MolWt IC50 value CCCHOCC xxx xxxx xxxx xxxxxx xxx xxxx xxxx

how to do that. I found following codes in your tutorial

from pubchempy import get_compounds, Compound comp = Compound.from_cid(1423) print(comp.isomeric_smiles) CCCCCCCNC1CCCC1CCCCCCC(=O)O comps = get_compounds('Aspirin', 'name') print(comps[0].xlogp)

where i need to provide the structure identifier manually or i need to make a list.

any advice from your end.