io
Submodule handling the input/output operations.
load_pullf(pullf_files)
¶
Load filenames and resturns them as list.
Filenames can be taken from file or glob them from globpattern.
Parameters:
-
pullf_files
(Str
) –file which contains
pullf
filenames or globpattern
Returns:
-
filenames
((List[Str], Str1DArray)
) –list/array of filenames
Examples:
>>> from dcTMD.io import load_pullf
>>> # load filenames form file
>>> filenames = load_pullf('pullf_files.txt')
>>> # load filenames with glob pattern
>>> filenames = load_pullf('data/*.pullf.xvg')
Source code in src/dcTMD/io.py
write_output(out, estimator, filetype=('.dat', '.npz'))
¶
Take all calculated quantities and save them.
Parameters:
-
out
(Str
) –Output name. By default f'{out}_N{n_traj}_dG'
-
estimator
–Either a ForceEstimator or WorkEstimator instance.
-
filetype
–Output filetype, either '.dat', '.npz' or ['.dat', '.npz'].
Examples:
>>> from dcTMD.storing import load
>>> from dcTMD.io import write_output
>>> from dcTMD.dcTMD import WorkEstimator
>>> # Save the results from WorkEstimator
>>> # (ForceEstimator works similarly)
>>> # calculate dcTMD results from workset
>>> work = load('my_work_set')
>>> work_estimator = WorkEstimator(temperature=290.15)
>>> work_estimator.fit(work)
>>> out = 'my_dcTMD_results'
>>> # save results as '.npz' file
>>> write_output(out, work_estimator, filetype='.npz')