-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation updates? #28
Comments
Hi Tyler,
Welcome to scientific computing! If you're coming from a software
background, prepare to be entertained :)
For a VMD plugin, you'll need a couple of things:
1) A backend. Some kind of functions that submit your jobs.
2) A frontend GUI, if you want. For Python + VMD, use Tkinter
3) Glue between these two and integration into VMD.
The first two are solvable with some googling, but the third can get weird.
Here are some hints in the right direction:
- You can register callbacks from button presses in your Tkinter GUI to
make things happen in the VMD GUI / render window / environment. See:
https://vmd.robinbetz.com/vmdcallbacks.html
- You can add entries to VMD menus (like to the plugins area) with the
vmdmenu module. See:
https://vmd.robinbetz.com/api/generated/vmd.vmdmenu.add.html
- Getting your plugin installed can be as easy as putting it in
$VMDDIR/plugins, but you'll have to poke around with how that works. I bet
getting a Python one to load without having to recompile VMD won't be too
hard.
The vast majority of current plugins are written in TCL, and I know there
is functionality for registering them.
This probably isn't the right repo to build off of if you're trying to put
something into the VMD GUI window, as it's just a Python module.
I'd go get the VMD source code and build that with Python support, or find
a binary someone's distributing. I have a really old blog post on doing
this but it is quite out of date.
If you feel like wading through code I wrote in grad school, the
DensitySampler class in this file implements a matplotlib graph that you
can click on and it shows or hides molecules:
https://github.com/Eigenstate/beak/blob/master/beak/visualize/sampler.py This
isn't done with callbacks but with threads, but it's the only practical
example I can find right now :)
Let me know how it goes! I am happy to help, but may respond quite
asynchronously.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Robin,
I hope you'll bear with a couple of silly questions, and if it helps then I can take some time to update your README, to help clarify a couple of things.
I'm a software person and terribly new to the world of scientific computing, so I'm still really getting oriented. I've been asked to write a VMD plugin for configuring and submitting jobs, hopefully in Python. Would you be willing to spend a few moments helping me to understand how I can do that? It would be my pleasure to write up some tutorial notes and submit a pull request.
thanks for your time
Tyler
The text was updated successfully, but these errors were encountered: