Attachment 'atomplot.py'
Download 1 from ASE.Visualization.VMD import VMD
2 from Dacapo import Dacapo
3 #outfile is the name of the outfile you want to plot
4 atoms=Dacapo.ReadAtoms('outfile.nc')
5 #Plot the atom, .Repeat can be used to repeat the unit cell
6 VMD(atoms.Repeat((1,1,1)))
7
8
9 #Saving ListOfatoms and the electron density as a .Cube file
10 from ASE.IO.Cube import WriteCube
11 calc=atoms.GetCalculator()
12 density_array=calc.GetDensityArray()
13 WriteCube(atoms,density_array,'densityarray.cube')
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.