Skip to content

Commit

Permalink
upgrade weas_widget version
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresOrtegaGuerrero committed Oct 29, 2024
1 parent 31a5e13 commit db2cc62
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = [
"pre-commit",
"euphonic",
"kaleido",
"weas-widget==0.1.5",
"weas-widget==0.1.12",
]

[tool.ruff.lint]
Expand Down
30 changes: 18 additions & 12 deletions src/aiidalab_qe_vibroscopy/utils/raman/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import json

from weas_widget import WeasWidget
from weas_widget.utils import generate_phonon_trajectory

from aiida_vibroscopy.utils.broadenings import multilorentz

Expand Down Expand Up @@ -520,19 +519,26 @@ def _animation_widget(self):
# Get the structure of the selected mode
structure = self.structure_ase

trajectory = generate_phonon_trajectory(
atoms=structure,
eigenvectors=eigenvector,
amplitude=amplitude,
repeat=[
self.weas = WeasWidget(guiConfig=self.guiConfig)
self.weas.from_ase(structure)

phonon_setting = {
"eigenvectors": np.array(
[[[real_part, 0] for real_part in row] for row in eigenvector]
),
"kpoint": [0, 0, 0], # optional
"amplitude": amplitude,
"nframes": 20,
"repeat": [
self._supercell[0].value,
self._supercell[1].value,
self._supercell[2].value,
],
)
self.weas = WeasWidget(guiConfig=self.guiConfig)
self.weas.from_ase(trajectory)
self.weas.avr.vf.settings = [
{"origins": "positions", "vectors": "movement", "radius": 0.1}
]
"color": "black",
"radius": 0.1,
}
self.weas.avr.phonon_setting = phonon_setting

self.weas.avr.model_style = 1
self.weas.avr.color_type = "JMOL"
self.weas.avr.vf.show = True

0 comments on commit db2cc62

Please sign in to comment.