Skip to content
A mirror of David Dubbeldam's general purpose classical simulation package.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Docs Added LTA dcTST example May 8, 2018
Literature Added pdf of the RASPA Molecular Simulation article Feb 26, 2015
examples Added CFWidomProbability move; Fixed binary-restart to be backwards-c… Jul 22, 2018
forcefield Initial Release RASPA-2.0 Feb 3, 2015
framework Initial Release RASPA-2.0 Feb 3, 2015
molecules
python Uploaded to PyPI, can now be installed with 'pip install RASPA2' Apr 7, 2015
run
scripts
src Added CFWidomProbability move; Fixed binary-restart to be backwards-c… Jul 22, 2018
structures Initial Release RASPA-2.0 Feb 3, 2015
.gitattributes Initial Release RASPA-2.0 Feb 3, 2015
.gitignore Initial Release RASPA-2.0 Feb 3, 2015
.nb Initial Release RASPA-2.0 Feb 3, 2015
AUTHORS Initial Release RASPA-2.0 Feb 3, 2015
BUGS Initial Release RASPA-2.0 Feb 3, 2015
COPYING Initial Release RASPA-2.0 Feb 3, 2015
ChangeLog Initial Release RASPA-2.0 Feb 3, 2015
INSTALL Initial Release RASPA-2.0 Feb 3, 2015
LICENSE ln -s COPYING LICENSE.txt Mar 27, 2015
MANIFEST.in Uploaded to PyPI, can now be installed with 'pip install RASPA2' Apr 7, 2015
Makefile.am Initial Release RASPA-2.0 Feb 3, 2015
NEWS
README Initial Release RASPA-2.0 Feb 3, 2015
README.md Python version bump May 28, 2018
acconfig.h
conf31383.sh Initial Release RASPA-2.0 Feb 3, 2015
configure.ac Patch by Jure Varlec on configure.ac to allow specification different… Apr 14, 2016
ltconfig Initial Release RASPA-2.0 Feb 3, 2015
setup.py Python version bump May 28, 2018
work.pc Initial Release RASPA-2.0 Feb 3, 2015
work.pcl Initial Release RASPA-2.0 Feb 3, 2015

README.md

RASPA2

A general purpose classical simulation package that can be used for the simulation of molecules in gases, fluids, zeolites, aluminosilicates, metal-organic frameworks, carbon nanotubes and external fields.

Installation

Like any other software library, RASPA2 should be installed through a package manager. This can be done through pip.

pip install RASPA2

If you want to stay on the cutting edge of RASPA2 development, you can also install directly from this git repo with pip install git+https://github.com/numat/RASPA2.

If you are unfamiliar with package managers, read the For New Coders section of the RASPA2 wiki.

Usage

There are currently two ways to use RASPA: through configuration files in the command line, or through Python functions.

Command Line

This approach uses RASPA script files and a set of directories to load structures, gases, and forcefield files. It outputs a set of folders and files which contain data about the simulation run. This is the original designed use of RASPA, and can be used in conjunction with shell scripts for small sets of long-running simulations. To see the help, type:

simulate -h

To write and configure simulation input files, read Docs/raspa.pdf.

Python

The previous approach is useful for long-running jobs, but can become cumbersome when you want to manage a large number of simulations. In this use case, the Python wrapper provides a streamlined workflow.

RASPA's full functionality can be accessed in a Python script, which enables simulation runs to be "glued" together with auxiliary workflow steps. For example, to run a set of simulations across a logarithmic range of pressures, parse the outputs for uptake data, and plot the results, use:

import RASPA2

# Set up
gas = "CO2"
pressures = [1e4 * 10**(0.1 * i) for i in range(21)]

# Run
results = [RASPA2.run(my_structure, gas, temperature=298, pressure=pressure)
           for pressure in pressures]

# Parse
uptakes = [r["Number of molecules"][gas]
            ["Average loading absolute [cm^3 (STP)/cm^3 framework]"][0]
           for r in results]

# Plot
plot(pressures, uptakes)

When used in conjunction with supercomputer interfaces such as the IPython Notebook and chemical data handling libraries such as open babel, it is possible to completely automate job distribution, cif formatting, charge estimation, and more in a single script.

For more examples, read the workflow wiki.

Accessing Configuration Files

In order to edit the RASPA forcefields, you need to access the associated .def files. The current path of the .def files can be discovered by typing raspa-dir into a terminal. In order to change your terminal directory to this, you can chain commands:

cd `raspa-dir`

Edit the files here, and then re-run your simulations. If you make any improvements to the existing force fields, molecules, or structures, you should consider contributing them back to RASPA by issuing a pull request.

You can’t perform that action at this time.