Eigenstate / vmd-python

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

Change in `get` behavior #25

Closed RasmusFonseca closed 5 years ago

RasmusFonseca commented 5 years ago

We're seeing changes in behavior related to one or more of these get-commands. Any idea what changed?

https://github.com/getcontacts/getcontacts/blob/e403219c6721706023b4b33ae97c7406754d3f7d/contact_calc/contact_utils.py#L196-L202

https://github.com/getcontacts/getcontacts/issues/54

Eigenstate commented 5 years ago
  1. You need to provide more detail than "changes in behavior" for me to be able to do anything. What is the expected output? What is the output you're getting? I can't just glance at your code and see how the new release affects your function call. What Python version? What OS?

  2. I don't know why you're using the TCL interface and parsing the output when native Python functionality has always existed for atomsel.

chains = safely_parsed_evaltcl("$%s get chain" % selection_id) is trivially: selection.chains (or in vmd-python 2.*, selection.get("chains") which is backwards compatible but will emit DeprecationWarning in vmd-python 3. ) Please read the documentation for atomsel: https://vmd.robinbetz.com/atomsel.html

Re-writing your code to make full use of the vmd-python interface may fix the problems you're seeing.

RasmusFonseca commented 5 years ago
  1. The related issue is right there along with the stack-trace and reported OS. I wasn't asking to fix our code, just whether there were expected changes related to the get-functionality.
  2. I don't know either as I didn't write it. Your suggested syntax looks way nicer than what we're currently doing, so will try that out. Thanks!
Eigenstate commented 5 years ago

Fixed in version 3.0.5