Best way to strain crystal and calculate dielectric tensor

Hello!

I am interested in straining a crystal system (+/-25 kbar) and calculating the dielectric tensor for a list of materials. I have the code in place to calculate the dielectric tensor using the ‘wf_dielectric_constant’ workflow and would like to add a power-up or use an alternative method to strain the crystal and then perform the calculation.

Here is an example of a test code I’ve used in the past to run a dielectric constant wf with some lines commented out for using a power-up to change the INCAR parameters.

#!/usr/bin/env python3
import numpy as np
from pymatgen import MPRester
from fireworks import LaunchPad
from atomate.vasp.workflows.presets.core import wf_dielectric_constant
from atomate.vasp.powerups import add_modify_incar

# Get the structure from the Materials Project
with MPRester() as mpr:
        struct = mpr.get_structure_by_material_id('mp-4651')

        # Create the workflow
        workflow = wf_dielectric_constant(struct)
        #print("original")
        #print(workflow.fws[0].tasks)

        #modified_wf = add_modify_incar(workflow, modify_incar_params={'incar_update': {'NCORE': 28}})#,
                                       #fw_name_constraint='optimization')
        #print("modified")
        #print(modified_wf.fws[0].tasks)
        # Create the launchpad and add our workflow
        launchpad = LaunchPad.auto_load()
        launchpad.add_wf(workflow)

Hi,

I would just strain the structure before you run the dielectric workflow, not use a powerup.

In detail I guess it depends on the type of strain you want to use. For e.g. hydrostatic pressure you could run a bulk modulus workflow (from atomate.vasp.workflows.base.bulk_modulus import get_wf_bulk_modulus) first and then change the volume of the structure according to the volume that gives you +/- 25kbar of strain using the equation of state. Just note that I believe that this workflow is somewhat broken at the moment (see this post).

You might also have a look at atomate.vasp.workflows.base.elastic to get default strain states.

Hope that helps a bit, Michael