Replies: 1 comment
-
I haven't done any solvation analysis myself, but it seems like this would be a good feature for people who wish to do so. I am unfamiliar with solvation analysis myself, but it seems that it would be on a frame-by-frame basis that the selection would be applied. Rather than having to re-import the selection for each frame that you wish, you could apply it to the frames themselves as an attribute: MolecularNodes/MolecularNodes/md.py Lines 255 to 271 in 4c19d04 This is the loop in The same principle can be applied to the solvation shell selection, or really any frame-by-frame selection. If you have a new for ts in traj:
frame = create_object(
name = name + "_frame_" + str(ts.frame),
collection = coll_frames,
locations = univ.atoms.positions * world_scale
)
if solvation_shell:
try:
add_attribute(frame, 'solvation_selection_name', solvation_selections[ts.frame])
except:
solvation_shell = False
# adds occupancy data to each frame if it exists
# This is mostly for people who want to store frame-specific information in the
# b_factor but currently neither biotite nor MDAnalysis give access to frame-specific
# b_factor information. MDAnalysis gives frame-specific access to the `occupancy`
# so currently this is the only method to get frame-specific data into MN
# for more details: https://github.com/BradyAJohnston/MolecularNodes/issues/128
if add_occupancy:
try:
add_attribute(frame, 'occupancy', ts.data['occupancy'])
except:
add_occupancy = False I'm not sure how the structure of the solvation shell is, you have have to use something like |
Beta Was this translation helpful? Give feedback.
-
Right now, I am using SolvationAnalysis to make the shell selection given a frame input:
Then for that given frame I will output this based on solute_idx = 603.
Since frame 0 has ~15 solute indices (i.e. 15 solvation shell selections) and I am loading it directly into add_attribute() as boolean selections.
Here are the selections below:
Example structure ea_fec.
Enable multiple selections for specified solvation shell. Would this be a helpful feature?
Beta Was this translation helpful? Give feedback.
All reactions