MDAnalysis / UserGuide

User Guide for MDAnalysis
https://userguide.mdanalysis.org
22 stars 31 forks source link

Passing atomgroup as argument #336

Closed melissakcl closed 9 months ago

melissakcl commented 9 months ago

User story

When using an atomgroup as an argument in a selection command you need to include a keyword/argument to link to the specific atomgroup. This isn't included in the main doc example (https://docs.mdanalysis.org/2.6.1/documentation_pages/selections.html).

For example: interaction = water.select_atoms("around 3 global polymer", polymer=polymer)

Without the polymer=polymer keyword/argument the group can not be found.

Additional context

This requirement is specified in the "Atom Selection Language" page (https://userguide.mdanalysis.org/stable/selections.html) but I think it should be added to the main doc.