diff --git a/package/MDAnalysis/visualization/__init__.py b/package/MDAnalysis/visualization/__init__.py index 24c0fd27743..c832d49909c 100644 --- a/package/MDAnalysis/visualization/__init__.py +++ b/package/MDAnalysis/visualization/__init__.py @@ -1,5 +1,5 @@ # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- -# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors @@ -23,7 +23,7 @@ """ :mod:`MDAnalysis.visualization` --- Visualization library in MDAnalysis -================================================================ +======================================================================= """ from __future__ import absolute_import from . import streamlines diff --git a/package/MDAnalysis/visualization/streamlines.py b/package/MDAnalysis/visualization/streamlines.py index 4b4d2d3cf75..cf940b68021 100644 --- a/package/MDAnalysis/visualization/streamlines.py +++ b/package/MDAnalysis/visualization/streamlines.py @@ -1,5 +1,5 @@ # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- -# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors @@ -20,21 +20,30 @@ # J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787 # -''' -Multicore 2D streamplot Python library for MDAnalysis --- :mod:`MDAnalysis.visualization.streamlines` -===================================================================================================== +""" +Streamplots (2D) --- :mod:`MDAnalysis.visualization.streamlines` +================================================================= :Authors: Tyler Reddy and Matthieu Chavent :Year: 2014 :Copyright: GNU Public License v3 :Citation: [Chavent2014]_ +The :func:`generate_streamlines` function can generate a 2D flow field from a +MD trajectory, for instance, lipid molecules in a flat membrane. It can make +use of multiple cores to perform the analyis in parallel. + .. autofunction:: generate_streamlines -''' +""" from __future__ import absolute_import from six.moves import zip +import multiprocessing + +import numpy as np +import scipy + try: import matplotlib import matplotlib.path @@ -45,22 +54,39 @@ 'http://matplotlib.org/faq/installing_faq.html?highlight=install') import MDAnalysis -import multiprocessing -import numpy as np -import scipy + def produce_grid(tuple_of_limits, grid_spacing): - '''Produce a grid for the simulation system based on the tuple of Cartesian Coordinate limits calculated in an - earlier step.''' + """Produce a grid for the simulation system based on the tuple of Cartesian Coordinate limits calculated in an + earlier step.""" x_min, x_max, y_min, y_max = tuple_of_limits grid = np.mgrid[x_min:x_max:grid_spacing, y_min:y_max:grid_spacing] return grid def split_grid(grid, num_cores): - '''Take the overall grid for the system and split it into lists of square vertices that can be distributed to - each core. Limited to 2D for now''' + """Split the grid into blocks of vertices. + + Take the overall `grid` for the system and split it into lists of + square vertices that can be distributed to each core. + + Parameters + ---------- + grid : numpy.array + 2D array + num_cores : int + number of partitions to generate + + Returns + ------- + [list_square_vertex_arrays_per_core, list_parent_index_values, current_row, current_column] + + Note + ---- + Limited to 2D for now. + + """ # produce an array containing the cartesian coordinates of all vertices in the grid: x_array, y_array = grid @@ -99,7 +125,10 @@ def split_grid(grid, num_cores): def per_core_work(coordinate_file_path, trajectory_file_path, list_square_vertex_arrays_this_core, MDA_selection, start_frame, end_frame, reconstruction_index_list, maximum_delta_magnitude): - '''The code to perform on a given core given the list of square vertices assigned to it.''' + """Run the analysis on one core. + + The code to perform on a given core given the list of square vertices assigned to it. + """ # obtain the relevant coordinates for particles of interest universe_object = MDAnalysis.Universe(coordinate_file_path, trajectory_file_path) list_previous_frame_centroids = [] @@ -170,72 +199,91 @@ def produce_list_centroids_this_frame(list_indices_in_polygon): def generate_streamlines(coordinate_file_path, trajectory_file_path, grid_spacing, MDA_selection, start_frame, end_frame, xmin, xmax, ymin, ymax, maximum_delta_magnitude, num_cores='maximum'): - """Produce the x and y components of a 2D streamplot data set. + r"""Produce the x and y components of a 2D streamplot data set. - :Parameters: - **coordinate_file_path** : str + Parameters + ---------- + coordinate_file_path : str Absolute path to the coordinate file - **trajectory_file_path** : str - Absolute path to the trajectory file. It will normally be desirable to filter the trajectory with a tool - such as GROMACS g_filter (see [Chavent2014]_) - **grid_spacing** : float + trajectory_file_path : str + Absolute path to the trajectory file. It will normally be desirable + to filter the trajectory with a tool such as GROMACS ``g_filter`` (see + [Chavent2014]_) + grid_spacing : float The spacing between grid lines (angstroms) - **MDA_selection** : str + MDA_selection : str MDAnalysis selection string - **start_frame** : int + start_frame : int First frame number to parse - **end_frame** : int + end_frame : int Last frame number to parse - **xmin** : float + xmin : float Minimum coordinate boundary for x-axis (angstroms) - **xmax** : float + xmax : float Maximum coordinate boundary for x-axis (angstroms) - **ymin** : float + ymin : float Minimum coordinate boundary for y-axis (angstroms) - **ymax** : float + ymax : float Maximum coordinate boundary for y-axis (angstroms) - **maximum_delta_magnitude** : float - Absolute value of the largest displacement tolerated for the centroid of a group of particles ( - angstroms). Values above this displacement will not count in the streamplot (treated as excessively large - displacements crossing the periodic boundary) - **num_cores** : int, optional - The number of cores to use. (Default 'maximum' uses all available cores) - - :Returns: - **dx_array** : array of floats + maximum_delta_magnitude : float + Absolute value of the largest displacement tolerated for the + centroid of a group of particles ( angstroms). Values above this + displacement will not count in the streamplot (treated as + excessively large displacements crossing the periodic boundary) + num_cores : int or 'maximum' (optional) + The number of cores to use. (Default 'maximum' uses all available + cores) + + Returns + ------- + dx_array : array of floats An array object containing the displacements in the x direction - **dy_array** : array of floats + dy_array : array of floats An array object containing the displacements in the y direction - **average_displacement** : float - :math:`\\frac {\\sum \\sqrt[]{dx^2 + dy^2}} {N}` - **standard_deviation_of_displacement** : float - standard deviation of :math:`\\sqrt[]{dx^2 + dy^2}` + average_displacement : float + :math:`\frac{\sum\sqrt[]{dx^2 + dy^2}}{N}` + standard_deviation_of_displacement : float + standard deviation of :math:`\sqrt[]{dx^2 + dy^2}` - :Examples: - - :: + Examples + -------- + Generate 2D streamlines and plot:: import matplotlib, matplotlib.pyplot, np import MDAnalysis, MDAnalysis.visualization.streamlines - u1, v1, average_displacement,standard_deviation_of_displacement = - MDAnalysis.visualization.streamlines.generate_streamlines('testing.gro','testing_filtered.xtc',grid_spacing = - 20, MDA_selection = 'name PO4',start_frame=2,end_frame=3,xmin=-8.73000049591,xmax= 1225.96008301, - ymin= -12.5799999237, ymax=1224.34008789,maximum_delta_magnitude = 1.0,num_cores=16) - x = np.linspace(0,1200,61) - y = np.linspace(0,1200,61) + + u1, v1, average_displacement, standard_deviation_of_displacement = + MDAnalysis.visualization.streamlines.generate_streamlines('testing.gro', 'testing_filtered.xtc', + grid_spacing=20, MDA_selection='name PO4', start_frame=2, end_frame=3, + xmin=-8.73000049591, xmax= 1225.96008301, + ymin= -12.5799999237, ymax=1224.34008789, + maximum_delta_magnitude=1.0, num_cores=16) + x = np.linspace(0, 1200, 61) + y = np.linspace(0, 1200, 61) speed = np.sqrt(u1*u1 + v1*v1) fig = matplotlib.pyplot.figure() - ax = fig.add_subplot(111,aspect='equal') + ax = fig.add_subplot(111, aspect='equal') ax.set_xlabel('x ($\AA$)') ax.set_ylabel('y ($\AA$)') - ax.streamplot(x,y,u1,v1,density=(10,10),color=speed,linewidth=3*speed/speed.max()) + ax.streamplot(x, y, u1, v1, density=(10,10), color=speed, linewidth=3*speed/speed.max()) fig.savefig('testing_streamline.png',dpi=300) .. image:: testing_streamline.png - .. [Chavent2014] Chavent, M.\*, Reddy, T.\*, Dahl, C.E., Goose, J., Jobard, B., and Sansom, M.S.P. (2014) - Methodologies for the analysis of instantaneous lipid diffusion in MD simulations of large membrane systems. - *Faraday Discussions* **169**: **Accepted** + + References + ---------- + .. [Chavent2014] Chavent, M.*, Reddy, T.*, Dahl, C.E., Goose, J., Jobard, + B., and Sansom, M.S.P. Methodologies for the analysis of instantaneous + lipid diffusion in MD simulations of large membrane systems. *Faraday + Discussions* **169** (2014), 455–475. doi: `10.1039/c3fd00145h`_ + + .. _`10.1039/c3fd00145h`: https://doi.org/10.1039/c3fd00145h + + + See Also + -------- + MDAnalysis.visualization.streamlines_3D.generate_streamlines_3d """ # work out the number of cores to use: @@ -287,5 +335,3 @@ def log_result_to_parent(delta_array): return (dx_array, dy_array, average_displacement, standard_deviation_of_displacement) -# if __name__ == '__main__': #execute the main control function only if this file is called as a top-level script -#will probably mostly use this for testing on a trajectory: diff --git a/package/MDAnalysis/visualization/streamlines_3D.py b/package/MDAnalysis/visualization/streamlines_3D.py index 2b5a29c17bc..b382cc4b043 100644 --- a/package/MDAnalysis/visualization/streamlines_3D.py +++ b/package/MDAnalysis/visualization/streamlines_3D.py @@ -20,33 +20,43 @@ # J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787 # -''' -Multicore 3D streamplot Python library for MDAnalysis --- :mod:`MDAnalysis.visualization.streamlines_3D` -========================================================================================================= +""" +Streamplots (3D) --- :mod:`MDAnalysis.visualization.streamlines_3D` +=================================================================== :Authors: Tyler Reddy and Matthieu Chavent :Year: 2014 :Copyright: GNU Public License v3 :Citation: [Chavent2014]_ +The :func:`generate_streamlines_3d` function can generate a 2D flow field from a +MD trajectory, for instance, lipid molecules in a flat membrane. It can make +use of multiple cores to perform the analyis in parallel. + + .. autofunction:: generate_streamlines_3d -''' +""" from __future__ import division, absolute_import import six from six.moves import range, zip -import MDAnalysis import multiprocessing + import numpy as np import numpy.testing import scipy import scipy.spatial.distance +import MDAnalysis def determine_container_limits(coordinate_file_path, trajectory_file_path, buffer_value): - '''A function for the parent process which should take the input trajectory and calculate the limits of the - container for the system and return these limits.''' + """Calculate the extent of the atom coordinates + buffer. + + A function for the parent process which should take the input trajectory + and calculate the limits of the container for the system and return these + limits. + """ universe_object = MDAnalysis.Universe(coordinate_file_path, trajectory_file_path) all_atom_selection = universe_object.select_atoms('all') # select all particles all_atom_coordinate_array = all_atom_selection.positions @@ -64,16 +74,34 @@ def determine_container_limits(coordinate_file_path, trajectory_file_path, buffe def produce_grid(tuple_of_limits, grid_spacing): - '''Produce a grid for the simulation system based on the tuple of Cartesian Coordinate limits calculated in an - earlier step.''' + """Produce a grid for the simulation system. + + The partitioning is based on the tuple of Cartesian Coordinate limits + calculated in an earlier step. + """ x_min, x_max, y_min, y_max, z_min, z_max = tuple_of_limits grid = np.mgrid[x_min:x_max:grid_spacing, y_min:y_max:grid_spacing, z_min:z_max:grid_spacing] return grid def split_grid(grid, num_cores): - '''Take the overall grid for the system and split it into lists of cube vertices that can be distributed to each - core.''' + """Split the grid into blocks of vertices. + + Take the overall `grid` for the system and split it into lists of cube + vertices that can be distributed to each core. + + Parameters + ---------- + grid : numpy.array + 3D array + num_cores : int + number of partitions to generate + + Returns + ------- + [list_dictionaries_for_cores, total_cubes, num_sheets, delta_array_shape] + + """ # unpack the x,y,z mgrid arrays x, y, z = grid num_z_values = z.shape[-1] @@ -169,13 +197,15 @@ def split_grid(grid, num_cores): def per_core_work(start_frame_coord_array, end_frame_coord_array, dictionary_cube_data_this_core, MDA_selection, start_frame, end_frame): - '''The code to perform on a given core given the dictionary of cube data.''' + """Run the analysis on one core. + + The code to perform on a given core given the dictionary of cube data.""" list_previous_frame_centroids = [] list_previous_frame_indices = [] # define some utility functions for trajectory iteration: def point_in_cube(array_point_coordinates, list_cube_vertices, cube_centroid): - '''Determine if an array of coordinates are within a cube.''' + """Determine if an array of coordinates are within a cube.""" #the simulation particle point can't be more than half the cube side length away from the cube centroid in # any given dimension: array_cube_vertices = np.array(list_cube_vertices) @@ -201,9 +231,9 @@ def point_in_cube(array_point_coordinates, list_cube_vertices, cube_centroid): def update_dictionary_point_in_cube_start_frame(array_simulation_particle_coordinates, dictionary_cube_data_this_core): - '''Basically update the cube dictionary objects assigned to this core to contain a new key/value pair + """Basically update the cube dictionary objects assigned to this core to contain a new key/value pair corresponding to the indices of the relevant particles that fall within a given cube. Also, for a given cube, - store a key/value pair for the centroid of the particles that fall within the cube.''' + store a key/value pair for the centroid of the particles that fall within the cube.""" cube_counter = 0 for key, cube in six.iteritems(dictionary_cube_data_this_core): index_list_in_cube = point_in_cube(array_simulation_particle_coordinates, cube['vertex_list'], @@ -218,7 +248,7 @@ def update_dictionary_point_in_cube_start_frame(array_simulation_particle_coordi cube_counter += 1 def update_dictionary_end_frame(array_simulation_particle_coordinates, dictionary_cube_data_this_core): - '''Update the cube dictionary objects again as appropriate for the second and final frame.''' + """Update the cube dictionary objects again as appropriate for the second and final frame.""" cube_counter = 0 for key, cube in six.iteritems(dictionary_cube_data_this_core): # if there were no particles in the cube in the first frame, then set dx,dy,dz each to 0 @@ -250,9 +280,14 @@ def update_dictionary_end_frame(array_simulation_particle_coordinates, dictionar def produce_coordinate_arrays_single_process(coordinate_file_path, trajectory_file_path, MDA_selection, start_frame, end_frame): - '''To reduce memory footprint produce only a single MDA selection and get desired coordinate arrays; can later - send these coordinate arrays to all child processes rather than having each child process open a trajectoryand - waste memory.''' + """Generate coordinate arrays. + + To reduce memory footprint produce only a single MDA selection and get + desired coordinate arrays; can later send these coordinate arrays to all + child processes rather than having each child process open a trajectory and + waste memory. + + """ universe_object = MDAnalysis.Universe(coordinate_file_path, trajectory_file_path) relevant_particles = universe_object.select_atoms(MDA_selection) # pull out coordinate arrays from desired frames: @@ -271,74 +306,84 @@ def produce_coordinate_arrays_single_process(coordinate_file_path, trajectory_fi def generate_streamlines_3d(coordinate_file_path, trajectory_file_path, grid_spacing, MDA_selection, start_frame, end_frame, xmin, xmax, ymin, ymax, zmin, zmax, maximum_delta_magnitude=2.0, num_cores='maximum'): - '''Produce the x, y and z components of a 3D streamplot data set. + r"""Produce the x, y and z components of a 3D streamplot data set. - :Parameters: - **coordinate_file_path** : str + Parameters + ---------- + coordinate_file_path : str Absolute path to the coordinate file - **trajectory_file_path** : str - Absolute path to the trajectory file. It will normally be desirable to filter the trajectory with a tool - such as GROMACS g_filter (see [Chavent2014]_) - **grid_spacing** : float + trajectory_file_path : str + Absolute path to the trajectory file. It will normally be desirable + to filter the trajectory with a tool such as GROMACS ``g_filter`` (see + [Chavent2014]_) + grid_spacing : float The spacing between grid lines (angstroms) - **MDA_selection** : str + MDA_selection : str MDAnalysis selection string - **start_frame** : int + start_frame : int First frame number to parse - **end_frame** : int + end_frame : int Last frame number to parse - **xmin** : float + xmin : float Minimum coordinate boundary for x-axis (angstroms) - **xmax** : float + xmax : float Maximum coordinate boundary for x-axis (angstroms) - **ymin** : float + ymin : float Minimum coordinate boundary for y-axis (angstroms) - **ymax** : float + ymax : float Maximum coordinate boundary for y-axis (angstroms) - **zmin** : float - Minimum coordinate boundary for z-axis (angstroms) - **zmax** : float - Maximum coordinate boundary for z-axis (angstroms) - **maximum_delta_magnitude** : float - Absolute value of the largest displacement (in dx,dy, or dz) tolerated for the centroid of a group of - particles (angstroms; default: 2.0). Values above this displacement will not count in the streamplot ( - treated as excessively large displacements crossing the periodic boundary) - **num_cores** : int, optional - The number of cores to use. (Default 'maximum' uses all available cores) - - :Returns: - **dx_array** : array of floats + maximum_delta_magnitude : float + Absolute value of the largest displacement tolerated for the + centroid of a group of particles ( angstroms). Values above this + displacement will not count in the streamplot (treated as + excessively large displacements crossing the periodic boundary) + num_cores : int or 'maximum' (optional) + The number of cores to use. (Default 'maximum' uses all available + cores) + + Returns + ------- + dx_array : array of floats An array object containing the displacements in the x direction - **dy_array** : array of floats + dy_array : array of floats An array object containing the displacements in the y direction - **dz_array** : array of floats + dz_array : array of floats An array object containing the displacements in the z direction - :Examples: - - :: + Examples + -------- + Generate 3D streamlines and visualize in `mayavi`_:: import np as np + import MDAnalysis import MDAnalysis.visualization.streamlines_3D + import mayavi, mayavi.mlab - #assign coordinate system limits and grid spacing: + # assign coordinate system limits and grid spacing: x_lower,x_upper = -8.73, 1225.96 y_lower,y_upper = -12.58, 1224.34 z_lower,z_upper = -300, 300 grid_spacing_value = 20 - x1, y1, z1 = MDAnalysis.visualization.streamlines_3D.generate_streamlines_3d('testing.gro', - 'testing_filtered.xtc',xmin=x_lower,xmax=x_upper,ymin=y_lower,ymax=y_upper,zmin=z_lower,zmax=z_upper, - grid_spacing = grid_spacing_value, MDA_selection = 'name PO4',start_frame=2,end_frame=3,num_cores='maximum') - x,y,z = np.mgrid[x_lower:x_upper:x1.shape[0]*1j,y_lower:y_upper:y1.shape[1]*1j,z_lower:z_upper:z1.shape[ - 2]*1j] - - #plot with mayavi: - fig = mayavi.mlab.figure(bgcolor=(1.0,1.0,1.0),size=(800,800),fgcolor=(0, 0, 0)) - for z_value in np.arange(z_lower,z_upper,grid_spacing_value): - st = mayavi.mlab.flow(x,y,z,x1,y1,z1,line_width=1,seedtype='plane',integration_direction='both') + x1, y1, z1 = MDAnalysis.visualization.streamlines_3D.generate_streamlines_3d( + 'testing.gro', 'testing_filtered.xtc', + xmin=x_lower, xmax=x_upper, + ymin=y_lower, ymax=y_upper, + zmin=z_lower, zmax=z_upper, + grid_spacing=grid_spacing_value, MDA_selection = 'name PO4', + start_frame=2, end_frame=3, num_cores='maximum') + + x, y, z = np.mgrid[x_lower:x_upper:x1.shape[0]*1j, + y_lower:y_upper:y1.shape[1]*1j, + z_lower:z_upper:z1.shape[2]*1j] + + # plot with mayavi: + fig = mayavi.mlab.figure(bgcolor=(1.0, 1.0, 1.0), size=(800, 800), fgcolor=(0, 0, 0)) + for z_value in np.arange(z_lower, z_upper, grid_spacing_value): + st = mayavi.mlab.flow(x, y, z, x1, y1, z1, line_width=1, + seedtype='plane', integration_direction='both') st.streamline_type = 'tube' st.tube_filter.radius = 2 st.seed.widget.origin = np.array([ x_lower, y_upper, z_value]) @@ -346,14 +391,20 @@ def generate_streamlines_3d(coordinate_file_path, trajectory_file_path, grid_spa st.seed.widget.point2 = np.array([ x_lower, y_lower, z_value]) st.seed.widget.resolution = int(x1.shape[0]) st.seed.widget.enabled = False - mayavi.mlab.axes(extent = [0,1200,0,1200,-300,300]) + mayavi.mlab.axes(extent = [0, 1200, 0, 1200, -300, 300]) fig.scene.z_plus_view() mayavi.mlab.savefig('test_streamplot_3D.png') - #more compelling examples can be produced for vesicles and other spherical systems + # more compelling examples can be produced for vesicles and other spherical systems .. image:: test_streamplot_3D.png - ''' + See Also + -------- + MDAnalysis.visualization.streamlines.generate_streamlines + + + .. _mayavi: http://docs.enthought.com/mayavi/mayavi/ + """ # work out the number of cores to use: if num_cores == 'maximum': num_cores = multiprocessing.cpu_count() # use all available cores @@ -427,6 +478,3 @@ def log_result_to_parent(process_dict): dy_array[abs(dy_array) >= maximum_delta_magnitude] = 1.0 dz_array[abs(dz_array) >= maximum_delta_magnitude] = 1.0 return (dx_array, dy_array, dz_array) - -# if __name__ == '__main__': #execute the main control function only if this file is called as a top-level script -#will probably mostly use this for testing on a trajectory diff --git a/package/doc/sphinx/source/documentation_pages/references.rst b/package/doc/sphinx/source/documentation_pages/references.rst index 3df14b09839..ffcb8516ba1 100644 --- a/package/doc/sphinx/source/documentation_pages/references.rst +++ b/package/doc/sphinx/source/documentation_pages/references.rst @@ -100,6 +100,18 @@ If you use the implementation of the ENCORE ensemble analysis in .. _`10.1371/journal.pcbi.1004415`: http://doi.org/10.1371/journal.pcbi.1004415 +If you use the streamline visualization in +:mod:`MDAnalysis.visualization.streamlines` and +:mod:`MDAnalysis.visualization.streamlines_3D` please cite + +.. [Chavent2014b] Chavent, M., Reddy, T., Dahl, C.E., Goose, J., Jobard, B., + and Sansom, M.S.P. Methodologies for the analysis of instantaneous lipid + diffusion in MD simulations of large membrane systems. *Faraday + Discussions* **169** (2014), 455–475. doi: `10.1039/c3fd00145h`_ + +.. _`10.1039/c3fd00145h`: https://doi.org/10.1039/c3fd00145h + + Thanks! diff --git a/package/doc/sphinx/source/documentation_pages/visualization/streamlines.rst b/package/doc/sphinx/source/documentation_pages/visualization/streamlines.rst index 7da808cf692..877661e639a 100644 --- a/package/doc/sphinx/source/documentation_pages/visualization/streamlines.rst +++ b/package/doc/sphinx/source/documentation_pages/visualization/streamlines.rst @@ -1,4 +1 @@ -2D Streamplot -************* - .. automodule:: MDAnalysis.visualization.streamlines diff --git a/package/doc/sphinx/source/documentation_pages/visualization/streamlines_3D.rst b/package/doc/sphinx/source/documentation_pages/visualization/streamlines_3D.rst index 2dcd6bcb070..f8f20c4ad02 100644 --- a/package/doc/sphinx/source/documentation_pages/visualization/streamlines_3D.rst +++ b/package/doc/sphinx/source/documentation_pages/visualization/streamlines_3D.rst @@ -1,5 +1,2 @@ -3D Streamplot -************* - .. automodule:: MDAnalysis.visualization.streamlines_3D - + diff --git a/package/doc/sphinx/source/documentation_pages/visualization_modules.rst b/package/doc/sphinx/source/documentation_pages/visualization_modules.rst index 10467019e80..93917cb974a 100644 --- a/package/doc/sphinx/source/documentation_pages/visualization_modules.rst +++ b/package/doc/sphinx/source/documentation_pages/visualization_modules.rst @@ -4,8 +4,8 @@ Visualization modules ********************* -The MDAnalysis.visualization namespace contains code to carry out analyses -which return data that is specifically-tailored for visualization. +The :mod:`MDAnalysis.visualization` namespace contains code to carry out +analyses which return data that is specifically-tailored for visualization. Please see the individual module documentation for additional references and citation information. @@ -15,12 +15,14 @@ import them from :mod:`MDAnalysis.visualization`, for instance: :: import MDAnalysis.visualization.streamlines -.. Note:: +.. Note:: - Some of the modules require additional Python packages such as numpy_ or matplotlib_. + Some of the modules require additional Python packages such as matplotlib_ or + scipy_. -.. _numpy: http://www.numpy.org .. _matplotlib: http://matplotlib.org +.. _scipy: https://www.scipy.org/scipylib/index.html + Visualization of Lipid Flow ============================ @@ -30,3 +32,6 @@ Visualization of Lipid Flow visualization/streamlines visualization/streamlines_3D + + +