Eigenstate / vmd-python

Installable VMD as a python module
Other
129 stars 24 forks source link

render produce wrong output file when running through script #31

Closed huangziyan11111 closed 4 years ago

huangziyan11111 commented 4 years ago

I wrote a code: visual.py, just two step:load and render. I can correctly run when I firstly get into python environment, and run step by step. While I run through script (python visual.py), the output file 1fqy.dat can not produce correctly. I don't know why output get wrong as I run the same code as before.

the content of script visual.py: from vmd import Molecule from Molecule import * from vmd import render molecule.load('pdb','1fqy.pdb') render.render(method="Tachyon",filename="1fqy.dat")

Eigenstate commented 4 years ago

I need some more information to be able to help you with your problem. A couple questions:

huangziyan11111 commented 4 years ago

Thank you for you reply, I get the right result through adding one line: "display.update()" before "render.render(method="Tachyon",filename="1fqy.dat")". output file 1fqy.dat is the same as I run with firstly getting into python environment. I check what you suggest, everything is fine. ^_^