exercises:2019_conexs_newcastle:ex4
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exercises:2019_conexs_newcastle:ex4 [2019/09/11 12:52] – [Part 1: PDOS and spectra broadening of liquid water] abussy | exercises:2019_conexs_newcastle:ex4 [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 301: | Line 301: | ||
< | < | ||
module load Anaconda3/ | module load Anaconda3/ | ||
+ | </ | ||
+ | and then typing | ||
+ | < | ||
+ | python pdos_conv.py | ||
</ | </ | ||
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 " | 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 " | ||
<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(' | ||
+ | import matplotlib.pyplot as plt | ||
# Parameters | # Parameters | ||
Line 399: | Line 405: | ||
&END MOTION | &END MOTION | ||
</ | </ | ||
- | 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 |
< | < | ||
&PDOS | &PDOS | ||
Line 409: | Line 415: | ||
&END PDOS | &END PDOS | ||
</ | </ | ||
- | which means that we only print the PDOS every third step, as well as appending the specta | + | which means that we only print the PDOS every third step, as well as appending the spectra |
When you have finished the calculation, | When you have finished the calculation, | ||
Line 417: | Line 423: | ||
<code - pdos_conv_md.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(' | ||
+ | import matplotlib.pyplot as plt | ||
# Parameters | # Parameters | ||
- | FWHM = 0.3 # Full width half maximum | + | FWHM = 0.4 # Full width half maximum |
Emin=-16. | Emin=-16. | ||
Emax= 4. # ----- | Emax= 4. # ----- |
exercises/2019_conexs_newcastle/ex4.1568206369.txt.gz · Last modified: 2020/08/21 10:15 (external edit)