pwem package


Module contents

This module contains classes related with EM

class pwem.Config[source]

Bases: Config

CUDA_BIN = '/usr/local/cuda/bin'
CUDA_LIB = '/usr/local/cuda/lib64'
EM_ROOT = '/home/buildbot/devel/scipion/software/em'
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

  • 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

  • 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

  • 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

  • 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