Polymer Between Two Surface Slabs

I’m trying to generate a 3 phase system sandwiched between two surface slabs. The first phase is polymer, the second phase is gas-phase oxygen, and the third phase is another type of polymer.

With the way EMC builds phases (concentrically instead of one on top of the other) I can’t figure out how to do this without mixing phases. Any suggestions?

I assume you refer to avoiding interphase blending when you mention the mixing of phases? This could be accomplished by excluding areas in which no build should take place. Unfortunately, EMC Setup currently does not support such build mode, but you could alter the resulting build.emc for this purpose by adding the region interaction functionality:

types		= {
  region	-> {
    lj		-> {active -> true, mode -> repulsive,
      data	-> {
          index -> 0, epsilon -> 0.1, sigma -> 1,
          region -> {shape -> cuboid, type -> absolute,
            h -> {lphase, infinite, infinite},
            center -> {centerx, 0, 0}

This creates a excluded repulsive volume of shape h with center at {cx, 0, 0}. The form of the latter vector depends on in which direction you grow your box. Normally, only the space for the built phase is added before building. I would suggest increasing your box a little and placing an excluded repulsive volume at that side too. This way both ends of your newly built phase will be flattened. This also means you need to add two region entries with values for index of 0 and 1. I would suggest locations to insert the above to be right after the heading for building of phase 2,

(* build phase 2 *)

and consecutive phases. This way the variable lphase represents the thickness of the latter phase. Please note that the energy will show high values when overlaying an already built phase with a repulsive volume.