ajjackson / ascii-phonons

Blender extensions for illustrations of phonons
GNU General Public License v3.0
59 stars 22 forks source link

Issues with ascii-phonons #33

Open spriti523 opened 2 months ago

spriti523 commented 2 months ago

I want to simply visualize the ascii files printed by phonopy.

I am using./ascii-phonons -b /Applications/Blender.app/Contents/MacOS/Blender ../../animations/animation_G.ascii .

The call breaks giving the error

Blender 3.4.1 (hash 55485cb379f7 built 2022-12-20 00:48:52)
Read prefs: "/Application Support/Blender/3.4/config/userpref.blend
Error: Python: Traceback (most recent call last):
  File "/phonons/ascii-phonons/scripts/tmpojzggnou.py", line 13, in <module>
    vsim2blender.plotter.open_mode(**{'input_file': 'phonons/animations/animation_G.ascii', 'blender_bin': '/Applications/Blender.app/Contents/MacOS/Blender'})
  File "/phonons/ascii-phonons/addons/vsim2blender/plotter.py", line 359, in open_mode
    draw_bounding_box(lattice_vectors, offset=bbox_offset)
  File "/phonons/ascii-phonons/addons/vsim2blender/plotter.py", line 37, in draw_bounding_box
    cart_offset = offset * Matrix(cell)
TypeError: Element-wise multiplication: not supported between 'Vector' and 'Matrix' types

Blender quit

I am trying to figure if there is a way out around this?

Thanks!

ajjackson commented 2 months ago

Hi @spriti523 ,

I think this is a compatibility issue with Blender 3 and later. ascii-phonons was originally developed against Blender 2.76 and there have been some significant changes in the python libraries included with Blender since then.

It would be good to update ascii-phonons to work with newer versions, but I don't currently have a timescale to do this work. If you can install an older version of Blender that would be the quickest way to get things up and running! But I appreciate this becomes increasingly difficult over time...