Skip to main content

Dynamical structure factors and correlation

Project description

dynasor is a tool for calculating total and partial dynamic structure factors as well as related correlation functions from molecular dynamics (MD) simulations. By analyzing these functions one can access the dynamics of a system without resorting to perturbative approaches. Moreover by combining in particular the structure factor with the cross sections (or form factors) of, e.g., neutrons, X-rays or electrons, one can predict experimental spectra. The main input consists of a trajectory from a MD simulation, i.e., a file containing snapshots of the particle coordinates and optionally velocities, that correspond to consecutively and equally spaced points in (simulation) time.

dynasor provides both python and a command line interface. The following snippet illustrates how one can calculate dynamic structure factors using the former.

traj = Trajectory('dump.xyz', trajectory_format='extxyz')
q_points = generate_spherical_qpoints(traj.cell, q_max=20)
sample = compute_dynamic_structure_factors(traj, q_points=q_points, dt=5, window_size=100)
sample.write_to_npy('test.npy')

dynasor can be installed via pip or conda. Please consult the installation section of the user guide for details.

The full documentation can be found in the user guide. For questions and help please use the dynasor discussion forum on matsci.org. dynasor and its development are hosted on gitlab.

When using dynasor in your research please cite the following paper:

Dynasor – A tool for extracting dynamical structure factors and current correlation functions from molecular dynamics simulations
Erik Fransson, Mattias Slabanja, Paul Erhart, and Göran Wahnström
Advanced Theory and Simulations 4, 2000240 (2021); DOI:10.1002/adts.202000240

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

dynasor-2.1.tar.gz (234.5 kB view details)

Uploaded Source

File details

Details for the file dynasor-2.1.tar.gz.

File metadata

  • Download URL: dynasor-2.1.tar.gz
  • Upload date:
  • Size: 234.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for dynasor-2.1.tar.gz
Algorithm Hash digest
SHA256 7d346e787a99cec8d92bccc69752d09ab11dc3d9f38adfde331c27b525e4a315
MD5 0c925afc2d1937a5b6a463dc5a497a89
BLAKE2b-256 c345b35bf88c83caa97d09a7f8346d391bb45eb3d6a81392235455945b95b70c

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