Jump to content

Running MD code in MATLAB

From ChemWiki

MATLAB

The software for this experiment runs on the MATLAB software package. MATLAB is installed on the desktop computers around college. Students can register for a free copy via software shop.

Download Instructions

File:MATLAB MD.zip

  1. The file MATLAB_MD.zip linked above contains the files needed to run the experiment. Download and unzip its content into a single directory. Ensure filenames are lower-case.
  2. Open Matlab, ensure that the directory above is specified as the 'Current Folder' (See 2. in instructions below).
  3. Type lepsgui on the command line, this should bring up the GUI.

Python

File:LepsPy V1.zip

Usage Instructions

Starting the program

Figure 1
  1. Open MATLAB. An image of what the screen should look like is shown in Figure 1.
  2. Near the top you should see a drop down menu titled Current Folder. In that menu, point to the folder in which you have saved the files. They should appear in the column on the left of the program.
  3. In the Command Window, type "lepsgui" and press enter. This should bring up the Graphical User Interface (GUI) similar to the one below.


Using the Graphical User Interface

Figure 2

a) The Update button refreshes the plot on the right with the parameters specified.

b) Here you can switch between Dynamics and MEP calculations.

c) The cutoff is the maximum energy allowed to be displayed on the plot.

d) Initial momenta and distances are set here. The shorter BC Distance tells shows us that we are starting with the BC molecule.

e) The plot type shown in the GUI can be changed here.

f) This toggle allows the plot to be rotated in 3D.

g) The number of steps can be changed here. If your trajectory hasn't gone far enough, increase the number of steps but make sure the distances do not exceed 10Å or the GUI will crash!

h) The angle A-B-C is set here. This typically shouldn't be changed from the 180º default.


Known issues

  • Do not use the "save" icon in the Figure 2 interface to save figures. Use screenshots to save images of your results. Clicking the "save" icon will overwrite lepsgui.fig. You can restore it by re-downloading lepsgui.fig file.
  • Animation does not work if internuclear distance becomes greater than 10Å. Work around: changing number of steps so that bond distances do not exceed 10Å.