技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
mdanalysis【数据与研究】Use MDAnalysis to load molecular simulation data, select atoms, run analyses, transform trajectories, write outputs, and diagnose format or optional dependency issues.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task mentions MDAnalysis, MDAnalysis, mda.Universe, atom selections, molecular dynamics trajectories, topology/coordinate formats, MDAnalysis.analysis, on-the-fly transformations, or converter/optional-format errors.
MDAnalysis is a Python toolkit for analyzing molecular simulation systems. Its core pattern is: create a Universe, select atoms, iterate or transform trajectories, run analysis classes/functions, and optionally write new coordinate or trajectory outputs.
python -m pip install MDAnalysis; add narrow optional packages only when a workflow requires them.python -c "import MDAnalysis as mda; print(mda.__version__)".python scripts/check_mdanalysis_install.py from this skill directory.references/troubleshooting.md before trying broad optional extras.sub-skills/universe-io/SKILL.md for Universe(...), Universe.empty(...), topology/trajectory pairing, trajectory iteration, Merge, load_new, and basic writers.sub-skills/selections-topology/SKILL.md for selection strings, sorted/updating selections, topology attributes, groups, fragments, bonds, guessing, and selection exporters.sub-skills/analysis-workflows/SKILL.md for AnalysisBase, RMSD/RMSF, alignment, contacts, distance arrays, RDF, hydrogen bonds, results containers, slicing, and backends.sub-skills/transformations-writing/SKILL.md for translate, wrap, unwrap, center_in_box, fit_rot_trans, NoJump, transformation order, and transformed-output writing.sub-skills/formats-converters/SKILL.md for supported format families, explicit format= or topology_format=, optional dependencies, RDKit/OpenMM/ParmEd converters, auxiliary data, and PDB fetching.universe-io to build u = mda.Universe(topology, trajectory), selections-topology to form stable AtomGroups, then analysis-workflows for module-specific results.Universe.empty(..., trajectory=True) plus bundled smoke scripts when a user wants runnable code without molecular data files.transformations-writing to define transformations and output safety checks, then use universe-io for writer factory and atom-count details.formats-converters to map the failed format/converter to a narrow package instead of installing every optional extra.analysis-workflows when a loop should become an AnalysisBase subclass with deterministic results and validated frame slicing.references/package-overview.md summarizes the package surface, object model, install variants, and how the sub-skills fit together.references/troubleshooting.md covers cross-cutting install/import, data, optional dependency, and API-misuse failures.references/repo-provenance.md records the source evidence baseline for future refresh decisions.references/repo-routing-metadata.json is structured metadata for the managed repo-skills router.scripts/check_mdanalysis_install.py verifies import, version, synthetic Universe.empty, selection, and a tiny distance calculation.sorted=False or non-selection group operations are intentionally used.import MDAnalysis as mda
u = mda.Universe.empty(3, n_residues=1, trajectory=True)
u.add_TopologyAttr("names", ["N", "CA", "C"])
protein_backbone = u.select_atoms("name N CA C")
print(protein_backbone.n_atoms)
Use the sub-skills for production recipes, troubleshooting, and format-specific details.