[Blog #3] Finally a Successful Simulation!

In the past weeks, I was finally able to start my MD simulations on Nafion! To begin, I first used a Nafion structure file that my mentor, Akhilesh, provided me that contained 50 nafion polymers (each consisting of 10 monomers) already packed into a 10 x 10 x 10 nm cube. The reason for using his structure instead of the one I developed was just to reproduce his results from a previous simulation to ensure that we are able to get everything to run properly.

 

Cube packed with 50 Nafion chains

 

We then had to pack the cube with water molecules and also negative counterions to balance out the positive Nafion sulfonate groups and maintain electroneutrality. To accomplish this, I needed to use a program called PACKMOL which allows us to pack molecules into defined regions of space. After downloading and installing packmol onto my personal computer, I quickly ran through some tutorials to get familiar with the software. It ended up being super simple! Essentially, all I need to do is make an input file that specifies the coordinates of a region (I use a cube so I only need to define two of the vertices), as well as the types and amounts of molecules/atoms you want to pack into the region. For tutorial examples, I ended up creating a mixture of urea and water, as well as an interface between water and chloroform.

 

Chloroform and water interface I created using PACKMOL

 

Since I was now comfortable with using PACKMOL, I created an input file to pack the cube of 50 Nafion polymers with Na+ ions and water molecules. Since the 50 Nafion chains have a total negative charge of 500, I added 500 sodium ions to maintain electroneutrality. I also decided to add 5000 water molecules because that would be approximately the correct water uptake given the sodium ion concentration, according to literature.

 

Now that I obtained a structure file for my solvated Nafion system, it was time to start the MD simulation! I first had to check that my topology file was updated with the correct amount of sodium ions and water molecules. Using the job script I developed, I then ran the simulation of the cluster. I thought this would be the final step before I was able to start doing analysis, however the simulation took a bit of tuning. I didn’t account for the multitude of errors I was about to confront. One such error was that the number of cores I was requesting on the cluster was incompatible with my GROMACS simulation, so I ended up requesting less and less cores until the simulation finally ran. Another error I kept getting was that the system was not converging to a stable energy in the energy minimization step as the energy on a specific water molecule would be infinity. After consulting Akhilesh, I realized that this was occurring because packmol wasn’t entirely accurate in the way it packed molecules and that there were actually two overlapping molecules in my system. To fix this, I went into the structure file and shifted the troublesome molecule over 0.5 angstroms along one of the axes which seemed to have fixed the error. After I had fixed this, the simulation finally ran without any errors, taking about 40 hours to complete!

 

 

A visualization of the water channels that formed through the simulation (Nafion is hidden).