MPCv3
THIS IS AN EARLIER VERSION
For the latest version of MPC click here
Publications
Overview
MEAM Parameter Calibration (MPC) is a graphical MATLAB application for interactive editing of MEAM library and parameter files, and for semi-automated calibration of MEAM parameters to fit DFT and/or experimental data. Intended as a teaching tool, the MPC is designed to run on a laptop running 64-bit Windows without MATLAB.
For questions, comments, and suggestions regarding MPC, send e-mail to the developer. For an earlier version of MPC click here
In this document, bold refers to a label and italic refers to a menu item in the interface.
Installation
MPC runs on a personal computer with a 64-bit Windows operating system. The following software need to be installed:
- MPC application. The distribution package (File:MPC pkg.zip) is also available from the CAVS filesystem at /cavs/cmd/data1/users/rlc/Binaries/MPC-Win7-R2013a. Copy to, say, C:\MPC, then run to unpack contents.
- MATLAB Compiler Runtime (MCR) 8.1. A copy is provided in the same location as MPC_pkg.exe in the CAVS filesystem.
- Python 2.7 (32-bit was used when developing MPC)
- NumPy 1.8.1
The MPC_pkg.exe contains the LAMMPS (14 May 2013) executable compiled with the MEAM package, the required Cygwin DLLs, compiled Python scripts, sample MEAM library and parameter files, and sample DFT curves.
The MPC includes particle swarm optimization (PSO) as one of the choices for the optimization method.
To test the installation,
- Run/double-click MPC.exe to start the application. If it fails to run, verify that MCR 8.1 was installed correctly.
- Select menu item Restart | Load restart, choose the file 'MPCv4-restart.mat'
If it installed correctly, the application should look like the figure above.
First steps
- Run/double-click MPC.exe to start the application.
- Set up LAMMPS
- Select LAMMPS | LAMMPS executable; choose lmp_cygwin.exe or a rebuilt executable.
- Select LAMMPS | LAMMPS work directory; navigate to where MPC will write LAMMPS input files, atom positions files, and log files.
- Set up the primary and secondary structures
- Select Structures | Primary; choose, for example, FCC
- Select Structures | Secondary 1; choose, for example, BCC
- Select Structures | Secondary 2; choose, for example, HCP
- Set up MEAM library and MEAM parameter file
- Select LAMMPS | MEAM library file; choose a *.library.meam. If library has several entries, then select a single element entry using the popup menu beside Library entry
- Select LAMMPS | MEAM parameter file; choose a *.meam file or *.parameter.meam file (NOT *.library.meam). If Parameter file section of interface does not have any of 'Cmax', 'Cmin', 'nn2', 'attrac', 'repuls', then right-click on the popup menu for a missing parameter, then Add ...
- Specify calibration data. At least the data for the Primary structure has to be specified.
- Select Data | FCC data; choose, for example, the file DFT_FCC
- Select Data | BCC data | Curve; choose, for example, the file DFT_BCC
- Select Data | HCP data | Curve; choose, for example, the file DFT_HCP
- Select Data | C44, C11, C12 data; specify values
- Select Data | VFE data; specify value
- Select Data | GSF data; choose, for example, the file DFT_GSF
- Execute scripts to generate the input files and atom positions files
- Select Generate | {FCC, BCC, ...} only, to generate the input file and atom positions file for FCC only, or BCC only, etc
- Select Generate | Generate all ..., to generate all input files and atom positions files
MPC will execute compiled Python scripts to generate input files and atom positions files for LAMMPS then copy these files to the LAMMPS work directory. Some atom positions files depend on the MEAM parameter alat. If alat is modified, the affected files should be regenerated by running the appropriate scripts.
- Run LAMMPS to update the LAMMPS plots and displayed values
- Select Execute | {FCC only, BCC only, ...}, to update FCC plot only, or BCC plot only, etc
- Select Execute | Execute all , to update all plots and displayed values
Too many plots!
Select menu item Plots and select(deselect) the plots to be displayed(hidden).
Manual edit of parameter values
To change a parameter under Library entry, simply enter the new value in the edit box on the right of the parameter label. Then select menu item Execute | Execute all LAMMPS scripts to update the LAMMPS plots and displayed values.
To change a parameter under Parameter file, right-click the popup for the parameter and select Edit this (parameter) value. Enter the new value in the dialog box that appears, and click the 'OK' button. Then select menu item Execute | Execute all LAMMPS scripts to update the LAMMPS plots and displayed values.
One or more parameter values may be edited before Execute | Execute all LAMMPS scripts.
Parametric study
In order to investigate the effect of varying a single parameter on the LAMMPS plots and displayed values, right-click the label of the parameter, then select Parametric study. An input dialog appears where the range and the number values for the parameter are specified. Click the 'OK' button to run all scripts for each value of the parameter. A popup menu Parameter study of (parameter) vs (target) will appear at the lower portion of the interface. Select a target using the popup menu to display the LAMMPS plots/values for each parameter value.
Calibrating to a single target
- If not already done previously, perform the First steps above.
- Select optimization algorithm. Right-click Parameters to fit (lower left on interface), then choose one of the following:
- Use fminsearch - unconstrained optimization using a simplex search method; bounds will be ignored. This is a direct search method that does not use numerical or analytic gradients.
- Use patternsearch - Direct Search; bounds will be respected.
- Use pso - Particle Swarm Optimization
- Use ga - Genetic Algorithm
- Use gamultiobj - Pareto sets via Genetic Algorithm (see section Calibrating to multiple targets simultaneously)
Where used, set TolFun and TolX to 1.0e-3 to get initial 'rough' approximations.
- Calibrate to a single target at a time. If the Primary, Secondary 1, and Secondary 2 structures are FCC, BCC, and HCP, respectively, the sequence suggested by Prof. Mike Baskes is:
- Select Targets | FCC data: minimum, select Parameters | esub, alat, alpha, then click Calibration Run button
- Select Targets | FCC data: all, select Parameters | attrac, repuls, then click Calibration Run button
- Select Targets | BCC data: minimum, select Parameters | b0, then click Calibration Run button
- Select Targets | HCP data: minimum, select Parameters | t3, then click Calibration Run button
- Select Targets | C44, C11, C12 data, select Parameters | t2, b2, then click Calibration Run button
- Select Targets | VFE data, select Parameters | t1, then click Calibration Run button
- Select Targets | GSF data, enter 1 for left index and 11 for right index, select Parameters | Cmin, asub, then click Calibration Run button
- Select Targets | GSF data, enter 12 for left index and 31 for right index, select Parameters | b1, b3, then click Calibration Run button
Since alat is modified in step 1, regenerate the input files and atom positions files as in First Steps (6.2) and (7.2) after step 1.
Iterate the calibration process from step 3.
The optimization method can be changed before Calibration Run.
Calibration history
Each Calibration Run adds an entry to the 'history' of fitted parameters. An entry can be recalled by selecting its summary tag from the History popup menu. A right-click on the popup menu provides options to delete entries from the history.
It's slow!
The calibration process executes LAMMPS a few hundred times to arrive at reasonable solutions. In addition, the population-based optimization methods (ga, gamultiobj, pso) really require a lot of LAMMPS runs and therefore, patience.
There are 57 atom positions files (FCC: 1, BCC: 1, HCP: 1, C44: 21, C1x: 11, VFE: 2, GSF: 20) to be simulated by LAMMPS if all the plots and displayed values are to be updated. Although the systems are small and LAMMPS is invoked only once through a single script containing several 'include' commands, writing the potential files and retrieving values from the log.lammps consume file I/O time which could be significant when using slow hard disks or networked drives.
If the PC has a lot of RAM, consider installing [RAMDisk Lite] and using the disk in RAM as the MPC directory or LAMMPS work directory. Just don't forget to copy the contents from the disk in RAM to the physical hard disk afterwards.
Calibrating to multiple targets with arbitrary parameters
MPC allows calibration to multiple targets while varying an arbitrary set of parameters.
- Select the desired targets using Targets | FCC data: minimum ..., etc. The selected targets are listed in the text box below Calibration Run.
- To include a parameter, right-click the label of the parameter (under Library entry or Parameter File) and select Add to "Parameters to fit" list. The selected parameters are also listed in the text box below Calibration Run.
- To exclude a parameter that is already in the "Parameters to fit" list, right-click its label (under Library entry or Parameter File) and select Remove from "Parameters to fit" list
- Click Calibration Run. If the optimization method is gamultiobj, the residuals from each target are minimized simultaneously to produce a Pareto set of solutions, all of which will be added to the History of fits. For the other optimization methods, the residuals are combined into a vector whose norm is minimized to produce a single solution.
Restart files
- Save the state of the MPC application using Restart | Write restart file. Restore MPC to a previously saved state using Restart | Load restart file.
MEAM potential files
- To write the library entries to a text file with MEAM library file format, right-click Library entry then select Write to <timestamp>.library.meam.
- To write the parameters to a text file with MEAM parameter file format, right-click Parameter file then select Write to <timestamp>.parameter.meam.