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

support vector field #14

Closed superstar54 closed 6 months ago

superstar54 commented 6 months ago

This PR

One can add any vector field by:

viewer.vectorField = {"origins": origins, "vectors": vectors, "color": "red"}

Magnetic moment

Show the magnetic moment as a vector field.

atoms.set_array("moment", np.ones(len(atoms)))