density_map#

density_map(univ, atom_types, interface_coordinate, axis='z', eps=3.0, start=0, end=-1, bin_size=0.1)[source]#

Create a 2D density map of atoms within a specified distance of an interface.

Parameters:
univmda.Universe

The input MDAnalysis Universe to analyze.

atom_typesstr or list

Atom types to consider.

interface_coordinatefloat

Interface coordinate along the given axis.

axisstr

Axis parallel to which to calculate the density.

epsfloat

Half-thickness of the slab: atoms between interface_coordinate - eps and interface_coordinate + eps are counted.

startint

Starting trajectory frame.

endint

Ending trajectory frame.

bin_sizefloat

Size of bins for the histogram in Angstroms.

Returns:
pd.DataFrame

2D average density map.