DensitySphere#
- class maicos.modules.densitysphere.DensitySphere(atomgroups, dens='mass', bin_width=1, rmin=0, rmax=None, refgroup=None, grouping='atoms', unwrap=True, bin_method='com', output='density.dat', concfreq=0)[source]#
Bases:
ProfileSphereBase
Compute spherical partial density profiles.
Calculations are carried out for
mass
\((\rm u \cdot Å^{-3})\),number
\((\rm Å^{-3})\) orcharge
\((\rm e \cdot Å^{-3})\) density profiles along a certain cartesian axes[x, y, z]
of the simulation cell. Cell dimensions are allowed to fluctuate in time.For grouping with respect to
molecules
,residues
etc., the corresponding centers (i.e., center of mass) taking into account periodic boundary conditions are calculated. For these calculations molecules will be unwrapped/made whole. Trajectories containing already whole molecules can be run withunwrap=False
to gain a speedup. For grouping with respect to atoms the unwrap option is always ignored.- Parameters:
atomgroups (list[AtomGroup]) – a list of
AtomGroup
objects for which the calculations are performed.refgroup (AtomGroup) –
Reference
AtomGroup
used for the calculation.If refgroup is provided, the calculation is performed relative to the center of mass of the AtomGroup.
If refgroup is
None
the calculations are performed to the center of the (changing) box.unwrap (bool) –
When
unwrap = True
, molecules that are broken due to the periodic boundary conditions are made whole.If the input contains molecules that are already whole, speed up the calculation by disabling unwrap. To do so, use the flag
-no-unwrap
when using MAICoS from the command line, or useunwrap = False
when using MAICoS from the Python interpreter.Note: Molecules containing virtual sites (e.g. TIP4P water models) are not currently supported in MDAnalysis. In this case, you need to provide unwrapped trajectory files directly, and disable unwrap. Trajectories can be unwrapped, for example, using the
trjconv
command of GROMACS.concfreq (int) – When concfreq (for conclude frequency) is larger than 0, the conclude function is called and the output files are written every concfreq frames
rmin (float) – Minimal radial coordinate relative to the center of mass of the refgroup for evaluation (in Å).
rmax (float) –
Maximal radial coordinate relative to the center of mass of the refgroup for evaluation (in Å).
If
rmax=None
, the box extension is taken.bin_width (float) – Width of the bins (in Å).
rmin – Minimal radial coordinate relative to the center of mass of the refgroup for evaluation (in Å).
rmax –
Maximal radial coordinate relative to the center of mass of the refgroup for evaluation (in Å).
If
rmax=None
, the box extension is taken.grouping (str {
'atoms'
,'residues'
,'segments'
,'molecules'
,'fragments'
}) –Atom grouping for the calculations of profiles.
The possible grouping options are the atom positions (in the case where
grouping='atoms'
) or the center of mass of the specified grouping unit (in the case wheregrouping='residues'
,'segments'
,'molecules'
or'fragments'
).bin_method (str {
'cog'
,'com'
,'coc'
}) –Method for the position binning.
The possible options are center of geometry (
cog
), center of mass (com
), and center of charge (coc
).output (str) – Output filename.
dens (str {'mass', 'number', 'charge'}) – density type to be calculated.
- results.bin_pos#
Bin positions (in Å) ranging from
rmin
tormax
.- Type:
- results.profile#
Calculated profile.
- Type:
- results.dprofile#
Estimated profile’s uncertainity.
- Type: