Plotting functions

The functions that help visualizing data in the FAIRMD Lipids are described here. These functions are located in the fairmd.lipids.ipylib submodule. Currently, the module offers a function to plot simulation against experimental data for form factor and order parameter.

Plotting form factors

from fairmd.lipids.core import initialize_databank
from fairmd.lipids.ipylib import plot_simulation_FF

ss = initialize_databank()
f = plot_simulation_FF(ss.loc(914))
f.savefig("form_factor_914.png", dpi=300)

fairmd.lipids.ipylib.plot_simulation_FF() will produce a figure with the simulated and experimental form factors together. Experimental data is automatically rescaled before plotting by the scaling factor computed by function fairmd.lipids.analib.formfactor.calc_ff_scaling_distance(). Currently, the function plots only first experiment if there are multiple experiments associated.

Simulated and experimental form factors for databank entry 914

Plotting order parameters

from fairmd.lipids.ipylib import plot_simulation_OP

s = ss.loc(831)
figures = plot_simulation_OP(s, "POPC")
figures["sn-1"].savefig("op831a.png", dpi=92)
figures["sn-2"].savefig("op831b.png", dpi=92)
figures["head"].savefig("op831c.png", dpi=92)

fairmd.lipids.ipylib.plot_simulation_OP() returns a dictionary of figures with the simulated and experimental order parameters together, keyed by fragment (for example, "sn-1", "sn-2", and "head"). The available keys depend on the fragments present in the selected lipid. Carbons are named according to naming registry (fairmd.lipids.auxiliary.opconvertor.NamingRegistry) through the fairmd.lipids.auxiliary.opconvertor.build_nice_OPdict() function. Currently, the plotting function plots only first experiment if there are multiple experiments associated.

Simulated and experimental order parameters for databank entry 831 (sn-1) Simulated and experimental order parameters for databank entry 831 (sn-2) Simulated and experimental order parameters for databank entry 831 (headgroup)