Giter Site home page Giter Site logo

n-medvedev / skprogs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aradi/skprogs

0.0 0.0 0.0 664 KB

Basic programs for generating Slater-Koster files for the DFTB-method

License: GNU Lesser General Public License v3.0

Shell 0.04% Python 23.39% Fortran 48.46% Forth 25.03% CMake 3.09%

skprogs's Introduction

SkProgs

Package containing a few programs that are useful in generating Slater-Koster files for the DFTB-method.

NOTE: This packages comes with minimal documentation and with a currently rather fragile user interface. It is considered to be neither stable nor robust. Make sure, you check results as careful as possible. Use at your own risk!

Installing

Prerequisites

  • Fortran 2003 compliant compiler
  • CMake (>= 3.16)
  • Python3 (>= 3.2)
  • LAPACK/BLAS libraries (or compatible equivalents)
  • libXC library with f03 interface (tested with version 5.1.7, version 4.x does not work due to interface changes in libXC)

Building the code

Follow the usual CMake build workflow:

  • Configure the project, specify your compiler (e.g. gfortran), the install location (e.g. $HOME/opt/skprogs) and the build directory (e.g. _build):

    FC=gfortran cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/skprogs -B _build .
    

    If libXC is installed in a non-standard location, you may need to specify either the CMAKE_PREFIX_PATH environment variable (if libXC was built with CMake) or the PKG_CONFIG_PATH environment variable (if libXC was built with autotools) in order to guide the library search:

    CMAKE_PREFIX_PATH=YOUR_LIBXC_INSTALL_FOLDER FC=gfortan cmake [...]
    
    PKG_CONFIG_PATH=FOLDER_WITH_LIBXC_PC_FILES FC=gfortran cmake [...]
    
  • If the configuration was successful, build the code

    cmake --build _build -- -j
    
  • If the build was successful, install the code

    cmake --install _build
    

Advanced build configuration

Controlling the toolchain file selection

You can override the toolchain file, and select a different provided case, passing the -DTOOLCHAIN option with the relevant name, e.g.:

-DTOOLCHAIN=gnu

or by setting the toolchain name in the SKPROGS_TOOLCHAIN environment variable. If you want to load an external toolchain file instead of one from the source tree, you can specify the file path with the -DTOOLCHAIN_FILE option

-DTOOLCHAIN_FILE=/some/path/myintel.cmake

or with the SKPROGS_TOOLCHAIN_FILE environment variable.

Similarly, you can also use an alternative build config file instead of config.cmake in the source tree by specifying it with the -DBUILD_CONFIG_FILE option or by defining the SKPROGS_BUILD_CONFIG_FILE environment variable.

Generating SK-files

The basic steps of generating the electronic part of the SK-tables are as follows:

  • Initialize the necessary environment variables by sourceing the skprogs-activate.sh script (provided you have BASH or compatible shell, otherwise inspect the script and set up the environment variables manually):

    source <SKPROGS_INSTALL_FOLDER>/bin/skprogs-activate.sh
    
  • Then create a file skdef.hsd containing the definitions for the elements and element pairs you wish to create. See the examples/ folder for some examples.

  • Run the skgen script to create the SK-tables. For example, in order to generate the electronic part of the SK-tables for C, H and O with dummy (zero) repulsives added, issue

    skgen -o slateratom -t sktwocnt sktable -d C,H,O C,H,O
    

    The SK-files will be created in the current folder. See the help (e.g. skgen -h) for additional options.

Further documentation will be presented in a separate document later.

License

SkProgs is released under the GNU Lesser General Public License.

You can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the files COPYING and COPYING.LESSER for the detailed licensing conditions.

skprogs's People

Contributors

vanderhe avatar aradi avatar bhourahine avatar awvwgk avatar tsihyoung 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.