sarkas.utilities.io.InputOutput#

class sarkas.utilities.io.InputOutput(process='preprocess')[source]#

Class handling the input and output functions of the MD run.

Parameters

process (str) – Name of the process class containing MD run info.

Methods

InputOutput.__init__([process])

InputOutput.algorithm_info(simulation)

Print algorithm information.

InputOutput.copy_params(params)

Copy necessary parameters.

InputOutput.create_file_paths()

Create all directories', subdirectories', and files' paths.

InputOutput.datetime_stamp()

Add a Date and Time stamp to the log file.

InputOutput.directory_size_report(sizes, process)

Print the estimated file sizes.

InputOutput.dump(phase, ptcls, it)

Save particles' position, velocity, and acceleration data to binary file for future restart.

InputOutput.dump_observables(phase, ptcls, it)

Save particles' data to binary file (uncompressed npz) for future restart.

InputOutput.dump_potfit_config([phase, ...])

Write configuration files for PotFit by reading the npz dumps.

InputOutput.dump_thermodynamics(phase, ptcls, it)

Save particles' data to binary file for future restart.

InputOutput.dump_xyz([phase, dump_start, ...])

Save the XYZ file by reading Sarkas dumps.

InputOutput.file_header()

Create the log file and print the figlet if not a restart run.

InputOutput.from_dict(input_dict)

Update attributes from input dictionary.

InputOutput.from_yaml(filename)

Parse inputs from YAML file.

InputOutput.make_directories()

Make directories in directory_tree where to store the MD results.

InputOutput.make_directory_tree()

Construct the tree of directory paths of the MD simulation and save it into directory_tree.

InputOutput.make_files_tree()

Make the dictionary of files' names and paths, filenames_tree.

InputOutput.postprocess_info(simulation[, ...])

InputOutput.potential_info(simulation)

Print potential information.

InputOutput.preprocess_timing(str_id, t, loops)

Print times estimates of simulation to file first and then to screen if verbose.

InputOutput.read_npz(fldr, filename)

Load particles' data from dumps.

InputOutput.read_particles_npz(fldr, filename)

Load particles' data from dumps.

InputOutput.read_pickle(process[, dir_path])

Read pickle files containing all the simulation information.

InputOutput.read_pickle_single(class_to_read)

Read the desired pickle file.

InputOutput.save_pickle(simulation)

Save all simulations parameters in pickle files.

InputOutput.screen_figlet()

Print a colored figlet of Sarkas to screen.

InputOutput.setup()

Create file paths and directories for the simulation.

InputOutput.setup_checkpoint(params)

Assign attributes needed for saving dumps.

InputOutput.simulation_summary(simulation)

Print out to file a summary of simulation's parameters.

InputOutput.time_info(simulation)

Print time simulation's parameters.

InputOutput.time_stamp(time_stamp, t)

Print out to screen elapsed times.

InputOutput.timing_study(simulation)

Info specific for timing study.

InputOutput.write_to_logger(message)

Append the message to log file.