-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathillustrate.html
293 lines (275 loc) · 11.7 KB
/
illustrate.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<!DOCTYPE html>
<html lang="en-us">
<HEAD>
<TITLE>IllustrateWeb</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="mobile-web-app-capable" content="yes" />
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<style>
input
{
font-family: 'Gloria Hallelujah';
}
/* A link that has not been visited */
a:link {
color: white;
}
/* A link that has been visited */
a:visited {
color: red;
}
/* A link that is hovered on */
a:hover {
color: yellow;
}
/* A link that is selected */
a:active {
color: green;
}
@font-face {
font-family: 'Gloria Hallelujah';
font-style: normal;
font-weight: 400;
font-display: fallback;
src: local('Gloria Hallelujah'), local('GloriaHallelujah'), url(fonts/font.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
body, html {
height: 100%;
width: 100%;
margin: 0;
//font-family: Arial, Helvetica, sans-serif;
font-family: 'Gloria Hallelujah', sans-serif;
//font-size: 22px;
font-display: fallback;
}
* {
box-sizing: border-box;
}
pre {
overflow-x: auto;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
wired-textarea{
font-family: 'Courier', sans-serif;
font-size: 12px;
}
.bg-image {
/* The image used */
background-image: url('images/wallpaper.jpg.png');
/* Add the blur effect */
filter: blur(10px);
-webkit-filter: blur(10px);
width: 100%;
/* Full height */
height: 100%;
background-color: white;
background-blend-mode: luminosity;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
/* Position text in the middle of the page/image */
.bg-text {
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0, 0.5); /* Black w/opacity/see-through */
color: white;
font-weight: bold;
border: 3px solid #f1f1f1;
//position: absolute;
//top: 0%;
//left: 0%;
//transform: translate(-50%, -50%);
//z-index: 2;
width: 100%;
//padding: 20px;
//text-align: center;
}
.bg-form{
//background-color: rgb(0,0,0); /* Fallback color */
//background-color: rgba(0,0,0, 0.5); /* Black w/opacity/see-through */
//color: white;
font-weight: bold;
//border: 3px solid #f1f1f1;
//position: absolute;
// top: 33%;
//left: 0%;
//transform: translate(-50%, -50%);
//z-index: 2;
width: 100%;
//padding: 20px;
//text-align: center;
}
.content {
position: absolute;
top: 0%;
left: 0%;
z-index: 9999;
margin-left: 0px;
margin-right: 0px;
width: 100%;
//height: 100%;
display: flex;
flex-direction: column;
background-color: rgba(0,0,0, 0.5);
}
.loader {
border: 16px solid #f3f3f3; /* Light grey */
border-top: 16px solid #3498db; /* Blue */
border-radius: 50%;
width: 120px;
height: 120px;
animation: spin 2s linear infinite;
display: none;
}
.options{
display: block;
}
.cards{
}
.NGLpan {
width: 100%;
height: 100%; //order:2;
display: flex;
flex-direction: row;
justify-content: space-between;
max-width: 100%; //background: url(images/Pane.png) repeat;
//border-radius: 25px 25px 25px 25px;
//box-shadow: 5px 5px 20px LightGrey;
//box-sizing: border-box;
//padding: 25px;
outline: 1px solid red;
outline-offset: -1px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<link type="text/css" rel="stylesheet" href="awesomplete.css" />
<script src="extras/webcomponents-loader.js"></script>
<script src="extras/wired-elements.bundled.js"></script>
<script src="https://cdn.rawgit.com/arose/ngl/v2.0.0-dev.24/dist/ngl.js"></script>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="extras/awesomplete.min.js"></script>
</HEAD>
<BODY>
<div class="bg-image" id="bgimage"></div>
<div id="mainContent" class="content">
<div class="bg-text" id="bgtext"><pre>
******************************
I L L U S T R A T E
Biomolecular Illustration
******************************
copyright 2019 David S Goodsell
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License
This work was supported by Damon Runyon-Walter Winchell Cancer Research Fund Fellowship DRG 972,
the US National Institutes of Health R01-GM120604 and the RCSB Protein Data Bank.
To get started, type in a PDB id, pick a Style, choose a view in the NGL window, and click Illustrate.
Documentation and Illustrate source at <a href=https://ccsb.scripps.edu/illustrate>https://ccsb.scripps.edu/illustrate</a>
--------------------------------------------------------------------
<a href=https://www.ncbi.nlm.nih.gov/pubmed/1476997>DS Goodsell & AJ Olson (1992) "Molecular Illustration in Black and White" JMolGraphics 10, 235-240.</a>
--------------------------------------------------------------------
</pre>
</div>
<div id="mainDiv" style="display:flex;flex-flow:row;flex-wrap:wrap;background-color: rgba(0,0,0, 0.5);color: white;">
<div style="display:flex;flex-flow:column">
<div id="options" class="options">
<input type="file" id="pdb_file_input" style="color:white" accept=".pdb,.cif,.ent,.gz,.mol2" type="file" onclick="Util_forceSelect(this)" onchange="loadStructure(event)" /></input>
<br>
or use PDB id <wired-input type="text" id="pdbinput" value="" style="color:black" onchange="changePDB(this)"/></wired-input>
<br>Project name <wired-input type="text" style="color:black" id="nameinput" value="" style="" onchange="changeName(this)"></wired-input>
<wired-checkbox id="advanced" name="advanced" onclick="showOptions(this)"> Advanced Options</wired-checkbox>
<input type=number id="scale" step=1 value=12 /> Pixel per Angstrom <br />
<label for="ill_style"> Style </label>
<wired-combo id="ill_style" selected="1" role="combobox" tabindex="0">
<wired-item style="color:black" value="ProteinDNA">Protein/DNA</wired-item>
<wired-item style="color:black" value="EntityChain">EntityChain</wired-item>
<wired-item style="color:black" value="Atomic">Atomic</wired-item>
<wired-item style="color:black" value="CPK">CPK</wired-item>
<wired-item style="color:black" value="One">One Color</wired-item>
<wired-item style="color:black" value="OneRange">One Color Range</wired-item>
<wired-item style="color:black" value="Coarse">Coarse</wired-item>
<wired-item style="color:black" value="Generic">Generic</wired-item>
<wired-item style="color:black" value="Custom">Advanced</wired-item>
</wired-combo>
<input type="color" onchange="ChangeRep()" id="ucolor" name="ucolor" style="display:none" value="#ff0000">
<div id="ao_options" style="display:none">
<wired-checkbox id="hb" name="hb" checked> Ignore hydrogen</wired-checkbox>
<wired-checkbox id="water" name="water" checked> Ignore water</wired-checkbox>
<wired-checkbox id="ao" name="ao" checked> Soft Shadow</wired-checkbox>
<input type=number id="ao_params1" step=0.0001 value=0.0023 /> fractional shadowing around each atom : larger=darker (0.0-1.0, typically 0.0023)<br />
<input type=number id="ao_params2" step=0.1 value=2.0 /> angle of shadowing around each atom : larger=tighter region (0.0-1.0, typically 2.0) <br />
<input type=number id="ao_params3" step=0.1 value=1.0 /> shadowing only applied if z-difference greater than this value (Angstroms, typically 1.0)<br />
<input type=number id="ao_params4" step=0.1 value=0.7 /> maximal shadowing amount : smaller=darker (0.0-1.0, typically 0.7) <br />
</div>
</div>
<div id="customStyle" style="display:none">
<div>
<input style="color:black" type="text" id="atoms" value="" style=""></input>
<input style="color:black" type="text" id="residues" value="" style=""></input>
<input style="color:black" type="text" id="chains" value="" style=""></input>
<input type="color" id="acolor" name="acolor" value="#ff0000"/>
<wired-button onclick='AddCard()'>Add Card</wired-button>
</div>
</div>
<div id="inp_options">
<wired-button onclick='previewInput()'>Preview Input Txt</wired-button>
<wired-button onclick='clearInpTxt()'>Clear Input Script</wired-button>
<br>or <input style="color:white" type="file" id="inp_file_input" accept=".inp,.txt" type="file" onclick="Util_forceSelect(this)" onchange="loadInp(event)"></input>
<wired-textarea id="inp_txt" placeholder="Enter text" rows="3"></wired-textarea>
<wired-checkbox id="use_loaded_inp_txt" name="use_loaded_inp_txt"> Use Input Script</wired-checkbox>
<br><wired-button style="width: max-content;" onclick='resetToDefault()'>Reset to Default</wired-button>
</div>
<div id="current_query" style="display: none;"></div>
</div>
<div style="display:flex;flex-flow:column">
<div>
<div id="viewport" class="NGLpan" style="width:300px; height:300px;"></div>
<label for="ass_type"> Assembly</label>
<wired-combo id="ass_type" onchange="changeBU()" selected="AU" role="combobox" tabindex="0">
<wired-item style="color:black" value="AU">AU</wired-item>
</wired-combo>
<br>
<label for="mod_type"> Modelid </label>
<wired-combo id="mod_type" onchange="changeModel()" selected="0" role="combobox" tabindex="0">
<wired-item style="color:black" value="0">0</wired-item>
</wired-combo>
<div class="multiselect">
<div id="selection_ch_checkboxes" style="display:flex;flex-flow:row;flex-wrap:wrap;">
</div>
</div>
Selection <wired-input style="color:black" type="text" id="sel_str" value="" style="" onchange="ChangeRep()"></wired-input><br>
<wired-button style="width: max-content;" onclick='resetView()'>Reset View</wired-button>
<wired-button style="width: max-content;" onclick='onClick()'>Illustrate</wired-button>
</div>
</div>
<div>
<div id="aprogress_holder" style="display: none">
<progress id="aprogress" value="0" max="100" ></progress>
<label>Sending to server</label>
</div>
<div id="loader" class="loader"></div>
<a id="linkimg" href="" target="blanck"><img id="result" src="" style="width:300px"></img></a>
</div>
</div>
</div>
<script src="extras/chroma.min.js"></script>
<script src="extras/chroma.palette-gen.js"></script>
<script src="js/util.js"></script>
<script src="js/illustrator.js"></script>
</body>
</html>