[ase-users] Visualizing problem
Sepide Araban
sepide.araban at gmail.com
Thu Apr 22 02:38:46 CEST 2021
Dear ASE users,
I have a problem with visualizing I would appreciate if you solve it. When
I using "view" it sometimes works and sometimes does not work. It sometimes
shows one image less than what I used in my script. Here is the one script
for example(I created it from a part of a bigger script and run it), I
turned on the computer and run the script, it worked and showed 3 images. I
closed the windows and run the script for the second time, it showed
nothing (no windows, no errors, no messages). It seems that I have to
restart the computer every time in order for it to work. I run the script
in serial mode.
Does 'view' work in parallel mode? And how can I solve the problem?
«««««««««
from ase import Atoms, io, o ptimize
from gpaw import GPAW, FermiDirac
from gpaw.cluster import Cluster
from gpaw.lrtddft import LrTDDFT
from ase.cluster.cubic import BodyCenteredCubic
from ase.visualize import view
import numpy as np
a0=.53#.053nm
n=20
d = n*a0 # starting distance
#Na particle
surfaces = [(1, 0, 0), (1, 1, 0), (1, 1, 1)]
layers = [1, 5, 5]
lc = 4.28#0.428nm
atoms1 = BodyCenteredCubic('Na', surfaces, layers, latticeconstant=lc)
view(atoms1)
positions1=atoms1.get_positions()
positions2=positions1
positions2[:,2]=positions2[:,2]+d
positions1=atoms1.get_positions()
d=Atoms('Na9',positions2)
dp=d.get_positions()
view(d)
positions3=np.vstack((positions1,positions2))
c=Atoms('Na18',positions3)
cp=c.get_positions()
view(c)
#s = Cluster(symbols='Na18',positions=cp)
#view(s)
««««««««
I don't know if the information is enough or there are some other
necessary professional Linux or python scripts. I hope that it would be
enough. Please let me know if it's not.
Best regards
Sepideh Araban
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20210422/3accaefb/attachment-0001.htm>
More information about the ase-users
mailing list