Python version of the DirectDM package
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

DirectDM: a python package for dark matter direct detection

directdm takes the Wilson coefficients of relativistic operators that couple DM to the SM quarks, leptons, and gauge bosons and matches them onto a non-relativistic Galilean invariant EFT in order to calculate the direct detection scattering rates.

You can get the latest version of directdm on github.


directdm needs python3, and the python3 versions of SciPy and NumPy.

The latest release is available via the Python Package Index, so you can install it simply by executing

pip3 install directdm

(You might need root permissions to execute this command, and pip3 might be called pip on your system.)

Note: the package has been tested on a linux machine. Mac users using homebrew should be able to install directdm after executing

brew install python3
brew upgrade numpy
brew upgrade scipy


Here is a simple example how to use directdm:

Import the package:

import directdm as ddm

Define some Wilson coefficients for Dirac DM in the three-flavor basis, using a python dictionary:

wc_dict = {'C61u' : 1./100**2 , 'C61d' : 1./100**2}
wc3f = ddm.WC_3f(wc_dict, DM_type="D")

Match the three-flavor Wilson coefficients onto the non-relativstic ones (the DM mass has been set to 100 GeV, and the momentum transfer is 50 MeV):

print(wc3f.cNR(100, 50e-3))

Write the list of proton and neutron NR Wilson coefficients into a file in the current directory with filename 'wc3.m':

wc3f.write_mma(100, 50e-3, filename='wc3.m')

The included file has basic descriptions of all relevant classes.

The included file has basic examples for using the functions provided by the code.


If you use DirectDM please cite us! To get the BibTeX entries, click on: inspirehep query

Main Author

  • Joachim Brod (University of Cincinnati)


  • Fady Bishara (University of Oxford)
  • Benjamin Grinstein (UC San Diego)
  • Emmanuel Stamou (University of Chicago)
  • Jure Zupan (University of Cincinnati)


DirectDM is distributed under the MIT license.

License: MIT