(This is an old version of the MPC. The updated version is here.)
MEAM Parameter Calibration (MPC) is a graphical MATLAB application for:
- interactive editing of MEAM library and parameter files,
- running LAMMPS with an input file containing the commands 'pair_style meam' and 'pair_coeff * * LIBRARY_FILE ELEMENTS PARAMETER_FILE ATOM_TYPES', and
- automatic calibration of user-specified MEAM parameters.
- The local machine must be a PC running 64-bit Windows.
- Download and install the MATLAB Compiler Runtime for R2012a (7.17) 64-bit from http://www.mathworks.com/products/compiler/mcr/index.html). The installation process will take a while. You may need administrative privileges on the PC to do this.
- Copy MPC_pkg.exe (sent through e-mail), to say, C:\MPC_files. Make sure there are no spaces in the name of the target directory.
- Run MPC_pkg.exe to extract the MPC files.
- Run MPC.exe. The MPC application window (like the above figure, but without the numbers and plots) will appear after a few seconds.
Information regarding the 'pair_style meam' command in LAMMPS may be found at http://lammps.sandia.gov/doc/pair_meam.html. The parameter names and labels in the MPC GUI came from there.
Hover the mouse pointer over a GUI item to display a tip regarding that item.
For general usage information, right-click on an empty space just outside the plot area, then "Help topics".
For help on fitting, right-click "Parameters to fit" then "Help on fitting".
Interface with LAMMPS
The MPC distribution package comes with a self-contained LAMMPS environment for Windows. To configure MPC so that it will interface with LAMMPS:
- Right-click "Config" then "Select LAMMPS EXEcutable"
- Right-click "Config" then "Select LAMMPS INPut file"
- If the INPut file "readfile"s the atom positions, right-click "Config" then "Select LAMMPS atom POSitions file"
- Right-click "Config" then "Select LAMMPS working DIRectory"
Before the last step, there will be a message regarding MPC configuration not being complete. This is message is correct. The interface with LAMMPS will be complete when the 'Run LAMMPS' button under 'Config' is enabled.
Testing the MPC+LAMMPS configuration
- On the drop-down menu beside "Dataset", select the "scratch" dataset.
- Right-click "Library entry" to load a MEAM library file.
- On the drop-down menu beside "Library entry", select an element of interest.
- Right-click selected element then "Add as MEAM element".
- (Repeat steps 3 & 4 for other elements of interest, if any.)
- Re-select each element of interest, right-click, then "Add to LAMMPS atom types" in the desired order.
- Right-click "Parameter" to load a MEAM parameter file.
- Click "Run LAMMPS" to test your configuration.
If a plot appears, your configuration is correct; otherwise, your selections in steps 4, 5 and 6 may be incompatible with the input file.
- Choose a material from the periodic table. An energy vs. volume curve will display using default parameter values from the default MEAM library in a Rose equation.
- Right-click "Dataset" (top left corner) then select "Load E vs. a" dataset.
- Right-click on the file name of the loaded dataset (appears in the box next to "dataset") then "Set as calibration target".
- Re-select "scratch" dataset.
Isolate Parameters to Calibrate
- For each property to be used in fitting:
- Right-click on the property name in the left hand panel and select "Add to Parameters to fit list". A new dialog box will appear with an input for the property's initial value as well as space to define a range (maximum and minimum) for optimization.
- Specify a maximum and minimum that define the property's range as well as an initial value. NOTE: alpha and bulk are functions of each other. If they are used in fitting, only add one or the other the the Parameters to fit, do not add both. For example: if bulk has been added to the Parameters to fit, alpha will be calculated from bulk, alat and esub.
- Notice each time a parameter is added to theParameters to fit list, it appears within the list displayed at the bottom of the GUI.
- For each addtional parameter to used in the calibration:
- Right click on the parameter name in the lower left hand panel and select "Add to Parameters to fit list".A dialog box will appear with spaces for an intial value, as well as alloy element identifiers: I and J. If working with a pure material set I=J=1.
Add New Parameters (optional)
- If the parameter is not active (i.e. "not defined"), first right-click the parameter then "Add ...". For example, if "# Cmax not defined", right-click it, then "Add Cmax". After specifying a value in the resulting dialog box, right-click it again, then "Add to Parameters to fit list".
Generate an Energy vs. Volume Curve for "Scratch" Values
- Make any changes to the property values (top left) within the "scratch" data necessary. If this is the intial run calibration, likely the default property values are good.
- Click on "Run LAMMPS" to generate an Energy vs. Volume Curve. A dialog box will appear prompting you for a name and a desciption for the LAMMPS run. After entering a name and description, click "ok". LAMMPS will now execute. When the calculation is complete a new energy vs. volume curve will be displayed in the plot. If no parameters were changed from their default values, the new curve should lie directly over the Rose curve.
- Re-select "Scratch" dataset
Calibrate Using Chosen Parameters
- Click "Optimize"
- Wait until optimization completes (time to completion depends on amount of parameters chosen, ranges chosen, and computational power).
Manual Calibration (optional)
- Choose the scratch dataset, and manually vary parameters to your discretion.
- After a parameter is edited, click on "run LAMMPS" to see a new curve using the edited values.
Next time you run MPC ...
MPC stores the information on all invocations of LAMMPS in the working directory. A previous LAMMPS run may be loaded to initialize the MPC configuration after startup.
- Right-click "Dataset" then "Load a previous LAMMPS run as a dataset"
- Navigate to the directory of a previous LAMMPS run, then select "MPC-Run-LAMMPS.cfg"
- If the plot for the previous run appears, then the configuration for that run was successfully loaded.
- Right-click the tag for the run (on the drop-down menu beside "Dataset"), then "Copy parameters for this LAMMPS run to scratch"
MPC on Linux
MPC also runs on Linux with MATLAB. The following steps were tested on HPC2's Bazooka server. A Linux desktop in CAVS may also work.
- Copy the source codes (MPC.m, MPC.fig) from /cavs/cmd/data1/users/rlc/MPC_sandbox, to say, <some_dir>/MPC_files.
- Open a command line terminal, change directory to <some_dir>/MPC_files.
- On the terminal, enter the command "swsetup lammps", then "swsetup matlab" (without the quotes)
- On the terminal, enter the command "matlab" (without the quotes)
- On the MATLAB command window, enter "MPC" (without the quotes)
When specifying the LAMMPS executable, navigate to /usr/local/lammps/x86_64/lmp_serial.
If your MEAM files came from Windows, convert these using "dos2unix" so that MPC on Linux can read them.,