# Python script

import mdpp

mdpp.cmd('setnolog')
mdpp.cmd('setoverwrite')
mdpp.cmd('dirname = runs/si-example')
#------------------------------------------------------------
# Create Perfect Lattice Configuration
#
mdpp.cmd('element0 = Si')
mdpp.cmd('crystalstructure = diamond-cubic')
mdpp.cmd('latticeconst = 5.4309529817532409') # (A) for Si
mdpp.cmd('element0 = Silicon')
mdpp.cmd('''
    latticesize = [ 1 0 0 2
                    0 1 0 2
                    0 0 1 3 ]
                    ''')
mdpp.cmd('makecrystal writecn')
#------------------------------------------------------------
# Plot Configuration
# 
mdpp.cmd('atomradius = 0.67 bondradius = 0.3 bondlength = 2.8285')
mdpp.cmd('atomcolor = orange highlightcolor = purple')
mdpp.cmd('bondcolor = red backgroundcolor = white')
mdpp.cmd('plotfreq = 10 rotateangles = [ 0 0 0 1.25 ]')
mdpp.cmd('openwin alloccolors rotate saverot eval plot')
mdpp.cmd('sleep quit')
