pyiron / pyiron_atomistics

pyiron_atomistics - an integrated development environment (IDE) for atomistic simulation in computational materials science.
https://pyiron-atomistics.readthedocs.io
BSD 3-Clause "New" or "Revised" License
42 stars 15 forks source link

plot3d vector field broken with triclinic unit cells #58

Open pmrv opened 3 years ago

pmrv commented 3 years ago

Summary

Arrows are drawn incorrectly when plotting a structure + vector field with a triclinic cells.

Not sure if this our bug or NGLView's, skimming the plot3d I at least didn't see anything suspicious. Anyone more familiar with that?

pyiron Version and Platform

d9145e63 @ garching

Expected Behavior

Arrows should be rooted at atomic coordinates

Actual Behavior

Arrows roots seem to be inverted, so screens below.

Steps to Reproduce

Create a non-cubic structure with ase and plot any vector field. vector vector2

samwaseda commented 3 years ago

Can you give more details for me to reproduce the problem? The following lines seemed to be fine:

structure = pr.create_structure('Fe', 'bcc', 2.85)
structure.apply_strain([[0, 0, 0], [1, 0, 0], [0, 0, 0]])
structure.plot3d(vector_field=[[2, 0, 0], [2, 0, 0]])
test
pmrv commented 3 years ago
structure = pr.create_structure('Fe', 'bcc', 2.85)
structure.apply_strain([[0, 1, 1], [0, 0, 0], [0, 0, 0]])
structure.plot3d(vector_field=[[2, 2, 0], [2, 0, 0]])

It seems only some directions are affected, which does sound like something is not properly rotated somewehre.

plot