Bottlebrush type polymer

I wanted to create a polymer where the backbone monomer has a sidechain that also grows. Earlier, I used a huge backbone where I explicitly added the sidechain. However, is there an easier way to do this? I tried the following way, but I am getting No terminator for polymer ‘poly’ error.

(* EMC: Script *)

(* Created by emc.pl v3.5.3, June 26, 2018
   on Wed Jun 27 19:17:46 CEST 2018 *)

(* define variables *)

variables	= {
  seed		-> -1,
  ntotal	-> 1000,
  fshape	-> 1,
  output	-> "polymer",
  field		-> "pcff/pcff",
  location	-> $root+"field/",

  nav		-> 0.6022141179,
  temperature	-> 300,
  radius	-> 5,
  nrelax	-> 100,
  weight_nonbond -> 0.0001,
  weight_bond	-> 0.0001,
  weight_focus	-> 1,
  cutoff	-> 9.5,
  charge_cutoff	-> 9.5,
  kappa		-> 4,

  density1	-> 0.85,

  f_poly	-> 1,

  chem_bb	-> "*C(*C)C*",
  chem_sc	-> "*CCC*",
  chem_tbb	-> "*C",
  chem_tsc	-> "*C"
};

output		= {
  debug		-> false,
  exit		-> true,
  info		-> true,
  warning	-> true
};

(* define force field *)

field		= {
  mode		-> cff,
  name		-> {location+field+".frc", location+field+"_templates.dat"}
};

(* define groups *)

groups = {

  group -> {id -> bb, depth -> 8, chemistry -> chem_bb,
    connects -> {
      {source -> $end1, destination -> {bb,  $end3}},
      {source -> $end1, destination -> {tbb, $end1}},
      {source -> $end3, destination -> {tbb, $end1}},
      {source -> $end3, destination -> {bb,  $end1}},
      {source -> $end2, destination -> {sc,  $end1}}
    }
  },

  group -> {id -> sc, depth -> 8, chemistry -> chem_sc,
    connects -> {
      {source -> $end1, destination -> {bb,  $end2}},
      {source -> $end2, destination -> {sc,  $end1}},

      {source -> $end2, destination -> {tsc, $end1}}
    }
  },

  group -> {id -> tbb, depth -> 8, chemistry -> chem_tbb,
    connects -> {
      {source -> $end1, destination -> {bb, $end1}},
      {source -> $end1, destination -> {bb, $end3}}
    }
  },

  group -> {id -> tsc, depth -> 8, chemistry -> chem_tsc,
    connects -> {
      {source -> $end1, destination -> {sc, $end2}},
    }
  }
};


field		= {
  mode		-> apply,
  check		-> true,
  debug		-> false
};

simulation	= {
  types		-> {
    cff		-> {
      pair	-> {active -> true, mode -> repulsive, cutoff -> cutoff}
    }
  }
};

(* determine simulation sizing *)

variables	= {

  (* lengths *)

  lg_bb	-> nsites(bb),
  lg_sc	-> nsites(sc),
  lg_tbb	-> nsites(tbb),
  lg_tsc	-> nsites(tsc),
  norm_poly	-> 100,

  l_poly	-> (10*lg_bb+10*lg_sc+2*lg_tbb+1*lg_tsc)*100/norm_poly,

  (* masses *)

  mg_bb	-> mass(bb),
  mg_sc	-> mass(sc),
  mg_tbb	-> mass(tbb),
  mg_tsc	-> mass(tsc),

  norm_poly	-> 100,

  m_poly	-> (10*mg_bb+10*mg_sc+2*mg_tbb+1*mg_tsc)*100/norm_poly,

  (* mol fractions *)

  f_poly	-> f_poly*l_poly,

  (* normalization *)

  norm		-> f_poly,

  f_poly	-> f_poly/norm,

  (* sizing *)

  n_poly	-> int(f_poly*ntotal/l_poly+0.5),


  (* system sizing *)

  ntotal	-> 0,
  mtotal	-> 0
};

