Replies: 1 comment
-
Did you manually check the selection If this is the case, try using the same keyword to select complete residues 'same resid as (prop y >= 8.55 and prop y <= 11.25 and resname water)' Double-check manually that these selections give you what you want, i.e. if your water model contains 3 atoms, check that you have 3 atoms for each resid w = u.select_atoms('same resid as (prop y >= 8.55 and prop y <= 11.25 and resname water)')
w_groups = w.atoms.groupby("resids") # print w_groups to understand this dict!
print([resid for resid,ag in w_groups.items() if ag.n_atoms != 3]) The last line will print a list of resids for which you did NOT have all three atoms in the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using the waterdynamics.AngularDistribution function. And I want to study the water molecules in certain area (8.55 <= y <= 11.25), here is the python content. But there is an error:
Below is my python content. how can I fix this problem? And I have tried if I only select water without the y range it can work. So I guess, if it is that water molecules are not complete in my chosen and how can I do to make sure the water molecules are complete? Thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions