superstar54 / weas-widget

A widget to visualize and edit atomic structures in Jupyter Notebook
https://weas-widget.readthedocs.io/en/latest/index.html
MIT License
19 stars 3 forks source link

No atoms is shown in the GUI. #66

Open hanjiahe1999 opened 3 days ago

hanjiahe1999 commented 3 days ago

It didn't show the particles. the code is

from ase.build import bulk
from ase.calculators.emt import EMT
import numpy as np
from weas_widget import WeasWidget

atoms = bulk('Au', cubic = True)
atoms *= [3, 3, 3]
atoms.positions += np.random.random((len(atoms), 3))
atoms.calc = EMT()
atoms.get_potential_energy()
# set the forces as an attribute
atoms.set_array("Force", atoms.calc.results["forces"])

viewer = WeasWidget()
viewer.from_ase(atoms)
viewer.avr.color_by = "Force"
viewer.avr.color_ramp = ["red", "yellow", "blue"]
viewer.avr.model_style = 1
viewer

But there are no bugs. the jupyter show is this. img_v3_02fm_73aab0d4-2898-4ba7-924f-fc763bf1649g

hanjiahe1999 commented 3 days ago

the weas-widget version is 0.1.7 and I also try to the 0.1.6. it doesn't work.

superstar54 commented 1 day ago

Hi @hanjiahe1999 , I can not reproduce this issue.

Did you install weas-widget using pip or from the source of the repository?

hanjiahe1999 commented 11 hours ago

I used the pip

superstar54 commented 11 hours ago

I can not reproduce this in a fresh environment. Could you try it in a fresh environment?

Or could you share your environment here, .e.g., run

pip freeze > requirements.txt

If you are using conda:

conda env export > requirements.txt

and then share the requirements.txt file here.