imodenv(1) General Commands Manual imodenv(1) NAME Description of IMOD environment variables DESCRIPTION This page describes all of the environment variables that can be set for use with IMOD programs. User-level variables 3DMOD_MEMORY_LIMIT Set this variable with the maximum memory that 3dmod is allowed to use for images; it will limit the image cache to this size and use it for single image files bigger than this size. The value can be either in megabytes or a fraction (between 0.1 and 1) of the physical memory (in a 64-bit system) or the addressable memory (in a 32-bit system). The default is 0.75. ANALYZEDM3_DEBUG Set this variable (no value needed) to get debugging output from the function that analyzes DigitalMicrograph dm3 or dm4 files for header data. AUTODOC_DIR Alternative directory to search for an autodoc file when a program uses PIP for input. CTFPLOT_BOTTOM_SCALE This variable fixes several problems when trying to get good screenshots of the Ctfplotter graph window, especially on a high-DPI monitor in conjunction with QT_SCALE_FACTOR set to 1. Set the variable to the amount to scale the scaling and vertical text extent sizes in the region below the X axis. When this scaling is not 1.0, the program will also omit the "Alternate colors" checkbox and draw the curves with double line thickness. ETOMO_LOG_DIR Directory into which Etomo will place error log files named by date and time, instead of into $HOME/.etomologs. Set this to a non-existent name (e.g., stuffAndNonsense) to have sequentially numbered error logs kept in the directory from which Etomo was started. ETOMO_LOGS_TO_RETAIN Set this to the number of log files named by date and time to retain in the directory where they are kept. The default is 31 if this variable is not set. ETOMO_MEM_LIM Memory limit for running Etomo. Define this as a number of megabytes followed by the letter "m". The default of 512m is set in the etomo startup script. Larger values will allow larger final alignment logs to be displayed. ETOMO_NAMING_STYLE The naming style when starting a project in Etomo: 0 for old- style with descriptive extensions, 1 for extension ".mrc", or 2 for extension ".hdf". The --namingstyle option to Etomo overrides this variable setting. Note that without this variable set, setting IMOD_OUTPUT_FORMAT to MRC or HDF will make Etomo assume naming style 1 or 2, respectively, but setting this ETOMO_NAMING_STYLE overrides this effect of IMOD_OUTPUT_FORMAT on the naming style. ETOMO_THREAD_LIM Thread limit for running Etomo. Define this to set a number for the thread limits set by these options: -XX:ConcGCThreads, -XX:ParallelGCThreads, and (for Java version 1.8 build 191 or higher) -XX:ActiveProcessorCount. The default is the minimum of 16 and the number of logical processors on the system (i.e., including hypercores). These limits are intended to prevent very large numbers of threads from being used by Java on machines with large numbers of cores. FINDWARP_LEGACY_RATIOS Set to 1 to force Findwarp to use an older method of computing the ratio of measurements to unknown values even for new data, or -1 to make it use the newer method even with older data. IGNORE_BAD_EER_ENDING Set to 1 to ignore the final pixel position being more than one past the end of the image when reading an EER file, or 0 to give an error as usual, overriding the flag that the calling program might have set to ignore the error. IMOD_ALL_BIG_TIFF Set to 1 to make all new TIFF files be opened in the newer format that allows files bigger than 4 GB, even when it is not known at the time of opening that the file will be large. Currently only Mrc2tif and Newstack will write a multi- image TIFF file bigger than 4 GB in the correct format. This variable would need to be set to get other other programs to write large TIFF files correctly. However, with it set, smaller TIFF files written by those programs (except 3dmod snapshots) will be unreadable by other software that does not read large files. IMOD_AUTOSAVE Interval at which 3dmod should autosave the model, in minutes (superceded by setting in 3dmod preferences). IMOD_AUTOSAVE_DIR Directory into which 3dmod should autosave the model (superceded by setting in 3dmod preferences). IMOD_BRIEF_HEADER If this variable is set (no value needed), all Fortran programs except header will output a brief header with the dimensions, pixel size, mode, minimum, maximum, and mean value, and the first and last title. If it is set to a value greater than 1, the blank line at the end will also be omitted. IMOD_CALIB_DIR Directory in which IMOD-related information can live, unaffected by upgrading the main IMOD directory. Set by startup scripts to /usr/local/ImodCalib. IMOD_DIR The path to the top IMOD directory; set by startup scripts, or can be set before startup script is run. IMOD_DUMP_FSCACHE Makes 3dmod tell the system to dismiss the file system cache while loading a file on Linux. This behavior was originally the default because, on early 64-bit systems with files bigger than about half of the system memory capacity, the system would swap out data within 3dmod while loading. This bad system behavior was no longer observed in testing on FC4, RHEL4 and RHEL5. Set this variable (no value needed) for working on systems that show this problem or to clear the cache in order to experiment with file access times. IMOD_FORCE_OMP_THREADS Sets the number of threads for operations in IMOD parallelized with OpenMP. Almost all such operations set an optimal thread number based on the size of the computation (e.g., image size), to avoid inefficient use of resources. They then call the library function numOMPthreads, which limits this number both by the number of physical cores and by a value set by the environment variable OMP_NUM_THREADS. If IMOD_FORCE_OMP_THREADS is set, it overrides all of these limits and sets the thread number directly. Set it to a specific number, to ALL_CORES for the number of physical cores, or to ALL_HYPER for the number of logical cores with hyperthreading, if any. Some routines have arrays of fixed sizes used for threads; these will still use no more than 16 threads. IMOD_HDF_COMPRESSION Sets the index for ZIP compression when writing to an HDF file. Compression values can range from 1 (fastest, least compressed) to 9 (slowest, most compressed). A value set by this variable is overridden by an explicit entry to a program that provides an option for setting this compression level (e.g., the -compression option Newstack, or the -quality option to Makepyramid). IMOD_IGNORE_MRC_INVERTED This variable can prevent reading in MRC files inverted; set it to the sum of 1 to prevent inversion of FEI files recognized as inverted, and 2 to prevent inversion if the "mapr" header value is -2. IMOD_JAVADIR Location of Java to be used to run Etomo; $IMOD_JAVADIR/bin is put on the front of the path in the etomo startup script. IMOD_JPEG_QUALITY Sets the quality level for JPEG output from programs other than Mrc2tif and 3dmod; values between 25 and 100 are meaningful. IMOD_JPEG_RESOLUTION Sets the resolution in dots per inch stored in JPEG files produced by programs other than Mrc2tif and 3dmod. This is limited to a 16-bit integer (65535) and cannot encode pixel sizes below 400 nm. IMOD_M1_CURSOR_FIX If this variable is set (no value needed), it activates the fix for cursor problems originally present on the M1 Mac. The problem seems to have been solved in OS 11.5, so the fix is not used by default. IMOD_PHYSICAL_MEMORY Set this variable to the number of megabytes of memory that should be assumed by the function that programs used to determine the amount of system memory. The value must be at least 10. The output of the function can be seen by running "imodqtassist -t". IMOD_NO_IMAGE_BACKUP If this variable is set (no value needed), virtually all programs that create image files will no longer back up an existing file by adding ~ to the name. Instead, they will overwrite the file. IMOD_OUTPUT_FORMAT Sets the default file format for new files created by virtually all IMOD programs. Possible settings are MRC, HDF, TIFF (or TIF), and JPEG (or JPG). TIFF and JPEG output will work only for programs that output data as whole images instead of in chunks; JPEG output must be byte or RGB mode and will only work when writing a single section to the output file. IMOD_PLUGIN_DIR Main directory for IMOD plugins; set by startup scripts to be inside IMOD. IMOD_PERMISSION_ERROR_OK Set to any value to prevent warnings or errors from setting permissions in b3dcopy and Vmstopy when they are run with their respective -p options. IMOD_PROCESSORS Number of processors in the computer; used by Slicer and Isosurface to limit how many threads to run in parallel, and also used to create a parallel processing table in Etomo when cpu.adoc is not found. Slicer and Isosurface, like all other threaded processing in IMOD, are also limited to the number of physical cores in the computer and the setting of OMP_NUM_THREADS. IMOD_PS_FONT Name of a font (instead of Helvetica) to use in the Postscript output from various graphics programs; Arial is good for going to Illustrator. IMOD_QTSCALE_MIN_DPI Minimum DPI for 3dmod, Midas, and Ctfplotter to scale fonts and spacings on Linux by physical DPI divided by 96. The default value is 120 when this variable is not set. IMOD_QUEUE_INIT_WAIT Wait time in seconds after running the command to initialize a queue in Processchunks. The value must be -1 for an indefinite wait, or a positive value up to 2000000. IMOD_QTLIBDIR Directory in which IMOD's copy of Qt lives, if any. Set by IMOD startup scripts. IMOD_READ_EER_ANTIALIASED Use antialiasing when reading from an EER file with super- resolution 0 or 1. Set to 1 to use the Lanczos 2 filter function or 2 to use the Mitchell function. IMOD_READ_EER_SUPER_RES Amount of super-resolution to retain when reading from a file with the EER format. Set to 0 for no super-resolution, 1 for 2x2 subpixel resolution, or 2 for 4x4, or to a negative value of -1 to -3 for further reduction by 2, 4 or 8. This setting affects all programs that do not have options to manage the resolution themselves (currently 3dmod, Clip, and Alignframes). IMOD_DFLT_EER_SUPER_RES Default amount of super-resolution to retain when reading an EER file, for programs that do have an option to set this parameter (currently 3dmod, Clip, and Alignframes). In 3dmod, the variable will override both the program's default and a preference set in the Options dialog. IMOD_READ_EER_Z_SUMMING Number of frames to sum when reading from a file with the EER format, or the negative of the number of summed frames to read. When a positive summing value does not evenly divide the total number of frames, the specified frame summing is the maximum summing that will occur, and the frames will be distributed as evenly as possible, with the summing lower by 1 at the beginning of the stack. This setting affects all programs that do not have options to manage the resolution themselves (currently 3dmod, Clip, and Alignframes). IMOD_DFLT_EER_Z_SUMMING Number of frames to sum when reading from a file with the EER format, or the negative of the number of summed frames to read, for programs that do have an option to set this parameter (currently 3dmod, Clip, and Alignframes). In 3dmod, the variable will override both the program's default and a preference set in the Options dialog. IMOD_STEREO_COMMAND When using obsolete hardware stereo, system command for switching the monitor to display left and right buffers in overlapping fashion. IMOD_STEREO_RESTORE System command for switching the monitor back to normal mode. IMOD_STEREO_TBOFFSET Default value of vertical offset when using top/bottom stereo display. IMOD_TIFF_COMPRESSION Sets the type of compression for TIFF files output by programs other than Mrc2tif. Must be set to an integer value: 1 for none, 5 for LZW, 7 for JPEG, 8 for ZIP, or other values listed in the Mrc2tif manpage. IMOD_TIFF_QUALITY Sets the quality level for TIFF compressed files output by programs other than Mrc2tif. Values should be between 1 and 9 for ZIP compression and between 25 and 100 for JPEG compression. IMOD_TIFF_RESOL_PER_INCH Set this variable to any value to have the pixel size stored in a TIFF file as dots per inch instead of dots per cm, as they were prior to IMOD 4.11. This does not apply to 3dmod snapshots, which are always saved with dots per inch. IMOD_NO_TIFF_MEM_MAP Set this variable to any value to disable memory mapping when reading TIFF files, which can greatly increase the memory usage for large files. IMOD_TMPDIR Path for temporary directory used by scripts. On Windows, this can be in Cygwin or Windows format, with forward or back slashes. IMOD_USE_GPU IMOD_USE_GPU2 These variables will tell the Tilt and Ctfphaseflip programs to use the GPU on a CUDA-capable NVIDIA graphics card. Set the variable to 0 to use the best available GPU, or to a positive number to specify the GPU to use. If there is only one GPU, 0 and 1 have the same effect. The setting with IMOD_USE_GPU is overridden by the UseGPU entry to the program, if any, while a setting with IMOD_USE_GPU2 overrides the UseGPU entry. IMOD_WRITE_FLOATS_16BIT This variable sets the default for whether floating point MRC output files are written as mode 2 (32-bit) or mode 12 (16-bit). When it is set to non-zero, the default is for floating point files to be written in mode 12. Otherwise, the default is to write them as mode 2, even when the input file is mode 12. The variable setting will be overridden by an option entry in any program that has an option to set the output mode. INVERT_MRC_ORIGIN This variable can be used to override the default setting for whether origin values are written to an MRC file with the internal IMOD convention, in which subareas have more negative origin values, or with an inverted sign that corresponds to the MRC standard. Set the variable to 1 to have origins written with the MRC standard sign, or 0 to have them written with the internal IMOD sign. The default was changed in IMOD 4.10.44 to write with the MRC standard sign. MIDAS_BIN_TO_TARGET Set this variable to a desired size to have Midas set the image binning to the value that makes the binned size closest to the specified size. The geometric mean of the sizes in X and Y is used for the image size. For example, a value of 1200 makes it set the binning to 2 for images of 1600 to 2800 pixels, 3 for images of 2800 to 4110 pixels, etc. Entering a specific binning with the -B option will override this automatically selected binning. MIN_BRIDGE_CONNECT_NUM This variable sets a minimum value for connection point numbers that will be used to define the place where two contours on the same plane should be bridged in order to mesh with a single contour on an adjacent section. If the connection point numbers for bridging are set to this minimum or higher, and other connection point numbers are lower, then those other connection points will not be mistakenly used for defining bridge locations. MODEL2POINT_INTEGERS Set this variable to any value to make Model2point output integers by default, its behavior before IMOD 4.10.35. MULTI_PROC_CPU_LIST This variable is used by Processchunk(1) when running multi- processor jobs to tell the jobs what the current CPU machine list is. MULTI_PROC_GPU_POOL This variable is used by Processchunk(1) when running multi- processor jobs to tell the jobs what the current pool of allocatable GPUs is. MULTI_PROC_THREAD_LIMIT This variable is used by Processchunk(1) when running multi- processor jobs to tell the jobs what the current thread limit is. MULTI_PROC_QUEUE_COMMAND This variable is used by Processchunk(1) when running multi- processor jobs to provide a command for the jobs to run tasks on a cluster queue. MULTI_PROC_MAX_QUEUE_JOBS This variable is used by Processchunk(1) when running multi- processor jobs to tell the jobs how many tasks should be submitted together to the cluster queue. MULTI_PROC_JOB_CORES This variable is used by Processchunk(1) when running multi- processor jobs on a queue to tell the jobs how many cores are available to each job; in this case, MULTI_PROC_QUEUE_COMMAND is not set. MULTI_PROC_JOB_GPUS This variable is used by Processchunk(1) when running multi- processor jobs to tell the jobs how many GPUs are directly available to each job. MULTI_PROC_GPU_QUEUE This variable is used by Processchunk(1) when running multi- processor jobs to provide a secondary queue that can be used for GPU operations. MULTI_PROC_MAX_GPU_JOBS This variable is used by Processchunk(1) when running multi- processor jobs to tell the jobs the maximum number of tasks should be submitted together on the secondary queue. PARALLEL_BOUNDARY_SIZE Set this variable with the default number of pixels to use for the boundary region when writing in parallel to an MRC file. This value will override the built-in default of 2048 provided that it is greater than that default; options to Splittilt, Sirtsetup(10), Splitcorrection, and Splitblend for setting the size of the boundary region will in turn override this value. PARALLEL_HDF_BUF_SIZE Set this variable with the number of megabytes to allocate for buffering data when writing to an HDF file in parallel from multiple processes. The default is 20. PIP_PRINT_ENTRIES Set this variable to 1 to enable printing of all options entered into a program using PIP input or 0 to disable it. The variable is automatically set to 1 when running programs through command files (i.e., vmstocsh and vmstopy both add lines to their output to set the variable to 1). Thus, if you leave the variable unset in your environment, entries will be printed in programs run through "subm" but not when programs are run at the command line. If you want the output when running at the command line, set the variable to 1 in your environment. To avoid this output when running a command file, add a line $setenv PIP_PRINT_ENTRIES 0 at the beginning of the file. PLAX_REDRAWS If there is trouble with the "plax" window used by Fortran graphics programs not updating properly, set this variable to the number of times for it be drawn (try 2 or 3). These programs include nda, sda, mtk, genhstplt, mtoverlap, mtpairing, avgstatplot, and filterplot. QT_SCALE_FACTOR Can be set on Linux to override the high-DPI scaling determined by 3dmod, Midas, and Ctfplotter on program startup. RAPTOR_BIN Directory where alternative RAPTOR executables are located; leave this undefined to run the executables in IMOD. READ_MODE0_SIGNED Set this variable non-zero to override the default for whether an MRC file in mode 0 should be read as signed or unsigned bytes. Potential values are: -2 to read all mode 0 files as unsigned, even ones with an IMOD stamp -1 to read mode 0 files lacking an IMOD stamp as unsigned 1 to read mode 0 files lacking an IMOD stamp as signed 2 to read all mode 0 files as signed, even ones with an IMOD stamp The values of -1 and 1 could be useful if a file header has incorrect entries for the minimum and maximum. Values of -2 or 2 would be needed if other software changed the representation of bytes in a file without modifying the IMOD stamp and flag values. RUNCMD_VERBOSE Set this variable to 1 to have the runcmd function called by Python programs print each command, input to the command, and the output of the command unless the output was already printed on standard out. SKIP_PHYSICAL_DPI Set this variable to a nonzero value to prevent the wrapper scripts for Qt-based programs from trying to run imodqtassist to get the physical DPI. This must be set to run Ctfplotter automatically in Linux when there is no display. SUBM_LOG_TYPE Set this variable to a positive value up to 4 to have subm (submfg) produce sequentially numbered log files with the given number of digits, or to -1 to -3 to have a date-time stamp attached the log file name. SUBM_MESSAGE Set this variable to an alternative message to be used when subm (submfg) completes execution of a command file. TIFF_RES_PIXEL_LIMIT This variable sets an upper limit on the pixel size, in microns, that is set when reading a TIFF file that has resolution tags in it. This setting affects whether tif2mrc automatically puts a pixel size from the TIFF input into the output file, and whether 3dmod thinks that a read-in TIFF file has a pixel size other than 1. The default value is 3.0 microns. TIFF_STRING_TAG_TO_PRINT This variable specifies the number of a tag for a field in a TIFF file containing a string. When a TIFF file is opened, the string will be printed if the field exists. TIFF_WRITE_THREAD_LIMIT This variable sets an upper limit on the number of threads used when writing a TIFF file with compression in parallel. Only a positive value has any effect. TILECACHE_LIMIT_MB The variable sets the default limit on the size of the tile/strip cache in 3dmod when an image pyramid is displayed and the cache size is not specified with the -C or -CT option. The value should be an integer specifying the size in megabytes. The default in 3dmod is 20000. TILTALIGN_SKIP_CROSS_VAL Set this variable (no value needed) to make Tiltalign skip doing cross-validation even when specified by the CrossValidate option; Bead Fixer uses this variable. WRITE_MODE0_SIGNED Set this variable to 0 to have all MRC files in mode 0 written as unsigned bytes, which was the convention used by IMOD prior to 4.8.24 but is contrary to the current MRC standard. Build and Test Variables BRT_TEST_OPTIONS When the Batchruntomo test is run in the nightly ImodTests, this variable can be set to provide options in place of "-cpu 2". BRT_TEST_SOURCE_DIR If this environment variable is set to a location where the stacks BBa.st and BBb.st are located, the nightly tests in ImodTests will include a reconstruction of this data set with Batchruntomo. CUDA_DIR Directory with CUDA toolkit, must be defined to enable building with CUDA. CUDA_BIN_PATH On Windows, this must be defined as the location of CUDA binaries if they are not in $CUDA_DIR/bin CUDA_LIB_PATH On Windows, this must be defined as the location of CUDA libraries if they are not in $CUDA_DIR/lib IMOD_ALTOOL_USERNAME Apple ID to be used as a username when attempting to notarize a Mac installer package with the script notarize.sh. This script expects that the password used with the notarizing command is in the login toolchain and named ALTOOL_PASSWORD. IMOD_DEBUG_CHECKSUM If defined, enables output of components of the model checksum. IMOD_FFTW_TIMING If defined, enables output from the FFTW wrapper routine about the number of threads used and the time consumed. IMOD_MAC_DEV_INST_ID If defined with the name of a Mac Developer Installer ID, the IMOD build script will skip building an installer package built when a release is being done. The script dist/Mac- Packages/notarize.sh can then be run from a Terminal; IMOD_ALTOOL_USERNAME must also be defined. IMOD_MESH_TIMING If defined, enables output from the imeshSkinObject function about the time consumed in each step. IMOD_PHYSICAL_DPI Used in 3dmod, Midas, Ctfplotter, and graphing program startup scripts on Linux to tell the programs the physical monitor DPI. IMOD_REPORT_CORES If defined, enables output from the numOPMthreads routine about the number of physical and logical processors and its decision on how to limit the number of threads. IMOD_SETUP_USE_MKL Make the default for IMOD setup to be to use MKL. IMOD_SIGNWRAPPER If this variable is set with he full path to a script for signing Windows executables and DLLs, then installqtlib will sign the files. IMOD_TEST_SECTION This is passed to the uitest script when running Etomo tests. It is used to choose one of the tests in uitest.adoc. IMOD_UITEST_DATA When running Etomo tests, the root directory for data files. IMOD_UITEST_SCRIPT This is used in uitest.make. It should be set to the location of the uitest script IMOD_UITEST_SOURCE When running Etomo tests, the location of the uitest.adoc and all autodocs it refers to. JAVA_DIR Location of Java SDK to be used by the IMOD build and test script. MSVCREDIST Location of Microsoft Visual C redistributable run-time libraries that are to be copied when building a distribution. When this is defined, manifests are also added to all executables. QTDIR Location of Qt, or at least of Qt bin directory if include is elsewhere. SCRIPT_TEST_DIR An alternate location for Python source scripts run by the tests in ImodTests/scriptTests. SIGNWRAPPER If this variable has a full Cygwin path to a script for signing Windows executables and DLLs, then the IMOD build and test script will set IMOD_SIGNWRAPPER with it to make installqtlib sign the files, then sign install packages. SOLVEMATCH_TEST Set this variable to prevent Solvematch from exiting with error when given a data set with relative coordinates. TEST_ALIGNFRAMES_GPU Set this variable to run the Alignframes test ImodTests/xformTests with GPU. WINKITREDIST Location of redistributable libraries in a Windows Kit to be copied when building a distribution. IMOD 5.0.2 imodenv(1)