produce_delta_forces.py¶
- mlcg_tk.scripts.produce_delta_forces.produce_delta_forces(dataset_name, names, tag, save_dir, prior_tag, prior_fn, device, batch_size, force_tag=None, mol_num_batches=1)[source]¶
Removes prior energy terms from input forces to produce delta force input for training
- 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
prior_tag (str) – String identifying the specific combination of prior terms
prior_fn (str) – Path to filename in which prior model is saved
device (str) – Device on which to run delta force calculations
batch_size (int) – Number of frames to take per batch
force_tag (str) – Optional tag to identify input for a particular run of delta force calculation
mol_num_batches (int) – If greater than 1, will load each molecule data from the specified number of batches that were be treated as different samples
- mlcg_tk.scripts.produce_delta_forces.remove_baseline_forces_collated(collated_data, model)[source]¶
Compute the forces on the input
collated_datawith themodelsand remove them from the reference forces contained indata_list. The computation of the forces is done on the wholedata_listat once so it should not be too large.- Parameters:
collated_data (
AtomicData) – Collated list of AtomicData instances that contain the full reference forcesmodels – SumOut object containing models that compute prior/baseline forces
- Returns:
Uncollated list of AtomicData instances, where the value of the ‘forces’ field is now the delta forces (original forces minus the baseline/prior forces). An additional field ‘baseline’ forces is added, whose value is equal to the baseline/prior forces
- Return type:
List[AtomicData]