####################################################################### # # # Example: Making a PLOT # # # ####################################################################### # # # XMD can produce plots on Postscript or Canon Laser printers. # # This example generates a B2 lattice and prints two different # # plots. In the first example, some of the atoms are displaced, # # and the original atoms are plotted along with "tails" showing the # # displacements. The second plot prints the original atoms with # # bonds connecting those atoms separted by a 2nd neighbor distance # # # # NOTE: You can convert the postscript plot to PDF format if you # # have 'ghostscript' installed. To create the PDF file 'p.pdf', # # the command is # # # # gs -sOutputFile=p.pdf -sDEVICE=pdfwrite -dBATCH -dNOPAUSE plot.ps # # # ####################################################################### # # # Make B2 lattice # box 4 4 4 particle 2 1 0.25 0.25 0.25 2 0.75 0.75 0.75 dup 3 1 0 0 dup 3 0 1 0 dup 3 0 0 1 # # Save original positions as reference step # refstep # # Displace some atoms # select box 1 1 1 3 3 3 move 0.125 0.125 0.0 # # Exchange current step (the displaced atoms) and original positions # refstep swap # # Set up plot parameters required by both plots # # Postscript Printer plot device postscript # Number of pages plot page 1 # Number of layers plot layer 4 # Orientation of plot (vertical axis y, horizontal axis x) plot orient y/x # Atom symbols select type 1 plot symbol fill cir 0.125 select type 2 plot symbol cir 0.25 # # 1st Plot: displacement plot with tails # # Use displacement plot disp on # Plot label label 1 This is an example of a displacement plot (with tails). # plot to output postscript file plot write plot.ps # # 2nd Plot: Bond plot # # Shut off displacements plot disp off # Turn on bonds plot bond on 0.5 0.9 # Plot label label 1 This is an example of a bond plot. # append plot to end of postscript file plot write +plot.ps