(* define interactions *)

simulation	= {
  units		-> {
    permittivity -> 1,
    seed	-> seed
  },
  types		-> {
    coulomb	-> {
      pair	-> {active -> true, cutoff -> charge_cutoff}
    }
  }
};

(* clusters phase 1 *)

clusters	= {
  polymer	-> {
    id		-> poly, system -> main, type -> alternate,
    n		-> int(100*n_poly/norm_poly+0.5),
    groups	-> {bb, sc, tbb, tsc},
    weights	-> {1, 1, 1, 1},
    nrepeat	-> {10, 100, 2, 10}
  }
};

(* build phase 1 *)

variables	= {
  nphase1	-> ntotal()-ntotal,
  mphase1	-> mtotal()-mtotal,
  vphase1	-> mphase1/nav/density1,
  lbox		-> (vphase1/fshape)^(1/3),
  lphase1	-> fshape*lbox,
  lxx		-> lphase1,
  lyy		-> lbox,
  lzz		-> lbox,
  lzy		-> 0,
  lzx		-> 0,
  lyx		-> 0,
  lphase	-> lphase1,
  ntotal	-> nphase1,
  mtotal	-> mphase1,
  vtotal	-> vphase1
};

field		= {
  mode		-> apply,
  check		-> true,
  debug		-> false
};

simulation	= {
  types		-> {
    cff		-> {
      pair	-> {active -> true, mode -> repulsive, cutoff -> cutoff}
    }
  }
};

build		= {
  system	-> {
    id		-> main,
    geometry	-> {xx -> lxx, yy -> lyy, zz -> lzz,
		    zy -> lzy, zx -> lzx, yx -> lyx},
    temperature	-> temperature,
    flag	-> {charge -> true, map -> true, pbc -> true}
  },
  select	-> {
    progress	-> list,
    frequency	-> 1,
    name	-> "error",
    cluster	-> {poly},
    relax	-> {ncycles -> nrelax, radius -> radius},
    grow	-> {
      method	-> energetic,
      check	-> all,
      nbonded	-> 20,
      ntrials	-> 20,
      niterations -> 1000,
      weight	-> {
	bonded	-> weight_bond, nonbonded -> weight_nonbond,
	focus	-> weight_focus}
    }
  }
};

force		= {style -> none, message -> nkt};
force		= {style -> init, message -> nkt};

(* LAMMPS profile variables *)

variables	= {
  nl_poly	-> nclusters(clusters -> poly)
};

(* storage *)

put		= {name -> output, compress -> true};

pdb		= {name -> output, forcefield -> cff, detect -> false,
		   hexadecimal -> false, unwrap -> true, pbc -> true,
		   atom -> index, residue -> index, segment -> index,
		   vdw -> false, cut -> false, fixed -> true, rigid -> true,
		   connectivity -> false, parameters -> false};

lammps		= {name -> output, mode -> put, forcefield -> cff,
		   parameters -> true, types -> false, unwrap -> true,
		   charges -> true, ewald -> true};

Could you provide your .esh with which you generated the above build.emc?

I actually did not use any .esh file. I started from the homopolymer example.

I tried using the following .esh file too. Same error.

#!/usr/bin/env emc.pl

ITEM    OPTIONS

replace         true
field           pcff
density         0.85
ntotal          1000

ITEM    END

ITEM    GROUPS

bb      *C(C)C,1,bb:3,1,tbb:1,2,sc:1,3,bb:1,3,tbb:1
sc      CCC,1,bb:2,2,sc:1,2,tsc:1
tbb     *C,1,bb:1,1,bb:3
tsc     *C,1,sc:2

ITEM    END

ITEM    CLUSTERS

poly    alternate  1

ITEM    END

ITEM    POLYMERS

poly
100     bb,10,sc,100,tbb,2,tsc,10

ITEM    END