From: John Stone (
Date: Fri Dec 18 2020 - 10:50:56 CST

  I don't believe we've (yet) added a Tcl binding that permits
voxel-at-a-time editing of volumetric data. It would be
relatively easy to do so however. In the short term, you might
find it easy to write an ASCII DX file with the same grid size
and other parameters, with the Z-based potentials you have in mind,
and add that to your existing volume using the built-in commands.

When I get a break from Windows/Mac build issues, I'll have a look
at what APIs are exposed here. In principle, adding voxel-level
access should not be hard, except that it would impact VMD's
tracking of volumetric data updates, representation regeneration
and redrawing, etc.

Best regards,
  John Stone

On Thu, Dec 10, 2020 at 02:18:23PM -0800, Bassam Haddad wrote:
> Hello VMDers,
> I am trying to generate a 'Total-potential.dx' from a constant e-field
> simulation, where I need to add a linear potential to the
> 'Reaction-potential.dx' that would be generated by the volmap plugin. I
> have looked through the documentation of voltool (which replaced volutil I
> believe) to see if I couldĀ select a voxel by it's 3D coordinates. I am
> able to get the size of the x, y, and z dimensions by using `voltool info
> xsize -i input.dx` for each respective dimension. What I would like to do
> is loop through every voxel, and add a z-dependent constant (linear
> potential). As far as I understand, I am only able to add a constant to
> the entire density, or select voxels near atoms, but not by their index [x
> y z].Ā
> I know this anĀ be done in python, but I was hoping to keep the entire
> script in TCL.
> Thank you forĀ your help, and advice.
> ______________
> Bassam Haddad
> R.L. Kirschstein NIH Fellow
> Doctoral Candidate
> Portland State University
> Portland, OR

NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801           Phone: 217-244-3349