Skip to content
Back to skills

Selections Topology

ASecurity

"Use and debug MDAnalysis atom selections, topology attributes,

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
toolspythongo

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill selections-topology --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Selections Topology?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Selections Topology
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-selections-topology/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-selections-topology)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: selections-topology
description: "Use and debug MDAnalysis atom selections, topology attributes,
  groups, fragments, topology guessing, and selection exporters."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# MDAnalysis Selections and Topology

Use this sub-skill when a task involves `select_atoms()`, `AtomGroup`/`ResidueGroup`/`SegmentGroup`, topology attributes, `group` or updating selections, bonds/fragments, topology guessing, or exporting selections for another molecular tool.

## Read First

- Start with [Selection Language](references/selection-language.md) for selection grammar, keyword behavior, sorting, dynamic selections, selection groups, geometry, SMARTS, and exporters.
- Use [Topology and Groups](references/topology-groups.md) for group operations, topology attribute access, custom attributes, fragments/bonds, and topology guessing.
- Use [Troubleshooting](references/troubleshooting.md) when selections are empty, reordered, slow, dependency-sensitive, or raise `SelectionError`, `NoDataError`, `ValueError`, or optional RDKit-related errors.
- Run `python scripts/selection_probe.py` from this sub-skill directory to confirm the installed MDAnalysis selection/topology basics with only synthetic data.

## Common Task Routes

- **Selection text**: Prefer `u.select_atoms("...")` or `ag.select_atoms("...")`; remember keywords and string values are case-sensitive and selections are unique/sorted by topology index unless `sorted=False` is passed.
- **Preserve order**: For manually ordered groups such as `ag[[5, 1, 0]]`, pass `sorted=False` to `select_atoms()` or use group concatenation/slicing when duplicates must be preserved.
- **Dynamic selections**: Pass `updating=True` for an `UpdatingAtomGroup` that lazily re-evaluates after trajectory frame changes; avoid it for static topology-only selections in tight loops.
- **Topology attributes**: Add built-in attributes with `u.add_TopologyAttr("masses", values)` or custom `TopologyAttr` subclasses; selectable custom attributes need supported `dtype` values (`bool`, integer, float, string/object).
- **Cross-skill routing**: Send file loading/writing format decisions to `../universe-io/SKILL.md`, converter interoperability to `../formats-converters/SKILL.md`, and numerical distance/analysis algorithms to `../analysis-workflows/SKILL.md`.

Files in this skill

  • SKILL.md2.3 KB
  • references/selection-language.md8.3 KB
  • references/topology-groups.md7.7 KB
  • references/troubleshooting.md6.1 KB
  • scripts/selection_probe.py4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.