Revision as of 21:40, 9 February 2021 by Btingle (talk | contribs) (→‎how to build the singularity image)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Info on using ZINC-22 3D building in singularity.

how to use the singularity image

ok, the image is @ /nfs/home/xyz/soft/build3d.img so, to run it, do the following:

LICENSE_DIR= ((((whatever you want it to be))))
export OE_LICENSE=$LICENSE_DIR/oe-license.txt (((((or whatever it is called)))))
export CHEMAXON_LICENSE_URL=$LICENSE_DIR/jchem-license.cxl
export OUTPUT= ((((some directory on the nfs where output is going))))
export INPUT= ((((some directory on nfs where input resides))))
export LOGGING= ((((wherever logs should go))))
export SGE_TASK_ID=((((whatever you want, the script will evaluate the SGE_TASK_ID'th entry in $(find -type f $INPUT | sort) ))))
export SGE_JOB_ID=((((again, whatever you want. Just a label for the job))))
singularity run build3d.img

how to build the singularity image

BKS uses centos7 for our operating system, which can cause issues when building with singularity, particularly if you are building on ubuntu. See https://singularity.lbl.gov/building-centos-image for more details.

The gist is, our singularity image needs to be built on a centos machine.

To build our image, simply pull the necessary files from dockerhub (link not yet here), chdir to the directory you just cloned and run the following command:

singularity build build3d.simg Singularity3D

The resulting build3d.simg can be used to run 3d building jobs with singularity.

export INPUT
export OUTPUT
export LOGGING
export JOB_ID
export SGE_TASK_ID
singularity run build3d.simg

You may also want to use a working directory that isn't in the default singularity bindings (i.e default root directories like /tmp, /dev/shm), for example a /scratch directory.

export SHRTCACHE=/scratch
singularity run build3d.simg

SHRTCACHE specifies the base working directory for the script where temporary files will be saved. Without any additional entries to SINGULARITY_BINDPATH, the two sane choices for SHRTCACHE are /tmp or /dev/shm (the default).