-
Notifications
You must be signed in to change notification settings - Fork 4
02_The_Inputs
2.1 Specifying Fragments and endGroups
The molecular fragments are specified using two input files:
- A “.car” file, which contains the coordinates and atom types of each
of the polymer building blocks (each building block having a separate .car file). This file can be prepared using programs such as Avogadro or Materials Studio. An example .car file is given in Figure 3.
- A “.csv” file that defines which atoms are endGroups and capAtoms
etc. The .csv file should have the same prefix as the .car file, but with a .csv suffix instead of .car. This is a standard comma-separated file that can be created and edited with any spreadsheet program.
The first line of the .csv file is a header naming the columns (case isn’t important here, but the field names must be correct):
Type,endGroup,capAtom,dihedral,delAtom
Each subsequent line defines an endGroup, with each column separated by a comma. The first three columns (Type, endGroup, and capAtom) are required, whilst the other two (dihedral and delAtom) are optional. The indices in the file start from 0, meaning that the first atom has an index of 0, the second 1, the third 2 etc.
The meanings of the columns given in the .csv file are as follows:
- Type: This is a string (starting with a letter) that names the
endGroup. This is used to specify bonding rules and to control which endGroups in which building blocks are bonded in Grow or Join steps (see sections 5.1 and 5.2).
- endGroup: This is the index of the atom in the .car file that is to be
the endGroup (the atoms that form part of the new bond between fragments) (Figure 4). As with the .csv file, the indexing in the car file starts from 0, so if the first atom in the .car file is to be the endGroup, the endGroup column should be 0.
- capAtom: This is the index of the atom in the .car file that is to be
the capAtom (the atom that caps the endGroup and defines the vector that the new bond will be made along) (Figure 4). The capAtom is removed when the new bond is formed and the corresponding endGroup in the other building block may not be in the same position, depending on the type of the two endGroups, which defines the new bond length.
- dihedral: This optional column specifies the atom that defines the
dihedral angle around the bond between two endGroups. This can be used to specify the orientation of molecules when they are attached with a Grow step. If the dihedral argument is given as “ -1 ”, or omitted, this means that there is no dihedral angle.
- delAtom: This optional column specifies an atom that will be removed
when the endGroup forms a bond. This can be used to unsaturate an atom on bonding, for example, if the endGroup is the nitrogen of an NH2 group, one of the hydrogen atoms could act as the capAtom and the other as the delAtom. On bonding to another NH2 endGroup a N=N double bond would be formed. If the delAtom argument is given as “ -1 ”, or omitted, this means that no atoms should be deleted during bond formation.
An example .csv file is given in Figure 5.
The following sections describe the various operations that can be performed by Ambuild. For an annotated example script, see the builder.py file in the builder directory.
2.2 Potential Parameters
It is necessary to supply Ambuild with any potential parameters for bonds, bond angles, dihedral angles, and intermolecular potentials required in any HOOMD-blue MD simulation or structural optimisation. These are defined in a set of .csv files: bond_params.csv, angle_params.csv, dihedral_params.csv, improper_params.csv, and pair_params.csv.
The Ambuild code uses a simple harmonic bond and angle potential, a cosine harmonic dihedral and improper potential and a Lennard-Jones pair potential. The building blocks are held rigid, meaning that only the bonds, bond angles and dihedral angles between building blocks are described. More detailed information about the parameters needed to run Ambuild can be found at: http://glotzerlab.engin.umich.edu/hoomd-blue/, and https://hoomd-blue.readthedocs.io/en/stable/package-md.html.
2.3 The Input File
The Input file is the top level Python script, containing all the information about where the building blocks and parameters are located, as well as any bonding rules specified. This is saved as a “.py” script. The Input file specifies how Ambuild should assemble the amorphous hyper-crosslinked polymer. This runs in the same way as a normal Python script, with the option to write the output to a log file. Structural output is given as a zipped Python “pickle” file (.pkl.gz, a serialised representation of the entire cell object), which may be converted to a .cml or .xyz file so it may be viewed using programs such as Avogadro2. The .cml file displays the periodic boundaries of the unit cell, but any bonds that extend across the periodic boundary will be omitted, meaning that this file should not be used for extracting structural data, it is simply for visualisation. The .xyz file simply gives all of the x, y, and z coordinates.