Output¶
- class openfts.Output(file_format='plain_text', field_errors_file='error.dat', scalar_operators_file='operators.dat', exchange_fields_file='fields', exchange_fields_save_history=False, species_densities_file='density', species_densities_save_history=False)¶
Contains filenames to outpupt fields to
- Parameters:
file_format (string) – File format to output fields to (options: “hdf5”, “plain_text”; default: “plain_text”)
scalar_operators_file (string) – Scalar Operators specified in Operator. Name of file to save, defaults to “operators.dat”.
field_errors_file (string) – Field errors for spefified model (e.g. \(|\frac{\delta H}{\delta \mu_+}|_{L1}\), \(|\frac{\delta H}{\delta \mu_-}|_{L1}\)). These are used to evaluate the convergence of SCFT. Name of file to save, defaults to “errors.dat”
species_densities_file (string) – Species densities for specified model (e.g. \(\rho_A\), \(\rho_B\)). Name of file to save, defaults to “density.dat”
species_densities_save_history (bool) – should the entire history be saved, or only the final value?
exchange_fields_file (string) – Exchange fields for specified model (e.g. \(\mu_+\), \(\mu_-\)). Can be useful for re-initializing a simulation. Name of file to save, defaults to “fields.dat”
exchange_fields_save_history (bool) – should the entire history be saved, or only the final value?
One additional file that is output (which cannot be currently customized) is STATUS, the status of the current driver->run() command. Possible values are:
0 - the simulation is still running
1 - the forces in the simulation look fishy, may have diverged
2 - the SCFT converged correctly to the specified tolerance
3 - the run command reached the maximum number of specified steps
Example (python)
# default filenames fts.output = openfts.Output() # to change filenames fts.output = openfts.Output(species_densities_file="density2.dat") fts.output.fields.exchange_fields.file = "fields2.dat"
Example (json)
"output": { "scalar_operators": {"file": "operators.dat"}, "fields": { "species_densities": { "file": "density.dat", "save_history": false }, "exchange_fields" : { "file": "fields.dat", "save_history": false } }, "field_errors" : {"file": "error.dat"} },