Simulation Module#
- class nexus.simulation.SimulationInput(*vars, **kwargs)[source]#
Bases:
NexusCore- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_path
get_required
incorporate_system
inverse
is_valid
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
read
read_file_text
read_text
return_structure
return_system
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_file_text
write_splash
write_text
- class nexus.simulation.SimulationAnalyzer(sim)[source]#
Bases:
NexusCore- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
analyze
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_splash
- class nexus.simulation.SimulationEmulator(*vars, **kwargs)[source]#
Bases:
NexusCore- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
run
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_splash
- class nexus.simulation.SimulationImage[source]#
Bases:
NexusCore- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
leave
list_optional
load
load_image
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
save_image
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_splash
- save_only_fields = {'block', 'block_subcascade', 'imlocdir', 'imremdir', 'imresdir', 'locdir', 'remdir', 'resdir'}#
- load_fields = {'analyzed', 'analyzer_image', 'app_name', 'app_props', 'errfile', 'failed', 'files', 'finished', 'got_output', 'identifier', 'image_dir', 'infile', 'input_image', 'outfile', 'outputs', 'path', 'process_id', 'sent_files', 'setup', 'sim_image', 'subcascade_finished', 'submitted'}#
- save_fields = {'analyzed', 'analyzer_image', 'app_name', 'app_props', 'block', 'block_subcascade', 'errfile', 'failed', 'files', 'finished', 'got_output', 'identifier', 'image_dir', 'imlocdir', 'imremdir', 'imresdir', 'infile', 'input_image', 'locdir', 'outfile', 'outputs', 'path', 'process_id', 'remdir', 'resdir', 'sent_files', 'setup', 'sim_image', 'subcascade_finished', 'submitted'}#
- class nexus.simulation.Simulation(**kwargs)[source]#
Bases:
NexusCore- Attributes:
- working_directory
Methods
acquire_dependents(sim)append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])separate_inputs(kwargs[, overlapping_kw, ...])sorted_keys()traverse_full_cascade(operation, *args, **kwargs)warn(msg[, indent])Warning from inside a Nexus class.
active
add
add_optional
analyze
analyzer_type
app_command
attempt_files
block_dependents
check_dependencies
check_required
check_result
check_sim_status
check_status
check_subcascade
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
clear_all_sims
close_log
code_name
completed
condense_name
copy
copy_file
copy_from
copy_to
create_directories
data_repr
delete
delete_optional
delete_required
depends
dict
dlog
downstream_simids
errfile_text
execute
extract
extract_optional
fake
fill_produces
fill_products
get
get_dependencies
get_optional
get_output
get_output_files
get_path
get_required
get_result
has_generic_input
idstr
incorporate_result
init_job
init_job_extra
input_type
inverse
items
last
leave
list_optional
load
load_analyzer_image
load_image
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
outfile_text
path_exists
post_analyze
post_init
post_submit
pre_check_status
pre_create_directories
pre_init
pre_send_files
pre_write_inputs
progress
propagate_identifier
random_key
ready
reconstruct_cascade
reset_indicators
reset_wait_ids
save_analyzer_image
save_attempt
save_image
select_random
send_files
serial
set
set_app_name
set_directories
set_files
set_optional
set_path
shallow_copy
show_input
submit
tlog
to_dict
to_obj
transfer_from
transfer_to
traverse_cascade
tree
tuple
undo_depends
update_process_id
values
write
write_dependents
write_end_splash
write_inputs
write_prep
write_splash
- input_type#
alias of
SimulationInput
- analyzer_type#
alias of
SimulationAnalyzer
- generic_identifier = 'sim'#
- infile_extension = '.in'#
- outfile_extension = '.out'#
- errfile_extension = '.err'#
- application = 'simapp'#
- application_properties = {'serial'}#
- application_results = {}#
- allow_overlapping_files = False#
- allowed_inputs = {'analysis_request', 'app_name', 'app_props', 'block', 'block_subcascade', 'dependencies', 'errfile', 'fake_sim', 'files', 'force_restart', 'force_write', 'identifier', 'imagefile', 'infile', 'input', 'job', 'outfile', 'path', 'restartable', 'simlabel', 'skip_submit', 'system'}#
- sim_imagefile = 'sim.p'#
- input_imagefile = 'input.p'#
- analyzer_imagefile = 'analyzer.p'#
- image_directory = 'sim'#
- supports_restarts = False#
- renew_app_command = False#
- is_bundle = False#
- sim_count = 0#
- creating_fake_sims = False#
- sim_directories = {}#
- all_sims = []#
- class nexus.simulation.NullSimulationInput(*vars, **kwargs)[source]#
Bases:
SimulationInput- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_path
get_required
incorporate_system
inverse
is_valid
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
read
read_file_text
read_text
return_structure
return_system
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_file_text
write_splash
write_text
- class nexus.simulation.NullSimulationAnalyzer(sim)[source]#
Bases:
SimulationAnalyzer- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
analyze
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_splash
- class nexus.simulation.GenericSimulation(**kwargs)[source]#
Bases:
Simulation- Attributes:
- working_directory
Methods
acquire_dependents(sim)append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
eliminate()enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])separate_inputs(kwargs[, overlapping_kw, ...])sorted_keys()traverse_full_cascade(operation, *args, **kwargs)warn(msg[, indent])Warning from inside a Nexus class.
active
add
add_optional
analyze
analyzer_type
app_command
attempt_files
block_dependents
check_dependencies
check_required
check_result
check_sim_status
check_status
check_subcascade
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
clear_all_sims
close_log
code_name
completed
condense_name
copy
copy_file
copy_from
copy_to
create_directories
data_repr
delete
delete_optional
delete_required
depends
dict
dlog
downstream_simids
errfile_text
execute
extract
extract_optional
fake
fill_produces
fill_products
get
get_dependencies
get_optional
get_output
get_output_files
get_path
get_required
get_result
has_generic_input
idstr
incorporate_result
init_job
init_job_extra
input_type
inverse
items
last
leave
list_optional
load
load_analyzer_image
load_image
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
outfile_text
path_exists
post_analyze
post_init
post_submit
pre_check_status
pre_create_directories
pre_init
pre_send_files
pre_write_inputs
progress
propagate_identifier
random_key
ready
reconstruct_cascade
reset_indicators
reset_wait_ids
save_analyzer_image
save_attempt
save_image
select_random
send_files
serial
set
set_app_name
set_directories
set_files
set_optional
set_path
shallow_copy
show_input
submit
tlog
to_dict
to_obj
transfer_from
transfer_to
traverse_cascade
tree
tuple
undo_depends
update_process_id
values
write
write_dependents
write_end_splash
write_inputs
write_prep
write_splash
- allowed_inputs = {'analysis_request', 'app_name', 'app_props', 'block', 'block_subcascade', 'dependencies', 'errfile', 'fake_sim', 'files', 'force_restart', 'force_write', 'identifier', 'imagefile', 'infile', 'input', 'job', 'outfile', 'outfiles', 'path', 'restartable', 'simlabel', 'skip_submit', 'system'}#
- class nexus.simulation.SimulationInputTemplateDev(filepath=None, text=None)[source]#
Bases:
SimulationInput- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
allow_no_assign
assign
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_path
get_required
incorporate_system
inverse
is_valid
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
preprocess
random_key
read
read_file_text
read_text
reset
return_structure
return_system
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_file_text
write_splash
write_text
- class nexus.simulation.SimulationInputMultiTemplateDev(**file_templates)[source]#
Bases:
SimulationInput- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_path
get_required
incorporate_system
inverse
is_valid
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
read
read_file_text
read_text
return_structure
return_system
select_random
serial
set
set_optional
set_path
set_templates
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_file_text
write_splash
write_text
- class nexus.simulation.SimulationInputTemplate(filepath=None, text=None)[source]#
Bases:
SimulationInputTemplateDev,GenericSimulationInput- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
allow_no_assign
assign
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_path
get_required
incorporate_system
inverse
is_valid
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
preprocess
random_key
read
read_file_text
read_text
reset
return_structure
return_system
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_file_text
write_splash
write_text
- class nexus.simulation.SimulationInputMultiTemplate(**file_templates)[source]#
Bases:
SimulationInputMultiTemplateDev,GenericSimulationInput- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_path
get_required
incorporate_system
inverse
is_valid
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
read
read_file_text
read_text
return_structure
return_system
select_random
serial
set
set_optional
set_path
set_templates
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_file_text
write_splash
write_text
- nexus.simulation.graph_sims(sims=None, savefile=None, useid=False, exit=True, quants=True, display=True)[source]#
- class nexus.simulation.DynamicProcess(dpid, sim, requires)[source]#
Bases:
DevBaseEnables dynamic workflows execution
Basic DP contains a single simulation. Derived classes may perform more elaborate processes, i.e. recovery for failed jobs, resetting the primary simulation object (sim data member) to point at the final sim in the process.
Takes the place of Simulation in user scripts. All generate_* simulation functions return DP’s when executing dynamic workflows.
- Attributes:
- analyzed
- analyzer_image
- block
- charge_density
- done
- fail
- failed
- finished
- got_output
- identifier
- input
- jastrow
- job
- orbitals
- products
- pwscf_orbitals
- sent_files
- setup
- simid
- skip_submit
- structure
- submitted
- succ
- system
- wavefunction
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)Check if all input/dependency requirements are met
save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_first_gen
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
shallow_copy
show_input
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- all_dynamic_processes#
- allowed_requirements = {'charge_density', 'jastrow', 'none', 'orbitals', 'pwscf_orbitals', 'structure', 'wavefunction'}#
- property products#
- property structure#
- property charge_density#
- property orbitals#
- property jastrow#
- property wavefunction#
- property pwscf_orbitals#
- property simid#
- property identifier#
- property job#
- property input#
- property system#
- property analyzer_image#
- property setup#
- property sent_files#
- property submitted#
- property finished#
- property got_output#
- property analyzed#
- property failed#
- property skip_submit#
- property block#
- property done#
- property succ#
- property fail#