Welcome to the plumitas documentation!¶
plumitas¶
API¶
plumitas.core¶
-
plumitas.core.
read_colvar
(filename='COLVAR', multi=0, unbiased=False)¶ Function that takes experimental data and gives us the dependent/independent variables for analysis.
Parameters: - filename (string) – Name of the COLVAR file to read in.
- multi (int) – Tells the method to read 1 or more COLVAR files. Default falsy value (0) means read only 1 file.
- unbiased (bool) – If True, adds a ‘weight’ column of all 1s.
Returns: df – CVs and bias as columns, time as index.
Return type: Pandas DataFrame
-
plumitas.core.
read_hills
(filename='HILLS')¶ Function that takes experimental data and gives us the dependent/independent variables for analysis.
Parameters: filename (string) – Name of the COLVAR file to read in. Returns: df – CVs and bias as columns, time as index. Return type: Pandas DataFrame
plumitas.visualization¶
-
plumitas.visualization.
make_2d_free_energy_surface
(df, x, y, temp, weight=None, bins=20, clim=None, xlim=None, ylim=None)¶ Create a 2D FES from a COLVAR file with static ‘pb.bias’. This function will be modularized and generalized, but I wanted to include something more exciting than reading colvar/hills files for the first PyPI cut.
Parameters: - df (Pandas DataFrame) – DataFrame generated from Plumed COLVAR file. This DataFrame must have a column with static ‘pb.bias’ - most likely generated from mdrun rerun - and at two CVs.
- x (string) – Name of one of the CVs (column name from df).
- y (string) – Name of one of the CVs (column name from df).
- bins (int) – Number of bins in each dimension to segment histogram.
- temp (float) – Temperature of simulation which generated Plumed file.
- weight (str) – Name of static bias column.
- clim (int) – Maximum free energy (in kJ/mol) for color bar.
- xlim (tuple/list) – Limits for x axis in plot (i.e. [x_min, x_max]).
- ylim (tuple/list) – Limits for y axis in plot (i.e. [y_min, y_max]).
Returns: axes
Return type: matplotlib.AxesSubplot
-
plumitas.visualization.
potential_of_mean_force
(df, collective_variables, temp, weight=None, bins=100, xlim=None, ylim=None)¶ Create PMF plot for one or several collective variables.
Parameters: - df (Pandas DataFrame) – DataFrame generated from Plumed COLVAR file. This DataFrame must have a column with static ‘pb.bias’ - most likely generated from mdrun rerun - and at two CVs.
- collective_variables (list) – List of CVs you’d like to plot. These should be supplied in the form of a list of column names, or an instance of pd.Index using df.columns
- temp (float) – Temperature of simulation which generated Plumed file.
- weight (str) – Name of static bias column.
- bins (int) – Number of bins in each dimension to segment histogram.
- xlim (tuple/list) – Limits for x axis in plot (i.e. [x_min, x_max]).
- ylim (tuple/list) – Limits for y axis in plot (i.e. [y_min, y_max]).
Returns: axes
Return type: matplotlib.AxesSubplot
Testing¶
plumitas.tests¶
plumitas.tests.test_plumitas¶
-
plumitas.tests.test_plumitas.
test_make_2d_free_energy_surface
()¶ Testing functions to reweight based on COLVAR from biased simulations and generate 2D free energy surface.
-
plumitas.tests.test_plumitas.
test_potential_of_mean_force
()¶ Testing functions to reweight based on COLVAR from biased simulations and generate 1D potential of mean force.
-
plumitas.tests.test_plumitas.
test_read_files
()¶ Testing function to convert of COLVAR file to pandas DataFrame.