Difference between revisions of "Code:MDIntro"

From Predictive Chemistry
Jump to: navigation, search
(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
H.save(
+
save("H.npy", H)
   
 
</source>
 
</source>

Latest revision as of 12:37, 18 April 2018

  1. Water dimer structure
  2. Swiss PDB Viewer
    • Download, extract to the default location (C:\Users\<uname>\Downloads\SPDBV_4.10_PC), and run spdvb.exe.
  3. Since sftp doesn't work from the lab computers, download files from [1]
  4. Optional: compile and install libxdrfile
  5. Compute radial distribution functions using gmx rdf
    • gmx rdf -n ../index.ndx -f ../run.trr -o run.rdf.xvg
    • see [2]
  6. Compute P(r, theta)

<source lang="python"> from xdrfile import xdrfile from numpy import *

trr = xdrfile("../run.trr")

  1. create an empty histogram

H = zeros((500,500)) bins =

  1. loop through frames

for frame in trr:

 print ( frame.x.shape)
 break
 # add this frame's histogram
 ## compute distances
 ## compute angles
  1. display/save histogram

save("H.npy", H)

</source>