# Garlic Tutorial

## Script 2 (bonds.script) - Drawing styles for bonds

This script shows the available drawing styles for bonds. The file trp.pdb is required as input. You can mark, copy and paste this script to your local host (create the file bonds.script).
Type the following command at garlic prompt:
exe bonds.script
The sample image is at the bottom of this page.

    # Show all drawing styles used to draw bonds. Atoms are hidden,
    # except for nice bonds!
    # This script will work if you use default .garlicrc script.
    # This script requires garlic version 1.2 or later!

    # Bond style 1:
    load trp.pdb
    pos -12 -6 -40
    ato 0
    bon 1
    tag "1"

    # Now inform user that refreshing is off:
    title 1 50 50 "Please be patient ..."

    # Switch refreshing off:
    refresh off

    # Bond style 2:
    load trp.pdb
    pos 0 -6 -40
    ato 0
    bon 2
    tag "2"

    # Bond style 3:
    load trp.pdb
    pos 12 -6 -40
    ato 0
    bon 3
    tag "3"

    # Bond style 4:
    load trp.pdb
    pos -12 6 -40
    ato 0
    bon 4
    tag "4"

    # Bond style 5:
    load trp.pdb
    pos 0 6 -40
    ato 0
    bon 5
    tag "5"

    # Bond style nice:
    load trp.pdb
    pos 12 6 -40
    ato co2
    bon nice
    tag "nic (nice)"

    # Hide the title:
    title 1 off

    # Switch refreshing on:
    refresh