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

Is it possible to get 3D coordinates of ligand using CID or SID? #72

Open
drorhunvural opened this issue Dec 19, 2022 · 1 comment
Open

Comments

@drorhunvural
Copy link

drorhunvural commented Dec 19, 2022

Is it possible to get 3D coordinates of ligand using CID or SID?

Approach-1

import pubchempy as pcp
pcp.download('SDF', '4369521.sdf', 4369521, 'cid',overwrite=True)

Approach-2

c = pcp.Compound.from_cid(4369521)
coords = [(c.x, c.y, c.z) for c in c.atoms]
print(coords)

In both solutions above, they give the result in 2 dimensions (2D).

I get an error when I try a code like below

import pubchempy as pcp
pcp.download('SDF', '4369521.sdf', 4369521, 'cid',overwrite=True, record_type = '3d')

I'm sure this topic will be useful for this highly sought-after question on the internet.

@manassharma07
Copy link

I am also facing the same issue. Did you happen to resolve it?

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

2 participants