igashov commited on
Commit
4470746
1 Parent(s): c11c33a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -3,7 +3,7 @@ import os
3
  import sys
4
 
5
 
6
- HTML_TEMPLATE = '''<!DOCTYPE html>
7
  <html>
8
  <head>
9
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
@@ -12,30 +12,29 @@ HTML_TEMPLATE = '''<!DOCTYPE html>
12
  width: 600px;
13
  height: 600px;
14
  position: relative;
15
- mx-auto:0
16
  }
17
  .mol-container select{
18
  background-image:None;
19
  }
20
  </style>
21
- <script src="http://3Dmol.csb.pitt.edu/build/3Dmol-min.js""></script>
22
  </head>
23
 
24
  <body>
25
  <div id="container" class="mol-container"></div>
26
  <script>
27
  $(document).ready(function() {
28
- let element = $("#container");
29
- let config = { backgroundColor: "orange" };
30
- let viewer = $3Dmol.createViewer( element, config );
31
- viewer.addSphere({ center: {x:0, y:0, z:0}, radius: 10.0, color: "green" });
32
- viewer.zoomTo();
33
- viewer.render();
34
  });
35
  </script>
36
  </body>
37
  </html>
38
- '''
39
 
40
  def generate(input_file):
41
  try:
 
3
  import sys
4
 
5
 
6
+ HTML_TEMPLATE = """<!DOCTYPE html>
7
  <html>
8
  <head>
9
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 
12
  width: 600px;
13
  height: 600px;
14
  position: relative;
 
15
  }
16
  .mol-container select{
17
  background-image:None;
18
  }
19
  </style>
20
+ <script src="https://3Dmol.csb.pitt.edu/build/3Dmol-min.js"></script>
21
  </head>
22
 
23
  <body>
24
  <div id="container" class="mol-container"></div>
25
  <script>
26
  $(document).ready(function() {
27
+ let element = $("#container");
28
+ let config = { backgroundColor: "orange" };
29
+ let viewer = $3Dmol.createViewer( element, config );
30
+ viewer.addSphere({ center: {x:0, y:0, z:0}, radius: 10.0, color: "green" });
31
+ viewer.zoomTo();
32
+ viewer.render();
33
  });
34
  </script>
35
  </body>
36
  </html>
37
+ """
38
 
39
  def generate(input_file):
40
  try: