[Chimera-users] WebGL file

Avnam Ohri avnamohri4awesome at gmail.com
Tue Jul 6 16:16:22 PDT 2021

Hello Chimera Team
i have been trying to make a script for looping through a set of pdb files
and get WebGL (.html) file as the output
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("E:/files to work/")

# 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("ac wb")
rc("ac c2")
htmlname = fn[:-3] +'.html'

This is the code I have been using in the script , but the output i get is
not working , i have been getting 26kb files instead of 3-5 mb files and it
doesn't show anything when I open it.

can you please help me with the same as i am new to python code
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20210706/5f2ff5c1/attachment.html>

More information about the Chimera-users mailing list