import "monomer.lt"

Polymer {

  # Make a chain of monomers
  monomers = new Monomer [12].rot(180, 1,0,0).move(2.0, 0, 0)


  # Now, link the monomers together this way:
  write("Data Bonds") {
    $bond:bb1 @bond:Monomer/bb $atom:monomers[0]/CA $atom:monomers[1]/CA
    $bond:bb2 @bond:Monomer/bb $atom:monomers[1]/CA $atom:monomers[2]/CA
    $bond:bb3 @bond:Monomer/bb $atom:monomers[2]/CA $atom:monomers[3]/CA
    $bond:bb4 @bond:Monomer/bb $atom:monomers[3]/CA $atom:monomers[4]/CA
    $bond:bb5 @bond:Monomer/bb $atom:monomers[4]/CA $atom:monomers[5]/CA
    $bond:bb6 @bond:Monomer/bb $atom:monomers[5]/CA $atom:monomers[6]/CA
    $bond:bb7 @bond:Monomer/bb $atom:monomers[6]/CA $atom:monomers[7]/CA
    $bond:bb8 @bond:Monomer/bb $atom:monomers[7]/CA $atom:monomers[8]/CA
    $bond:bb9 @bond:Monomer/bb $atom:monomers[8]/CA $atom:monomers[9]/CA
    $bond:bb10 @bond:Monomer/bb $atom:monomers[9]/CA $atom:monomers[10]/CA
    $bond:bb11 @bond:Monomer/bb $atom:monomers[10]/CA $atom:monomers[11]/CA
  }

  create_var { $mol }  # Create a molecule ID number for this polymer

  # This causes monomer[0], monomer[1], ... to share the same molecule counter
  # because in the 2bead.lt file, the "..." in "$mol:..." preferentially looks
  # for a counter of that type in a parent molecule or earlier ancestor.

} # Polymer



# Angle, dihedral and improper interactions will be generated
# automatically according to the instructions in "monomer.lt"
