Bond length distributions
- analyze_foldamers.parameters.bond_distributions.calc_bond_length_distribution(cgmodel, file_list, nbins=90, frame_start=0, frame_stride=1, frame_end=-1, plot_per_page=2, temperature_list=None, plotfile='bond_hist.pdf', particle_mapping=None)[source]
Calculate and plot all bond length distributions from a CGModel object and trajectory
- Parameters
cgmodel (class) – CGModel() object
file_list (str or list(str)) – path to pdb or dcd trajectory file(s)
nbins (int) – number of histogram bins
frame_start (int) – First frame in trajectory file to use for analysis.
frame_stride (int) – Advance by this many frames when reading trajectories.
frame_end (int) – Last frame in trajectory file to use for analysis.
plot_per_page (int) – number of subplots to display on each page (default=2)
temperature_list (list(Quantity())) – list of temperatures corresponding to file_list. If None, file names will be the plot labels.
plotfile (str) – filename for saving bond length distribution pdf plots
particle_mapping (dict(str:str)) – dictionary mapping specific particle types to more general bonded types (for example, ‘sc1’ –> ‘sc’) (default=None)
- Returns
bond_hist_data ( dict )
Bond angle distributions
- analyze_foldamers.parameters.angle_distributions.calc_bond_angle_distribution(cgmodel, file_list, nbins=90, frame_start=0, frame_stride=1, frame_end=-1, plot_per_page=2, temperature_list=None, plotfile='angle_hist.pdf', particle_mapping=None)[source]
Calculate and plot all bond angle distributions from a CGModel object and pdb trajectory
- Parameters
cgmodel (class) – CGModel() object
file_list (str or list(str)) – path to pdb or dcd trajectory file(s)
nbins (int) – number of bins spanning the range of 0 to 180 degrees, default = 90
frame_start (int) – First frame in trajectory file to use for analysis.
frame_stride (int) – Advance by this many frames when reading trajectories.
frame_end (int) – Last frame in trajectory file to use for analysis.
plot_per_page (int) – number of subplots to display on each page (default=2)
temperature_list (list(Quantity())) – list of temperatures corresponding to file_list. If None, file names will be the plot labels.
plotfile (str) – Base filename for saving bond angle distribution pdf plots
particle_mapping (dict(str:str)) – dictionary mapping specific particle types to more general bonded types (for example, ‘sc1’ –> ‘sc’) (default=None)
- Returns
angle_hist_data ( dict )
Torsion angle distributions
- analyze_foldamers.parameters.angle_distributions.calc_torsion_distribution(cgmodel, file_list, nbins=180, frame_start=0, frame_stride=1, frame_end=-1, plot_per_page=2, temperature_list=None, plotfile='torsion_hist.pdf', particle_mapping=None)[source]
Calculate and plot all torsion distributions from a CGModel object and pdb or dcd trajectory
- Parameters
cgmodel (class) – CGModel() object
file_list (str or list(str)) – path to pdb or dcd trajectory file(s)
nbins (int) – number of bins spanning the range of -180 to 180 degrees, default = 180
frame_start (int) – First frame in trajectory file to use for analysis.
frame_stride (int) – Advance by this many frames when reading trajectories.
frame_end (int) – Last frame in trajectory file to use for analysis.
plot_per_page (int) – number of subplots to display on each page (default=2)
temperature_list (list(Quantity())) – list of temperatures corresponding to file_list. If None, file names will be the plot labels.
plotfile (str) – Base filename for saving torsion distribution pdf plots
particle_mapping (dict(str:str)) – dictionary mapping specific particle types to more general bonded types (for example, ‘sc1’ –> ‘sc’) (default=None)
- Returns
torsion_hist_data ( dict )
2D histograms
- analyze_foldamers.parameters.angle_distributions.calc_2d_distribution(cgmodel, file_list, nbin_xvar=180, nbin_yvar=180, frame_start=0, frame_stride=1, frame_end=-1, plotfile='2d_hist.pdf', xvar_name='bb_bb_bb', yvar_name='bb_bb_bb_bb', colormap='nipy_spectral', temperature_list=None, particle_mapping=None)[source]
Calculate and plot 2d histogram for any 2 bonded variables, given a CGModel object and pdb or dcd trajectory.
- Parameters
cgmodel (class) – CGModel() object
file_list (str or list(str)) – path to pdb or dcd trajectory file(s) - can be a list or single string
nbin_xvar (int) – number of bins for x bonded variable
nbin_yvar – number of bins for y bonded variable
frame_start (int) – First frame in trajectory file to use for analysis.
frame_stride (int) – Advance by this many frames when reading trajectories.
frame_end (int) – Last frame in trajectory file to use for analysis.
plotfile (str) – Filename for saving torsion distribution pdf plots
xvar_name (str) – particle sequence of the x bonded parameter, after any particle type mapping (default=”bb_bb_bb”)
yvar_name (str) – particle sequence of the y bonded parameter, after any particle type mapping (default=”bb_bb_bb_bb”)
colormap (str (case sensitive)) – matplotlib pyplot colormap to use (default=’nipy_spectral’)
temperature_list (list(Quantity())) – list of temperatures corresponding to file_list. If None, no subplot labels will be used.
particle_mapping (dict(str:str)) – dictionary mapping specific particle types to more general bonded types (for example, ‘sc1’ –> ‘sc’) (default=None)
- Returns
hist_data ( dict )
xedges ( dict )
yedges ( dict )
- analyze_foldamers.parameters.angle_distributions.calc_ramachandran(cgmodel, file_list, nbin_theta=180, nbin_alpha=180, frame_start=0, frame_stride=1, frame_end=-1, plotfile='ramachandran.pdf', backbone_angle_type='bb_bb_bb', backbone_torsion_type='bb_bb_bb_bb', colormap='nipy_spectral', temperature_list=None, particle_mapping=None)[source]
Calculate and plot ramachandran plot for backbone bond bending-angle and torsion angle, given a CGModel object and pdb or dcd trajectory.
- Parameters
cgmodel (class) – CGModel() object
file_list (str or list(str)) – path to pdb or dcd trajectory file(s) - can be a list or single string
nbin_theta (int) – number of bins for bond-bending angle (spanning from 0 to 180 degrees)
nbin_alpha – number of bins for torsion angle (spanning from -180 to +180 degrees)
frame_start (int) – First frame in trajectory file to use for analysis.
frame_stride (int) – Advance by this many frames when reading trajectories.
frame_end (int) – Last frame in trajectory file to use for analysis.
plotfile (str) – Filename for saving torsion distribution pdf plots
backbone_angle_type (str) – particle sequence of the backbone angles, after any particle type mapping (default=”bb_bb_bb”)
backbone_torsion_type (str) – particle sequence of the backbone angles, after any particle type mapping (default=”bb_bb_bb_bb”)
colormap (str (case sensitive)) – matplotlib pyplot colormap to use (default=’nipy_spectral’)
temperature_list (list(Quantity())) – list of temperatures corresponding to file_list. If None, no subplot labels will be used.
particle_mapping (dict(str:str)) – dictionary mapping specific particle types to more general bonded types (for example, ‘sc1’ –> ‘sc’) (default=None)
- Returns
hist_data ( dict )
xedges ( dict )
yedges ( dict )
- analyze_foldamers.parameters.angle_distributions.fit_ramachandran_data(hist_data, xedges, yedges)[source]
Calculate and plot ramachandran plot for backbone bond bending-angle and torsion angle, given a CGModel object and pdb or dcd trajectory.
- Parameters
hist_data (dict {series_name: 2D numpy array}) – dictionary containing 2D histogram data for one or more data series
xedges (dict {series_name: 1D numpy array}) – dictionary containing bin edges corresponding to x dimension of hist_data
yedges (dict {series_name: 1D numpy array}) – dictionary containing bin edges corresponding to y dimension of hist_data