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

problem loading OpenDx files generated from density_from_Universe() in pymol #1725

Closed
KyleStiers opened this Issue Dec 7, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@KyleStiers

KyleStiers commented Dec 7, 2017

Expected behaviour

D = density_from_Universe(u, delta=1.0, atomselection="name OW")
D.convert_density('TIP3P')
D.export("density.dx")

'open density.dx in pymol'

isomesh test, density, 2.0, carve=1.5

Actual behaviour

No errors thrown when density.dx loaded in pymol, but no isomesh is produced from the above command.

If you edit line 23 of the density.dx from

object 3 class array type float rank 0 items 9472320 data follows

to

object 3 class array type double rank 0 items 9472320 data follows

and then run the command

isomesh test, density, 2.0, carve=1.5

the isomesh map shows up and everything is fine.

@orbeckst

This comment has been minimized.

Show comment
Hide comment
@orbeckst

orbeckst Dec 8, 2017

Member

Can you try out if the DX file with double is still readable in VMD and Chimera?

The DX file I/O is fairly rudimentary and when I wrote it, I only checked that it worked for my immediate purposes; I thought it had worked for pymol, too, but I don't remember. The float type is the default type for the DX array object so I chose it for the output type.

Is it possible that this is a bug in pymol?

Member

orbeckst commented Dec 8, 2017

Can you try out if the DX file with double is still readable in VMD and Chimera?

The DX file I/O is fairly rudimentary and when I wrote it, I only checked that it worked for my immediate purposes; I thought it had worked for pymol, too, but I don't remember. The float type is the default type for the DX array object so I chose it for the output type.

Is it possible that this is a bug in pymol?

@KyleStiers

This comment has been minimized.

Show comment
Hide comment
@KyleStiers

KyleStiers Dec 8, 2017

It works in VMD still, but I can't tell in Chimera. I only see DX loading in Chimera for APBS maps and it seems like it only colors surface. It definitely loaded the file, but unclear whether it actually works as expected.

It's equally likely this is a pymol bug. May be best just to put a note in the documentation so that people know.

KyleStiers commented Dec 8, 2017

It works in VMD still, but I can't tell in Chimera. I only see DX loading in Chimera for APBS maps and it seems like it only colors surface. It definitely loaded the file, but unclear whether it actually works as expected.

It's equally likely this is a pymol bug. May be best just to put a note in the documentation so that people know.

@orbeckst

This comment has been minimized.

Show comment
Hide comment
@orbeckst

orbeckst Dec 8, 2017

Member

We could add an option to the writer to set the output number format. We could set it to double if this increases interoperability; purists could then set it back to float.

If I find time I try in Chimera.

Member

orbeckst commented Dec 8, 2017

We could add an option to the writer to set the output number format. We could set it to double if this increases interoperability; purists could then set it back to float.

If I find time I try in Chimera.

@orbeckst

This comment has been minimized.

Show comment
Hide comment
@orbeckst

orbeckst Dec 8, 2017

Member

Ok, that is embarassing: This was a known issue already MDAnalysis/GridDataFormats#35 and I completely dropped the ball on it.

Member

orbeckst commented Dec 8, 2017

Ok, that is embarassing: This was a known issue already MDAnalysis/GridDataFormats#35 and I completely dropped the ball on it.

@KyleStiers

This comment has been minimized.

Show comment
Hide comment
@KyleStiers

KyleStiers Dec 12, 2017

Ah, sorry I should've found this as well. I tried to look through all the references to the DX file creation and problems in PyMOL but clearly missed this one.

KyleStiers commented Dec 12, 2017

Ah, sorry I should've found this as well. I tried to look through all the references to the DX file creation and problems in PyMOL but clearly missed this one.

orbeckst added a commit that referenced this issue Dec 19, 2017

document (and test) setting DX array type (#1725)
- requires gridDataFormats >= 0.4.0 (to be released)
- documented that PyMOL requires type="double" (see
  MDAnalysis/GridDataFormats#35 for details)
- added tests for Density.export(..., type=<type>) -- note
  that they really only test gridData.Grid.export()
- fixes #1725

orbeckst added a commit that referenced this issue Dec 19, 2017

document (and test) setting DX array type (#1725)
- requires gridDataFormats >= 0.4.0 (to be released)
- documented that PyMOL requires type="double" (see
  MDAnalysis/GridDataFormats#35 for details)
- added tests for Density.export(..., type=<type>) -- note
  that they really only test gridData.Grid.export()
- updated CHANGELOG
- fixes #1725

@orbeckst orbeckst referenced this issue Jan 12, 2018

Closed

release 0.4.0 #38

3 of 3 tasks complete

orbeckst added a commit that referenced this issue Jan 21, 2018

document (and test) setting DX array type (#1725)
- requires gridDataFormats >= 0.4.0
- documented that PyMOL requires type="double" (see
  MDAnalysis/GridDataFormats#35 for details)
- link to GridDataFormats docs for OpenDX type
- use intersphinx to the mdanalysis.org GridDataFormats docs
  instead of RTD (better brand experience by staying inside mdanalysis.org...)
- added tests for Density.export(..., type=<type>) -- note
  that they really only test gridData.Grid.export()
- updated CHANGELOG
- fixes #1725

orbeckst added a commit that referenced this issue Jan 22, 2018

document (and test) setting DX array type (#1725)
- requires gridDataFormats >= 0.4.0
- documented that PyMOL requires type="double" (see
  MDAnalysis/GridDataFormats#35 for details)
- link to GridDataFormats docs for OpenDX type
- use intersphinx to the mdanalysis.org GridDataFormats docs
  instead of RTD (better brand experience by staying inside mdanalysis.org...)
- added tests for Density.export(..., type=<type>) -- note
  that they really only test gridData.Grid.export()
- updated CHANGELOG
- fixes #1725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment