Attachment 'viz_Fe_anti.py'
Download 1 #!/usr/bin/env python
2
3 from Dacapo import Dacapo
4 from ASE.Visualization.VTK import VTKPlotArray, VTKPlotAtoms
5
6 atoms = Dacapo.ReadAtoms("anti.nc")
7 calc = atoms.GetCalculator()
8 spin0 = calc.GetDensityArray(spin=0)
9 spin1 = calc.GetDensityArray(spin=1)
10 zeta = (spin0-spin1)/ (spin0+spin1)
11 plot = VTKPlotArray(zeta, atoms.GetUnitCell())
12
13 atomplot = VTKPlotAtoms(atoms, parent=plot)
14
15 p1_Fe=atomplot.GetDictOfSpecies()['Fe']
16 p1_Fe.SetRadius(0.5)
17 p1_Fe.SetColor((1,1,1))
18
19 # The unitcell can be removed
20 unitcell=atomplot.unitcell
21 atomplot.RemoveAvatar(unitcell)
22 atomplot.Render()
23
24 plot.Render()
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.