pwem package

Subpackages

Module contents

This module contains classes related with EM

class pwem.Config[source]

Bases: Config

CHIMERA_OLD_BINARY_PATH = ''
CUDA_BIN = '/usr/local/cuda/bin'
CUDA_LIB = '/usr/local/cuda/lib64'
EM_ROOT = '/home/buildbot/devel/scipion/software/em'
IMAGEJ_BINARY_PATH = ''
JAVA_HOME = ''
JAVA_MAX_MEMORY = '4'
MAX_PREVIEW_FILE_SIZE = 500.0
MPI_BINDIR = '/usr/lib64/mpi/gcc/openmpi/bin'
MPI_LIBDIR = '/usr/lib64/mpi/gcc/openmpi/lib'
XMIPP_HOME = '/home/buildbot/devel/scipion/software/em/xmipp'
class pwem.Domain[source]

Bases: Domain

class pwem.Plugin[source]

Bases: Plugin

classmethod defineBinaries(env)[source]

Define required binaries in the given Environment.

classmethod defineBinariesMaxit(default, env)[source]
classmethod getMaxitBin()[source]
classmethod getMaxitHome()[source]
classmethod getVersionFromPath(path, separator='-', default='0.0', pattern=None)[source]

Resolves path to the realpath (links) and returns the last part of the path after the separator as a Version object. If separator is not present returns None

Parameters
  • path – string containing a path with a version as part of its name

  • separator – Optional. defaults to “-“.

  • default – Optional. Default version (“X.Y” string) to return if no version is found

  • pattern – Optional. If passed, the pattern will be used to locate the folder

:return Version object filled with version found or 0.0

classmethod getVersionFromVariable(variable, default='0.0', pattern=None)[source]

Returns a Version instance from parsing the content of a variable

Parameters
  • variable – Variable name to use and parse

  • default – Optional. Default value to return in case version is not found

  • pattern – Optional. If passed, the pattern will be used to locate the folder

:return Version after parsing the variable

classmethod guessCudaVersion(variable, default='10.1')[source]

Guesses the cuda version from a variable

Parameters
  • variable – Name of a variable defined by a plugin

  • default – Default value in case cuda is not found

:return Version after parsing the variable or default

pwem.findFolderWithPattern(path, pattern)[source]

Returns the first folder found from the right that matches the pattern

Parameters
  • path – path to do the search on

  • pattern – pattern to look for. No regex for now, just a contains

:return the folder matching the pattern or None