fit_priors.py¶
- mlcg_tk.scripts.fit_priors.compute_statistics(dataset_name, names, tag, save_dir, stride, batch_size, prior_tag, prior_builders, embedding_map, statistics_tag=None, device='cpu', save_figs=True, save_sample_statistics=False, weights_template_fn=None, mol_num_batches=1)[source]¶
Computes structural features and accumulates statistics on dataset samples
- Parameters:
dataset_name (str) – Name given to specific dataset
names (List[str]) – List of sample names
tag (str) – Label given to all output files produced from dataset
save_dir (str) – Path to directory from which input will be loaded and to which output will be saved
stride (int) – Integer by which to stride frames
batch_size (int) – Number of frames to take per batch
prior_tag (str) – String identifying the specific combination of prior terms
prior_builders (List[PriorBuilder]) – List of PriorBuilder objects and their corresponding parameters
embedding_map (CGEmbeddingMap) – Mapping object
statistics_tag (str) – String differentiating parameters used for statistics computation
device (str) – Device on which to run delta force calculations
save_sample_statistics (
bool) – If true, will save individual list of prior builders with accumulated statistics of one moleculesave_figs (bool) – Whether to plot histograms of computed statistics
weights_template_fn (str) – Template file location of weights to use for accumulating statistics
mol_num_batches (int) – If greater than 1, will save each molecule data into the specified number of batches that will be treated as different samples
- mlcg_tk.scripts.fit_priors.fit_priors(save_dir, prior_tag, embedding_map, temperature)[source]¶
Fits potential energy estimates to computed statistics
- Parameters:
save_dir (str) – Path to directory from which input will be loaded and to which output will be saved
prior_tag (str) – String identifying the specific combination of prior terms
embedding_map (CGEmbeddingMap) – Mapping object
temperature (float) – Temperature from which beta value will be computed