Skip to main content

Code for simulating EXAFS calculations from molecular dynamics trajectories or normal modes using FEFF

Project description

Introduction

Expectra is program to simulate EXAFS from the outputs of molecular dynamics simulations. It also has the ability to to sample structures based on a harmonic potential generated from a normal modes calculation.

The EXAFS multiple scattering calculations are performed using FEFF6-lite, which was written at the University of Washington by J.J. Rehr and co-workers.1

  1. J.J. Rehr, S.I. Zabinsky and R.C. Albers, “High-order multiple scattering calculations of x-ray-absorption fine structure”, Phys. Rev. Lett. 69, 3397 (1992).

Requirements

  • gfortran

  • MPI (e.g. OpenMPI or MPICH)

  • Python

    • numpy

    • mpi4py

    • ASE

Installation

This program is distributed as a Python package. It requires a Fortran compiler (e.g. gfortran) to build the FEFF6-lite program that is redistributed with the code. A MPI library (e.g. OpenMPI) is also required.

The first step is to install Python, GFortran, and MPICH. On Ubuntu this can be accomplished like so:

$ sudo apt-get install build-essential gfortran mpich python python-pip

Once the dependencies are installed expectra (and the Python packages it depends on) can be installed using pip:

$ pip install --user expectra

Usage

usage: expectra [-h] [--first-shell] [--neighbor-cutoff DISTANCE]
                [--multiple-scattering] [--rmax DISTANCE] [--S02 FACTOR]
                [--energy-shift ENERGY] [--absorber ELEMENT]
                [--ignore-elements ELEMENTS] [--edge EDGE] [--skip SKIP]
                [--every EVERY]
                TRAJ [TRAJ ...]

positional arguments:
  TRAJ                  trajectory file (POSCAR, con, xyz)

optional arguments:
  -h, --help            show this help message and exit
  --first-shell         a single scattering calculation that uses an
                        automatically calculated reference path (default:
                        True)
  --neighbor-cutoff DISTANCE
                        1st neighbor cutoff distance (default: 3.4)
  --multiple-scattering
  --rmax DISTANCE       maximum scattering half-path length
  --S02 FACTOR          amplitude reduction factor
  --energy-shift ENERGY
                        energy shift to apply in eV
  --absorber ELEMENT    atomic symbol of the xray absorber
  --ignore-elements ELEMENTS
                        comma delimited list of elements to ignore in the
                        scattering calculation
  --edge EDGE           one of K, L1, L2, L3
  --skip SKIP           number of frames to skip at the beginning
  --every EVERY         number of frames to between each step

Installing from source

If installing Expectra from source instead of pip, clone the source code from GitHub:

git clone https://github.com/SamChill/expectra.git

After all the dependency requirements have been satisfied, build the feff binary, and move it to expectra/expectra/:

cd expectra/feff

# To use ifort instead of gfortran, set FC=ifort in ./Makefile

make clean
make  # should create the feff binary

mv ./feff ../expectra

Finally, set relevant environmental variables (assuming Expectra was installed at $HOME):

# consider including these in ~/.bash_profile, ~/.profile, or ~/.bashrc
export PATH=$HOME/expectra/bin:$PATH
export PYTHONPATH=$HOME/expectra:$PYTHONPATH

Note from developers

Expectra was recently migrated from Python2 to Python3. Please report any bugs to sunghjung3@utexas.edu.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

expectra-1.0.5.tar.gz (116.1 kB view details)

Uploaded Source

Built Distribution

expectra-1.0.5-py3-none-any.whl (129.0 kB view details)

Uploaded Python 3

File details

Details for the file expectra-1.0.5.tar.gz.

File metadata

  • Download URL: expectra-1.0.5.tar.gz
  • Upload date:
  • Size: 116.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for expectra-1.0.5.tar.gz
Algorithm Hash digest
SHA256 d6ae3af25b5da688d7697ca8ac823f944485b53635a2a51475c2777c1bd44f2e
MD5 68058db5489317e4a4548320d7a10b43
BLAKE2b-256 ac2f37c5aa1986be900948123ece76654465873299246c25e272c12b553746a8

See more details on using hashes here.

File details

Details for the file expectra-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: expectra-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 129.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for expectra-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9e8234e51bde0f7c2b0e653cbeb5c1440216aff1ecc2d3405cda1e7824926ab2
MD5 c7d41e4b815330f465c3e05a8494d508
BLAKE2b-256 63f361140e8007d4058eed660d4f8ba7ba1fa9eff028b40688eab278944cc02b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page