Eigenstate / vmd-python

Installable VMD as a python module
Other
132 stars 25 forks source link

Documentation updates? #28

Open tylergannon opened 5 years ago

tylergannon commented 5 years ago

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

Eigenstate commented 5 years ago

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:

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.