Skip to content

Commit

Permalink
Merge pull request #156 from BradyAJohnston/152-md-chain
Browse files Browse the repository at this point in the history
add `chain_id_unique` on md import, to enable custom built nodes when importing via MDAnalysis
  • Loading branch information
BradyAJohnston authored Feb 10, 2023
2 parents 3c45ad7 + 7781d3b commit a7d7f54
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MolecularNodes/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def att_chain_id():
chain_id = univ.atoms.chainIDs
chain_id_unique = np.unique(chain_id)
chain_id_num = np.array(list(map(lambda x: np.where(x == chain_id_unique)[0][0], chain_id)))
mol_object['chain_id_unique'] = chain_id_unique
return chain_id_num

# returns a numpy array of booleans for each atom, whether or not they are in that selection
Expand Down

0 comments on commit a7d7f54

Please sign in to comment.