Skip to content

Commit

Permalink
#3459 - All atom attributes should be displayed as SMARTS if at least…
Browse files Browse the repository at this point in the history
… one purely SMARTS attribute exists

- Update logic for aromaticity property
- Update snapshots
  • Loading branch information
AKZhuk committed Oct 20, 2023
1 parent 1a88db2 commit 047c464
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -1202,13 +1202,6 @@ function getAtomLabelAttrText(value: string, atom) {
}
if (atomType === 'single') {
let labelText = '';
if (atom.aromaticity) {
labelText +=
atom.aromaticity === 'aromatic'
? value.toLowerCase()
: value.toUpperCase();
return labelText;
}
const number = Elements.get(capitalize(value))?.number;
labelText += number ? `#${number}` : '';
return labelText;
Expand Down Expand Up @@ -1253,6 +1246,7 @@ export function getAtomCustomQuery(atom) {
} = {
label: getAtomLabelAttrText,
isotope: (value) => value,
aromaticity: (value) => (value === 'aromatic' ? 'a' : 'A'),
charge: (value) => {
if (value === '') return value;
const regExpResult = /^([+-]?)([0-9]{1,3}|1000)([+-]?)$/.exec(value);
Expand Down

0 comments on commit 047c464

Please sign in to comment.