diff --git a/olex2/README.md b/olex2/README.md index b36af2d..7cc4032 100644 --- a/olex2/README.md +++ b/olex2/README.md @@ -1,25 +1,7 @@ -XDS +# Olex2 -Step 1: login with your -adm account +Olex2 is a free, open-source software program used for determining, visualizing, and analyzing small-molecule crystal structures. It provides a comprehensive and user-friendly graphical interface to guide users through the process of crystal structure solution, refinement, and report generation. This workflow-oriented program is designed to be useful for both experienced crystallographers and chemists who may not have specialized training. -``` -[smith_k@ra-l-005 xds]$ kinit smith_k-adm -[smith_k@ra-l-005 xds]$ aklog -``` - -Step 2: load the latest Pmodules package - -``` -module use unstable -module load Pmodules/2.0.0 -``` - -Step 3: go into olex2 directory, update config.yaml to add newest release version and build module with that release name (e.g. below is for 1.5) - -``` -cd olex2 -vi files/config.yaml -./build 1.5 -``` - -Step 4: confirm that the module loads as expected +## Installation guide +1. First, download the zip archive with the binaries. For example for version 1.5, it was download from https://secure.olex2.org/olex2-distro/1.5/olex2-linux64.zip +2. Build the module with the correct version. diff --git a/olex2/build b/olex2/build old mode 100644 new mode 100755 index 8553ea2..fad32ba --- a/olex2/build +++ b/olex2/build @@ -1,15 +1,43 @@ #!/usr/bin/env modbuild +pbuild::configure(){ + : +} -pbuild::prep() { :; } - -pbuild::configure() { :; } - -pbuild::compile() { :; } +pbuild::compile(){ + : +} pbuild::install() { - #wget --no-check-certificate https://xds.mr.mpg.de/XDS-gfortran_Linux_x86_64.tar.gz + + # Get the OS and architecture + os=$(uname -s | tr '[:upper:]' '[:lower:]') + arch=$(uname -m) + case "$arch" in + x86_64|amd64) arch="64" ;; + i386|i686) arch="32" ;; + aarch64) arch="arm64" ;; + armv7*) arch="arm" ;; + esac + + ZIP="${PREFIX}/${P}-${os}${arch}.zip" + + # Copy the zip archive from the build directory + cp -n "${BUILDBLOCK_DIR}/${P}-${os}${arch}.zip" "$ZIP" + + # Extract contents directly into PREFIX + unzip -o -q "$ZIP" -d "${PREFIX}" + + # Create the bin directory mkdir -p "${PREFIX}/bin" - cd "${PREFIX}/bin" - unzip "${BUILDBLOCK_DIR}/Olex2Linux64.zip" + + # Copy the executable files to the bin directory + find "${PREFIX}/${P}" -maxdepth 1 -type f -perm -111 -exec mv {} "${PREFIX}/bin/" \; + + # Move all contents of the zip archive into PREFIX + mv "${PREFIX}/${P}/"* "${PREFIX}/" + rmdir "${PREFIX}/${P}" + + # Remove zip archive + rm "$ZIP" } diff --git a/olex2/files/config.yaml b/olex2/files/config.yaml index 834b761..9e9ce5e 100644 --- a/olex2/files/config.yaml +++ b/olex2/files/config.yaml @@ -5,6 +5,7 @@ olex2: group: MX overlay: base relstage: stable + versions: 1.5: config: diff --git a/olex2/modulefile b/olex2/modulefile index 54771e4..7b6d92a 100644 --- a/olex2/modulefile +++ b/olex2/modulefile @@ -1,12 +1,18 @@ #%Pmodule -module-whatis "OlexSys Ltd is a scientific software company providing State of the Art Crystallographic Software as well as the best Laboratory Chemicals Management there is." -module-url "https://www.olexsys.org/categories/installation/" -module-license "Olex2 is completely free to use for anyone. There is no catch here – whether you are in industry, academia or a student, it’s free!" +module-whatis "Olex2 is a free and comprehensive software package for determining, visualizing, and analyzing small-molecule crystal structures" +module-url "https://www.olexsys.org/olex2" +module-license "https://www.olexsys.org/tags/licence/" module-maintainer "MX Data " -module-help " -Olex2 is open source – all our code is available for you to look at, check and – hopefully! +module-help " +Olex2 is a free and comprehensive software package for determining, +visualizing, and analyzing small-molecule crystal structures. It features a +user-friendly, mouse-driven graphical interface to assist both chemists and +crystallographers with tasks like structure solution, refinement, and report +generation. The program seamlessly links all aspects of the crystallography +workflow into a single, intuitive package. " -setenv Olex2 $PREFIX/bin +# Use software OpenGL explicitly to avoid Vulkan drivers missing error +setenv LIBGL_ALWAYS_SOFTWARE 1 diff --git a/olex2/Olex2Linux64.zip b/olex2/olex2-linux64.zip similarity index 100% rename from olex2/Olex2Linux64.zip rename to olex2/olex2-linux64.zip