-
Notifications
You must be signed in to change notification settings - Fork 853
PaperErrata
The paper on MDAnalysis has been published as
- N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and O. Beckstein. MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations. J. Comput. Chem. 32 (2011), 2319–2327, DOI: 10.1002/jcc.21787
The HTML version of the paper has so many indentation errors in the code example to make it almost completely useless for learning MDAnalysis. The PDF version is mostly correct although the final formatted version ended up with a few line breaks that are illegal in the Python syntax. The free PubmedCentral version (available April 2012, e.g. through PMID 21500218), however, contains perfectly formatted Python code.
Corrected code is listed here and can also be found in the examples that are part of the MDAnalysis package. We are sorry for the inconvenience but assure you that we tried our best to impart the importance of spaces in Python code on the typesetter.
We are also collecting any further errata (which correct errors or omissions in both the PDF and the HTML version). If you find further problems then please let us know by emailing one of the authors or filing an issue in the MDAnalysis Issue Tracker.
universe.selectAtoms("byres (resname SOL and around 3.5 protein)").write("solvation-shell.pdb")
The PDF version also contains a crucial indentation error.
def blocked(universe, nblocks, analyze):
size = universe.trajectory.numframes/nblocks
blocks = []
for block in xrange(nblocks):
a = []
for ts in u.trajectory[block*size:(block+1)*size]:
a.append(analyze(universe))
blocks.append(numpy.average(a))
blockaverage = numpy.average(blocks)
blockstd = numpy.std(blocks)
return nblocks, size, blockaverage, blockstd
See examples/blocks.py for a working example.
def rgyr(universe):
return universe.selectAtoms("protein").radiusOfGyration()
MDAnalysis.collection.addTimeseries(\
Timeseries.Dihedral(atomselection))
data = universe.trajectory.correl(\
MDAnalysis.collection, skip=10)
The normalisation is not correct in the simplified example in the paper; use examples/radial_distribution_function.py from the distribution.
CHARMM has a way to calculate 3D densities using the COORdinates ANALysis ... IHIS facility. The table states incorrectly that CHARMM can not presently carry out this kind of calculations.