Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • DAPHNE4NFDI/sassena
1 result
Show changes
Commits on Source (17)
Showing with 878 additions and 15707 deletions
......@@ -2,8 +2,7 @@ FROM nvidia/cuda:12.5.1-devel-ubuntu24.04
LABEL NAME="sassena-docker-cuda" \
VERSION="1.0" \
DESCRIPTION="Docker image that contains all required dependencies to build Sassena with CPU+CUDA support."
RUN apt-get update -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && apt-get install -y tzdata locales locales-all
RUN apt-get install -y build-essential cmake zlib1g-dev libblas-dev libfftw3-dev libxml2-dev libhdf5-dev \
wget mpi-default-dev liblapack-dev ninja-build doxygen sphinx-doc
RUN apt-get install -y libspdlog-dev python3 python3-pip graphviz git python3-h5py python3-sphinx-rtd-theme pipx fuse
......@@ -12,6 +11,9 @@ RUN pipx install doxysphinx
RUN wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O $HOME/.local/bin/linuxdeploy
RUN chmod +x $HOME/.local/bin/linuxdeploy
ENV PATH="$PATH:/root/.local/bin"
RUN wget https://release-cli-downloads.s3.amazonaws.com/latest/release-cli-linux-amd64
RUN mv release-cli-linux-amd64 /usr/local/bin/release-cli
RUN chmod +x /usr/local/bin/release-cli
ARG BOOST_VERSION=1.80.0
RUN cd /tmp && \
BOOST_VERSION_MOD=$(echo $BOOST_VERSION | tr . _) && \
......@@ -22,3 +24,6 @@ RUN cd /tmp && \
echo "using mpi ;" >> project-config.jam && \
./b2 install && \
rm -rf /tmp/*
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
\ No newline at end of file
......@@ -89,15 +89,22 @@ appimage-cpu-job: # Create an AppImage for Sassena (CPU only), upload it to the
stage: deploy
rules:
- if: $CI_COMMIT_TAG
when: manual
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
tag_name: '$CI_COMMIT_TAG'
description: '$CI_COMMIT_TAG'
assets:
links:
- name: 'Sassena AppImage'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${IMAGE_VERSION}/Sassena_CPU.AppImage'
link_type: package
image: $CI_REGISTRY/daphne4nfdi/sassena:latest
script:
- git submodule update --init --recursive
- cmake --preset=rel-cpu -DCMAKE_INSTALL_PREFIX=/usr
- cmake --preset=rel-cpu -DCMAKE_INSTALL_PREFIX=/usr # preset must be set according to AppImage documentation
- cd build-rel-cpu
- DESTDIR=AppDir ninja install -j3
- linuxdeploy --appimage-extract-and-run --desktop-file AppDir/usr/share/applications/sassena_cpu.desktop --appdir AppDir --output appimage
- 'curl --fail-with-body --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "Sassena_(CPU)-x86_64.AppImage" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${IMAGE_VERSION}/Sassena_CPU.AppImage"'
- linuxdeploy --appimage-extract-and-run --desktop-file AppDir/usr/share/applications/sassena_cpu.desktop --appdir AppDir --output appimage # create the AppImage using linuxdeploy
- 'curl --fail-with-body --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "Sassena_(CPU)-x86_64.AppImage" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${IMAGE_VERSION}/Sassena_CPU.AppImage"' # upload it to the server
artifacts:
paths:
- "build-rel-cpu/Sassena_(CPU)-x86_64.AppImage"
cff-version: 1.2.0
title: Sassena
message: >-
If you use this software, please cite both the software
and the journal publication.
type: software
authors:
- given-names: Jose
family-names: Borreguero
orcid: 'https://orcid.org/0000-0002-0866-8158'
- given-names: Eduard
family-names: Bosch i Mustaros
- given-names: Sebastian
family-names: Busch
email: sebastian.busch@hereon.de
orcid: 'https://orcid.org/0000-0002-9815-909X'
- given-names: Stuart
family-names: Campbell
orcid: 'https://orcid.org/0000-0001-7079-0878'
- given-names: Victor
family-names: Escuerdo
- given-names: Benjamin
family-names: Lindner
- given-names: Arnab
family-names: Majumdar
orcid: 'https://orcid.org/0000-0003-4049-4060'
- given-names: Berta
family-names: Pedret Sagnier
orcid: 'https://orcid.org/0009-0009-4718-2212'
- given-names: Xavier
family-names: Povill
- given-names: Jeremy C.
family-names: Smith
orcid: 'https://orcid.org/0000-0002-2978-3227'
- given-names: Daniel
family-names: Vonk
orcid: 'https://orcid.org/0000-0003-0837-9185'
identifiers:
- type: url
value: 'https://codebase.helmholtz.cloud/DAPHNE4NFDI/sassena'
description: Code repository
repository-code: 'https://codebase.helmholtz.cloud/DAPHNE4NFDI/sassena'
abstract: >-
Sassena is a program to calculate X-ray and neutron
scattering patterns from Molecular Dynamic simulations in
the Born approximation.
license: GPL-3.0
references:
- type: article
authors:
- given-names: Benjamin
family-names: Lindner
- given-names: Jeremy C.
family-names: Smith
title: "Sassena -- X-ray and neutron scattering calculated from molecular dynamics trajectories using massively parallel computers"
year: 2012
journal: Computer Physics Communications
doi: 10.1016/j.cpc.2012.02.010
......@@ -66,7 +66,7 @@
"USE_DEVELOPER_MODE": "OFF",
"SASS_USE_WERROR": "OFF",
"SASS_USE_CUDA": "ON",
"CMAKE_CUDA_ARCHITECTURES": "all-major"
"CMAKE_CUDA_ARCHITECTURES": "native"
},
"inherits": [
"base"
......
Contributing
############
Thank you for contributing to Sassena!
Please follow the steps below to contribute to Sassena:
* Create a new `issue <https://codebase.helmholtz.cloud/DAPHNE4NFDI/sassena/-/issues>`_ where you describe your intentions clearly and can gather feedback
* Get the source code: ``git clone https://codebase.helmholtz.cloud/DAPHNE4NFDI/sassena.git``
* Start from the development branch: ``git checkout develop``
* Make sure your ``develop`` branch is up to date with the repo's: ``git pull origin develop --rebase``
* Create a new feature branch from here with a descriptive name: ``git switch -c name`` where ``name`` could for example be ``fix/readme``
* code away!
* ``git add`` the changed files you want to upload
* ``git commit`` with a meaningful message
* In your last commit of this series, include a `keyword <https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests>`_ to close your feature branch.
* Upload your feature branch: ``git push origin HEAD``
* Create a merge request of your feature branch into the ``develop`` branch
From time to time, we will merge the ``develop`` branch into the ``main`` branch.
......@@ -2,8 +2,7 @@ FROM ubuntu:latest
LABEL NAME="sassena-docker-no-cuda" \
VERSION="1.0" \
DESCRIPTION="Docker image that contains all required dependencies to build Sassena with CPU support."
RUN apt-get update -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && apt-get install -y tzdata locales locales-all
RUN apt-get install -y build-essential cmake zlib1g-dev libblas-dev libfftw3-dev libxml2-dev libhdf5-dev \
wget mpi-default-dev liblapack-dev ninja-build doxygen sphinx-doc
RUN apt-get install -y libspdlog-dev python3 python3-pip graphviz git python3-h5py python3-sphinx-rtd-theme pipx fuse
......@@ -12,6 +11,9 @@ RUN pipx install doxysphinx
RUN wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O $HOME/.local/bin/linuxdeploy
RUN chmod +x $HOME/.local/bin/linuxdeploy
ENV PATH="$PATH:/root/.local/bin"
RUN wget https://release-cli-downloads.s3.amazonaws.com/latest/release-cli-linux-amd64
RUN mv release-cli-linux-amd64 /usr/local/bin/release-cli
RUN chmod +x /usr/local/bin/release-cli
ARG BOOST_VERSION=1.80.0
RUN cd /tmp && \
BOOST_VERSION_MOD=$(echo $BOOST_VERSION | tr . _) && \
......@@ -22,3 +24,6 @@ RUN cd /tmp && \
echo "using mpi ;" >> project-config.jam && \
./b2 install && \
rm -rf /tmp/*
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
This diff is collapsed.
NOTE: This is a fork of the upstream repo which hasn't been updated in a while.
Software for Calculating Scattering Diagrams on Massively Parallel Computers
please visit www.sassena.org for details.
associated paper: http://dx.doi.org/10.1016/j.cpc.2012.02.010
Content (from website)
=======
Sassena is a highly scalable parallelized software for calculating neutron and xray scattering intensities from all-atomic molecular dynamics simulations. It enables scientific scattering calculations only attainable through massively large parallel computers. The development of sassena is a consequence of the need to calculate scattering diagrams for systems with thousands of atoms and millions of time steps. These calculations require enormous computing power in the range of thousands of cores and up to terabytes of memory. As a side effect, the overall time for calculating scattering of small systems and short trajectories can be significantly reduced through the use of parallel computers.
The direct computation of scattering diagrams based on (all-atomic) molecular dynamics trajectories allows reconciliation of simulations with experiment. Scattering diagrams also provide a powerful tool to investigate structural and dynamical properties of simulated molecular systems by reducing the amount of information into meaningful structural and dynamical fingerprints.
Sassena was inspired by pre-existing software and integrates their capabilities:
SASSIM (SASSIM: a method for calculating small-angle X-ray and neutron scattering and the associated molecular envelope from explicit-atom models of solvated proteins, F. Merzel and J. C. Smith, 2002, Acta Cryst.. D58, p. 242-249)
SERENA (SERENA: a program for calculating X-ray diffuse scattering intensities from molecular dynamics trajectories, Micu A.M., Smith J.C., 1995, Computer Physics Communications, 91 (1-3), pp. 331-338.).
nMoldyn 2, G R. Kneller, V Keiner, M Kneller and M Schiller, "nMoldyn, a program package for the calculation and analysis of neutron scattering spectra from MD simulations" Comp. Phys. Comm., vol. 91, (1995), 191-214., T Róg, K Murzyn, K Hinsen and G R. Kneller, "nMoldyn : A Program Package for a Neutron Scattering Oriented Analysis of Molecular Dynamics Simulations" J. Comp. Chem. no. 5, vol. 24, (2003), 657-667.
The design goal of the sassena software suite is to enable scientific scattering calculations which are only attainable through the use of massively parallel computers. However, the software also represents a great educational tool for investigating structural and dynamical properties of molecular systems. For this reason this websites contains a collection of tutorials, in-depth information and hosts the sassena user community.
Though the focus of the software is scalability, work is underway to increase single-node performance and optimize IO access.
The inaugural paper is online (http://dx.doi.org/10.1016/j.cpc.2012.02.010) and the source code is available free of charge and open source.
If you use Sassena for your calculations please cite the following reference:
B. Lindner and J.C. Smith, 2012, "Sassena — X-ray and neutron scattering calculated from molecular dynamics trajectories using massively parallel computers", Comp. Phys. Comm., Volume 183, Issue 7, Pages 1491–1501, http://dx.doi.org/10.1016/j.cpc.2012.02.010
=======
Sassena
=======
Sassena is a program to calculate X-ray and neutron scattering patterns from
Molecular Dynamics simulations in the Born approximation.
Description
===========
The full documentation is currently hosted on
https://daphne4nfdi.pages.hzdr.de/sassena (access restrictions apply).
Sassena can calculate:
* structure factor S(Q)
* coherent intermediate scattering function I\ :sup:`coh`\ (Q,t)
* incoherent intermediate scattering function I\ :sup:`inc`\ (Q,t)
* elastic incoherent structure factor EISF(Q)
Filetypes:
* Sassena can read ``pdb`` files for atom type definition and ``dcd`` files
containg the trajectory. For trajectory conversion, use e.g. `VMD
<https://www.ks.uiuc.edu/Research/vmd/>`_.
* The computation has to be defined by the user in an ``xml`` file
* Sassena writes the output into an ``hdf`` file
Orientational averages are calculated explicitly using a Monte Carlo scheme. It
is possible to define subsets of atoms or frames that the computation should run
on.
Sassena has a command-line interface and can be run across many CPUs using MPI.
Installation
============
You can choose to either use a pre-built binary of Sassena, which contains all
the required libraries or build the project yourself from source. For more
information, visit `the documentation <https://daphne4nfdi.pages.hzdr.de/sassena/for_users/index.html>`_.
AppImage
--------
An AppImage is provided that can run on Linux (x64, without CUDA support) out of the box when executed (no installation needed). To use
it, download the AppImage from the `releases page <https://codebase.helmholtz.cloud/DAPHNE4NFDI/sassena/-/releases>`_, mark it as an executable and run it from the
command-line:
.. code-block:: bash
chmod +x Sassena.AppImage
./Sassena.AppImage # --config scatter.xml etc.
# or to use mpi:
mpirun -n 16 ./Sassena.AppImage --config scatter.xml
Compiling from Source
---------------------
For optimal performance (e.g. using target-specific registers, CUDA), Sassena
can be compiled on the target machine, e.g. on Ubuntu 24.04:
.. code-block:: bash
sudo apt install build-essential cmake ninja-build git\
openmpi-bin libblas-dev liblapack-dev\
libxml2-dev libhdf5-dev zlib1g-dev libfftw3-dev\
libboost-regex-dev libboost-mpi-dev\
libboost-thread-dev libboost-serialization-dev libboost-system-dev\
libboost-filesystem-dev libboost-program-options-dev
git clone https://codebase.helmholtz.cloud/DAPHNE4NFDI/sassena.git
cd sassena
git submodule update --init --recursive
cmake --preset=rel-cpu # or rel-cuda if you want to build with CUDA
cd build-rel-cpu
ninja
Contributing
============
To contribute, please create a feature branch from the develop branch and add
your changes and then create a merge request onto the `develop` branch. The repo
uses `rebasing workflow
<https://git-scm.com/book/en/v2/Git-Branching-Rebasing>`_, so you may need to
rebase your changes onto the `develop` branch before the merge can be completed.
For further information, please see ``CONTRIBUTING.rst``.
Notable upstream repositories
=============================
https://github.com/camm/sassena
https://github.com/benlabs/sassena
Citation
========
If you use Sassena for your calculations please cite
Benjamin Lindner and Jeremy C. Smith: "Sassena — X-ray and neutron scattering calculated from molecular dynamics trajectories using massively parallel computers", Comp. Phys. Comm. 183/7 (2012) 1491, `DOI: 10.1016/j.cpc.2012.02.010 <http://dx.doi.org/10.1016/j.cpc.2012.02.010>`_
#!/bin/bash
module ()
{
eval `/opt/modules/3.1.6/bin/modulecmd bash $*`
}
PREFIX=$HOME/sw/jaguar-xt5
# requirements:
# boost
# fftw
# hdf5
# libxml2
#
module unload PrgEnv-pgi
module load PrgEnv-gnu
module load hdf5
module load fftw
cmake -D CMAKE_PREFIX_PATH=$PREFIX -D STATIC=true -D CRAY=true ../..
#!/bin/bash
module ()
{
eval `/opt/modules/3.1.6/bin/modulecmd bash $*`
}
PREFIX=$HOME/sw/kraken-xt5
# requirements:
# boost
# fftw
# hdf5
# libxml2
#
module swap PE-pgi PE-gnu
module load hdf5
module load fftw
cmake -D CMAKE_PREFIX_PATH=$PREFIX -D STATIC=true -D CRAY=true ../..
#!/bin/bash
module ()
{
eval `/usr/bin/modulecmd bash $*`
}
module unload PE-pgi
module load PE-gnu/4.3.2
module unload ompi
module load ompi/1.4.2-gnu4.3.2
module load git
module load cmake
module list
PREFIX=$HOME/sw/lens
# requirements:
# boost
# fftw
# hdf5
# libxml2
#
cmake -D CMAKE_EXE_LINKER_FLAGS="-Wl,-rpath,$LD_LIBRARY_PATH" -D CMAKE_PREFIX_PATH=$PREFIX ../..
#!/bin/bash
# get rid of interference
export LD_LIBRARY_PATH=
PREFIX=$HOME/sw/moldyn
export FFTW3_DIR=$HOME/sw/moldyn/opt/fftw-3.3
export BOOST_ROOT=$HOME/sw/moldyn/opt/boost-1.47-shared-mt
export HDF5_HOME=$HOME/sw/moldyn/opt/hdf5-1.87
export PATH=/shared/apps/gnu4.4.4/openmpi/1.4.3/bin:$PATH
export LD_LIBRARY_PATH=${PREFIX}/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/ofed/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/shared/apps/gnu4.4.4/openmpi/1.4.3/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${FFTW3_DIR}/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${HDF5_HOME}/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${BOOST_ROOT}/lib:$LD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
cmake -D CMAKE_C_COMPILER=gcc44 -D CMAKE_CXX_COMPILER=g++44 -D CMAKE_EXE_LINKER_FLAGS="-Wl,-rpath,$LD_LIBRARY_PATH" ../..
\ No newline at end of file
#!/bin/bash
PREFIX=$HOME/sw/viper
cmake -D CMAKE_EXE_LINKER_FLAGS="-Wl,-rpath,$LD_LIBRARY_PATH" -D CMAKE_PREFIX_PATH=$PREFIX ../..
{ pkgs, lib }:
pkgs.stdenv.mkDerivation rec {
pname = "sassena";
version = "0.1.0";
src = ./.;
nativeBuildInputs = with pkgs; [ ninja python3 cmake clang-tools gcc13 ];
buildInputs = with pkgs;
let boost-mpi = boost.override { useMpi = true; };
in [ blas fftw libxml2 zlib boost-mpi hdf5 hdf5-cpp hdf5-mpi mpi spdlog ];
configurePhase = ''
cmake --preset=dev .
'';
buildPhase = ''
cd build-dev
ninja
'';
installPhase = "";
meta = with lib; { platforms = with platforms; linux ++ darwin; };
}
File deleted
This diff is collapsed.
docs/config/pasted1.png

3.77 KiB

docs/config/pasted2.png

7.53 KiB

docs/config/pics/pasted1.png

6.54 KiB