Git Product home page Git Product logo

pyne's Introduction

PyNE: The Nuclear Engineering Toolkit

The PyNE project aims to provide a common set of tools for nuclear science and engineering needs.

If you are interested in the package itself, or would like to help and contribute, please let us know either on the mailing list (https://groups.google.com/forum/#!forum/pyne-dev, [email protected]) or github.

Examples, documentation, and more can be found at http://pyne.io/, the official PyNE project site.

Installation

Dependencies

PyNE has the following dependencies:

  1. Fortran compiler
  2. C++ compiler
  3. CMake (>= 2.8.5)
  4. NumPy (>= 1.8.0)
  5. SciPy
  6. Cython (>= 0.19.1)
  7. HDF5
  8. PyTables
  9. Python 2.7
  10. LAPACK
  11. BLAS
  12. Jinja2
Optional Depenendencies:
  1. MOAB
  2. PyTAPS

Additionally, building the documentation requires the following:

  1. Sphinx
  2. sphinxcontrib-bibtex
  3. PrettyTable
  4. numpydoc
  5. jupyter

Most of the dependencies are readily available through package managers.

Binary

Binary distributions of the latest release for mac and linux (64-bit) using the conda package manager can be installed by running the command:

conda install -c conda-forge pyne

where VERSION should be replaced with the version number to be installed.

A windows 32-bit binary is also available on conda via the same command but it is highly experimental and likely broken. Conda binaries do not have moab/pytaps/mesh support (yet).

Source

Installing PyNE from source is a two-step process. First, download and unzip the source (zip, tar). Then run the following commands from the unzipped directory:

cd pyne/
python setup.py install --user
scripts/nuc_data_make

The setup.py command compiles and installs the PyNE source code. The nuc_data_make builds and installs a database of nuclear data. Unfortunately, this must be done as a second step because most nuclear data is under some form of license restriction or export control which prevents the developers from distributing it with PyNE. However, the nuc_data_make program (which is installed by setup.py) will do its best to find relevant nuclear data elsewhere on your machine or from public sources on the internet.

Supported Platforms

PyNE is currently built and tested daily on the following platforms on Python 2.7

  • Ubuntu 12.04 - x86_64
  • OSX 10.8 - x86_64

PyNE has pre-built binaries for the lastest release (0.4) on windows mac and linux

  • Mac (Python 2.7 and Python 3.3) - x86_64
  • Linux (Python 2.7 and Python 3.3) - x86_64
  • Windows (Python 2.7) - x86

PyNE has known issues on the following platforms

  • Windows (64-bit build currently not feasible)
  • 32-bit platforms (all variants) have known problems - see #315

Conda Install Instructions

After installing anaconda or miniconda from the Continuum downloads page, in a new terminal run the following conda install command:

conda install -c conda-forge pyne

where VERSION should be replaced with the version number to be installed.

If you have any issues, please let us know.

Conda Build Instructions

On mac and linux PyNE can be installed via the package manager conda. After installing anaconda or miniconda from the Continuum downloads page add conda's binary directory to your bash profile by adding:

export PATH=/path/to/anaconda/bin:$PATH

to your .bashrc or .bash_profile. Then in a new shell:

conda install conda-build jinja2 nose setuptools pytables hdf5 scipy

on linux you may also need to run:

conda install patchelf

Then dowload the latest conda-recipes here

cd to the conda-recipes directory and run:

conda build pyne
conda install $(conda build --output pyne)
nuc_data_make

Mac OSX Specific Instructions

The simplest method of installing PyNE on mac is via macports. Version 0.4 can be installed using the following commands(assuming you are using python 2.7):

sudo port install py27-pyne
nuc_data_make --fetch-prebuilt False

The latest development version of PyNE can also be installed from source. The instructions below outline how it can be installed using the homebrew http://brew.sh/ package manager.

Before starting install the command line tools from https://developer.apple.com/downloads/ you will need to create an account in order to download them. After installing brew and the command line tools run the following commands:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
brew doctor
brew tap homebrew/science
brew install hdf5
brew install cmake
brew install python

Add:

export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/share/python:$PATH

to ~/.bash_profile, then:

source ~/.bash_profile
sudo pip install numpy
sudo chown -R $(whoami) /usr/local
brew install gfortran
pip install scipy
pip install cython
pip install numexpr
pip install tables

download pyne-staging cd to that directory:

cd Downloads/pyne-staging
python setup.py install

Once those lines have been added, run the following command before running nuc_data_make:

source ~/.bashrc

Ubuntu Build Scripts

Scripts for installing PyNE and all its dependencies from scratch on Ubuntu 14.04 - 15.04 are found here.

Contributing

We highly encourage contributions to PyNE! If you would like to contribute, it is as easy as forking the repository on GitHub, making your changes, and issuing a pull request. If you have any questions about this process don't hesitate to ask the mailing list (https://groups.google.com/forum/#!forum/pyne-dev, [email protected]).

pyne's People

Contributors

arekfu avatar bam241 avatar chrisdembia avatar crbates avatar elliottbiondo avatar erelson avatar flanflanagan avatar gidden avatar gonuke avatar jdangerx avatar jrobcary avatar katyhuff avatar kellyrowland avatar kennellyt avatar kkiesling avatar klebenowm avatar kmanalo avatar ljacobson64 avatar makeclean avatar marissachanlatte avatar ngranda avatar ohnemax avatar opotowsky avatar paulromano avatar pshriwise avatar py1sl avatar rachelslaybaugh avatar scopatz avatar yijinhua avatar zxkjack123 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyne's Issues

Add CI for r2s script (?)

Consider how best to test the R2S script as part of CI without actually running MCNP or ALARA. (and if it is worth it)

Add method to delete a tag from a mesh

While it is possible to delete a tag from a mesh using the pymoab interface, this does not honor the cross-referencing between tags and meshes.

A method should be added to the pyne mesh API to delete a tag and cleanup everything properly.

This is necessary to support the r2s script.

python 3 compatibility

Update mesh.py and associated tests to be compatible with python 3. Depending on how much needs updating, this could come in a follow-up PR.

remove `dagmc` dependency from `r2s.py`

(Similar to #17)

Move the discretize_geom functionality elsewhere and pass it's results into this script. This will both

  • remove the dagmc dependency, and
  • open the door for generating these results in other ways

Identify modules that depend on installation of DAGMC

All PyMOAB usage depends on a valid MOAB installation, but some also depnd on a valid DAGMC installation. We need to document which those are, probably by trying to build PyNE without DAGMC and looking for failures to build or test.

Update R2S example to include output files from MCNP and ALARA

The R2S example that is described in the documents includes a link to a tarball with all the files necessary for a "student" to run an R2S problem.

A correct set of output files should also be added so that:

  1. we can test the R2S script in CI without running physics codes
  2. "students" can compare their answers

Mesh mats

I was reviewing #56 and I'm a little confused as to what the mats data structure is intended to be...

By default it looks like an empty tuple, but the documentation states it should be a MaterialLibrary or dict of mats (typo in docstring there) mapping volume element handles to materials. Here we're mapping indices to materials.

I see that the materials object always gets set to a valid dictionary-like object unless mats is None, indicating that the user doesn't want materials on the mesh.

  • I think that at some point we should figure out what's up with the keys for the mats property. I'm thinking it's just a docstring update? ๐Ÿคž

  • I'll also advocate for the default of mats to be an empty dictionary (or MaterialLibrary) to reduce confusion about what the data structure ends up being.

Make formal PR to pyne/pyne

Once we have resolved these issues, make a PR of the PyMOAB update to pyne/pyne.

There may be some issues in review of the original pymoab_cleanup branch

A call to Mesh should either succeed or fail more gracefully.

As it stands, the line m = pyne.mesh.Mesh() will fail when it cannot find any volume elements to check for tags in the mesh module.

This kind of mesh creation should either succeed - though I'm not sure what use that is or what it would look like - or it should fail with some kind of exception/message with information on how to create a PyNE mesh properly.

IMO the latter is a better choice for now.

remove `dagmc` dependency from `partisn.py`

The partisn routines only use dagmc to call discretize_geom. Instead of passing a DAGMC geometry, it could be possible to pass the data array that is the outcome of discretize_geom.

This will both localize the dagmc dependency and open the door for alternative ways of generating this data, and perhaps also different ways of testing partisn

Update PyNE website based on current `develop`

The PyNE website has not been updated since 3/1/2018. We should push an update and document the best way to do this, perhaps using a docker image. The CNERG website may provide guidance for this.

Alternatively, we can implement a system that automatically updates the website on each new merge.... doctr?

review and fix scripts

Some scripts have been reviewed already and others have not. This issue will review all scripts to see which still need to be updated.

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.