-
Notifications
You must be signed in to change notification settings - Fork 652
ReleaseNotes0110
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.number
attribute toatom.index
(Issue #372) - Changed many AtomGroup methods to properties. These are:
indices
,masses
,charges
,names
,types
,radii
,resids
,resnames
,resnums
,segids
(Issue #372) -
Timestep
can 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
KDTree
andCoordinateNeighbor
from MDAnalaysis. If you want to search in cartesian coordinates directly for neighboring points use the BioPythonKDTree
or scikit-learnNeighbors
module. TheAtomNeighborSearch
class has been ported to use the BioPython KDTree and is now located inMDAnalaysis.lib.NeighborSearch
.MDAnalysis.KDTree
still exists in this version to load theNeighborSearch
module 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.util
tolib.mdamath
(Issue #287) -
AtomGroup.bond
,.angle
,.dihedral
and.improper
now return the correspondingTopologyObject
rather than performing the calculation (Issue #373) - All TopologyObjects now have a "
value()
" method to evaluate them (Issue #373) -
TopologyGroup
now has a "values()
" methods to evaluate all contained bonds (Issue #373) -
MDAnalysis.lib.distances.calc_torsions
renamed →MDAnalysis.lib.distances.calc_dihedrals
(Issue #373) -
TopologyGroup.selectBonds
renamed →select_bonds
(Issue #389) - deprecated camelCase AtomGroup methods in favour of underscore_style (Issue #389)
- deprecated
lib.distances.applyPBC
in favour ofapply_PBC
(Issue #389) -
AtomGroup.res[names,ids,nums]
andAtomGroup.segids
now give arrays of equal size toAtomGroup
(Issue #385) -
ResidueGroup.segids
now gives arrays of equal size toResidueGroup
(Issue #385) -
AtomGroup
settersset_<property>
now plural for consistency with property names (Issue #385) -
DCDReader
no 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_timestep
of 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.ProgressMeter
now outputs every interval number ofupdate
calls (Issue #313) - Created
lib.mdamath
for common mathematical functions. (Issue #287) - All Timesteps have the has_positions
has_velocities
andhas_forces
boolean 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 calculatetime
attribute (Issues #306 and #307) -
MDAnalysis.selection
: can also be written to aNamedStream
- Added function
lib.mdamath.make_whole
to "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
bfactors
property (Issue #372) - Added
AtomGroup
altLocs
andserials
properties with setters. (Issue #372) -
MDAnalysis.core.AtomGroup.Merge
now copies across bonding information (Issue #249)
- numpy >= 1.5 required
- A
ProtoReader
class intermediate betweenIObase
andReader
was added so specific Readers can be subclassed without__del__
(theChainReader
andSingleFrameReader
), 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.Reader
now defines__iter__
and__iter__
removed from many Readers (now usebase.Reader
implementation) (Issue #350) -
Timestep._x
,_y
and_z
are 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_matrix
now 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
TopologyGroup
moved tocore.topologyobjects
module (Issue #373) - Consolidated
coordinates.guess_format
andtopology.guess_format
tolib.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
TPRParser
considering LJ 1..4 exclusions as bonds (Issue #351) - ChainReaders no longer cause memory leak (Issue #312)
-
analysis.hbonds.HydrogenBondAnalysis
performs a sanity check for static selections (Issue #296) - Fixed
TRZWriter
failing when passed a nonTRZTimestep
(Issue #302) - relative imports are now banned in unit testing modules (Issue #189)
- Fixed bug and added
DivisionByZero
exception in analysis/waterdynamics.py inSurvivalProbability
. (Issue #327) - Fixed parsing of PDB header data for
PrimitivePDBReader
(Issue #332) - Fixed
contact_matrix
handles periodic boundary conditions correctly for sparse matrices. (Issue #375) - Fixed
analysis.hole
not using CPOINT (Issue #384) - Fixed XTC/TRR
.dt
rewinding the trajectory (Issue #407) - Fixed
TopologyGroup.from_indices
not 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