Migrating MDAnalysis code with ten2eleven.py

Oliver Beckstein edited this page Sep 7, 2015 · 4 revisions

Version 0.11.0 of MDAnalysis brought many changes to the API, meaning that many existing scripts will not work. But panic not, along with these changes, a tool for fixing old scripts, "ten2eleven", has been created. This page outlines how to use this tool. For a full list of changes see the the Release Notes for 0.11.0 and for a comprehensive list of changes to be made to code see the MDAnalysis 0.11 unifying release user guide.

If you have questions or problems migrating your existing code with ten2eleven, please ask for help on the user mailing list. Everyone will be more than happy to help!

Using ten2eleven

The ten2eleven tool is distributed as part of the MDAnalysis package starting from 0.11.0. To convert a script, simply call the ten2eleven function and pass it the path to the script you want to convert. This function can accept many filenames.

import MDAnalysis as mda

mda.ten2eleven('myscript.py', 'myotherscript.py')

This will then scan and correct the script in place, after creating a backup called OLDNAME.bak.

Project Information

About
GNU GPL v2 code license
Labels: python, molecular dynamics, analysis, DCD, CHARMM, LAMMPS, NAMD, Gromacs, computer simulation, atoms, coordinates, trajectory, XTC, Library, object-oriented
Core Developers

Essentials

Applications
Downloads
Install
Release Notes
Guide for Developers
Google Summer of Code

Code of Conduct

Links

@mdanalysis on Twitter
Documentation
Tutorials
Downloads (PyPi)
Mailing Lists:
User discussion group
Developer mailing list

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.