MPCv3

From EVOCD
Revision as of 07:34, 19 April 2017 by Carino (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

THIS IS AN EARLIER VERSION

For the latest version of MPC click here


Publications

Hierarchical Bridging Between Ab Initio and Atomistic Level Computations: Calibrating the Modified Embedded Atom Method (MEAM) Potential (Part A)

Hierarchical Bridging Between Ab Initio and Atomistic Level Computations: Sensitivity and Uncertainty Analysis for the Modified Embedded-Atom Method (MEAM) Potential (Part B)

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


MPCv3.png


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:

  1. 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.
  2. MATLAB Compiler Runtime (MCR) 8.1. A copy is provided in the same location as MPC_pkg.exe in the CAVS filesystem.
  3. Python 2.7 (32-bit was used when developing MPC)
  4. 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,

  1. Run/double-click MPC.exe to start the application. If it fails to run, verify that MCR 8.1 was installed correctly.
  2. 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

  1. Run/double-click MPC.exe to start the application.
  2. Set up LAMMPS
    1. Select LAMMPS | LAMMPS executable; choose lmp_cygwin.exe or a rebuilt executable.
    2. Select LAMMPS | LAMMPS work directory; navigate to where MPC will write LAMMPS input files, atom positions files, and log files.
  3. Set up the primary and secondary structures
    1. Select Structures | Primary; choose, for example, FCC
    2. Select Structures | Secondary 1; choose, for example, BCC
    3. Select Structures | Secondary 2; choose, for example, HCP
  4. Set up MEAM library and MEAM parameter file
    1. 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
    2. 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 ...
  5. Specify calibration data. At least the data for the Primary structure has to be specified.
    1. Select Data | FCC data; choose, for example, the file DFT_FCC
    2. Select Data | BCC data | Curve; choose, for example, the file DFT_BCC
    3. Select Data | HCP data | Curve; choose, for example, the file DFT_HCP
    4. Select Data | C44, C11, C12 data; specify values
    5. Select Data | VFE data; specify value
    6. Select Data | GSF data; choose, for example, the file DFT_GSF
  6. Execute scripts to generate the input files and atom positions files
    1. Select Generate | {FCC, BCC, ...} only, to generate the input file and atom positions file for FCC only, or BCC only, etc
    2. 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.
  7. Run LAMMPS to update the LAMMPS plots and displayed values
    1. Select Execute | {FCC only, BCC only, ...}, to update FCC plot only, or BCC plot only, etc
    2. 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

  1. If not already done previously, perform the First steps above.
  2. Select optimization algorithm. Right-click Parameters to fit (lower left on interface), then choose one of the following:
  3. 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:
    1. Select Targets | FCC data: minimum, select Parameters | esub, alat, alpha, then click Calibration Run button
    2. Select Targets | FCC data: all, select Parameters | attrac, repuls, then click Calibration Run button
    3. Select Targets | BCC data: minimum, select Parameters | b0, then click Calibration Run button
    4. Select Targets | HCP data: minimum, select Parameters | t3, then click Calibration Run button
    5. Select Targets | C44, C11, C12 data, select Parameters | t2, b2, then click Calibration Run button
    6. Select Targets | VFE data, select Parameters | t1, then click Calibration Run button
    7. Select Targets | GSF data, enter 1 for left index and 11 for right index, select Parameters | Cmin, asub, then click Calibration Run button
    8. 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.

  1. Select the desired targets using Targets | FCC data: minimum ..., etc. The selected targets are listed in the text box below Calibration Run.
  2. 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.
  3. 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
  4. 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

  1. 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

  1. 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.
  2. To write the parameters to a text file with MEAM parameter file format, right-click Parameter file then select Write to <timestamp>.parameter.meam.
Personal tools
Namespaces

Variants
Actions
home
Materials
Material Models
Design
Resources
Projects
Education
Toolbox