pylipid.api.LipidInteraction.compute_surface_area

LipidInteraction.compute_surface_area(binding_site_id=None, radii=None, plot_data=True, save_dir=None, fig_close=False, fig_format='pdf', num_cpus=None)[source]

Calculate binding site surface areas.

The accessible surface area is calculated using the Shrake and Rupley algorithm 1. The basic idea of this algorithm is to generate a mesh of points representing the surface of each atom and then count the number of points that are not within the radius of any other atoms. The surface area can be derived from this number of exposed points.

This method utilizes the shrake_rupley function of MDTraj for calculation of the surface area. In implementation, this method scripts the protein coordinates out of the simulation system and obtains the accessible surface area of a binding site by summing those of its comprising residues

Atom radius is required for calculation of surface areas. MDtraj defines the radii for common atoms (see here). The radius of the BB bead in MARTINI2 is defined as 0.26 nm, the SC1/SC2/SC3 are defined as 0.23 nm in this method. Use the param radii to define or change of definition of atom radius.

Parameters
  • binding_site_id (int or list of int, default=None) – The binding site ID used in PyLipID. This ID is the index in the binding site node list that is calculated by the method compute_binding_nodes. The ID of the N-th binding site is (N-1). If None, the contact duration of all binding sites are calculated.

  • radii (dict or None, default=None) – The atom radii in the python dictionary format of {atom name: radius}

  • plot_data (bool, default=True) – Plot surface area data for the selected binding sites in a violinplot and in a time series plot.

  • save_dir (str or None, default=None) – The directory for saving the surface area plot. If None, it will save in Bound_Poses_{lipid} under the root directory defined at the initiation of LipidInteraction.

  • fig_close (bool, default=False) – This parameter control whether to close the plotted figures using plt.close(). It can save memory if many figures are generated.

  • fig_format (str, default="pdf") – Figure format. Support formats included in matplotlib.pyplot.

  • num_cpus (int or None default=None) – The number of CPUs used for calculating the surface areas. Python multiprocessing deployed by p_tqdm is used to speed up these calculations.

Returns

surface_area – Binding site surface areas as a function of time for the selected binding sites. The surface area values are stored by columns with the column name of binding site id and the time information is stored in the column named “Time”.

Return type

pandas.DataFrame

See also

pylipid.func.calculate_surface_area_wrapper

A wrapper function for calculating binding site surface area from a trajectory.

pylipid.plot.plot_surface_area

Plot binding site surface area as a function of time.

pylipid.plot.plot_binding_site_data

Plot binding site data in a matplotlib violin plot.

References

1

Shrake, A.; Rupley, J. A., Environment and exposure to solvent of protein atoms. Lysozyme and insulin. Journal of Molecular Biology 1973, 79 (2), 351-371