2

I created a program that allows the user to enter info about DNA twist,turn, and location, and other info. And the output is a PDB file, however, I want to show the .pdb file in a .pdb viewer within the program and cannot seem to know how. The desired applications are Chimera(http://www.cgl.ucsf.edu/chimera/), or swiss(http://spdbv.vital-it.ch/).

1 Answer 1

2

Depending on how tight you want your integration to be, a decent start could be something as simple as using python to externally invoke Chimera or Swiss:

import subprocess
subprocess.Popen(["C:/Path/To/Chimera/bin/chimera.exe", "--stereo",  "seq", "c:/Path/to/pdb/you/created/protease.pdb"])

This would cause a Chimera window to pop open then load and render your pdb, but leave your app active and running in the background (if you want your program to wait for the external program to close, use subprocess.call instead.)

(Btw, subprocess is the newer way to do this. os.system and os.exec* are the deprecated approaches, but would still get similar results.)

Not the answer you're looking for? Browse other questions tagged or ask your own question.