Save and load results

Three functions serve the purpose of saving and loading the results obtained with ComplexMixtures:

Save data to recover it later

save(results,"results.json")

where results is the output data structure of the mddf() calculation, and results.json is the output file to be created. The file is written in JSON format, thus is not naturally human-readable.

Load saved data

results = load("results.json")

The load function reads the output of the save function above, and restores the results data structure.

Write data in a human-readable format

If you Want the results to be written as simple ASCII tables such that you can read them with another analysis program, plotting graphic, or just want to inspect the data visually, use:

write(results,"results.dat")

Three files will be created by this function:

results.dat: Contains the main results, as the MDDF and KB-integral data.

results-ATOM_CONTRIB_SOLVENT.dat: contains the contribution of each atom type of the solvent to the MDDF.

results-ATOM_CONTRIB_SOLUTE.dat: contains the contribution of each atom type of the solute to the MDDF.

Base.writeMethod
write(
    R::Result, filename::String;
    solute_group_names::Vector{String} = R.solute.group_names,
    solvent_group_names::Vector{String} = R.solvent.group_names,
)

Function to write the final results to output files as simple tables that are human-readable and easy to analyze with other software

If the solute and solvent group names are defined in R, the solute_group_names and solvent_group_names arguments are not necessary. If they are not defined, the user can pass the names of the groups as strings in the solute_group_names and solvent_group_names arguments.

source