Skip to content

Commit 30c9afe

Browse files
fbaensch-beilsteinJanCBrammer
authored andcommitted
Enable enhanced stereochmistry branch (WIP);
1 parent c9979a0 commit 30c9afe

5 files changed

Lines changed: 254 additions & 1 deletion

File tree

pages/build_wasm_modules.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ source "${root_dir}/pages/utils.sh"
1818
build_inchi_wasm "1.06" "$inchi_versions_file" "$root_dir" "${root_dir}/inchi/util.c.patch"
1919
build_inchi_wasm "Latest" "$inchi_versions_file" "$root_dir"
2020
build_inchi_wasm "Latest with Molecular Inorganics" "$inchi_versions_file" "$root_dir"
21+
build_inchi_wasm "Latest with Enhanced Stereochemistry" "$inchi_versions_file" "$root_dir"
2122

2223
# Build RInChI
2324
build_rinchi_wasm "$root_dir"

pages/components/components.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,16 @@ class InChIOptionsLatestMoInElement extends InChIOptionsElement {
316316
}
317317
}
318318

319+
class InChIOptionsLatestEnhancedStereoElement extends InChIOptionsElement {
320+
constructor() {
321+
super();
322+
this.componentPaths = [
323+
"components/tautomer-options.html",
324+
"components/latest-enhanced-stereo-options.html",
325+
];
326+
}
327+
}
328+
319329
function createAnnotation(text, color) {
320330
const annotation = document.createElement("div");
321331
annotation.textContent = text;
@@ -570,4 +580,9 @@ customElements.define(
570580
"inchi-options-latest-moin",
571581
InChIOptionsLatestMoInElement,
572582
);
583+
customElements.define(
584+
"inchi-options-latest-enhanced-stereo",
585+
InChIOptionsLatestEnhancedStereoElement,
586+
)
573587
customElements.define("inchi-ngl-viewer", NGLViewerElement);
588+
Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
<div class="form-check">
2+
<input
3+
data-id="mobileH"
4+
class="form-check-input"
5+
type="checkbox"
6+
data-inchi-option-off="FixedH"
7+
data-default-checked
8+
checked
9+
/>
10+
<label class="form-check-label">Mobile H Perception</label>
11+
</div>
12+
<div class="form-check">
13+
<input
14+
data-id="doNotAddH"
15+
class="form-check-input"
16+
type="checkbox"
17+
data-inchi-option-on="DoNotAddH"
18+
/>
19+
<label class="form-check-label"
20+
>Do not add implicit H atoms
21+
<i
22+
class="bi bi-question-circle-fill colored-icon"
23+
data-bs-toggle="tooltip"
24+
data-bs-custom-class="custom-tooltip"
25+
data-bs-html="true"
26+
data-bs-title="If enabled all hydrogens in input structure will be treated as explicit hydrogens. Reflects the <i>doNotAddH</i> option in the InChI command line tool. If disabled, implicit hydrogens will be added to the structure before InChI generation. <p><b>Note: </b> The Ketcher structural drawing tool does not take this option into account. Therefore, implicit hydrogen atoms are displayed based on the Ketcher settings.</p>"
27+
></i
28+
></label>
29+
</div>
30+
<div class="row">
31+
<div class="col">
32+
<div class="form-check">
33+
<input
34+
data-id="includeStereo"
35+
class="form-check-input"
36+
type="checkbox"
37+
data-inchi-option-off="SNon"
38+
data-default-checked
39+
checked
40+
/>
41+
<label class="form-check-label">Include Stereo:</label>
42+
</div>
43+
</div>
44+
<div class="col">
45+
<div class="form-check ms-xl-0 ms-lg-4">
46+
<input
47+
data-id="EnhancedStereochemistry"
48+
class="form-check-input"
49+
type="radio"
50+
name="stereoRadio"
51+
data-inchi-option-on="EnhancedStereochemistry"
52+
data-inchi-stereo-option
53+
data-default-checked
54+
checked
55+
/>
56+
<label class="form-check-label">
57+
Enhanced Stereochemistry
58+
<i
59+
class="bi bi-question-circle-fill colored-icon"
60+
data-bs-toggle="tooltip"
61+
data-bs-custom-class="custom-tooltip"
62+
data-bs-html="true"
63+
data-bs-title="The functionality for enhanced stereochemistry is a work in progress. You can expect to encounter warnings."
64+
></i>
65+
</label>
66+
</div>
67+
<div class="form-check ms-xl-0 ms-lg-4">
68+
<input
69+
data-id="SAbs"
70+
class="form-check-input"
71+
type="radio"
72+
name="stereoRadio"
73+
data-inchi-stereo-option
74+
/>
75+
<label class="form-check-label">Absolute</label>
76+
</div>
77+
<div class="form-check ms-xl-0 ms-lg-4">
78+
<input
79+
data-id="SRel"
80+
class="form-check-input"
81+
type="radio"
82+
name="stereoRadio"
83+
data-inchi-option-on="SRel"
84+
data-inchi-stereo-option
85+
/>
86+
<label class="form-check-label">Relative</label>
87+
</div>
88+
<div class="form-check ms-xl-0 ms-lg-4">
89+
<input
90+
data-id="SRac"
91+
class="form-check-input"
92+
type="radio"
93+
name="stereoRadio"
94+
data-inchi-option-on="SRac"
95+
data-inchi-stereo-option
96+
/>
97+
<label class="form-check-label">Racemic</label>
98+
</div>
99+
<div class="form-check ms-xl-0 ms-lg-4">
100+
<input
101+
data-id="SUCF"
102+
class="form-check-input"
103+
type="radio"
104+
name="stereoRadio"
105+
data-inchi-option-on="SUCF"
106+
data-inchi-stereo-option
107+
/>
108+
<label class="form-check-label">From chiral flag</label>
109+
</div>
110+
</div>
111+
</div>
112+
<div class="form-check ms-4">
113+
<input
114+
data-id="SUU"
115+
class="form-check-input"
116+
type="checkbox"
117+
data-inchi-option-on="SUU"
118+
data-inchi-stereo-option
119+
/>
120+
<label class="form-check-label"
121+
>Always include omitted/undefined stereo</label
122+
>
123+
</div>
124+
<div class="form-check ms-4">
125+
<input
126+
data-id="SLUUD"
127+
class="form-check-input"
128+
type="checkbox"
129+
data-inchi-option-on="SLUUD"
130+
data-inchi-stereo-option
131+
/>
132+
<label class="form-check-label"
133+
>Different marks for unknown/undefined stereo</label
134+
>
135+
</div>
136+
<div class="form-check ms-4">
137+
<input
138+
data-id="NEWPSOFF"
139+
class="form-check-input"
140+
type="checkbox"
141+
data-inchi-option-on="NEWPSOFF"
142+
data-inchi-stereo-option
143+
/>
144+
<label class="form-check-label"
145+
>Both ends of wedge point to stereocenters</label
146+
>
147+
</div>
148+
<div class="form-check">
149+
<input
150+
data-id="RecMet"
151+
class="form-check-input"
152+
type="checkbox"
153+
data-inchi-option-on="RecMet"
154+
/>
155+
<label class="form-check-label">Include Bonds to Metal</label>
156+
</div>
157+
<div class="form-check">
158+
<input
159+
data-id="treatPolymers"
160+
class="form-check-input"
161+
type="checkbox"
162+
data-inchi-option-on="Polymers"
163+
/>
164+
<label class="form-check-label">Treat polymers:</label>
165+
</div>
166+
<div class="form-check ms-4">
167+
<input
168+
data-id="NoEdits"
169+
class="form-check-input"
170+
type="checkbox"
171+
data-inchi-option-on="NoEdits"
172+
data-inchi-polymer-option
173+
data-default-disabled
174+
disabled
175+
/>
176+
<label class="form-check-label"
177+
>No pre-edits of original polymer structure</label
178+
>
179+
</div>
180+
<div class="form-check ms-4">
181+
<input
182+
data-id="FoldCRU"
183+
class="form-check-input"
184+
type="checkbox"
185+
data-inchi-option-on="FoldCRU"
186+
data-inchi-polymer-option
187+
data-default-disabled
188+
disabled
189+
/>
190+
<label class="form-check-label">Enable CRU folding</label>
191+
</div>
192+
<div class="form-check ms-4">
193+
<input
194+
data-id="NoFrameShift"
195+
class="form-check-input"
196+
type="checkbox"
197+
data-inchi-option-on="NoFrameShift"
198+
data-inchi-polymer-option
199+
data-default-disabled
200+
disabled
201+
/>
202+
<label class="form-check-label">Disable CRU frame shift</label>
203+
</div>
204+
<div class="form-check">
205+
<input
206+
data-id="NPZz"
207+
class="form-check-input"
208+
type="checkbox"
209+
data-inchi-option-on="NPZz"
210+
/>
211+
<label class="form-check-label"
212+
>Allow non-polymer Zz pseudoatoms
213+
<i
214+
class="bi bi-question-circle-fill colored-icon"
215+
data-bs-toggle="tooltip"
216+
data-bs-custom-class="custom-tooltip"
217+
data-bs-html="true"
218+
data-bs-title='The "Zz" or "*" ("star") pseudoatom is a generic placeholder designating an entity of undefined/unknown/variable nature. It is typically used for handling polymers, but may also be used outside the polymer context with this InChI option (<i>NPZz</i>). See the InChI Technical Manual, section IV. "g. Zz (star, pseudo element) atoms", for details.<br /><br />How to draw?<br />"*" pseudoatoms can be selected within the Ketcher structure editor either via the <i>Extended Table</i> in the right toolbar or using the hotkey "*".'
219+
></i
220+
></label>
221+
</div>
222+
<div class="mt-2">
223+
<a style="text-decoration: none" role="button" data-reset-inchi-options
224+
><i class="bi bi-arrow-clockwise pe-2"></i>Reset InChI Options</a
225+
>
226+
</div>

pages/inchi_versions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,12 @@
2020
"optionsTemplateId": "inchi-options-latest-moin",
2121
"commit": "35059dc4d1065224b3fd46df1a3094a98ed69b4d",
2222
"url": "https://github.com/IUPAC-InChI/InChI/pull/107"
23+
},
24+
"Latest with Enhanced Stereochemistry": {
25+
"module": "inchiModuleLatestEnhancedStereo",
26+
"name": "inchi-web-latest-enhanced-stereo",
27+
"optionsTemplateId": "inchi-options-latest-enhanced-stereo",
28+
"commit": "cf6d7ce3c5de92fe4382f70875783192b760c629",
29+
"url": "https://github.com/IUPAC-InChI/InChI/pull/185"
2330
}
2431
}

pages/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<meta charset="utf-8" />
@@ -12,6 +12,10 @@
1212
src="inchi/inchi-web-latest-moin.js"
1313
></script>
1414
<script type="text/javascript" src="inchi/inchi-web106.js"></script>
15+
<script
16+
type="text/javascript"
17+
src="inchi/inchi-web-latest-enhanced-stereo.js"
18+
></script>
1519

1620
<!-- RInChI modules -->
1721
<script type="text/javascript" src="rinchi/librinchi-1.1.js"></script>

0 commit comments

Comments
 (0)