density_profile#
- density_profile(universe, atom_types, axis='z', start=0, end=-1, bin_size=0.1)[source]#
Create a DataFrame with the average density of atoms of given types along a given axis.
- Parameters:
- universemda.Universe
The input MDAnalysis Universe to analyze.
- atom_typeslist
Atom types to compute the density for.
- axisstr
Axis along which to calculate the density (‘x’, ‘y’, or ‘z’).
- startint
Starting frame index.
- endint
Ending frame index.
- bin_sizefloat
Size of bins for the histogram (in Angstroms).
- Returns:
- pd.DataFrame
Average density profile for the specified atom types.