Code Monkey home page Code Monkey logo

mpmorph's Introduction

MPmorph

MPmorph is a collection of tools to run and analyze ab-initio molecular dynamics (AIMD) calculations run with VASP, and is currently under development. It relies heavily on tools developed by the Materials Project (pymatgen, custodian, fireworks) and atomate.

MPmorph provides:

  • Infrastructure for dynamic VASP MD workflows:
    • Tools to create dynamic MD workflows using atomate
    • E.g. generation of new MD runs based on the given criterion (currently pressure, for liquid/amorphous phase density estimation)
  • Tools for statistical analysis of:
    • Static observables:
      • Radial distribution functions
      • Coordination numbers
      • Voronoi analysis
      • Polyhedra connectivities
      • Thermodynamic quantities
    • Diffusion coefficients:
      • Robust calculation of diffusion coefficients (D) and activation energies (Q).
      • Rigorous error analysis for D and Q.

Installation

Before installing mpmorph, install the latest version of pymatgen, custodian, fireworks) and atomate

clone the repository to your computer and install using

python setup.py develop

If you wish to make amorphous structures, please install packmol on your machine and add the following line to your bash profile.

export PACKMOL_PATH="path_to_packmol_executable_here"

Using MPmorph

Before diving headfirst into mpmorph, one should get familiar with how to run fireworks before jumping into mpmorph. Relevant features of fireworks include setting up a fireworks database, adding workflows to the database, configuring a conda environment for running fireworks on a supercomputer, launching jobs to a workload manager (using qlaunch), and monitoring fireworks jobs. For a quick tutorial, check out beginner and intermediate atomate/fireworks tutorials from our 2019 Materials project workshop.

A sample of using mpmorph to run an AIMD simulation at 1500K for 200ps (100k steps at 2fs/step) is shown below:

from mpmorph.workflows.converge import get_converge_wf
from pymatgen.ext.matproj import MPRester

from fireworks import LaunchPad

mpr = MPRester()
structure = mpr.get_structure_by_material_id('mp-1143')
structure.make_supercell([3, 3, 3])

wf = get_converge_wf(structure, temperature = 750, target_steps = 100000)

lp = LaunchPad.auto_load()
lp.add_wf(wf)

To generate an amorphous structure, run the following code:

from mpmorph.runners.amorphous_maker import get_random_packed
from mpmorph.workflows.converge import get_converge_wf
from fireworks import LaunchPad

structure = get_random_packed('Li', target_atoms=100)

wf = get_converge_wf(structure, temperature = 5000, target_steps = 10000)

lp = LaunchPad.auto_load()
lp.add_wf(wf)

Customizing runs

At the simplest level of customizing the workflow, one can change the temperature, total number of steps by changing the args passed to get_converge_wf().

For more advanced changes, pass a dictionary for "converge_args", "spawner_args", or "prod_args". This allows customization of vasp inputs, starting and ending temperatures, number of steps, and convergence crieteria.

Examples:

Changing the rescale parameter, to make for larger volume changes at each stage:

from mpmorph.runners.amorphous_maker import get_random_packed
from mpmorph.workflows.converge import get_converge_wf
from fireworks import LaunchPad

structure = get_random_packed('Li', target_atoms=100)

spawner_args = {'rescale_params': {'beta': 5e-6}}
wf = get_converge_wf(structure, temperature = 5000, target_steps = 10000, spawner_args=spawner_args)

lp = LaunchPad.auto_load()
lp.add_wf(wf)

Changing precision of production runs to PREC=Low:

from mpmorph.runners.amorphous_maker import get_random_packed
from mpmorph.workflows.converge import get_converge_wf
from fireworks import LaunchPad

structure = get_random_packed('Li', target_atoms=100)

prod_args = {'optional_fw_params': {'override_default_vasp_params': {'user_incar_settings': {'PREC': 'Normal'}}}}
wf = get_converge_wf(structure, temperature = 5000, target_steps = 10000, prod_args = prod_args)

lp = LaunchPad.auto_load()
lp.add_wf(wf)

Citation

If you use mpmorph, please cite the following papers:

  • Aykol, M., Dwaraknath, S.S., Sun, W. and Persson, K.A., 2018. Thermodynamic limit for synthesis of metastable inorganic materials. Science advances, 4(4), p.eaaq0148.
  • Aykol, M. and Persson, K.A., 2018. Oxidation Protection with Amorphous Surface Oxides: Thermodynamic Insights from Ab Initio Simulations on Aluminum. ACS applied materials & interfaces, 10(3), pp.3039-3045.

mpmorph's People

Contributors

sivonxay avatar aykol avatar jic198 avatar shyamd avatar vvvlzy avatar tinaatucsd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.