APBS OpenDX file conversion to XYZ

Is it possible to use Chimera to convert an APBS OpenDX grid to coordinates: x,y,x, grid point value?

Hi Scott, An APBS OpenDX file is just a text file which lists the values at the grid points (x-axis varying fastest, z axis varying slowest). So you could probably write a script to convert it to this other text format easily enough. A Chimera Python script could do the same thing but it isn't any easier. Still if you wanted to try it using Chimera Python here is a basic example of accessing volume data in Chimera https://www.rbvi.ucsf.edu/trac/chimera/attachment/wiki/Scripts/readvol.py Below is the start of an APBS OpenDX file to give you an idea of how you would write a script to read it and reformat it how you want. By the way, we haven't developed Chimera for about 8 years and our new program ChimeraX is much more capable, but would still need a similar Python script to output values in the format you want. Tom # Data from APBS 0.3.2 # # POTENTIAL (kT/e) # object 1 class gridpositions counts 65 97 97 origin -8.064450e+00 -4.768105e+01 -4.266980e+01 delta 3.779047e-01 0.000000e+00 0.000000e+00 delta 0.000000e+00 4.098240e-01 0.000000e+00 delta 0.000000e+00 0.000000e+00 4.099125e-01 object 2 class gridconnections counts 65 97 97 object 3 class array type double rank 0 items 611585 data follows 8.921700e-01 9.000006e-01 9.078676e-01 9.157664e-01 9.236924e-01 9.316403e-01 9.396046e-01 9.475795e-01 9.555586e-01 9.635354e-01 9.715027e-01 9.794531e-01 9.873788e-01 9.952714e-01 1.003122e+00 ... (65 * 97 * 97 values in the file).
On Mar 4, 2024, at 3:46 PM, Scott Bembenek via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Is it possible to use Chimera to convert an APBS OpenDX grid to coordinates: x,y,x, grid point value? _______________________________________________ Chimera-users mailing list -- chimera-users@cgl.ucsf.edu To unsubscribe send an email to chimera-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimera-users@cgl.ucsf.edu/

Hi Scott, Sorry, there is no simple way. DX is read as a volume data file, and the choices for saving volume data are MRC (default), NetCDF, Chimera map, BRIX, or IMAGIC format. volume data input formats: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/filetypes.html#volume> volume data output formats: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/volume.html#output> I said "no simple way" because I'm sure it is possible with Python coding, but I don't know how complicated that would be, and I cannot advise since I don't know Python myself. If you're familiar with any of the other output formats you may be able to write your own converter script. Regards, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 4, 2024, at 3:46 PM, Scott Bembenek via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Is it possible to use Chimera to convert an APBS OpenDX grid to coordinates: x,y,x, grid point value? _______________________________________________ Chimera-users mailing list -- chimera-users@cgl.ucsf.edu To unsubscribe send an email to chimera-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimera-users@cgl.ucsf.edu/

thanks for the info Tom. On Mon, Mar 4, 2024 at 5:49 PM Tom Goddard <goddard@sonic.net> wrote:
Hi Scott,
An APBS OpenDX file is just a text file which lists the values at the grid points (x-axis varying fastest, z axis varying slowest). So you could probably write a script to convert it to this other text format easily enough. A Chimera Python script could do the same thing but it isn't any easier. Still if you wanted to try it using Chimera Python here is a basic example of accessing volume data in Chimera
https://www.rbvi.ucsf.edu/trac/chimera/attachment/wiki/Scripts/readvol.py
Below is the start of an APBS OpenDX file to give you an idea of how you would write a script to read it and reformat it how you want.
By the way, we haven't developed Chimera for about 8 years and our new program ChimeraX is much more capable, but would still need a similar Python script to output values in the format you want.
Tom
# Data from APBS 0.3.2 # # POTENTIAL (kT/e) # object 1 class gridpositions counts 65 97 97 origin -8.064450e+00 -4.768105e+01 -4.266980e+01 delta 3.779047e-01 0.000000e+00 0.000000e+00 delta 0.000000e+00 4.098240e-01 0.000000e+00 delta 0.000000e+00 0.000000e+00 4.099125e-01 object 2 class gridconnections counts 65 97 97 object 3 class array type double rank 0 items 611585 data follows 8.921700e-01 9.000006e-01 9.078676e-01 9.157664e-01 9.236924e-01 9.316403e-01 9.396046e-01 9.475795e-01 9.555586e-01 9.635354e-01 9.715027e-01 9.794531e-01 9.873788e-01 9.952714e-01 1.003122e+00 ...
(65 * 97 * 97 values in the file).
On Mar 4, 2024, at 3:46 PM, Scott Bembenek via Chimera-users < chimera-users@cgl.ucsf.edu> wrote:
Is it possible to use Chimera to convert an APBS OpenDX grid to coordinates: x,y,x, grid point value? _______________________________________________ Chimera-users mailing list -- chimera-users@cgl.ucsf.edu To unsubscribe send an email to chimera-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimera-users@cgl.ucsf.edu/

thanks for the info Elaine. On Mon, Mar 4, 2024 at 6:02 PM Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Scott, Sorry, there is no simple way. DX is read as a volume data file, and the choices for saving volume data are MRC (default), NetCDF, Chimera map, BRIX, or IMAGIC format.
volume data input formats: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/filetypes.html#volume>
volume data output formats: < https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/volume.html#output
I said "no simple way" because I'm sure it is possible with Python coding, but I don't know how complicated that would be, and I cannot advise since I don't know Python myself. If you're familiar with any of the other output formats you may be able to write your own converter script.
Regards, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 4, 2024, at 3:46 PM, Scott Bembenek via Chimera-users < chimera-users@cgl.ucsf.edu> wrote:
Is it possible to use Chimera to convert an APBS OpenDX grid to coordinates: x,y,x, grid point value? _______________________________________________ Chimera-users mailing list -- chimera-users@cgl.ucsf.edu To unsubscribe send an email to chimera-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimera-users@cgl.ucsf.edu/
participants (3)
-
Elaine Meng
-
Scott Bembenek
-
Tom Goddard