Thursday, January 10, 2013

Cross-linked Polymers: Part I - Static Method

Chemical reactions are fun! Throwing some resin monomers into a beaker and mixing them with a curing agent results in something greater than the sum of their individual molecules. Once it cures you have a material that should have been jammed between two things you wanted glued together or something you should have poured into a mold to make one of those vendetta masks I see on TV these days. All those molecules magically react with one another forming a 3D-network of molecules. monomers form bonds with other monomer molecules and with curing agent molecules.

The world of molecular dynamics (MD) does in some cases support chemical reactions. The LAMMPS MD simulator supports the ReaxFF and sadly I have not devoted much time to it. Ignorance can be a dangerous thing. One could reinvent the wheel and look foolish especially if the wheel produced is not as good as a standard wheel. For what it does ReaxFF is a fantastic tool! It is 10-50 times slower than non-reactive force fields, but is NlogN in performance compared to quantum mechanical (QM) methods which are N^3! This is according work done by Adri van Duin in a power point I read online. Ideally, it would be fantastic to build a cell filled with DGEBA and IPD molecules and specify the ReaxFF force field and let LAMMPS build an initial cell to some desired level of cross-linking. ReaxFF is on my to do list. I am working on less creative and more brute force methods for creating cross-linked systems, which I plan to benchmark against the ReaxFF approach.

My first attempt at cross-linking software is still vaporware. It is based on a static approach. The static approach is based on building molecules one atom at a time using a template to tell the software where to place the next atom relative to the previous atom. Starting points in the cell are randomly generated initially and a molecule to be built per starting point is randomly decided. Atoms are added to each of N molecules in a round-robin fashion giving nearly equal access to each molecule under construction. Each molecule is built in turn and positions on a molecule's structure is identified as a point where another molecule can be attached. If there are many molecules to choose from for this attachment then a random selection is made based on the odds supplied to the software. A DGEBA molecule has two places in its structure where either another DGEBA or an IPD can be attached. If the choice is 50:50 then a coin is flipped to choose one. Each DGEBA molecule contributes two new starting points to a stack of starting points in the software. The situation could become explosive! Every IPD molecule has four start ing points so explosive is an understatement! So what allows the software to terminate? The software uses several methods of termination. The first is to achieve a desired cell density. The second is collisions. Every molecule under construction could  collide with another molecule being built! Which ever molecule that tests for and finds a collision is selected for deletion! This applies to molecules that attempt to leave the cell. The third and fourth tests used to terminate the molecule building process is to track the cell density and upon convergence to any value or after some user defined iteration limit the process terminates.

What is collision detection? In the case of molecules it means that two atoms cannot occupy the same space. It also means that a bond cannot spear a ring structure. An atom should not occupy space between two bonded atoms. The book, "Real-time Collision Detection" by Christer Ericson provided me the knowledge about collision detection. Testing for collisions between points with points, lines (aka bonds)  and planes (aka ring structures) , and lines with planes are being done in computer games and so it can be used in a much slower environment of building cells for simulation. Organic ring structures are represented by one or more unique triangular planes. Again, collision detection causes the current molecule to be erased and the starting point to be replaced with a hydrogen atom. The following  structure shown below shows DGEBA like molecules being built atom-by-atom where the monomers are being assembled into chains simulating a polymerization process. Collision detection is not the Holy Grail. Software is not smart and every new atom, bond and plane needs to be tested for collisions against all the other atoms, bonds and planes!!! This is at least N^2 in effort! Fortunately, there are tricks discovered by smart people that can be employed to this problem. The one I use is to partition my cell into many cubes. Every atom, bond and plane belongs to at least one of these cubes. Testing against the atoms, bonds and planes in the cube where the new atom is placed drastically reduces the number of tests. Also, since the atoms in a molecule template do not collide with other atoms in the template by definition these comparisons can be ignored as well.

"Polymerization" of DGEBA like molecules

Notice in the image above that the monomers are in regular patterns that could possibly be the start of some crystalline or semicrystalline structure. This is a side benefit from the static cross-linking and could possibly result in other test cell geometries beyond amorphous cells. Randomly generating a new trajectory angle for each monomer attached to a chain could result in an amorphous structure assuming the chain does not turn back on itself thus negating a self avoiding walk or SAW. In face the name of the static cross-linking software is SAW.

SAW creates trees of molecules bonded together growing throughout a volume. This process does not create a graph where a graph is a tree with multiple paths to a node and cycles. Each independent tree does not eventually cross-link to another in the cell. This is like a dendritic structure. Of course with enough chains entangled this approach to cross-linking may be good enough? As I pointed out on a previous post I used the oligomer approach to cross-linking for my graduate thesis work. PACKMOL packed the five oligomers into a cell and as an extra bonus entangled the oligomers.

Another important issue is the potential energy of the molecules. If one draws the molecule template in NanoEngineer-1 with longer or shorter than expected bonds or angles that are too wide or narrow it is like storing energy in a spring. NE-1 is used to create the molecule template and the stress added will be placed into every molecule replicated by SAW. This energy is released at the beginning of simulation in LAMMPS and leads to failed simulations because atoms jump across CPUs. Bad dynamics are bad! I will have more to say about energy in a separate blog article soon.

In part two I will cover a dynamic cross-linking approach where LAMMPS will put resin and curing agent molecules into motion and molecules will be bonded together external to LAMMPS. This approach is based on LAMMPS as a callable library from a larger cross-linker. If anyone has invented this wheel why not package up your source code and make a contribution to open source? Comments and suggestions are very welcome on this blog. You can't hurt my feelings because I have worked in the software industry for over 20 years and have a tough skin. Let's work together to build tools to build better students who will go to industry and have some understanding of real-world problems.

Closeup of DGEBA like structures above


  1. This is so interesting. I have been doing research on MDS software. This wasn't what I was expecting to find but it sure was interesting. Thanks so much for this post.

    1. Could you let me know what your expectations are so I can work to make MDS more useful. Thanks!

  2. I find this very interesting as it could be useful to my research. I am on the steep part of the learning curve and look forward to utilizing the modeling software.

  3. Thank you! Please give me feedback on the software and additional features you would like to see.

  4. Your example with DGEBA and IPD is a step growth process. Any suggestions on how to utilize this in a chain growth polymerization?

    1. Could you give me your definitions for step and chain growth? The software currently selects N positions inside the MD cell to start the growth of molecules. Each molecule is "grown" one atom at a time by doing a round robin from position to position giving each molecule a fair chance to grow. As hotspots are encountered in the growth process another molecule is started growing at that position in the MD cell and is bonded to the just completed molecule. By changing the attitude of the next molecule to be built the polymer chain is grown in a different direction if the user wants it to. The user is free to grow straight chains by keeping the same attitude.

      If IPD is not used in the MD cell then only chains of DGEBA will be grown into long polymer chains. If the attitude of each DGEBA monomer is changed the chain will meander willy-nilly through the MD cell. I'd like to add a "TRON light cycle" like capability that allows the chain to change direction at the MD cell boundary.

      If possible, could we discuss this further via email?

      Thanks you,