Skip to content
Back to skills

Transformations Writing

ASecurity

"Build MDAnalysis on-the-fly coordinate transformation pipelines

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
code-qualityrailsdebuggingapi

Works with

  • api

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 transformations-writing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Transformations Writing?

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

Security grade badge for Transformations Writing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-transformations-writing/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-transformations-writing)

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: transformations-writing
description: "Build MDAnalysis on-the-fly coordinate transformation pipelines
  and write transformed outputs safely."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# MDAnalysis Transformations and Writing

Use this sub-skill when a task needs MDAnalysis on-the-fly coordinate transformations, periodic-boundary cleanup, fitted/centered trajectories, or writing transformed coordinates to disk.

## Route the Task

- Use this sub-skill for `MDAnalysis.transformations`, `Universe(..., transformations=...)`, `trajectory.add_transformations(...)`, transformed `AtomGroup.write(...)`, and manual `Writer` loops.
- Read [references/transformation-api.md](references/transformation-api.md) for supported transformation signatures, ordering rules, custom transformation shape, and `max_threads` / `parallelizable` behavior.
- Read [references/writing-recipes.md](references/writing-recipes.md) for transformed snapshot/trajectory writing, atom-count checks, format inference, and temporary-output safety.
- Read [references/troubleshooting.md](references/troubleshooting.md) when transformations appear not to run, wrapping fails, `NoJump` errors, writer selection fails, or transformed output differs from analysis-time coordinates.
- Route file-format discovery, reader/writer format support, and basic `Universe` loading to [../universe-io/SKILL.md](../universe-io/SKILL.md).
- Route selection strings, `protein` / `solvent` selection debugging, topology attributes, fragments, bonds, residues, and atom grouping to [../selections-topology/SKILL.md](../selections-topology/SKILL.md).

## Recommended Workflow

1. Build selections and references first, then create a transformation list in the exact order it should run.
2. Add transformations once, either with `Universe(..., transformations=workflow)` during loading or with `u.trajectory.add_transformations(*workflow)` before iteration.
3. Sanity-check one or two frames by comparing centers, dimensions, atom counts, and expected coordinate changes.
4. Write transformed output by iterating over the transformed trajectory and writing an `AtomGroup` or `Universe`, not a raw `Timestep`.
5. Use the bundled [scripts/transformation_smoke_check.py](scripts/transformation_smoke_check.py) to verify the installed MDAnalysis transformation and writer surface with synthetic data.

## Quick Guardrails

- Transformation pipelines are immutable after they are added; create a new `Universe` to change order or add another transform.
- Transformations modify each current `Timestep` in place and are applied before `AtomGroup.positions` is exposed for that frame.
- PBC transforms such as `wrap`, `center_in_box(wrap=True)`, and `NoJump` require valid unit-cell dimensions on every relevant frame.
- `NoJump` is stateful and not parallelizable; apply it from frame 0, iterate sequentially, and avoid strided/random access unless you intentionally accept warnings.
- Writers generally require an `AtomGroup` or `Universe` and a matching `n_atoms`; do not call `writer.write(ts)` in MDAnalysis 2.x.

Files in this skill

  • SKILL.md3 KB
  • references/transformation-api.md8.7 KB
  • references/troubleshooting.md7.8 KB
  • references/writing-recipes.md6.4 KB
  • scripts/transformation_smoke_check.py4.4 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.