#set:bg_colour=gui.html.bg_colour
#set:font_colour=gui.html.font_colour

set:font_colour_code=#aaaaff
set:font_colour_bold=gui.html.highlight_colour

c:fuse
c:html.ItemState index* 0
c:html.ItemState index-home 1
c:html.ItemState tab* 2
c:lines 10
c:showq false

p:This tutorial will look at how to use the pack function in Olex 2 in order to show how the molecules interact with each other, the first thing this tutorial will do is to load sucrose as an example to show this.
c:freeze(true)
c:reap 'DataDir()/samples/sucrose/sucrose.res'
c:spy.revert_to_original()
c:freeze(false)

p:First you need to click on the <b>View</b> tab in the top toolbar.
h:tab-view
c:spy.demo.switch_tab_for_tutorials(view)

p:Then you need to open the toolbar called <b>Symmetry Generation</b> by clicking it, which will extend the tab
h:h2-symmetry-generation
c:html.ItemState h2-view-symmetry-generation 1

p:...you then need to open the tab called <b>Packing</b>
h:h3-h3-packing
c:html.ItemState h3-packing 1

p:You can then either choose using the slider how many units you want to pack the molecule by
c:html.setbg(slidepackradius,red)
c:html.setvalue(slidepackradius,15)
c:html.setvalue(packradius,15)
c:setvalue(packradius,getvalue(slidepackradius))
c:pack getvalue(packradius)
c:refresh

p:...or you can choose to type the command <c>pack</c> to show the maximum amount aloud to be shown
c:pack
c:refresh

p:You can move, rotate and use functions on these as you would for a normal single unit of the molecule for example here is the molecule rotating 90 degrees along the x axis
c:rota x 90
c:refresh

p:In order to reduce this back down to a single unit again you have to click on the tab called <b>Symmetry Tools</b>
c:html.ItemState h3-packing 2
h:h3-h3-symmetry-tools
c:html.ItemState h3-symmetry-tools 1

p:Once on the symmetry tools tab you need to click on <b>Fuse</b> in order to reduce the model to one unit again or type the command <c>fuse</c>
h:button-fuse
c:fuse
c:refresh

p:End of tutorial, press next to repeat the tutorial or cancel to exit.