Skip to content

04_Filling_The_Cell

Ambuild-code edited this page Jul 14, 2019 · 1 revision

4.1 Creating a Linear Polymer

To create a linear polymer, the following line can be used:

growPolymer(monomers=['A','B'], ratio=[1,1], length=10, random=False, center=False)

This is the simplest and most automatic way to create a structure. The variables used in the growPolymer argument are given below:

  • monomers: The list of Ambuild fragmentTypes (as specified when adding

each fragment to the cell using the libraryAddFragment argument-see Section 3.2) that will be joined to create a subunit.

  • ratio: A list of integers specifying the number of each type in the

subunit. This list should be as long as the list of monomers.

  • length: The number of subunits that will be created.
  • random: Whether to build up the polymer deterministically or

stochastically, but where the final ratio of fragments will approach that specified in ratio. Expressed as True or False.

  • center: True or False argument asking whether to place the first

monomer in the centre of the cell or not (if possible).

The fragment and ratio lists define the construction of the subunit. E.g.:

monomers = ['A', 'B']

ratio = [1,2]

gives: [ABB]

Another example would be:

monomers = ['A', 'B', 'A', 'B']

ratio = [1,2,3,1]

gives: [ABBAAAB]

4.2 Filling the Cell with Building Blocks

The seed command is used to seed the system with molecular building blocks:

seed(100, fragmentType='A', maxTries=500, center=False )

The arguments to seed a cell are:

  • nblocks: The number of building blocks of that fragmentType to add to

the cell.

  • fragmentType: The type of fragments to add. If the fragmentType is

given as ‘None’, or omitted, then fragments will be randomly chosen from the library.

  • maxTries: The maximum number of attempts to make when adding a

building block before the seed step fails and returns.

  • center: Expressed as True or False, this argument asks whether or not

to place the first block in the centre of the cell (if possible).

  • point: A list of three floats defining a point around which the

centroids of the blocks will be seeded (requires the radius argument).

  • radius: A single float specifying the radius of a sphere around the

point within which the centroids of the building blocks will be seeded (requires the point argument).

  • zone: A list of six floats specifying a box within the cell within

which the centroids of the blocks will be seeded. The coordinates are given in the form of: x, x, y, y, z, z, rather than xyz, xyz.

Once the system is seeded, Grow or Join steps are used to either add new blocks to the system, or join existing blocks together, respectively.