matmacore.plot module
- class matmacore.plot.Plot(data=None, desc: list = None)[source]
Bases:
objectA class that creates plots from a numpy array. It can make reaction coordinate diagrams, RMSD and RMSF trajectory plots, Free energy plots, Scatter Plots, and SNFG Figures.
- cmap(color_num: int = None, offset: float = 0, map: str = 'ice', reverse: bool = False)[source]
Generates and processes a colormap with optional offsetting logic. :param color_num: (int) Number of discrete colors. :param offset: (float) Fractional offset to shift the colormap. :param map: (str) Name of the colormap from the colormaps library.
- contour(xpm_mols, limit=16)[source]
Plots contour maps for a provided list of moles from xpm files. :param xpm_mols: (List) List of mol objects generated from xpm files. :param limit: (Int) The upper limit on your energy scale
- fes(mol, cols=[1, 2], temp=300, num_levels=8, num_ticks=8)[source]
Plots MD FES. Takes in data for CP2K or Gromacs via Mol. :param mol: (Mol) Class Mol. :param cols: (int) Index of the 2 columns containing your colvar data, in the case that you have more than 2.
- foo_plot(mol, SCR=None, w=0.5)[source]
Not a bar plot. Mostly used for SCR stuff :param mol: (mol) mol objects generated from csv files. :param SCR: (list) Specifies specific SCRs to plot from your data. Otherwise, default is to plot them all. :param w: (float) Width of the lines in the foo plot.
- multi_profile(reaction_data, labels=None, type=<class 'str'>, units='kcal')[source]
Plots multiple reaction profiles, accepting either: - Raw mol_lists + labels, or - Reaction list from create_reaction_list()
- Parameters:
reaction_data – Either list of mol_lists OR output from create_reaction_list()
labels – Optional if using create_reaction_list() output
type – Energy type (‘E’, ‘F’, or ‘H’)
units – Energy units (‘kcal’, ‘Eh’, or ‘kJ’)
- puckers_hist(mol_pucker, mol_fem, puckers=['1C4', '1,4B'], limit=16, temp=300)[source]
Plots ring pucker free energy surface. Requires 2 mol objects to run. :param mol_pucker: (Mol) Class Mol containing the .xvg file for your ring pucker determination. :param mol_fem: (Mol) Class Mol containing the .xvg file for your free energy surface.
- rdf(mol, xmin=0, xmax=10)[source]
Plots radial distribution function. :param mol: (Mol) Class Mol generated from xvg file :param xmin: (Int) Minimum x value for rdf plot :param xmax: (Int) Maximum x value for rdf plot
- reaction_profile(mol_list, labels, type=<class 'str'>, units='kcal')[source]
Plots a reaction coordinate diagram.
- Parameters:
mol_list (list) – a list of mol objects
labels (list) – a list of labels for the mol objects
type (str) – the type of energy that will be plotted (‘E’ or ‘F’ or ‘H’)
units (str) – the units of energy to be used (‘kcal’, ‘Eh’, or ‘kJ’). Default is ‘kcal’.
- Returns:
A Reaction Coordinate Diagram Energy Plot
- trajectory(mol_list, var_name='colvar', col=1, average=None, title=None, hist=True, alpha=None, calc_qa=False, overlap=False)[source]
Plots MD trajectory with histogram. Takes in data for CP2K or Gromacs via Mol. :param molecule: (Mol / List) Either a Mol object, or a list of moles if you want to overlay data. :param var_name: (list) Name of the collective variable you are plotting on your y-axis. :param col: (int) Index of the column containing your colvar data, in the case that you have multiple.