ReleaseNotes0110 - MDAnalysis/mdanalysis GitHub Wiki
Release 0.11.0 is a major update for MDAnalysis. It contains a number of backwards-incompatible API changes, i.e. existing code is likely to break. Additionally, some old functionality has been deprecated and will be removed for the 1.0.0 release.
The MDAnalysis 0.11 unifying release user guide should help you with porting your code. We have also included a tool ten2eleven as part of the package that automates some of the API changes in your existing code, as described in Migrating MDAnalysis code with ten2eleven.
This release brings large changes to many parts of the API and might break many existing scripts. For a full guide on the API changes, please see:
https://github.com/MDAnalysis/mdanalysis/wiki/MDAnalysis-0.11-unifying-release-user-guide
Migrating old scripts has been made easier with the introduction of the ten2eleven tool which is part of the package. Details on how to use this are available at:
https://github.com/MDAnalysis/mdanalysis/wiki/Migrating-MDAnalysis-code-with-ten2eleven.py
- Changed AtomGroup counting methods to properties with different
names (Issue #376):
-
numberOfAtoms()→n_atoms -
numberOfResidues()→ n_residues -
numberOfSegments()→n_segments
-
- Changed trajectory reader
numframes→n_frames(Issue #376) - Changed
Timestep.numatoms→n_atoms(Issue #376) - Deprecated the use of the
'fullgroup'selection keyword (Issue #268) - Changed
atom.numberattribute toatom.index(Issue #372) - Changed many AtomGroup methods to properties. These are:
indices,masses,charges,names,types,radii,resids,resnames,resnums,segids(Issue #372) -
Timestepcan now only init using an integer argument (which represents the number of atoms) (Issue #250) - Added
from_timestep()andfrom_coordinates()construction methods tobase.Timestep(Issue #250) - Removed
KDTreeandCoordinateNeighborfrom MDAnalaysis. If you want to search in cartesian coordinates directly for neighboring points use the BioPythonKDTreeor scikit-learnNeighborsmodule. TheAtomNeighborSearchclass has been ported to use the BioPython KDTree and is now located inMDAnalaysis.lib.NeighborSearch.MDAnalysis.KDTreestill exists in this version to load theNeighborSearchmodule but is deprecated and will be removed in 1.0. (Issue #383) - Moved
MDAnalysis.core.transformations→MDAnalysis.lib.transformations(Issue #287) - Moved
MDAnalysis.core.util→MDAnalysis.lib.util(Issue #287) - Moved
MDAnalysis.core.log→MDAnalysis.lib.log(Issue #287) - Moved
MDAnalysis.core.units→MDAnalysis.units(Issue #287) - Moved
MDAnalysis.core.distances→MDAnalysis.lib.distances(Issue #287) - Moved
MDAnalysis.core.parallel→MDAnalysis.lib.parallel(Issue #287) - Moved
norm(),normal(),angle(),stp()anddihedral()fromlib.utiltolib.mdamath(Issue #287) -
AtomGroup.bond,.angle,.dihedraland.impropernow return the correspondingTopologyObjectrather than performing the calculation (Issue #373) - All TopologyObjects now have a "
value()" method to evaluate them (Issue #373) -
TopologyGroupnow has a "values()" methods to evaluate all contained bonds (Issue #373) -
MDAnalysis.lib.distances.calc_torsionsrenamed →MDAnalysis.lib.distances.calc_dihedrals(Issue #373) -
TopologyGroup.selectBondsrenamed →select_bonds(Issue #389) - deprecated camelCase AtomGroup methods in favour of underscore_style (Issue #389)
- deprecated
lib.distances.applyPBCin favour ofapply_PBC(Issue #389) -
AtomGroup.res[names,ids,nums]andAtomGroup.segidsnow give arrays of equal size toAtomGroup(Issue #385) -
ResidueGroup.segidsnow gives arrays of equal size toResidueGroup(Issue #385) -
AtomGroupsettersset_<property>now plural for consistency with property names (Issue #385) -
DCDReaderno longer supports the "skip" keyword. Use slicing on reader iteration to achieve same effect. (Issue #350) - All Readers have a default "
dt" of 1.0 ps. This applies also to single frame readers, these would previously raise an error on accessingdt. (Issue #350) - NCDF Reader no longer has a default
skip_timestepof 1 (Issue #350)
- Added the '
global' selection keyword (Issue #268) - Added Jmol selection writer (Issue #356)
- Added reading of Hoomd XML files (Issue #333). These can only act as topology information for now
- Tests can now detect memleaks on a per-test basis (Issue #323)
- AtomGroups can now be pickled/unpickled (Issue #293)
- Universes can have a
__del__method (not actually added) without leaking (Issue #297) - Added reading of DL_Poly format CONFIG and HISTORY files, these can both act as both Topology and Coordinate information (Issue #298)
- Timestep objects now have
__eq__method (Issue #294) - coordinates.base.Timestep now can handle velocities and forces (Issue #294)
- Waterdynamics analysis module added, including five analysis classes: Hydrogen Bond Lifetimes, Water Orientational Relaxation, Angular Distribution, Mean Square Displacement and Survival Probability. Documentation and test are included. (Issue #300)
- RMSF class added to rms analysis module
-
MDAnalysis.lib.log.ProgressMeternow outputs every interval number ofupdatecalls (Issue #313) - Created
lib.mdamathfor common mathematical functions. (Issue #287) - All Timesteps have the has_positions
has_velocitiesandhas_forcesboolean flags (Issue #213) - Timesteps can now allocate velocities and forces if they weren't
originally created with these through the use of the
has_*flags. (Issue #213) - Timesteps now store '
dt' and 'time_offset' if passed to them by Reader to calculatetimeattribute (Issues #306 and #307) -
MDAnalysis.selection: can also be written to aNamedStream - Added function
lib.mdamath.make_wholeto "unbreak" molecules over periodic boundaries. (Issue #355) - Added triclinic_dimensions to
Timestep, returns representation of unit cell as triclinic vectors (Issue #276) - Added setter to
bfactorsproperty (Issue #372) - Added
AtomGroupaltLocsandserialsproperties with setters. (Issue #372) -
MDAnalysis.core.AtomGroup.Mergenow copies across bonding information (Issue #249)
- numpy >= 1.5 required
- A
ProtoReaderclass intermediate betweenIObaseandReaderwas added so specific Readers can be subclassed without__del__(theChainReaderandSingleFrameReader), thus preventing memleaks (Issue #312). - Atoms (and all container classes thereof) are now bound to Universes only via weakrefs. If Universes are not explicitly kept in scope Atoms will become orphaned. (Issue #297)
- Removed
FormatError, now replaced byValueError(Issue #294) -
base.Readernow defines__iter__and__iter__removed from many Readers (now usebase.Readerimplementation) (Issue #350) -
Timestep._x,_yand_zare now read only (Issue #213) - moved
MDAnalysis.selections.base.get_writer()toMDAnalysis.selections.get_writer()to break a circular import. This should not affect any code becauseMDAnalysis.selections.get_writer()already existed. -
distances.contact_matrixnow treats the particle distance with itself as a contact for sparse matrices and numpy arrays. The progress reporting for sparse calculations has been removed. (Issue #375) - TopologyObjects and
TopologyGroupmoved tocore.topologyobjectsmodule (Issue #373) - Consolidated
coordinates.guess_formatandtopology.guess_formattolib.util.guess_format(Issue #336)
- All Writers now refer to time between written Timesteps as "
dt", was previously "delta" in some Writers. (Issue #206) - Topology files can now be compressed (Issue #336)
- Fixed PDB Parser and Reader requiring occupancy field (Issue #396)
- Amber TRJ and NCDF Reader & Writers now use '
dt' instead of 'delta' to refer to time elapsed between timesteps. (Issue #350 and #206) - Fixed
TPRParserconsidering LJ 1..4 exclusions as bonds (Issue #351) - ChainReaders no longer cause memory leak (Issue #312)
-
analysis.hbonds.HydrogenBondAnalysisperforms a sanity check for static selections (Issue #296) - Fixed
TRZWriterfailing when passed a nonTRZTimestep(Issue #302) - relative imports are now banned in unit testing modules (Issue #189)
- Fixed bug and added
DivisionByZeroexception in analysis/waterdynamics.py inSurvivalProbability. (Issue #327) - Fixed parsing of PDB header data for
PrimitivePDBReader(Issue #332) - Fixed
contact_matrixhandles periodic boundary conditions correctly for sparse matrices. (Issue #375) - Fixed
analysis.holenot using CPOINT (Issue #384) - Fixed XTC/TRR
.dtrewinding the trajectory (Issue #407) - Fixed
TopologyGroup.from_indicesnot guessing topology object class (Issue #409) - Fixed
TopologyGroup.__contains__failing if different instance of same bond was queried. (Issue #409)
tyler.je.reddy, richardjgowers, alejob, orbeckst, dotsdl, manuel.nuno.melo, cyanezstange, khuston, ivirshup, kain88-de, gormanstock