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

Rings new #12

Merged
merged 15 commits into from
Jul 8, 2024
Merged

Rings new #12

merged 15 commits into from
Jul 8, 2024

Conversation

fgrunewald
Copy link
Collaborator

@fgrunewald fgrunewald commented May 24, 2024

pending pysmiles 2.0

@fgrunewald fgrunewald requested a review from pckroon June 7, 2024 15:36
cgsmiles/pysmiles_utils.py Outdated Show resolved Hide resolved
cgsmiles/pysmiles_utils.py Show resolved Hide resolved
Comment on lines -46 to -47
if keep_bonding:
hcount -= len(mol_graph.nodes[node]['bonding'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems rather important, and it disappeared?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because this is actually rather tricky thing. How do you deal with aromatic bonding connectors?

if self.all_atom:
for edge_node in edge:
if self.molecule.nodes[edge_node]['element'] != 'H':
self.molecule.nodes[edge_node]['hcount'] -= 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.molecule.nodes[edge_node]['hcount'] -= 1
self.molecule.nodes[edge_node]['hcount'] -= order

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works is the short answer; having the order there does not presumably due to aromatic bond orders

@fgrunewald fgrunewald requested a review from pckroon June 24, 2024 08:24
@pckroon
Copy link
Collaborator

pckroon commented Jun 24, 2024

Hmmn, about the aromatic bond orders. I'd say you round the aromatic bond order down (to 1), and after, if your atom is aromatic you subtract another hydrogen.

Let me have a look at the code

@fgrunewald fgrunewald merged commit ca10d4f into master Jul 8, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants