GithubHelp home page GithubHelp logo

vasp_opt_axis's Introduction

VASP OPT AXIS

This project provides patches enabling the ability to fix lattice vector component(s)/stress tensor component(s) during relaxation in VASP.

PLEASE READ THROUGH THIS FILE BEFORE PROCEED

Stress tensor method

This method is forked from muchong and modified upon.

The lattice vectors are updated after each SCF loop by following formula (you can find codes similar to the following in dyna.F):

      DO J=1,3
         DO I=1,3
            A(I,J)=AC(I,J)
            DO K=1,3
               A(I,J)=A(I,J) + SSIF(I,K)*AC(K,J)*STEP
            ENDDO
         ENDDO
      ENDDO

Where SSIF is the (scaled) stress tensor (note that fortran uses Column-major order), A is the lattice vector matrix and STEP is the step size.

NOTE: This means that fixing the stress tensor elements does not necessarily fix the corresponding lattice components.

Fixing only the diagonal term

Put stress_relax.patch file in the root directory of your VASP distro. and type:

$ patch -p0 < stress_relax.patch

and recompile VASP.

This patch lets VASP read a file called OPTCELL after each SCF loop and use the info inside to determine which diagonal stress component(s) to fix.

OPTCELL file format:

xx yy zz

For example:

1 1 0

will fix zz component of the stress tensor.

Note that for this patch we can only fix the diagonal stress tensor element(s) so it's better suited for orthorhombic cell or at least lattice vector that is perpendicular to other lattice vectors.

Also note that ISIF=3 is needed for lattice relaxation.

Fixing specific stress tensor element(s)

Put stress_relax_finner.patch file in the root directory of your VASP distro. and type:

$ patch -p0 < stress_relax_finner.patch

and recompile VASP.

This patch lets VASP read IOPTCELL tag directly from INCAR.

IOPTCELL format:

IOPTCELL = xx yx zx xy yy zy xz yz zz

for example:

IOPTCELL = 1 1 0 1 1 0 0 0 0

will relax the xx, xy, yx and yy components of the stress tensor, while keeping the other components fixed (to zero).

Direct fixing of the lattice method

WARNINIG: this method only works with IBRION=2 and may induce numerical instabilities.

This patch enables direct fixing of the lattice.

This is achieved by re-assigning the original value of the lattice elements after each geometry updates of the conjugate gradient step. (modification made in dyna.F)

Also, the stress tensor is modified to reduce instabilities introduced by direct fixing. (modification made in constr_cell_relax.F).

To use this method:

Put cell_relax.patch file in the root directory of your VASP distro. and type:

$ patch -p0 < cell_relax.patch

and recompile VASP.

This patch lets VASP read IOPTCELL tag directly from INCAR.

IOPTCELL format:

IOPTCELL = xx xy xz yx yy yz zx zy zz

for example:

IOPTCELL = 1 1 0 1 1 0 0 0 0

will relax the xx, xy, yx and yy components of the lattice matrix, while keeping the other components fixed. It will also fix the xz, yz and zz components of the stress tensor.

Disclaimer

*1. VASP is a commercial package, be sure you have a proper license to use it.

*2. The correctness of this patch has been checked with few simple cases. However, this is not guaranteed to work for your specific system. Make sure you KNOW WHAT YOU ARE DOING!

vasp_opt_axis's People

Contributors

chengcheng-xiao 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.