Difference between revisions of "Code:MDIntro"
From Predictive Chemistry
(Created page with "# [http://pubs.acs.org/doi/pdf/10.1021/j100091a024 Water dimer structure] # [https://spdbv.vital-it.ch/ Swiss PDB Viewer] #* Download, extract to the default location (''C:\Us...") |
m |
||
Line 29: | Line 29: | ||
# display/save histogram |
# display/save histogram |
||
− | + | save("H.npy", H) |
|
</source> |
</source> |
Latest revision as of 12:37, 18 April 2018
- Water dimer structure
- Swiss PDB Viewer
- Download, extract to the default location (C:\Users\<uname>\Downloads\SPDBV_4.10_PC), and run spdvb.exe.
- Since sftp doesn't work from the lab computers, download files from [1]
- Optional: compile and install libxdrfile
- Compute radial distribution functions using gmx rdf
- gmx rdf -n ../index.ndx -f ../run.trr -o run.rdf.xvg
- see [2]
- Compute P(r, theta)
- see [3]
<source lang="python"> from xdrfile import xdrfile from numpy import *
trr = xdrfile("../run.trr")
- create an empty histogram
H = zeros((500,500)) bins =
- loop through frames
for frame in trr:
print ( frame.x.shape) break # add this frame's histogram ## compute distances ## compute angles
- display/save histogram
save("H.npy", H)
</source>