Skip to content

Commit

Permalink
More renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
jojoelfe committed May 24, 2024
1 parent 9ed607a commit 5f11a4d
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/05_spa_annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ This tutorial uses single particle analysis tutorial data from Relion 4.0.
Download instruction are [here](https://relion.readthedocs.io/en/release-4.0/SPA_tutorial/Introduction.html).
You will only need the precalculated results.

## Starfile panel
## Annotation panel

In the Import panel of Molecular Nodes change the type to starfile.
In the Import panel of Molecular Nodes change the type to `Annotation`.

![](https://i.imgur.com/aj7wCXP.png)

Expand Down
Binary file not shown.
Binary file removed molecularnodes/assets/MN_data_file_starfile.blend
Binary file not shown.
6 changes: 3 additions & 3 deletions molecularnodes/blender/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ def get_style_node(object):

def annotation_instances_node(group):
prev = previous_node(get_output(group))
is_annotation_instances_node = ("MN_starfile_instances" in prev.name)
is_annotation_instances_node = ("MN_annotation_instances" in prev.name)
while not is_annotation_instances_node:
prev = previous_node(prev)
is_annotation_instances_node = ("MN_starfile_instances" in prev.name)
is_annotation_instances_node = ("MN_annotation_instances" in prev.name)
return prev


Expand Down Expand Up @@ -428,7 +428,7 @@ def create_starting_nodes_annotation_instances(object, n_images=1):
node_output = get_output(group)
node_input.location = [0, 0]
node_output.location = [700, 0]
node_annotation_instances = add_custom(group, 'MN_starfile_instances', [450, 0])
node_annotation_instances = add_custom(group, 'MN_annotation_instances', [450, 0])
link(node_annotation_instances.outputs[0], node_output.inputs[0])
link(node_input.outputs[0], node_annotation_instances.inputs[0])

Expand Down
6 changes: 3 additions & 3 deletions molecularnodes/io/parse/star.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ def _rehydrate_ensembles(scene):
if hasattr(obj, 'mn') and 'molecule_type' in obj.mn.keys():
if obj.mn['molecule_type'] == 'star':
ensemble = StarFile.from_blender_object(obj)
if not hasattr(bpy.types.Scene, 'MN_starfile_ensembles'):
bpy.types.Scene.MN_starfile_ensembles = []
bpy.types.Scene.MN_starfile_ensembles.append(ensemble)
if not hasattr(bpy.types.Scene, 'MN_annotation_ensembles'):
bpy.types.Scene.MN_annotation_ensembles = []
bpy.types.Scene.MN_annotation_ensembles.append(ensemble)

class StarFile(Ensemble):
def __init__(self, file_path):
Expand Down
4 changes: 2 additions & 2 deletions molecularnodes/io/star.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
bpy.types.Scene.MN_import_star_file_name = bpy.props.StringProperty(
name='Name',
description='Name of the created object.',
default='NewStarInstances',
default='NewAnnotationInstances',
maxlen=0
)


def load(
file_path,
name='NewStarInstances',
name='NewAnnotationInstances',
node_setup=True,
world_scale=0.01
):
Expand Down
2 changes: 1 addition & 1 deletion molecularnodes/ui/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
('local', "Local", "Open a local file", 1),
('md', "MD", "Import a molecular dynamics trajectory", 2),
('density', "Density", "Import an EM Density Map", 3),
('star', 'Starfile', "Import a .starfile mapback file", 4),
('star', 'Annotation', "Import an annotation file", 4),
('cellpack', 'CellPack', "Import a CellPack .cif/.bcif file", 5),
('dna', 'oxDNA', 'Import an oxDNA file', 6)
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_star.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ def test_rehydration(tmp_path):
bpy.ops.wm.read_homefile()
assert ensemble._update_micrograph_texture not in bpy.app.handlers.depsgraph_update_post
bpy.ops.wm.open_mainfile(filepath=str(tmp_path / "test.blend"))
new_ensemble = bpy.types.Scene.MN_starfile_ensembles[0]
new_ensemble = bpy.types.Scene.MN_annotation_ensembles[0]
assert new_ensemble._update_micrograph_texture in bpy.app.handlers.depsgraph_update_post
assert new_ensemble.data.equals(ensemble.data)

0 comments on commit 5f11a4d

Please sign in to comment.