-
Notifications
You must be signed in to change notification settings - Fork 657
ReleaseNotes070
This is a new major release of MDAnalysis. In line with our release policy, it introduces new features at all levels of the code and removes old legacy code in favour for a more consistent (and hopefully more intuitive) API. These changes may break old scripts using MDAnalysis. Major effort went into making the AtomGroup work in all situations and allow users to access segments/residues/atoms from any Atom, AtomGroup, Residue, or Segment.
Trajectory writing has been streamlined (e.g. writing of selections can be done by just supplying the appropriate AtomGroup to the Writer.write()
method).
A number of bugs have been fixed and the coverage of UnitTests expanded. New scripts and improvements to the MDAnalysis.analysis module should make it easier for users to adapt MDAnalysis to their own use cases.
If you have old code then it is worthwhile looking at the Changes below in more detail as it lists changes that are known to be incompatible with pre-0.7 code.
We hope that the improvements in this release make it worthwhile to update your old code and encourage you to report any problems via the mailing list and/or the Issue Tracker.
major release 0.7.0: (includes changes that can BREAK BACKWARDS COMPATIBILITY)
In particular, the following methods are gone or are not found in the previous place anymore:
-
AtomGroup.principleAxes
(Issue 33) -
DCD.DCDReader.dcd_header()
andDCD.DCDWriter.dcd_header()
(use_dcd_header()
) -
Universe.dcd
(andUniverse.xtc
,Universe.trr
...) --- from now on onlyUniverse.trajectory
is supported. WILL BREAK LEGACY CODE! - removed the following packages from top-level MDAnalysis name space:
-
AtomGroup
,Selection
: import them fromMDAnalysis.core
if really needed (e.g.import MDAnalysis.core.AtomGroup
) -
distances
,rms_fitting
:import MDAnalysis.analysis.distances
orimport MDAnalysis.analysis.align.rms_fitting
(the actual modules still live inMDAnalysis.core
but they might get moved in the future and bundled withtransformations
) -
from MDAnalysis import *
will only get['Timeseries', 'Universe', 'asUniverse', 'Writer', 'collection']
-
- removed
copy
flag fromdistance_array
andself_distance_array
: setting it to False would always give wrong results so there was no good reason keeping it around
- improved trajectory writing
-
MDAnalysis.Writer()
factory function that provides an appropriate writer for the desired file format -
Writer.write()
accepts aUniverse
or a arbitraryAtomGroup
(e.g. from a selection); this is much more flexible thanWriter.write_next_timestep()
; the DCD/XTC/TRR writer also accepts aTimestep
for itswrite()
method.
-
- CHARMM CRD coordinate files
- CRDReader added (fixes Issue 40) ... it will work for both standard and extended formats: NO special flags needed.
- CRDWriter will now write extended crd files: NO special flags needed.
- PDB format: By default, PDB files are read with the PrimitivePDBReader and not the Bio.PDB reader anymore because the latter can drop atoms when they have the same name in a residue (which happens for systems generated from MD simulations) The PrimitivePDBReader copes just fine with those cases (but does not handle esoteric PDB features such as alternative atoms and insertion codes that are not needed for handling MD simulation data).
- The default behaviour of MDAnalysis can be set through the flag
MDAnalysis.core.flag['permissive_pdb_reader']
. The default is True. - One can always manually select the PDB reader by providing the permissive keyword to Universe; e.g.
Universe(PDB, permissive=False)
will read the input file with the Bio.PDB reader. This might be useful when processing true Protein Databank PDB files.
- The default behaviour of MDAnalysis can be set through the flag
- AtomGroup
- Indexing is made consistent with the way lists behave:
- indexing with integers returns a single
Atom
- slicing always returns a new
AtomGroup
- advanced slicing with a list or array returns a new
AtomGroup
(NEW, fixes Issue 36)
- indexing with integers returns a single
-
AtomGroup
coordinates can be manipulated (translate()
,rotate()
androtateby()
methods; when appropriate, these methods can takeAtomGroup
s or arrays to determine coordinates) -
new attributes
residues
andsegments
forAtomGroup
to give access to the list of residue/segment objects of the group - new exception
NoDataError
; raised when creation of an emptyAtomGroup
is attempted (see also Issue 12) -
consistent representation of the Segment > Residue > Atom hierarchy : all classes related to
AtomGroup
now expose the attributesatoms
,residues
,segments
that provide access to groups of the corresponding objects
- Indexing is made consistent with the way lists behave:
- improvements to
Residue
,ResidueGroup
andSegment
classes; documented the instant selector pseudo-attributes:- documented accessing residues from
Segment
asSegment.r<resid>
; resid is 1-based -- BREAKS OLD CODE that used the previous undocumented feature (which was 0-based) - added
SegmentGroup
class - can write from
Residue
,ResidueGroup
andSegment
(Issue 46) - residue name attribute of a
Segment
now consistently returns aResidueGroup
(Issue 47) -- MIGHT BREAK OLD CODE - added documentation and examples in the doc strings
- new special dihedral angle selections defined for
Residue
class to simplify analysis of backbone torsions (experimental)
- documented accessing residues from
- whitespace is no longer required around parentheses for
selectAtoms()
strings but the old syntax with white space still works (Issue 43) - new
contact_matrix
method for calculating contacts (Issue 30); for large (N > ~10000) coordinate arrays automatically switches to a method using a sparse matrix (slower) - more example scripts (e.g. for membrane analysis, trajectory writing, coordinate transformations)
- fixed Issue 51 (distance_array() did not properly check its input and wrong results could be returned if the input was a float64 and a float32 array)
- manipulation of coordinates through the
translate
androtateby
methods of an AtomGroup - a
Residue
can return dihedral angle selections for the protein phi, psi, and omega backbone angles
orbeckst, denniej0, tyler.je.reddy, danny.parton, joseph.goose