density

Calculate density along a coordinate.

density [out <filename>] [name <set name>] [delta <resolution>] [x|y|z] [number|mass|charge|electron] [efile <filename>] <mask1> ... <maskN>

out Output file for histogram: relative distances vs. densities for each mask.
delta Resolution, i.e. determines number of slices. (0.25 Å)
x|y|z Coordinate for density calculation. (z)
number|mass|charge|electron Number, mass, partial charge (q) or electron (Ne – q) density. To convert the electron density to e-/Å3 divide by the (average) area spanned by the other two dimensions. (number)
mask1 ... maskN Arbitrary number of masks for atom selection; a dataset is created and the output will contain entries for each mask.

DataSet Aspects:
[avg] Average density over coordinate.
[sd] Standard deviation of density over coordinate.

Calculate specified density for system. Defaults are shown in parentheses above. The format of the file is as follows. Comments are lines starting with ’#’ or empty lines. All other lines must contain the atom type followed by an integer number for the electron number. Entries must be separated by spaces or ’=’.

Example input:

density out number_density.dat number delta 0.25 ":POPC@P1" ":POPC@N" \
":POPC@C2" ":POPC"
density out mass_density.dat mass delta 0.25 ":POPC@P1" ":POPC@N" \
":POPC@C2" ":POPC"
density out charge_density.dat charge delta 0.25 ":POPC@P1" ":POPC@N" \
":POPC@C2" ":POPC"
density out electron_density.dat electron delta 0.25 efile Nelec.in \
":POPC@P1" ":POPC@N" ":POPC@C2" ":POPC" ":TIP3" \
":POPC | :TIP3" "*"
density out ion_density.dat number delta 0.25 ":SOD" ":CLA"

See also $AMBERHOME/AmberTools/test/cpptraj/Test_Density.