Density Analysis in a PoreΒΆ
The density analysis needs the sampled object file using the density routine
import porems as pms
import poreana as pa
mol = pms.Molecule(inp="data/benzene.gro")
sample = pa.Sample("data/pore_system_cylinder.obj", "data/traj_cylinder.xtc", mol, [])
sample.init_density("output/dens.h5")
sample.sample()
Finished frame 2001/2001...
The calculation of the density profile is done using the bins function
dens = pa.density.bins("output/dens.h5")
Density inside Pore = 0.100 #/nm^3 ; 12.941 kg/m^3
Density outside Pore = 0.127 #/nm^3 ; 16.446 kg/m^3
and viewed using the plot function
pa.density.bins_plot(dens)