nglviewer / ngl

WebGL protein viewer
http://nglviewer.org/ngl/
MIT License
657 stars 168 forks source link

Use addArrow to add Cartesian axes #1018

Closed hainm closed 5 months ago

hainm commented 5 months ago

Hi

We get a question from nglview user but I think NGL developers could help answer

https://github.com/nglviewer/nglview/discussions/1002#discussioncomment-8237076

I'm using ase.visualize.view(atoms, viewer='ngl') and trying to use add_arrow to add Cartesian axes. When I plot some crystal structures the arrows are aligned as I expect, but in some cases they are rotated relative to the atom positions.

It seems like the position arguments are related to the camera orientation and not the Cartesian coordinates. Is that right? Is there > an example setting positions using Cartesian coordinates?

Thanks

bpuchala commented 5 months ago

This was an issue with ase automatically rotating the structure.