Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flow improvements: add possible outputs and binThreads #904

Merged
merged 4 commits into from
Mar 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion xmipp3/protocols/protocol_align_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ class XmippProtAlignVolume(ProtAlignVolume):
_label = 'align volume'
nVols = 0
_devStatus = PROD

OUTPUT_NAME1 = "outputVolume"
OUTPUT_NAME2 = "outputVolumes"
_possibleOutputs = {OUTPUT_NAME1: Volume,
OUTPUT_NAME2: SetOfVolumes}

def __init__(self, **args):
ProtAlignVolume.__init__(self, **args)
Expand Down
8 changes: 8 additions & 0 deletions xmipp3/protocols/protocol_convert_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ def _defineParams(self, form):

# Defining parallel arguments
form.addParallelSection(threads=4, mpi=1)
form.addParam('binThreads', params.IntParam,
label='threads',
default=2,
help='Number of threads used by Xmipp each time it is called in the protocol execution. For '
'example, if 3 Scipion threads and 3 Xmipp threads are set, the pdbs will be '
'processed in groups of 2 at the same time with a call of Xmipp with 3 threads each, so '
'6 threads will be used at the same time. Beware the memory of your machine has '
'memory enough to load together the number of pdbs specified by Scipion threads.')

# Generating form
form.addSection(label='Input')
Expand Down
4 changes: 3 additions & 1 deletion xmipp3/protocols/protocol_preprocess/protocol_preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,13 @@ class XmippProtPreprocessParticles(XmippProcessParticles):
apply threshold, etc """
_label = 'preprocess particles'
_devStatus = PROD
_possibleOutputs = {"outputParticles": SetOfParticles}

# Normalization enum constants
NORM_OLD = 0
NORM_NEW = 1
NORM_RAMP =2

def __init__(self, **kwargs):
XmippProcessParticles.__init__(self, **kwargs)

Expand Down
2 changes: 2 additions & 0 deletions xmipp3/protocols/protocol_preprocess_micrographs.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class XmippProtPreprocessMicrographs(ProtPreprocessMicrographs):
You can crop borders, remove bad pixels, etc. """
_label = 'preprocess micrographs'

_possibleOutputs = {OUTPUT_MICROGRAPHS: SetOfMicrographs}


def __init__(self, **args):
ProtPreprocessMicrographs.__init__(self, **args)
Expand Down
2 changes: 2 additions & 0 deletions xmipp3/protocols/protocol_volume_adjust_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class XmippProtVolAdjBase(EMProtocol):
""" Helper class that contains some Protocol utilities methods
used by both XmippProtVolSubtraction and XmippProtVolAdjust."""

_possibleOutputs = {"outputVolume": Volume}

# --------------------------- DEFINE param functions --------------------------------------------
@classmethod
def _defineParams(self, form):
Expand Down
Loading