Skip to content

Commit

Permalink
fix mda import problems
Browse files Browse the repository at this point in the history
Chain number was off by 1 when imported from MDA, also removed addition of animate frames node when number of frames was == 1 through MDA import which was showing up as nothing.
  • Loading branch information
BradyAJohnston committed Jul 17, 2022
1 parent c40c5b5 commit a061a96
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Binary file added release/molecular_nodes_0.10.2.zip
Binary file not shown.
Binary file modified serpens_plugin_file.blend
Binary file not shown.
6 changes: 5 additions & 1 deletion src/CustomNodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ def create_node_group(node_name, input_list, label_prefix = "Chain "):
node_name = "MOL_" + str(output_name) + "_selection_chain"

# finally make the selection node!
create_node_group(node_name, chain_list)
create_node_group(
node_name = node_name,
input_list = chain_list,
label_prefix = "Chain"
)

# node = bpy.context.selected_nodes[0]
# bpy.ops.transform.translate('INVOKE_DEFAULT')
3 changes: 2 additions & 1 deletion src/mda_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def create_prop_AtomicNum_ChainNum_NameNum(univ, name, collection):
name=name,
collection=collection,
prop_x=prop_elem_num,
prop_y=prop_chain_num,
prop_y=prop_chain_num + 1, # to have the first chain be index from 1
prop_z=prop_name_num,
n_atoms=n
)
Expand Down Expand Up @@ -410,6 +410,7 @@ def create_frames(universe, collection, start=1, end=50000, time_step=100, name=
)
counter += 1

n_frames = len(u.trajectory)

# create the frames from the given universe, only along the given timesteps
create_frames(
Expand Down

0 comments on commit a061a96

Please sign in to comment.