[ase-users] Updating the gui window without opening a new window?
Ask Hjorth Larsen
asklarsen at gmail.com
Wed Feb 7 17:15:25 CET 2018
Hi Colin,
2018-02-06 15:11 GMT+01:00 Colin Bousige via ase-users
<ase-users at listserv.fysik.dtu.dk>:
> Hi,
>
> I am building a tool to easily construct some structure using tkinter to input some values and ase to show the resulting structure.
>
> My question is: how do you update the gui window with a modified structure *without* opening a new window ?
>
> Here is a short example showing my problem:
>
> ```python
> from ase import Atoms
> from ase.visualize import view
> from ase.build import fcc111
>
> slab = fcc111('Ag', size=(5,6,1), a=4, orthogonal=True)
> view(slab)
> # now we modify this slab (in my case this is done via tkinter where eg. the user can set size=(i,j,k))
> slab = fcc111('Ag', size=(5,6,3), a=4, orthogonal=True)
> view(slab) # Here I would like the view of the structure to be updated as I change it, and not open a new gui window
> ```
The 'view' command always opens a new process.
I don't completely understand what you need to do - the slab is
modified by the user, yet you later replace it?
You may wish to try slab.edit().
Best regards
Ask
>
> Thanks in advance for your help,
> Colin
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
More information about the ase-users
mailing list