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

Resonance Structure Generation: different starting structures #97

Open
xiaoruiDong opened this issue May 23, 2024 · 0 comments
Open

Resonance Structure Generation: different starting structures #97

xiaoruiDong opened this issue May 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@xiaoruiDong
Copy link
Owner

[N]1N=NN=C1C2C=CC([N+](=O)[O-])=CC=2 and N1=NN=NC1=C1[CH]C=C([N+](=O)[O-])C=C1 are resonance structures, with the first having the radical site on the N ring and the second having the radial site on the benzene ring.

838a89e6-a108-4a37-9130-83d396b53061
835a95bb-0b10-4048-a215-31e4db8da3ec

When generating the resonance structures of this molecule
The first gives 4 resonance structures (the kekulized version of the input molecule + 3 resonance structures with aromatic benzene and radical roaming on the 5-membered ring)
The second gives 6 resonance structures (same as the native RMG results)

It seems that there are still issues with handling aromatic ring molecules.
The difference between the two cases is at least rooted in the different results from analyze_molecule results ("is_aromatic": True for the first, False for the second).

However, even with the differences, the following lines should convert the aromatic form of the molecule to kekulized form...

if features["is_aromatic"]:
# This may be an intended behavior in RMG!
# `mol` (`mol_list[0]`) will be changed inplace to kekule form during `analyze_molecule`.
# So the optimal aromatic structure, generated in the next block will always be different
# from the initial one, if it is indeed an aromatic molecule. We will then always have an
# optimal aromatic structure and fully kekulized structure carried over to the later steps
# for aromatic molecules. And in the filtration step, all aromatic structures will be kept.
# The kekulized structure will be removed by aromaticity_filtration. But, it will be added
# back in the end, since it is the first structure in the list.
# However, in RDMC workflow, `mol` is not modified in `analyze_molecule`
# Therefore, to mimic RMG's behavior, we need to generate kekulized form of `mol` here
mol_list = generate_kekule_structure(mol)
else:
mol_list = [mol]
.

Further investigation is needed

@xiaoruiDong xiaoruiDong added the bug Something isn't working label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant