psdi-data-conversion 0.0.23__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. psdi_data_conversion/__init__.py +11 -0
  2. psdi_data_conversion/app.py +242 -0
  3. psdi_data_conversion/bin/linux/atomsk +0 -0
  4. psdi_data_conversion/bin/linux/c2x +0 -0
  5. psdi_data_conversion/bin/mac/atomsk +0 -0
  6. psdi_data_conversion/bin/mac/c2x +0 -0
  7. psdi_data_conversion/constants.py +185 -0
  8. psdi_data_conversion/converter.py +459 -0
  9. psdi_data_conversion/converters/__init__.py +6 -0
  10. psdi_data_conversion/converters/atomsk.py +32 -0
  11. psdi_data_conversion/converters/base.py +702 -0
  12. psdi_data_conversion/converters/c2x.py +32 -0
  13. psdi_data_conversion/converters/openbabel.py +239 -0
  14. psdi_data_conversion/database.py +1064 -0
  15. psdi_data_conversion/dist.py +87 -0
  16. psdi_data_conversion/file_io.py +216 -0
  17. psdi_data_conversion/log_utility.py +241 -0
  18. psdi_data_conversion/main.py +776 -0
  19. psdi_data_conversion/scripts/atomsk.sh +32 -0
  20. psdi_data_conversion/scripts/c2x.sh +26 -0
  21. psdi_data_conversion/security.py +38 -0
  22. psdi_data_conversion/static/content/accessibility.htm +254 -0
  23. psdi_data_conversion/static/content/convert.htm +121 -0
  24. psdi_data_conversion/static/content/convertato.htm +65 -0
  25. psdi_data_conversion/static/content/convertc2x.htm +65 -0
  26. psdi_data_conversion/static/content/documentation.htm +94 -0
  27. psdi_data_conversion/static/content/feedback.htm +53 -0
  28. psdi_data_conversion/static/content/header-links.html +8 -0
  29. psdi_data_conversion/static/content/index-versions/header-links.html +8 -0
  30. psdi_data_conversion/static/content/index-versions/psdi-common-footer.html +99 -0
  31. psdi_data_conversion/static/content/index-versions/psdi-common-header.html +28 -0
  32. psdi_data_conversion/static/content/psdi-common-footer.html +99 -0
  33. psdi_data_conversion/static/content/psdi-common-header.html +28 -0
  34. psdi_data_conversion/static/content/report.htm +103 -0
  35. psdi_data_conversion/static/data/data.json +143940 -0
  36. psdi_data_conversion/static/img/colormode-toggle-dm.svg +3 -0
  37. psdi_data_conversion/static/img/colormode-toggle-lm.svg +3 -0
  38. psdi_data_conversion/static/img/psdi-icon-dark.svg +136 -0
  39. psdi_data_conversion/static/img/psdi-icon-light.svg +208 -0
  40. psdi_data_conversion/static/img/psdi-logo-darktext.png +0 -0
  41. psdi_data_conversion/static/img/psdi-logo-lighttext.png +0 -0
  42. psdi_data_conversion/static/img/social-logo-bluesky-black.svg +4 -0
  43. psdi_data_conversion/static/img/social-logo-bluesky-white.svg +4 -0
  44. psdi_data_conversion/static/img/social-logo-instagram-black.svg +1 -0
  45. psdi_data_conversion/static/img/social-logo-instagram-white.svg +1 -0
  46. psdi_data_conversion/static/img/social-logo-linkedin-black.png +0 -0
  47. psdi_data_conversion/static/img/social-logo-linkedin-white.png +0 -0
  48. psdi_data_conversion/static/img/social-logo-mastodon-black.svg +4 -0
  49. psdi_data_conversion/static/img/social-logo-mastodon-white.svg +4 -0
  50. psdi_data_conversion/static/img/social-logo-x-black.svg +3 -0
  51. psdi_data_conversion/static/img/social-logo-x-white.svg +3 -0
  52. psdi_data_conversion/static/img/social-logo-youtube-black.png +0 -0
  53. psdi_data_conversion/static/img/social-logo-youtube-white.png +0 -0
  54. psdi_data_conversion/static/img/ukri-epsr-logo-darktext.png +0 -0
  55. psdi_data_conversion/static/img/ukri-epsr-logo-lighttext.png +0 -0
  56. psdi_data_conversion/static/img/ukri-logo-darktext.png +0 -0
  57. psdi_data_conversion/static/img/ukri-logo-lighttext.png +0 -0
  58. psdi_data_conversion/static/javascript/accessibility.js +196 -0
  59. psdi_data_conversion/static/javascript/common.js +42 -0
  60. psdi_data_conversion/static/javascript/convert.js +296 -0
  61. psdi_data_conversion/static/javascript/convert_common.js +252 -0
  62. psdi_data_conversion/static/javascript/convertato.js +107 -0
  63. psdi_data_conversion/static/javascript/convertc2x.js +107 -0
  64. psdi_data_conversion/static/javascript/data.js +176 -0
  65. psdi_data_conversion/static/javascript/format.js +611 -0
  66. psdi_data_conversion/static/javascript/load_accessibility.js +89 -0
  67. psdi_data_conversion/static/javascript/psdi-common.js +177 -0
  68. psdi_data_conversion/static/javascript/report.js +381 -0
  69. psdi_data_conversion/static/styles/format.css +147 -0
  70. psdi_data_conversion/static/styles/psdi-common.css +705 -0
  71. psdi_data_conversion/templates/index.htm +114 -0
  72. psdi_data_conversion/testing/__init__.py +5 -0
  73. psdi_data_conversion/testing/constants.py +12 -0
  74. psdi_data_conversion/testing/conversion_callbacks.py +394 -0
  75. psdi_data_conversion/testing/conversion_test_specs.py +208 -0
  76. psdi_data_conversion/testing/utils.py +522 -0
  77. psdi_data_conversion-0.0.23.dist-info/METADATA +663 -0
  78. psdi_data_conversion-0.0.23.dist-info/RECORD +81 -0
  79. psdi_data_conversion-0.0.23.dist-info/WHEEL +4 -0
  80. psdi_data_conversion-0.0.23.dist-info/entry_points.txt +2 -0
  81. psdi_data_conversion-0.0.23.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,32 @@
1
+ #!/bin/bash
2
+
3
+ # atomsk.sh
4
+ # Version 1.1 17th December 2024
5
+
6
+ # This shell script allows an Atomsk conversion to be carried out from the Python Flask app.
7
+
8
+ # Required positional arguments:
9
+ # arg2 is the fully-qualified input file name (e.g., /path/to/nacl.cif)
10
+ # arg3 is the fully-qualified output file name
11
+
12
+ DEFAULT_DIST=linux
13
+
14
+ # The ennvar DIST can be used to set the distribution, indicating the subdirectory to search in for the binary
15
+ if [ -z $DIST ]; then
16
+ DIST=$DEFAULT_DIST
17
+ fi
18
+
19
+ # If the envvar BIN_PATH is set, we use that path directly. Otherwise we use the binary distributed with this package
20
+ if [ -z $BIN_PATH ]; then
21
+ BIN_PATH=psdi_data_conversion/bin/$DIST/atomsk
22
+ fi
23
+
24
+ $BIN_PATH <<EOD
25
+ read $2
26
+ write $3
27
+ clear
28
+ quit
29
+ EOD
30
+
31
+ # Cleanup intermediate files that might have been created
32
+ rm -f quit
@@ -0,0 +1,26 @@
1
+ #!/bin/bash
2
+
3
+ # c2x.sh
4
+ # Version 1.0 10th January 2025
5
+
6
+ # This shell script allows a c2x conversion to be carried out from the Python Flask app.
7
+
8
+ # Required positional arguments:
9
+ # arg1 is the output format preceded by two dashes (e.g., --cml)
10
+ # arg2 is the fully-qualified input file name (e.g., /path/to/nacl.cif)
11
+ # arg3 is the fully-qualified output file name
12
+
13
+ DEFAULT_DIST=linux
14
+
15
+ # The ennvar DIST can be used to set the distribution, indicating the subdirectory to search in for the binary
16
+ if [ -z $DIST ]; then
17
+ DIST=$DEFAULT_DIST
18
+ fi
19
+
20
+ # If the envvar BIN_PATH is set, we use that path directly. Otherwise we use the binary distributed with this package
21
+ if [ -z $BIN_PATH ]; then
22
+ BIN_PATH=psdi_data_conversion/bin/$DIST/atomsk
23
+ fi
24
+
25
+ $BIN_PATH $1 $2 $3 $4 $5
26
+
@@ -0,0 +1,38 @@
1
+ """@file psdi_data_conversion/security.py
2
+
3
+ Created 2025-02-24 by Bryan Gillis.
4
+
5
+ Functions related to security
6
+ """
7
+
8
+ import re
9
+
10
+ # Short list of safe allowed characters:
11
+ # \w: All letters and digits
12
+ # \s: All whitespace characters
13
+ # .: Period
14
+ # \-: Hyphen
15
+ # :: Colon
16
+ # +: Plus symbol
17
+ # *: Asterisk
18
+ # =: Equals sign
19
+ # $: Dollar sign
20
+ # /: Forward-slash
21
+ # \\: Backslash
22
+ _SAFE_CHARS = r"[\w\s.\-:+*=$/\\]"
23
+ SAFE_CHAR_RE = re.compile(_SAFE_CHARS)
24
+ SAFE_STRING_RE = re.compile(f"{_SAFE_CHARS}*")
25
+
26
+
27
+ def char_is_safe(s: str):
28
+ """Checks whether a character is in the set of predefined safe characters.
29
+
30
+ Will return False if the string does not contain exactly one character.
31
+ """
32
+ return bool(SAFE_CHAR_RE.fullmatch(s))
33
+
34
+
35
+ def string_is_safe(s: str):
36
+ """Checks whether a string contains only characters in the predefined list of safe characters.
37
+ """
38
+ return bool(SAFE_STRING_RE.fullmatch(s))
@@ -0,0 +1,254 @@
1
+ <!--
2
+ accessibility.htm
3
+ Version 1.0, 7th June 2024
4
+ -->
5
+
6
+ <!DOCTYPE html>
7
+ <html>
8
+
9
+ <head>
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ <title>PSDI Data Conversion Service</title>
12
+ <link rel="icon" type="image/x-icon" href="../img/psdi-icon-dark.svg">
13
+ <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:400" rel="stylesheet" type="text/css">
16
+ <link href="https://fonts.googleapis.com/css?family=Lexend:400" rel="stylesheet" type="text/css">
17
+ <link rel="stylesheet" href="../styles/format.css">
18
+ <script src="../javascript/load_accessibility.js"></script>
19
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
20
+ <script src="../javascript/psdi-common.js" type="module"></script>
21
+ </head>
22
+
23
+ <body marginwidth="0">
24
+
25
+ <!-- Cover to hide element loading and make page transitions seem smoother -->
26
+ <div id="cover"></div>
27
+
28
+ <header class="header" id="psdi-header"></header>
29
+
30
+ <div class="hero">
31
+ <div class="max-width-box">
32
+ <h1 class="hero__title marginless_header">Accessibility</h1>
33
+ </div>
34
+ </div>
35
+
36
+ <form name="gui">
37
+ <div class="max-width-box">
38
+ <p>Select accessibility settings below as required, in any order. Each new setting immediately comes into effect
39
+ on this page only, in the first instance. Once the appearance of the page is satisfactory, clicking on the
40
+ 'Apply' button applies the settings to the entire website. Leaving the page without clicking on 'Apply' results
41
+ in the changes being lost. Note that page appearance may vary slightly according to the browser used.</p>
42
+ <p>The colour options here are not compatible with the dark-mode toggle in the header bar. If a custom dark scheme
43
+ is desired, the appropriate colours can be selected in light-mode.</p>
44
+ <div class="access-options">
45
+ <div class="access-option-container">
46
+ <p>
47
+ <label for="font" id="fontLabel">Font:</label><br>
48
+ <select id="font">
49
+ <option value="Default">Default</option>
50
+ <option value="Arial" style="font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;">Arial</option>
51
+ <option value="Calibri"
52
+ style="font-family: Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif;">Calibri</option>
53
+ <option value="Comic Sans" style="font-family: 'Comic Sans MS', 'Comic Sans', sans-serif;">Comic Sans
54
+ </option>
55
+ <option value="Courier New"
56
+ style="font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;">
57
+ Courier New</option>
58
+ <option value="Georgia" style="font-family: Georgia, Times, 'Times New Roman', serif">Georgia
59
+ </option>
60
+ <option value="Helvetica" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif">Helvetica
61
+ </option>
62
+ <option value="Lexend" style="font-family: Lexend, sans-serif;">Lexend</option>
63
+ <option value="Lucida Bright" style="font-family: 'Lucida Bright', Georgia, serif">Lucida Bright
64
+ </option>
65
+ <option value="Open Sans" style="font-family: Open Sans, sans-serif;">Open Sans
66
+ </option>
67
+ <option value="Tahoma" style="font-family: Tahoma, Verdana, Segoe, sans-serif;">Tahoma</option>
68
+ <option value="Times New Roman"
69
+ style="font-family: TimesNewRoman, 'Times New Roman', Times, Baskerville, Georgia, serif;">Times New
70
+ Roman</option>
71
+ <option value="Trebuchet"
72
+ style="font-family: 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;">
73
+ Trebuchet</option>
74
+ <option value="Verdana" style="font-family: Verdana, Geneva, sans-serif;">Verdana</option>
75
+ </select><br>
76
+ </p>
77
+ </div>
78
+ <div class="access-option-container">
79
+ <p>
80
+ <label for="size" id="sizeLabel">Font size (px):</label><br>
81
+ <select id="size">
82
+ <option value="Default">Default</option>
83
+ <option value="14" style="font-size: 14px;">14</option>
84
+ <option value="15" style="font-size: 15px;">15</option>
85
+ <option value="16" style="font-size: 16px;">16</option>
86
+ <option value="17" style="font-size: 17px;">17</option>
87
+ <option value="18" style="font-size: 18px;">18</option>
88
+ <option value="19" style="font-size: 19px;">19</option>
89
+ <option value="20" style="font-size: 20px;">20</option>
90
+ <option value="21" style="font-size: 21px;">21</option>
91
+ </select>
92
+ </p>
93
+ </div>
94
+ <div class="access-option-container">
95
+ <p>
96
+ <label for="weight" id="weightLabel">Font weight:</label><br>
97
+ <select id="weight">
98
+ <option value="Default" style="font-weight: normal;">Default</option>
99
+ <option value="Bold" style="font-weight: bold;">Bold</option>
100
+ </select>
101
+ </p>
102
+ </div>
103
+ <div class="access-option-container">
104
+ <p>
105
+ <label for="letter" id="letterLabel">Letter spacing (px):</label><br>
106
+ <select id="letter">
107
+ <!-- Limitations of how the select element works prevent us from showing a preview of this element
108
+ in the dropdown -->
109
+ <option value="Default">Default</option>
110
+ <option value="0.5">0.5</option>
111
+ <option value="1.0">1.0</option>
112
+ <option value="1.5">1.5</option>
113
+ <option value="2.0">2.0</option>
114
+ <option value="2.5">2.5</option>
115
+ <option value="3.0">3.0</option>
116
+ <option value="3.5">3.5</option>
117
+ </select>
118
+ </p>
119
+ </div>
120
+ <div class="access-option-container">
121
+ <p>
122
+ <label for="line" id="lineLabel">Line spacing:</label><br>
123
+ <select id="line">
124
+ <!-- Limitations of how the select element works prevent us from showing a preview of this element
125
+ in the dropdown -->
126
+ <option value="Default">Default</option>
127
+ <option value="1.0">1.0</option>
128
+ <option value="1.1">1.1</option>
129
+ <option value="1.2">1.2</option>
130
+ <option value="1.3">1.3</option>
131
+ <option value="1.4">1.4</option>
132
+ <option value="1.5">1.5</option>
133
+ <option value="1.6">1.6</option>
134
+ <option value="1.7">1.7</option>
135
+ <option value="1.8">1.8</option>
136
+ <option value="1.9">1.9</option>
137
+ <option value="2.0">2.0</option>
138
+ </select>
139
+ </p>
140
+ </div>
141
+ <div class="access-option-container lm-only">
142
+ <p>
143
+ <label for="dark-colour" id="colourLabel">Primary font colour:</label><br>
144
+ <select id="dark-colour">
145
+ <option value="Default">Default</option>
146
+ <option value="White" style="color: White">White</option>
147
+ <option value="LightGrey" style="color: LightGrey">LightGrey</option>
148
+ <option value="DarkGrey" style="color: DarkGrey">DarkGrey</option>
149
+ <option value="Black" style="color: Black">Black</option>
150
+ <option value="LightBlue" style="color: LightBlue">LightBlue</option>
151
+ <option value="Blue" style="color: Blue">Blue</option>
152
+ <option value="DarkBlue" style="color: DarkBlue">DarkBlue</option>
153
+ <option value="Purple" style="color: Purple">Purple</option>
154
+ <option value="Pink" style="color: Pink">Pink</option>
155
+ <option value="Red" style="color: Red">Red</option>
156
+ <option value="DarkRed" style="color: DarkRed">DarkRed</option>
157
+ <option value="Orange" style="color: Orange">Orange</option>
158
+ <option value="Brown" style="color: Brown">Brown</option>
159
+ <option value="LightGreen" style="color: LightGreen">LightGreen</option>
160
+ <option value="Green" style="color: Green">Green</option>
161
+ <option value="DarkGreen" style="color: DarkGreen">DarkGreen</option>
162
+ </select>
163
+ </p>
164
+ </div>
165
+ <div class="access-option-container lm-only">
166
+ <p>
167
+ <label for="light-colour" id="lightColourLabel">Alternate font colour:</label><br>
168
+ <select id="light-colour">
169
+ <option value="Default">Default</option>
170
+ <option value="White" style="color: White">White</option>
171
+ <option value="LightGrey" style="color: LightGrey">LightGrey</option>
172
+ <option value="DarkGrey" style="color: DarkGrey">DarkGrey</option>
173
+ <option value="Black" style="color: Black">Black</option>
174
+ <option value="LightBlue" style="color: LightBlue">LightBlue</option>
175
+ <option value="Blue" style="color: Blue">Blue</option>
176
+ <option value="DarkBlue" style="color: DarkBlue">DarkBlue</option>
177
+ <option value="Purple" style="color: Purple">Purple</option>
178
+ <option value="Pink" style="color: Pink">Pink</option>
179
+ <option value="Red" style="color: Red">Red</option>
180
+ <option value="DarkRed" style="color: DarkRed">DarkRed</option>
181
+ <option value="Orange" style="color: Orange">Orange</option>
182
+ <option value="Brown" style="color: Brown">Brown</option>
183
+ <option value="LightGreen" style="color: LightGreen">LightGreen</option>
184
+ <option value="Green" style="color: Green">Green</option>
185
+ <option value="DarkGreen" style="color: DarkGreen">DarkGreen</option>
186
+ </select>
187
+ </p>
188
+ </div>
189
+ <div class="access-option-container lm-only">
190
+ <p>
191
+ <label for="lightBackground" id="lightBackgroundLabel">Primary background colour:</label><br>
192
+ <select id="light-background">
193
+ <option value="Default">Default</option>
194
+ <option value="White" style="background-color: White">White</option>
195
+ <option value="LightGrey" style="background-color: LightGrey">LightGrey</option>
196
+ <option value="DarkGrey" style="background-color: DarkGrey">DarkGrey</option>
197
+ <option value="Black" style="background-color: Black">Black</option>
198
+ <option value="LightBlue" style="background-color: LightBlue">LightBlue</option>
199
+ <option value="Blue" style="background-color: Blue">Blue</option>
200
+ <option value="DarkBlue" style="background-color: DarkBlue">DarkBlue</option>
201
+ <option value="Purple" style="background-color: Purple">Purple</option>
202
+ <option value="Pink" style="background-color: Pink">Pink</option>
203
+ <option value="Red" style="background-color: Red">Red</option>
204
+ <option value="DarkRed" style="background-color: DarkRed">DarkRed</option>
205
+ <option value="Orange" style="background-color: Orange">Orange</option>
206
+ <option value="Brown" style="background-color: Brown">Brown</option>
207
+ <option value="LightGreen" style="background-color: LightGreen">LightGreen</option>
208
+ <option value="Green" style="background-color: Green">Green</option>
209
+ <option value="DarkGreen" style="background-color: DarkGreen">DarkGreen</option>
210
+ </select>
211
+ </p>
212
+ </div>
213
+ <div class="access-option-container lm-only">
214
+ <p>
215
+ <label for="darkBackground" id="darkBackgroundLabel">Alternate background colour:</label><br>
216
+ <select id="dark-background">
217
+ <option value="Default">Default</option>
218
+ <option value="White" style="background-color: White">White</option>
219
+ <option value="LightGrey" style="background-color: LightGrey">LightGrey</option>
220
+ <option value="DarkGrey" style="background-color: DarkGrey">DarkGrey</option>
221
+ <option value="Black" style="background-color: Black">Black</option>
222
+ <option value="LightBlue" style="background-color: LightBlue">LightBlue</option>
223
+ <option value="Blue" style="background-color: Blue">Blue</option>
224
+ <option value="DarkBlue" style="background-color: DarkBlue">DarkBlue</option>
225
+ <option value="Purple" style="background-color: Purple">Purple</option>
226
+ <option value="Pink" style="background-color: Pink">Pink</option>
227
+ <option value="Red" style="background-color: Red">Red</option>
228
+ <option value="DarkRed" style="background-color: DarkRed">DarkRed</option>
229
+ <option value="Orange" style="background-color: Orange">Orange</option>
230
+ <option value="Brown" style="background-color: Brown">Brown</option>
231
+ <option value="LightGreen" style="background-color: LightGreen">Green</option>
232
+ <option value="Green" style="background-color: Green">Green</option>
233
+ <option value="DarkGreen" style="background-color: DarkGreen">DarkGreen</option>
234
+ </select>
235
+ </p>
236
+ </div>
237
+ </div>
238
+ <input type="button" class="button" value=" Reset " name="resetButton" id="resetButton">
239
+ <br><span>Apply chosen settings to the entire website:</span>
240
+ <input type="button" class="button" value=" Apply " name="applyButton" id="applyButton">
241
+ <div class="medGap"></div>
242
+
243
+ </div>
244
+ </form>
245
+
246
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
247
+ crossorigin="anonymous"></script>
248
+ <script src="../javascript/accessibility.js" type="module" language="JavaScript"></script>
249
+
250
+ <footer class="footer" id="psdi-footer"></footer>
251
+
252
+ </body>
253
+
254
+ </html>
@@ -0,0 +1,121 @@
1
+ <!--
2
+ convert.htm
3
+ Version 1.0, 11th November 2024
4
+ -->
5
+
6
+ <!DOCTYPE html>
7
+ <html>
8
+
9
+ <head>
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ <title>PSDI Data Conversion Service</title>
12
+ <link rel="icon" type="image/x-icon" href="../img/psdi-icon-dark.svg">
13
+ <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
+ <link rel="stylesheet" href="../styles/format.css">
16
+ <script src="../javascript/load_accessibility.js"></script>
17
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
18
+ <script src="../javascript/psdi-common.js" type="module"></script>
19
+ </head>
20
+
21
+ <body marginwidth="0">
22
+
23
+ <!-- Cover to hide element loading and make page transitions seem smoother -->
24
+ <div id="cover"></div>
25
+
26
+ <header class="header" id="psdi-header"></header>
27
+
28
+ <div class="hero">
29
+ <div class="max-width-box">
30
+ <h1 class="hero__title marginless_header">Conversion</h1>
31
+ </div>
32
+ </div>
33
+
34
+ <form name="gui">
35
+ <div class="max-width-box">
36
+ <p>Zero to two option flag select boxes and zero to two sets of option flag check boxes may be displayed,
37
+ depending on the conversion and the degree of completion of the database. Further information may be displayed
38
+ underneath the select boxes if available. One or more input or output flags may be selected if required (command
39
+ click [Mac] or control click [Windows] for multiple select box selections). To undo all selections in a box,
40
+ click just underneath the final option. Ticking a check box reveals a text box for entry of required
41
+ information, along with further explanation if available.
42
+ </p>
43
+ <h6 id="heading"></h6>
44
+ <div id="flags">
45
+ <div id="inFlagList">
46
+ <p>
47
+ <label for="inFlags" id="in_label">Read (input) option flags
48
+ (select all required):</label>
49
+ <div id="in_flag_break"></div>
50
+ <select id="inFlags" class="large-width" size="4" multiple="multiple"></select>
51
+ <div id=inFlagInfo></div>
52
+ </p>
53
+ </div>
54
+ <div id="outFlagList">
55
+ <p>
56
+ <label for="outFlags" id="out_label">Write (output) option flags
57
+ (select all required):</label>
58
+ <div id="out_flag_break"></div>
59
+ <select id="outFlags" class="large-width" size="4" multiple="multiple"></select>
60
+ <div id=outFlagInfo></div>
61
+ </p>
62
+ </div>
63
+ </div>
64
+ <span id="in_argLabel">Read (input) option flags requiring further information (select all required):</span>
65
+ <table id="in_argFlags"></table>
66
+ <div id="flag_break"><br /></div>
67
+ <span id="out_argLabel">Write (output) option flags requiring further information (select all required):</span>
68
+ <table id="out_argFlags"></table>
69
+ <p>If 2- or 3-dimensional atomic coordinates need to be calculated (e.g., if they do not already exist in the
70
+ input file), select '2D' or '3D' and a speed/accuracy option ('fastest' is least accurate).
71
+ Note that this calculation is not appropriate for all file formats, so in these cases selections will be
72
+ ignored.
73
+ Click on 'Choose file' and then select an input file of the correct format (and extension). Clicking on
74
+ 'Convert'
75
+ uploads and converts the file. The output file is automatically downloaded, along with a log file. If any issues
76
+ are encountered (e.g., the output file does not download), please click on 'Provide Feedback' in the navigation
77
+ bar.
78
+ </p>
79
+ <p>
80
+ <label for="coordinates">Select '2D' or '3D' if an Open Babel calculation of 2- or 3-dimensional atomic
81
+ coordinates is required. Ensure that this calculation is suitable for your purpose.<br>For more information,
82
+ visit <a href="https://openbabel.org/docs/3DStructureGen/SingleConformer.html#gen3d" target="_blank">this
83
+ website.</a></label><br>
84
+ <input type="radio" name="coordinates" id="coordinates" value="Gen2D"> 2D
85
+ <input type="radio" name="coordinates" id="coordinates" value="Gen3D"> 3D
86
+ <input type="radio" name="coordinates" id="coordinates" value="neither" checked="checked">
87
+ neither
88
+ </p>
89
+ <p>
90
+ <label for="coordOptions"> Calculation options range from 'fastest'
91
+ (least accurate) to 'best' (slowest).</label><br>
92
+ <input type="radio" name="coordOptions" id="coordOptions" value="fastest" disabled=true> fastest
93
+ <input type="radio" name="coordOptions" id="coordOptions" value="fast" disabled=true> fast
94
+ <input type="radio" name="coordOptions" id="coordOptions" value="medium" checked="checked" disabled=true> medium
95
+ <input type="radio" name="coordOptions" id="coordOptions" value="better" disabled=true> better
96
+ <input type="radio" name="coordOptions" id="coordOptions" value="best" disabled=true> best
97
+ </p>
98
+ <p id="fileChecking">
99
+ </p>
100
+ <p id="convertFile">
101
+ <input type="checkbox" checked id="extCheck">Enforce file naming checking to ensure uploaded files (and files
102
+ contained in archives) all have the correct extension<br>
103
+ <input type="checkbox" id="requestLog">Also download log file for the conversion<br>
104
+ Select file to convert:
105
+ <br><input type="file" name="fileToUpload" id="fileToUpload"><br>
106
+ <input type="button" class="button init-disabled" value=" Convert " name="uploadButton" id="uploadButton"
107
+ disabled=true>
108
+ </p>
109
+ <div class="medGap"></div>
110
+ </div>
111
+ </form>
112
+
113
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
114
+ crossorigin="anonymous"></script>
115
+ <script src="../javascript/convert.js" type="module" language="JavaScript"></script>
116
+
117
+ <footer class="footer" id="psdi-footer"></footer>
118
+
119
+ </body>
120
+
121
+ </html>
@@ -0,0 +1,65 @@
1
+ <!--
2
+ convertato.htm
3
+ Version 1.0, 11th November 2024
4
+ -->
5
+
6
+ <!DOCTYPE html>
7
+ <html>
8
+
9
+ <head>
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ <title>PSDI Data Conversion Service</title>
12
+ <link rel="icon" type="image/x-icon" href="../img/psdi-icon-dark.svg">
13
+ <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
+ <link rel="stylesheet" href="../styles/format.css">
16
+ <script src="../javascript/load_accessibility.js"></script>
17
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
18
+ <script src="../javascript/psdi-common.js" type="module"></script>
19
+ </head>
20
+
21
+ <body marginwidth="0">
22
+
23
+ <!-- Cover to hide element loading and make page transitions seem smoother -->
24
+ <div id="cover"></div>
25
+
26
+ <header class="header" id="psdi-header"></header>
27
+
28
+ <div class="hero">
29
+ <div class="max-width-box">
30
+ <h1 class="hero__title marginless_header">Conversion</h1>
31
+ </div>
32
+ </div>
33
+
34
+ <form name="gui">
35
+ <div>
36
+ <p>
37
+ Click on 'Choose file' and then select an input file of the correct format (and extension). Clicking on
38
+ 'Convert'
39
+ uploads and converts the file. The output file is automatically downloaded, along with a log file. If any issues
40
+ are
41
+ encountered (e.g., the output file does not download), please click on 'Provide Feedback' in the navigation bar.
42
+ </p>
43
+ <h6 id="heading"></h6>
44
+ <p id="convertFile">
45
+ <input type="checkbox" checked id="extCheck">Enforce file naming checking to ensure uploaded files (and files
46
+ contained in archives) all have the correct extension<br>
47
+ <input type="checkbox" id="requestLog">Also download log file for the conversion<br>
48
+ Select file to convert:
49
+ <br><input type="file" name="fileToUpload" id="fileToUpload"><br>
50
+ <input type="button" class="button init-disabled" value=" Convert " name="uploadButton" id="uploadButton"
51
+ disabled=true>
52
+ </p>
53
+ </div>
54
+ <div class="largeGap"></div>
55
+ </form>
56
+
57
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
58
+ crossorigin="anonymous"></script>
59
+ <script src="../javascript/convertato.js" type="module" language="JavaScript"></script>
60
+
61
+ <footer class="footer" id="psdi-footer"></footer>
62
+
63
+ </body>
64
+
65
+ </html>
@@ -0,0 +1,65 @@
1
+ <!--
2
+ convertc2x.htm
3
+ Version 1.0, 10th January 2025
4
+ -->
5
+
6
+ <!DOCTYPE html>
7
+ <html>
8
+
9
+ <head>
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ <title>PSDI Data Conversion Service</title>
12
+ <link rel="icon" type="image/x-icon" href="../img/psdi-icon-dark.svg">
13
+ <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
+ <link rel="stylesheet" href="../styles/format.css">
16
+ <script src="../javascript/load_accessibility.js"></script>
17
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
18
+ <script src="../javascript/psdi-common.js" type="module"></script>
19
+ </head>
20
+
21
+ <body marginwidth="0">
22
+
23
+ <!-- Cover to hide element loading and make page transitions seem smoother -->
24
+ <div id="cover"></div>
25
+
26
+ <header class="header" id="psdi-header"></header>
27
+
28
+ <div class="hero">
29
+ <div class="max-width-box">
30
+ <h1 class="hero__title marginless_header">Conversion</h1>
31
+ </div>
32
+ </div>
33
+
34
+ <form name="gui">
35
+ <div>
36
+ <p>
37
+ Click on 'Choose file' and then select an input file of the correct format (and extension). Clicking on
38
+ 'Convert'
39
+ uploads and converts the file. The output file is automatically downloaded, along with a log file. If any issues
40
+ are
41
+ encountered (e.g., the output file does not download), please click on 'Provide Feedback' in the navigation bar.
42
+ </p>
43
+ <h6 id="heading"></h6>
44
+ <p id="convertFile">
45
+ <input type="checkbox" checked id="extCheck">Enforce file naming checking to ensure uploaded files (and files
46
+ contained in archives) all have the correct extension<br>
47
+ <input type="checkbox" id="requestLog">Also download log file for the conversion<br>
48
+ Select file to convert:
49
+ <br><input type="file" name="fileToUpload" id="fileToUpload"><br>
50
+ <input type="button" class="button init-disabled" value=" Convert " name="uploadButton" id="uploadButton"
51
+ disabled=true>
52
+ </p>
53
+ </div>
54
+ <div class="largeGap"></div>
55
+ </form>
56
+
57
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
58
+ crossorigin="anonymous"></script>
59
+ <script src="../javascript/convertc2x.js" type="module" language="JavaScript"></script>
60
+
61
+ <footer class="footer" id="psdi-footer"></footer>
62
+
63
+ </body>
64
+
65
+ </html>