Skip to content

Commit

Permalink
Merge pull request #77 from scipion-em/jj_hot_fix_model_wf
Browse files Browse the repository at this point in the history
Hotfix - problem with the common model wf steps with vesicle models
  • Loading branch information
pconesa authored May 16, 2023
2 parents 576a522 + 600fefa commit b43dac6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
V3.1.19:
- Hot fix: one of the steps of the common list from the model workflow is not included in the Dynamo side. The plugin
now offers the same behavior, so this kind of models do not fail now.
V3.1.18
- Model workflow able to generate correct (coordinates of a model) and failed (meshes whose model workflow failed
and need to be fixed).
Expand Down
2 changes: 1 addition & 1 deletion dynamo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import pyworkflow.utils as pwutils
from .constants import *

__version__ = '3.1.18'
__version__ = '3.1.19'
_logo = "icon.png"
_references = ['CASTANODIEZ2012139']

Expand Down
7 changes: 4 additions & 3 deletions dynamo/protocols/protocol_model_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,15 @@ def writeMatlabFile(self, tomoId, modelName, modelFile):
codeFid.write(content)
return codeFilePath

def _genCommonModelWfSteps(self):
def _genCommonModelWfSteps(self, isVesicle=False):
"""See
https://wiki.dynamo.biozentrum.unibas.ch/w/index.php/Example_of_membrane_model_workflow_through_the_command_line"""
contentMWf = "m.mesh_parameter = %i\n" % self.meshParameter.get()
contentMWf += "m.crop_mesh_parameter = %i\n" % self.cropping.get()
contentMWf += "m.mesh_maximum_triangles = %i\n" % self.maxTr.get()
contentMWf = "m.subdivision_iterations=%i\n" % self.subDivision.get()
contentMWf += "m.controlUpdate()\n"
if not isVesicle:
contentMWf += "m.controlUpdate()\n" # This step fails for vesicle model on the Dynamo side
contentMWf += "m.createMesh()\n"
if self.doRefineMesh.get():
contentMWf += "m.refineMesh()\n"
Expand All @@ -243,7 +244,7 @@ def _genCommonModelWfSteps(self):
def genVesicleCmdFileContents(self):
# Let Dynamo approximate the geometry based on the points annotated in the boxing protocol
contentMWf = "m.approximateGeometryFromPoints()\n"
contentMWf += self._genCommonModelWfSteps()
contentMWf += self._genCommonModelWfSteps(isVesicle=True)
return contentMWf

def genSCmdFileContents(self):
Expand Down

0 comments on commit b43dac6

Please sign in to comment.