User Tools

Site Tools


exercises:2019_conexs_newcastle:ex4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
exercises:2019_conexs_newcastle:ex4 [2019/09/11 03:50] – [Part 2: MD of liquid water] abussyexercises:2019_conexs_newcastle:ex4 [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 298: Line 298:
 &END TOPOLOGY &END TOPOLOGY
 </code> </code>
-where we specify the filename, format, and that we should not divide our atoms into molecules. When you have finished running the above input, try to use the following python script to convolve your spectra with Gaussian functions. Note that you might have to change the parameters at the top of the file to get pleasing results. If a new window with the plot does not open, it is also saved in the current directory as "pdos.png".+where we specify the filename, format, and that we should not divide our atoms into molecules. When you have finished running the above input, try to use the following python script to convolve your spectra with Gaussian functions. You do this by first loading Python3 by typing  
 +<code> 
 +module load Anaconda3/5.0.1 
 +</code> 
 +and then typing 
 +<code> 
 +python pdos_conv.py 
 +</code> 
 +Note that you might have to change the parameters at the top of the file to get pleasing results. If a new window with the plot does not open, it is also saved in the current directory as "pdos.png".
 <code - pdos_conv.py> <code - pdos_conv.py>
 import numpy as np import numpy as np
-import matplotlib.pyplot as plt 
 import os import os
 +import matplotlib as mpl
 +mpl.use('Agg')
 +import matplotlib.pyplot as plt
  
 # Parameters # Parameters
Line 395: Line 405:
 &END MOTION &END MOTION
 </code> </code>
-The parameters in the MD section has been selected to finish in a few minut, but feel free to experiment with different values. To not print too much, also modify the &PDOS section to+The parameters in the MD section has been selected to finish in a few minutes, but feel free to experiment with different values and get a feel for how they work. To not print too much, also modify the &PDOS section to
 <code> <code>
 &PDOS &PDOS
Line 405: Line 415:
 &END PDOS &END PDOS
 </code> </code>
-which means that we only print the PDOS every third step, as well as appending the specta instead of overwriting them.+which means that we only print the PDOS every third step, as well as appending the spectra instead of overwriting them.
  
 When you have finished the calculation, you should have created some new files, including When you have finished the calculation, you should have created some new files, including
Line 411: Line 421:
     * liquid_water-pos-1.xyz - containing your trajectory     * liquid_water-pos-1.xyz - containing your trajectory
 Examine liquid_water-1.ener and make sure that the temperature and total energy remains reasonably stable during the run. As a final exercise, use a slightly modified python code from Part 1 to see how the PDOS spectrum changes with time. Examine liquid_water-1.ener and make sure that the temperature and total energy remains reasonably stable during the run. As a final exercise, use a slightly modified python code from Part 1 to see how the PDOS spectrum changes with time.
-<code - asdas.py>+<code - pdos_conv_md.py>
 import numpy as np import numpy as np
-import matplotlib.pyplot as plt 
 import os import os
 +import matplotlib as mpl
 +mpl.use('Agg')
 +import matplotlib.pyplot as plt
  
 # Parameters # Parameters
-FWHM = 0.  # Full width half maximum+FWHM = 0.  # Full width half maximum
 Emin=-16.    # Starting energy Emin=-16.    # Starting energy
 Emax= 4.     # ----- Emax= 4.     # -----
exercises/2019_conexs_newcastle/ex4.1568173840.txt.gz · Last modified: 2020/08/21 10:15 (external edit)