nglview icon indicating copy to clipboard operation
nglview copied to clipboard

`center` method result in black sphere for structure with only one atom

Open superstar54 opened this issue 4 months ago • 0 comments

Version:

nglview: 3.0.6 ipywidgets: 7.7.4

Step to reproduce

  • Create a structure with only one atom in the unit cell.
  • Call center method
import nglview
from ase.build import bulk
atoms = bulk("Au")
v = nglview.show_ase(atoms)
v.add_unitcell()
v.center()
v

Screenshot from 2024-10-08 15-20-51

Note

This could be because of the overlap between the atom and the control of the viewer.

superstar54 avatar Oct 08 '24 13:10 superstar54