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

Check for adsorbates in resonance structure generation #2717

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions rmgpy/molecule/resonance.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ def populate_resonance_algorithms(features=None):
method_list.append(generate_allyl_delocalization_resonance_structures)
if features['is_cyclic']:
method_list.append(generate_aryne_resonance_structures)
if features['hasNitrogenVal5']:
if features['hasNitrogenVal5'] and not features['is_adsorbate']:
method_list.append(generate_N5dc_radical_resonance_structures)
if features['hasLonePairs']:
if features['hasLonePairs'] and not features['is_adsorbate']:
method_list.append(generate_adj_lone_pair_radical_resonance_structures)
method_list.append(generate_adj_lone_pair_multiple_bond_resonance_structures)
method_list.append(generate_adj_lone_pair_radical_multiple_bond_resonance_structures)
Expand Down Expand Up @@ -130,6 +130,7 @@ def analyze_molecule(mol, save_order=False):
'is_aryl_radical': False,
'hasNitrogenVal5': False,
'hasLonePairs': False,
'is_adsorbate':mol.contains_surface_site(),
Copy link
Member

Choose a reason for hiding this comment

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

minor: please add a space after :

}

if features['is_cyclic']:
Expand Down
Loading