iMolpro 1.0.1

Webpage

https://github.com/molpro/iMolpro

Version

1.0.1

Build Environment

-

Files Required

  • Miniforge3-Linux-x86_64.sh (miniforge installer)
  • diff-projectwindow.py: fix for csh/tcsh

--- ProjectWindow.py.org    2024-03-08 14:34:07.000000000 +0900
+++ ProjectWindow.py    2024-03-08 14:33:22.000000000 +0900
@@ -122,8 +122,12 @@
        settings['project_directory'] = os.path.dirname(self.project.filename(run=-1))

        if 'PATH' in os.environ and 'SHELL' in os.environ:
+            if re.search( 'csh', os.environ['SHELL'] ):
+                myopts = " -c 'echo $PATH'"
+            else:
+                myopts = " -l -c 'echo $PATH'"
            try:
-                os.environ['PATH'] = os.popen(os.environ['SHELL'] + " -l -c 'echo $PATH'").read() + ':' + os.environ[
+                os.environ['PATH'] = os.popen(os.environ['SHELL'] + myopts).read() + ':' + os.environ[
                    'PATH']  # make PATH just as if running from shell
            except Exception as e:
                msg = QMessageBox()

Build Procedure

#!/bin/sh

VERSION=1.0.1
#INSTALL_DIR=/apl/imolpro/${VERSION}

BASEDIR=/home/users/${USER}/Software/iMolpro/${VERSION}
MINIFORGE=${BASEDIR}/Miniforge3-Linux-x86_64.sh
IMOLPRO_GIT=https://github.com/molpro/iMolpro.git
IMOLPRO_TAG=refs/tags/${VERSION}

WORKDIR=/gwork/users/${USER}
WORKDIR_IMOLPRO=${WORKDIR}/imolpro
WORKDIR_BUILD=${WORKDIR_IMOLPRO}/build

PATCH=${BASEDIR}/diff-projectwindow.py

# ------------------------------------------------------------------------
umask 0022
export LANG=C
export LC_ALL=C

module -s purge

if [ -d ${WORKDIR_IMOLPRO} ]; then
  mv ${WORKDIR_IMOLPRO} ${WORKDIR_IMOLPRO}_erase
  rm -rf ${WORKDIR_IMOLPRO}_erase &
fi
mkdir ${WORKDIR_IMOLPRO} && cd ${WORKDIR_IMOLPRO}

sh ${MINIFORGE} -b -f -p ${WORKDIR_IMOLPRO}/miniforge3

eval "$(${WORKDIR_IMOLPRO}/miniforge3/bin/conda shell.bash hook)"

cd ${WORKDIR}
if [ -d iMolpro ]; then
  mv iMolpro iMolpro-erase
  rm -rf iMolpro-erase &
fi
git clone ${IMOLPRO_GIT}
cd iMolpro
git checkout ${IMOLPRO_TAG}

# /tmp is not only for you!
export TMPDIR=${WORKDIR_BUILD}
mkdir -p ${TMPDIR}
sed -i -e "s/\/tmp\///g" iMolpro.py database.py
# for csh... is it ok?
patch -p0 < $PATCH
# ad hoc workaround necessary only in RCCS (regarding token file protection)
conda install -c conda-forge -y --file=requirements.txt || exit 1
sed -i -e "s/\['\/bin\/sh'\]/[]/" ${WORKDIR_IMOLPRO}/miniforge3/lib/python3.*/site-packages/pymolpro/project.py

sh ./build.sh
# install dist/iMolpro-1.0.1-dirty.Linux.x86_64.tar.bz2 into $INSTALL_DIR manually

Notes

  • This is a GUI application. X11 forwarding is required.
    • MobaXterm on Windows, Xquartz on mac, SSH X11 forwarding on Linux may be useful.
    • iMolpro has internal JMol; 3D visualization of the molecule is possible.
  • Due to the local fixes (fix for csh/tcsh and avoid using /tmp), the version name is displayed as "1.0.1-dirty".
  • Guided mode can be activated if molpro command is in your path.
    • In the guided mode, you can choose settings using sophisticated UI (toggle boxes are available for example).
  • It is not possible to launch job directly from iMolpro for now.
    • (It may be possible with "backend" setting. Please check doc/example.md of the official source tree. A utility command which build job script and submit a job via jsub may be necessary.)
    • It is possible to create input files and to run small calculations on login server for now.
  • On RCCS system, you can launch iMolpro with a command like imolpro-molpro2023.2.0 once you load the imolpro module. These wrappers launch iMolpro after setting the path corresponding to the specified version of molpro.
    • imolpro-molpro2023.2.0 (molpro 2023.2.0)
    • imolpro-molpro2022.3.0 (molpro 2022.3.0)
    • imolpro-molpro2021.3.1 (molpro 2021.3.1)
    • imolpro-molpro2024.1.0 (molpro 2024.1.0; will soon be available)