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

unable to replace halogen [missing index 0 on .rep2D] #88

Open
Dslab2025 opened this issue Jan 4, 2025 · 6 comments
Open

unable to replace halogen [missing index 0 on .rep2D] #88

Dslab2025 opened this issue Jan 4, 2025 · 6 comments
Assignees

Comments

@Dslab2025
Copy link

Dslab2025 commented Jan 4, 2025

image
for Cl no numbering appeared
I want to replace Cl with others

if i use attachment point 1 That is C1 it returns error during build molecule
how to solve

@bieniekmateusz
Copy link
Collaborator

Hi @Dslab2025 , do you have a smiles or a file for this molecule?

I recreated the molecule and the Cl atom appears to have an index in this case. Thanks

mol = Chem.MolFromSmiles("C1=CC(=CC=C1C2=NC=C(S2)CNC3=NC=NC4=C3C=NN4)Cl")
mol = Chem.AddHs(mol)
scaffold = fegrow.RMol(mol)
scaffold.rep2D(idx=True, size=(500, 500))

image

@Dslab2025
Copy link
Author

Dslab2025 commented Jan 6, 2025

Thank you
Smiles of said molecule
Clc1ccc(cc1)c1ncc(CNc2ncnc3[nH]ncc23)s1

But how to do such things for other molecules?

@bieniekmateusz
Copy link
Collaborator

I see, if the atom happens to be the index 0 then its index is not visualised.

In your smiles, if you use the index 0 for replacement, that will point towards the Cl atom.

Thanks for bringing this to our attention. I'll see if I can also add the visualisation for it.

@bieniekmateusz bieniekmateusz self-assigned this Jan 6, 2025
@debanjansen48
Copy link

Thank you so much. Shall I update the program or I execute something else in order to continue my work?

@bieniekmateusz
Copy link
Collaborator

There is no need to update anything atm. It's just that the missing index means that the index is 0 on that atom. I'll update this issue when I have a neater fix for this. Best, Mat

@bieniekmateusz bieniekmateusz changed the title unable to replace halogen unable to replace halogen [missing index 0 on .rep2D] Jan 7, 2025
@Dslab2025
Copy link
Author

Thank you sir.

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

3 participants