generate output files with vampire · 2020-03-27 · configuration files in vampire 4 •...
TRANSCRIPT
Visualising results
AndreaMeo
1st Advanced VAMPIRE Workshop
2
GenerateoutputfileswithVAMPIRE
Configuration files in VAMPIRE
3
• Include statement in input fileconfig:atomsconfig:atoms-output-rate=1
• This will generate some files:> -rw-r--r--@ 1 andrea staff 1506 14 Sep 00:46 Py.mat> -rw-r--r-- 1 andrea staff 1786 14 Sep 00:49 input> -rw-r--r-- 1 andrea staff 6109 14 Sep 00:49 log> -rw-r--r-- 1 andrea staff 997 14 Sep 00:49 output> -rw-r--r-- 1 andrea staff 211958 14 Sep 00:49 atoms-coords.data> -rw-r--r-- 1 andrea staff 527 14 Sep 00:49 atoms-coords.meta> -rw-r--r-- 1 andrea staff 277816 14 Sep 00:49 spins-00000000.data> -rw-r--r-- 1 andrea staff 493 14 Sep 00:49 spins-00000000.meta> -rw-r--r-- 1 andrea staff 278227 14 Sep 00:49 spins-00000001.data> -rw-r--r-- 1 andrea staff 493 14 Sep 00:49 spins-00000001.meta
Configuration files in VAMPIRE
4
• Execute vdc utility> /path/to/vdc/vdc
• This will generate some new files:
> -rw-r--r-- 1 andrea staff 202212 14 Sep 00:55 crystal.xyz> -rw-r--r-- 1 andrea staff 738018 14 Sep 00:55 spins-00000000.inc> -rw-r--r-- 1 andrea staff 738429 14 Sep 00:55 spins-00000001.inc> -rw-r--r-- 1 andrea staff 151 14 Sep 00:55 spins.ini> -rw-r--r-- 1 andrea staff 2906 14 Sep 00:55 spins.pov
crystal.xyz
5
9747
Ag 1e-9 1e-9 1e-9Fe 1.775 1.775 1e-9Fe 1.775 1e-9 1.775Ag 1e-9 1.775 1.775Ag 3.55 1e-9 1e-9Fe 5.325 1.775 1e-9Ag 5.325 1e-9 1.775Ag 3.55 1.775 1.775
File containing crystal structure in xyz standard format
Number of atoms
Element,asdefinedinmaterial[1]:material-element=Ag
Atomiccoordinates
6
Toolsforvisualisation
Tools for visualisation
7
1. Gnuplot• Standard command-line tool that allows to generate 2D, 3D
and surface plots
• It’s quick and fast
• Can be used via script files
• Run on every platform
2. Povray• High quality tool for creating images Great and cool for spin
configurations and in general 3D plots à Suitable when youwant to publish
3. Rasmol, Jmol, Vesta, VMD (etc.)• Visualise crystal structure
Plotting 2D data with gnuplot
8
# Inbashwecansortthedatainafilebasedonspecifickeys(-k):>sort -k 1g -k 3g output
#Enteringnuplot:> Gnuplot
#column3istheanglephi,column6isy-componentoftorque#Ingnuplot wecanhaveconditionalstatements:($1==0 ?$3:0/0):($6)
#Onceingnuplot,typethefollowingcommands
> plot ‘<sort -k 1g -k 3g output’ u($1==0?$3:0/0):($6) w l
FILE to plot COLUMNS to plot
PLOT with lines
Plotting 3D data with gnuplot
9
• It is possible to visualise the spin configuration via gnuplot
• Spatial coordinates are stored in: atoms-coords.data• Spins coordinates are stored in: spins-(some zeros)#.data
• Combining the files is possible to generate a 3D plot
sp ”<paste atoms-coords.data spins-*.data” u 3:4:5:8 palette
sp ”<paste atoms-coords.data spins-*.data” u 3:4:5:6:7:8:8 w vector
10
a) Web page for details, documentation and support:
www.povray.org
b) Download Povray from github repository:
https://github.com/POV-Ray/povray/tree/3.7-stable
c) To install look at “README.md” in “unix” directory in thegithub
Povray
> git clone https://github.com/POV-Ray/povray.git
#Otherwise download the zip file from github
11
How to obtain and compile Povray
> cd unix/
> ./prebuild.sh
> cd ../
> ./configure COMPILED_BY="your name <email@address>"
> make
> make install
12
How to compile Povray as NON-root
> ./configure –-prefix=/where/you/want/to/installCOMPILED_BY="your name <email@address>” -–without-libtiff NON_REDISTRIBUTABLE_BUILD=yes> make check
> cd unix/
> ./prebuild.sh
> cd ../
13
Running Povray
> /path/to/vdc/vdc
> povray spins # render all snapshots in order
# or you can select only specific snapshots/ranges
> povray +KFI0 +KFF1 +A0.3 spins.pov
Initialframe
Finalframe
14
Running Povray
# You can add some option as resolution of the image
> povray –W1600 –H1200 +A0.3 spins.pov
Resolution
# Although, you can change this, as well as theantialiasing in the spins.ini file
15
Running Povray as NON-root
> /path/to/vdc/vdc
Whereyourexecutablehasbeen
createdSpecifypathto
“include”libraries
> /path/to/povray/unix/povray +L/path/to/prefix/include spins
spins.ini
16
Width = 800Height = 600
Antialias = OnAntialias_Threshold = 0.3
Define some global parameter for povray
Resolution
Antialiasing
spins-00000000.inc
17
spinm0(-49.7,-49.7,-4.43723,-0.484481,0.412277,0.771561,0.0741268,0.0741268,1)spinm1(-47.925,-49.7,-2.66223,0.853587,-0.413335,-0.317085,1,0.619498,0.619498)
File containing coords and spins to be input in povray
Spincoordinates
Materialnumberasdefinedinmaterialfilematerial[1]:…material[2]:…
Atomiccoordinates ColourinRGBformat
spins.pov – colours settings
18
#version 3.5;#include "colors.inc"#include "metals.inc"#include "screen.inc"
File containing parameters and settings for executing povray
Declarecompatibilityversion
Colourpalettetobeused
spins.pov – global & camera settings
19
global_settings { assumed_gamma 2.0 }
Backgroundcolour
background { color Gray30 }
Set_Camera(<CX,CY,CZ>, <LX,LY,LZ>, 15)
Cameralocation
Cameralookat
Cameraangle
spins.pov – camera settings
20Image from: “http://www.povray.org/documentation/3.7.0/r3_4.html#r3_4_2_1_1”
spins.pov – camera settings
21
Set_Camera_Aspect(4,3)
Aspectratio
Set_Camera_Sky(<0,0,1>)
light_source { <2*CX, 2*CY, 2*CZ> color White}
Tiltsthecamera
Definepointlightsource
Locationoflightsource
Colouroflightsource
spins.pov – materials settings
22
#declare sscale0=2.0; #declare rscale0=1.2;#declare cscale0=3.54;#declare cones0=0;#declare arrows0=1;#declare spheres0=1;#declare cubes0=0;#declare spincolors0=1;#declare spincolor0=pigment {color rgb < 0.1 0.1 0.1 >};
Declare parameters for each material defined in the material file
Parametersthatwillbeusedtocreatedifferent
shapes
spins.pov – materials settings
23
#macro spinm0(cx,cy,cz,sx,sy,sz, cr,cg,cb)union{#if(spheres0) sphere {<cx,cy,cz>,0.5*rscale0} #end#if(cubes0) box {<cx-cscale0*0.5,cy-cscale0*0.5,cz-
cscale0*0.5>,<cx+cscale0*0.5,cy+cscale0*0.5,cz+cscale0*0.5>} #end#if(cones0) cone {<cx+0.5*sx*sscale0,cy+0.5*sy*sscale0,cz+0.5*sz*sscale0>,0.0
<cx-0.5*sx*sscale0,cy-0.5*sy*sscale0,cz-0.5*sz*sscale0>,sscale0*0.5} #end#if(arrows0) cylinder
{<cx+sx*0.5*sscale0,cy+sy*0.5*sscale0,cz+sz*0.5*sscale0>,<cx-sx*0.5*sscale0,cy-sy*0.5*sscale0,cz-sz*0.5*sscale0>,sscale0*0.12}cone {<cx+sx*0.5*1.6*sscale0,cy+sy*0.5*1.6*sscale0,cz+sz*0.5*1.6*sscale0>,sscale0*0.0 <cx+sx*0.5*sscale0,cy+sy*0.5*sscale0,cz+sz*0.5*sscale0>,sscale0*0.2} #end
#if(spincolors0) texture { pigment {color rgb <cr cg cb>}finish {reflection{ref} diffuse 1 ambient 0}}
#else texture { spincolor0 finish {reflection {ref} diffuse 1 ambient 0}} #end}#end
Declare parameters for each material defined in the material file
Examples – nice perspective views of spiral configurations
24
Examples – top view of domains
25
T = 5K
T = 50K
T = 300K
Examples – vortex spin structure
26
Examples – crystal structure
27
Examples – unit cell/crystal structure
28
Image from: Daniel Meilak
29
Thankyouforyoutime!