-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Describe the bug
Creating labelled structured fails when running the vLab4Mic_main notebook if the selected probe is HIV_capsid_p24_direct and using custom parameters
To Reproduce
Steps to reproduce the behavior:
- Launch the notebook
- Run first two cells selecting virus capsid as struture
- Run third cell, select HIV_capsid_p24_direct
- Toggle advanced parameters
- Add probe with custom parameters
- Select probes and create labelled structure
Expected behavior
Probe should be loaded as using the custom parameters without changing any value should work out of the box or at least make it perfectly clear which parameters are intended to be used.
Screenshots
Error logs:
`TypeError Traceback (most recent call last)
File ~/Code/SupraMolecularSimulator/src/vlab4mic/jupyter_widgets/_experiment_parameters.py:278, in ui_select_probe..create_particle(b)
276 probes_gui["message2"].value = "Creating labelled structure..."
277 with io.capture_output() as captured:
--> 278 experiment.build(modules=["particle"])
279 probes_gui["add_probe"].disabled = True
280 probes_gui["create_particle"].disabled = True
File ~/Code/SupraMolecularSimulator/src/vlab4mic/experiments.py:670, in ExperimentParametrisation.build(self, use_locals, modules, **kwargs)
668 self._build_structure()
669 if "particle" in build_list:
--> 670 self._build_particle(keep=use_locals)
671 if "coordinate_field" in build_list:
672 self._build_coordinate_field(
673 use_self_particle=use_locals, keep=use_locals
674 )
File ~/Code/SupraMolecularSimulator/src/vlab4mic/experiments.py:493, in ExperimentParametrisation._build_particle(self, lab_eff, defect_build, keep)
491 labels_list = self._build_label(lab_eff=lab_eff)
492 if len(labels_list) > 0:
--> 493 particle, label_params_list = particle_from_structure(
494 self.structure, labels_list, self.configuration_path
495 )
496 if self.defect_eps["use_defects"]:
...
--> 129 p2 = p1 + np.array(self.params["axis"]["direction"])
130 pivots = np.array([p1, p2])
131 # print(f"pivots are: {pivots}")
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'`