GithubHelp home page GithubHelp logo

matt-chan / nlcglib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonpintarelli/nlcglib

0.0 0.0 0.0 368 KB

Nonlinear CG methods for wave-function optimization in DFT

License: BSD 3-Clause "New" or "Revised" License

C++ 87.92% Python 4.58% CMake 7.50%

nlcglib's Introduction

Nlcglib is a plugin for sirius providing robust wave-function optimization to q-e-sirius.

Installation

Q-e-sirius with the nlcglib plugin can be installed via spack. Please use the package files provided in this repository (in ./repo), as described below.

git clone -b develop https://github.com/simonpintarelli/nlcglib
# add the spack-repo
spack repo add nlcglib/spack
# build sirius/nlcglib with cuda enabled
spack install q-e-sirius@develop-ristretto%gcc ^sirius+cuda+openmp+nlcglib
#  build sirius/nlcglib without cuda
spack install q-e-sirius@develop-ristretto%gcc ^sirius~cuda+openmp+nlcglib

Input parameters

Nlcglib specific settings are specified in the namelist DIRECT_MINIMIZATION in the QuantumESPRESSO input file. It must be specified after the ELECTRONS namelist. The robust wave-function optimization is run after the SCF loop, taking the last iteration as starting guess. It is recommended to do at least 10 scf (=electron_maxstep) iterations to obtain a good initial guess.

&ELECTRONS
...
/
&DIRECT_MINIMIZATION
   nlcg_method = 'mvp2'
   nlcg_maxiter = 300
   nlcg_conv_thr = 1e-9
   nlcg_restart = 10
   nlcg_bt_step_length = 0.1
   nlcg_pseudo_precond = 0.3
   nlcg_processing_unit 'none' | 'cpu' | 'gpu' '# default=none, i.e. will run on gpu if there is cuda device
/

nlcg_conv_thr has the same meaning as conv_thr in the ELECTRONS namelist of the QE input, but note that nlcg_conv_thr is set to 1e-9 by default, while conv_thr defaults to 1e-6.

The default values should work for most cases, i.e. to enable the robust optimization, simply insert an empty namelist in the QE input file after the ELECTRONS namemlist:

&ELECTRONS
...
/
&DIRECT_MINIMIZATION
/

In this case the default settings will be used (300 iterations max, cg-restart 10, threshold 1e-9).

Currently Gaussian, Fermi-Dirac broadening is supported. The support for Methfessel-Paxton and Marzari-Vanderbilt smearing is experimental.

References

nlcglib's People

Contributors

simonpintarelli avatar ltalirz 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.