Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Code for EXAFS calculations from dynamics or normal modes

Project Description
# Expectra

## 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][feff], which was written at the University of Washington by J.J.
Rehr and co-workers.<sup>1</sup>

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

* Python
* numpy
* mpi4py
* gfortran
* MPI (e.g. OpenMPI or MPICH)

## 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 GFortran and an MPI implementation. 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 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]

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:
--neighbor-cutoff DISTANCE
1st neighbor cutoff distance (default: 3.4)
--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

### Example

The following example will run a parallel EXAFS simulation using 4 processes,
where the L3-edge EXAFS spectrum will be calculated by running FEFF will be run
once for every 10 configurations contained in the `XDATCAR` file. The absorbing
atom is set to Au and all scattering interactions up to 6 Angstrom are
included. Additionall, an experimentally determined energy shift (E0) is
specified to be 4.11 eV. The first 1000 configurations in the trajectory are
skipped in order to let the system reach local thermal equillibrium.

mpirun -n 4 expectra \
--multiple-scattering \
--absorber Au \
--rmax 6.0 \
--S02 0.837 \
--energy-shift 4.11 \
--edge L3 \
--skip 1000 \
--every 10 \
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
expectra-0.1.2.tar.gz (140.7 kB) Copy SHA256 Checksum SHA256 Source Sep 2, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting