From f332c5ef957fca5f0b360275fd20d63dd5a9e4e6 Mon Sep 17 00:00:00 2001
From: Avnam <avnamohri@gmail.com>
Date: Tue, 25 Jan 2022 02:35:12 +0530
Subject: [PATCH 1/2] Chimera software script for generating multiple webGL
 images

---
 Chimera_script/ReadMe.md     |  7 +++++++
 Chimera_script/import os1.py | 26 ++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 Chimera_script/ReadMe.md
 create mode 100644 Chimera_script/import os1.py

diff --git a/Chimera_script/ReadMe.md b/Chimera_script/ReadMe.md
new file mode 100644
index 00000000..746f951c
--- /dev/null
+++ b/Chimera_script/ReadMe.md
@@ -0,0 +1,7 @@
+# scipt for generating Webgl images using chimera visulaization software
+The script works on chimera software for visualizing pdb files of protein structures.
+With this scirpt images of multiple protein pdb files can be generated in webGl format which is not yet avalaible in ChimeraX
+Feel free to modify and add according to need 
+
+## This is working with .pdb files in chimera software
+Used in chimera terminal for python.
\ No newline at end of file
diff --git a/Chimera_script/import os1.py b/Chimera_script/import os1.py
new file mode 100644
index 00000000..ebf61b46
--- /dev/null
+++ b/Chimera_script/import os1.py	
@@ -0,0 +1,26 @@
+import os
+import chimera
+import Midas
+from chimera import exports
+from chimera import runCommand as rc # use 'rc' as shorthand for runCommand
+# change to folder with data files
+os.chdir("")
+
+# gather the names of .pdb files in the folder
+file_names = [fn for fn in os.listdir(".") if fn.endswith(".pdb")]
+
+# loop through the files, opening, processing, and closing each in turn
+for fn in file_names:
+	rc("open " + fn)
+	rc("window")
+	rc("ac wb")
+	rc("roll")
+	rc("freeze")
+	rc("ac c2")
+	rc("wait 5")
+	htmlname = fn[:-3] +'.html'
+	exports.doExportCommand("WebGL",htmlname)
+	rc("close all")
+	
+	# save image to a file that ends in .png rather than .pdb
+	
\ No newline at end of file

From d3cb04b8aceb1b3985c86c7f1d03d3f44b56796b Mon Sep 17 00:00:00 2001
From: Avnam <avnamohri@gmail.com>
Date: Tue, 25 Jan 2022 02:40:08 +0530
Subject: [PATCH 2/2] Renamed

---
 Chimera_script/{import os1.py => webGL_images.py} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename Chimera_script/{import os1.py => webGL_images.py} (100%)

diff --git a/Chimera_script/import os1.py b/Chimera_script/webGL_images.py
similarity index 100%
rename from Chimera_script/import os1.py
rename to Chimera_script/webGL_images.py