Difference between revisions of "Tutorial 2: entropy of mixing of methanol+water"
Miguel Caro (talk | contribs) (→Generating the trajectories) |
Miguel Caro (talk | contribs) (→Generating the starting configurations) |
||
| Line 39: | Line 39: | ||
1MET H 6 0.761 0.600 0.875 | 1MET H 6 0.761 0.600 0.875 | ||
1.20000 1.20000 1.20000 | 1.20000 1.20000 1.20000 | ||
| + | |||
| + | We are going to work with 2400 atoms total. This means that our pure water box will contain 800 molecules, our pure methanol box will contain 400 methanol molecules, and our 2:1 mixture will contain 400 water molecules and 200 methanol molecules. We can build our pure water and pure methanol boxes as follows: | ||
| + | |||
| + | gmx insert-molecules -box 3.0 3.0 3.0 -ci water.gro -nmol 800 -try 20 -o pure_water.gro | ||
| + | gmx insert-molecules -box 3.1 3.1 3.1 -ci methanol.gro -nmol 400 -try 20 -o pure_methanol.gro | ||
| + | |||
| + | For the mixture we are going to generate 10 different configurations. This is so that we can obtain statistics. It is important that these initial configurations are completely uncorrelated, and so we will use bash random variables as seed for the generation: | ||
| + | |||
| + | [[File:water_methanol_2_1_mixture.png|200px|thumb|right|One of the boxes containing a 2:1 water/methanol mixture]] | ||
| + | |||
| + | for i in `seq 1 1 10`; do | ||
| + | gmx insert-molecules -box 3.1 3.1 3.1 -ci water.gro -nmol 400 -try 20 -o temp1.gro -seed $RANDOM | ||
| + | gmx insert-molecules -f temp1.gro -ci methanol.gro -nmol 200 -try 20 -o temp2.gro -seed $RANDOM | ||
| + | rm temp1.gro; mv temp2.gro mixture_${i}.gro | ||
| + | done | ||
== References == | == References == | ||
{{Reference list}} | {{Reference list}} | ||
Revision as of 09:56, 20 April 2017
This tutorial is currently under construction
When two pure liquids are put in contact the new configurations that the molecules can adopt and the new molecular interactions will lead to a change in entropy. Typically, this change is positive because of disorder, although in principle specific molecular interactions can lead to a decrease in entropy in some cases. For ideal gases, the entropy of mixing has an analytical expression, and it depends only on the relative number of molecules of each component in the mixture. The total entropy of a mixture of ideal gases is:
[math]S_\text{mixture}^\text{ideal} = \sum\limits_\Lambda N_\Lambda \bar{S}_\Lambda - k_\text{B} \sum\limits_\Lambda N_\Lambda \ln{\left(\frac{N_\Lambda}{N}\right)},[/math]
where [math]N_\Lambda[/math] is the number of molecules of component [math]\Lambda[/math] and [math]N[/math] is the total number of molecules. [math]\bar{S}_\Lambda[/math] refers to the entropy per molecule in the pure component [math]\Lambda[/math]. For real mixtures, one defines the excess entropy of mixture [math]S_\text{mix}^\text{E}[/math] to account for the deviation of the mixing entropy with respect to what one would expect for ideal systems:
[math]S_\text{mix}^\text{E} = S_\text{mixture}^\text{real} - S_\text{mixture}^\text{ideal}[/math].
In this tutorial we will calculate [math]S_\text{mix}^\text{E}[/math] for a 1:1 mixture of water and methanol. More detailed information can be found in Ref.[1]
Generating the trajectories
For this tutorial we will use Gromacs to generate the mixture of liquids and the pure liquids. We will use the OPLS force field and the SPCE water model. For methanol we will use the topology available from virtualchemistry.org. We will constrain all bonds with H atoms.
You can skip this section and download the trajectories that we will be analyzing. Then continue with the 2PT analysis section.
Generating the starting configurations
We need the OPLS topology file for methanol (methanol.itp), which we retrieved from virtualchemistry.org. If you reuse this topology file make sure to properly credit the authors.[2] We also need two sample molecules to generate our liquids, one for water, "water.gro":
One water
3
1WAT OW 1 0.114 0.845 0.401 -0.5236 0.3981 0.1442
1WAT HW1 2 0.118 0.886 0.491 1.8112 -1.0518 -0.9491
1WAT HW2 3 0.147 0.758 0.425 1.3601 2.0733 3.6058
1.20000 1.20000 1.20000
and one for methanol, "methanol.gro":
One methanol
6
1MET C 1 0.697 0.788 0.843
1MET H 2 0.600 0.829 0.873
1MET H 3 0.781 0.853 0.870
1MET H 4 0.706 0.773 0.736
1MET O 5 0.701 0.664 0.911
1MET H 6 0.761 0.600 0.875
1.20000 1.20000 1.20000
We are going to work with 2400 atoms total. This means that our pure water box will contain 800 molecules, our pure methanol box will contain 400 methanol molecules, and our 2:1 mixture will contain 400 water molecules and 200 methanol molecules. We can build our pure water and pure methanol boxes as follows:
gmx insert-molecules -box 3.0 3.0 3.0 -ci water.gro -nmol 800 -try 20 -o pure_water.gro gmx insert-molecules -box 3.1 3.1 3.1 -ci methanol.gro -nmol 400 -try 20 -o pure_methanol.gro
For the mixture we are going to generate 10 different configurations. This is so that we can obtain statistics. It is important that these initial configurations are completely uncorrelated, and so we will use bash random variables as seed for the generation:
for i in `seq 1 1 10`; do
gmx insert-molecules -box 3.1 3.1 3.1 -ci water.gro -nmol 400 -try 20 -o temp1.gro -seed $RANDOM
gmx insert-molecules -f temp1.gro -ci methanol.gro -nmol 200 -try 20 -o temp2.gro -seed $RANDOM
rm temp1.gro; mv temp2.gro mixture_${i}.gro
done
References
- ↑ M.A. Caro, T. Laurila, and O. Lopez-Acevedo. Accurate schemes for calculation of thermodynamic properties of liquid mixtures from molecular dynamics simulations. J. Chem. Phys. 145, 244504 (2016).
- ↑ C. Caleman and P.J. van Maaren and M. Hong and J.S. Hub and L.T. Costa and D. van der Spoel. Force field benchmark of organic liquids: Density, enthalpy of vaporization, heat capacities, surface tension, isothermal compressibility, volumetric expansion coefficient, and dielectric constant. J. Chem. Theory Comput. 8, 61 (2012).