We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82b243b commit 8d81b90Copy full SHA for 8d81b90
src/util/toggleHydrogens.ts
@@ -1,14 +1,12 @@
1
import type { Molecule } from 'openchemlib';
2
3
-import { getImplicitHydrogensCount } from './getImplicitHydrogensCount.js';
4
-
5
/**
6
* Toggle presence of implicity hydrogens on/off
7
* @param molecule
8
* @param atomID
9
*/
10
export function toggleHydrogens(molecule: Molecule, atomID: number) {
11
- if (getImplicitHydrogensCount(molecule, atomID) === 0) {
+ if (molecule.getImplicitHydrogens(atomID) === 0) {
12
const atomsToDelete = [];
13
for (let i = 0; i < molecule.getAllConnAtoms(atomID); i++) {
14
const connectedAtom = molecule.getConnAtom(atomID, i);
0 commit comments