Merge branch 'master' of git://git.gromacs.org/gromacs
[gromacs/adressmacs.git] / share / html / online / mixed.html
blob38a4139f07cd392c53287c2a3531527b0551b171
1 <HTML>
2 <HEAD>
3 <TITLE>Getting started - Methanol+Water</TITLE>
4 <LINK rel=stylesheet href="style.css" type="text/css">
5 <BODY text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#990000" alink="#FF0000">
6 <TABLE WIDTH="98%" NOBORDER >
7 <TR><TD WIDTH=400>
8 <TABLE WIDTH=400 NOBORDER>
9 <TD WIDTH=116>
10 <a href="http://www.gromacs.org/"><img SRC="../images/gmxlogo_small.jpg"BORDER=0 height=133 width=116></a></td>
11 <td ALIGN=LEFT VALIGN=TOP WIDTH=280><br><h2>Getting started - Methanol+Water</h2>
12 <font size=-1><A HREF="../online.html">Main Table of Contents</A></font><br><br></td>
13 </TABLE></TD><TD WIDTH="*" ALIGN=RIGHT VALIGN=BOTTOM><p><B>VERSION 4.0<br>
14 Sun 18 Jan 2009</B></td></tr></TABLE>
15 <HR>
17 <P><H2>Methanol+Water</A></H2>
19 Now you are going to simulate 216 molecules of methanol and 216
20 molecules of water in a rectangular box (of 4.72 x 2.36 x 2.36 nm).
21 The molecules are completely demixed in the start conformation.
23 <P>
24 Change your directory to <tt>tutor/mixed </tt>:
25 <br><br>
26 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
27 <tr NOSAVE>
28 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
29 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
31 <tt> cd tutor/mixed</tt>
32 <td></td>
33 </tr>
34 </table>
35 <br>
37 Start by viewing the simulation box graphically:
38 <br><br>
39 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
40 <tr NOSAVE>
41 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
42 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
44 <tt> rasmol mixed.pdb
45 </tt>
46 <td></td>
47 </tr>
48 </table>
49 <br>
50 Note that one side of the box only contains methanol while the other only
51 contains water.
52 </p>
54 <p>
55 Since all the neccesary files are available, we are going to,
56 preprocess all the input files to create a run input
57 (<TT><a href="tpr.html">.tpr</a></TT>) file.
58 This run input file is the only input file for the
59 MD-program <TT><a href="mdrun.html">mdrun</a></TT>.
60 <br><br>
61 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
62 <tr NOSAVE>
63 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
64 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
66 <tt> grompp -v
67 </tt>
68 <td></td>
69 </tr>
70 </table>
71 <br>
73 Now it's time to start the simulation of 1000 picoseconds. Since this will
74 take some time, it has to be started in the background, otherwise you will
75 not be able to log out without terminating the simulation.
76 <br><br>
77 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
78 <tr NOSAVE>
79 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
80 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
82 <tt> nohup mdrun -v >& log &
83 </tt>
84 <td></td>
85 </tr>
86 </table>
87 <br>
89 After the MD simulation is finished (but even while it is still running),
90 it is possible to view the
91 trajectory with the <a href="ngmx.html">ngmx</a> program:
92 <br><br>
93 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
94 <tr NOSAVE>
95 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
96 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
98 <tt> ngmx
99 </tt>
100 <td></td>
101 </tr>
102 </table>
103 <br>
106 When the program starts, you must select a group of atoms to view.
107 You can choose to select only one group, or both. If you select first methanol
108 and then rewind the trajectory and select water, you see how the mixing takes
109 place.
110 </P>
112 <hr>
113 <h2>Analysis of the simulation</h2>
114 <ol>
115 <li><p>First we will analyze the mixing process. We can compute the density
116 of molecules, along the long axis of the simulation box, at different
117 times in the simulation.
118 <br><br>
119 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
120 <tr NOSAVE>
121 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
122 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
124 <tt> g_density -n index -o dens0 -b 0 -e 50 -d X
125 </tt>
126 <td></td>
127 </tr>
128 </table>
129 <br>
130 Here the <TT>-b</TT> and <TT>-e</TT> options indicate begin and end of the
131 analysis. When asked which groups to analyse you select two groups,
132 MeOH and Water. Now do the same for four more stretches of 50 ps along the
133 1000 ps trajectory (remember to change the name of the output file as well),
134 e.g. with begin times 0, 240, 480, 720, 950). And view all the output files
135 at once (if you used different names, replace the ones below with those):
136 <br><br>
137 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
138 <tr NOSAVE>
139 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
140 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
142 <tt> xmgrace -nxy dens0.xvg -nxy dens240.xvg -nxy dens480.xvg -nxy dens720.xvg -nxy dens950.xvg -legend load
143 </tt>
144 <td></td>
145 </tr>
146 </table>
147 <br>
148 <font color="red">Explain the results. When (at which timepoint)
149 do you consider the system completely mixed?</font>
151 </p>
152 </li>
153 <li><p> Calculate a radial distribution function of the oxygen atoms
154 around oxygen atoms. The index file <TT><a
155 href="ndx.html">index.ndx</a></TT> now contains multiple groups.
156 Select oxygen (containing both the water oxygen and the methanol oxygen).
157 <br><br>
158 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
159 <tr NOSAVE>
160 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
161 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
163 <tt> g_rdf -n index -o rdf-oo.xvg -b 900
164 </tt>
165 <td></td>
166 </tr>
167 </table>
168 <br>
169 The program will ask you for how many groups you want the calculate
170 the RDF, answer 1 (and select oxygen and oxygen). We start at 900 ps
171 in order to only use the completely mixed system.
172 Now, view the output graph.
173 <br><br>
174 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
175 <tr NOSAVE>
176 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
177 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
179 <tt> xmgrace rdf-oo.xvg
180 </tt>
181 <td></td>
182 </tr>
183 </table>
184 <br>
185 Which shows you the radial distribution function for oxygen-oxygen in the
186 mixture. Now do the same thing using the methyl group as reference and
187 as target (and use e.g. <tt>rdf-mm.xvg</tt> as output file name). Do not
188 forget the <TT>-b 900</TT> option to <TT>g_rdf</tt>. View all
189 the graphs together:
190 <br><br>
191 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
192 <tr NOSAVE>
193 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
194 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
196 <tt> xmgrace rdf-oo.xvg ../methanol/rdf-oo.xvg ../water/rdf.xvg -legend load
197 </tt>
198 <td></td>
199 </tr>
200 </table>
201 <br>
202 The <tt>xmgrace</tt> program will display three different graphs.
203 <font color="red">Compare the resulting graphs. Explain the differences and the
204 similarities.</font><br>
206 Do the same analysis for the Me-Me RDF in the mixture and in pure methanol.
207 <font color="red">Compare the resulting graphs. Explain the differences and the
208 similarities.</font>
209 </P></li>
211 <li><p>
212 We can also do a direct analysis of the number of hydrogen bonds in
213 methanol, based on O-O distance and O-H ... O angle.
214 <br><br>
215 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
216 <tr NOSAVE>
217 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
218 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
220 <tt> g_hbond
221 </tt>
222 <td></td>
223 </tr>
224 </table>
225 <br>
226 Select twice 0, when asked. Check the output with
227 <br><br>
228 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
229 <tr NOSAVE>
230 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
231 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
233 <tt> xmgrace hbnum.xvg
234 </tt>
235 <td></td>
236 </tr>
237 </table>
238 <br>
239 <font color="red">What is the number of hydrogen bonds per
240 molecule? Compare the results to
241 those from pure water and from pure methanol. Does the total
242 number of hydrogen bonds change during the mixing process?</font>
243 </p></li>
245 <li><p> As a further test of the simulation we will compute the self
246 diffusion constant of Methanol and water in the mixed state.
247 <br><br>
248 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
249 <tr NOSAVE>
250 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
251 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
253 <tt> g_msd -n index -b 900
254 </tt>
255 <td></td>
256 </tr>
257 </table>
258 <br>
259 (Run it twice, first selecting Me1 and then OW). View the output
260 <br><br>
261 <table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
262 <tr NOSAVE>
263 <td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
264 <td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">
266 <tt> xmgrace msd.xvg
267 </tt>
268 <td></td>
269 </tr>
270 </table>
271 <br>
272 Check that the graph is roughly linear. The <tt>g_msd</tt> program also
273 computes the diffusion constant D for you.
274 <font color="red">Compare the result to pure water and pure methanol.
275 Is it as you would expect?
276 </font>
277 </p></li>
278 </ol>
280 <hr>
281 <a href="speptide.html"><H3>Go to the next step</h3></a>
282 <hr>
284 </BODY>
285 </HTML>