CP2K 2.4 (Revision 12889)
Classes | Functions | Variables

cp_output_handling Namespace Reference

routines to handle the output, The idea is to remove the decision of wheter to output and what to output from the code that does the output, and centralize it here. More...

Classes

struct  cp_out_flags_type
 stores the flags_env controlling the output of properties More...

Functions

subroutine, public cp_print_key_section_create (print_key_section, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, supported_feature, unit_str, error)
 creates a print_key section
function, public cp_print_key_should_output (iteration_info, basis_section, print_key_path, used_print_key, first_time, error)
 returns what should be done with the given proprety if btest(res,cp_p_store) then the property should be stored in memory if btest(res,cp_p_file) then the property should be print ed to a file if res==0 then nothing should be done
LOGICAL, public cp_printkey_is_on (iteration_info, print_key, error)
 returns true if the printlevel activates this printkey does not look if this iteration it should be printed
function cp_printkey_is_iter (iteration_info, print_key, first_time, error)
 returns if the actual iteration matches those selected by the given printkey. Does not check it the prinkey is active (at the actual print_level)
CHARACTER(len=default_string_length),
public 
cp_iter_string (iter_info, print_key, for_file, error)
 returns the iteration string, a string that is useful to create unique filenames (once you trim it)
subroutine, public cp_iterate (iteration_info, last, iter_nr, increment, iter_nr_out, error)
 adds one to the actual iteration
subroutine, public cp_add_iter_level (iteration_info, level_name, n_rlevel_new, error)
 Adds an iteration level.
subroutine, public cp_rm_iter_level (iteration_info, level_name, n_rlevel_att, error)
 Removes an iteration level.
CHARACTER(len=default_path_length),
public 
cp_print_key_generate_filename (logger, print_key, middle_name, extension, my_local, error)
 Utility function that retuns a unit number to write the print key. Might open a file with a unique filename, generated from the print_key name and iteration info.
INTEGER, public cp_print_key_unit_nr (logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, error)
subroutine, public cp_print_key_finished_output (unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, error)
 should be called after you finish working with a unit obtained with cp_print_key_unit_nr, so that the file that might have been opened can be closed.
subroutine, public cp_print_key_log (logger, basis_section, print_key_path, extension, message, middle_name, local, log_filename, ignore_should_output, on_file, error)
 utility method to print out a string

Variables

LOGICAL, parameter, private debug_this_module = .TRUE.
CHARACTER(len=*), parameter,
private 
moduleN = 'cp_output_handling'
INTEGER, parameter, public cp_p_file_if = 3
INTEGER, parameter, public cp_p_store_if = 4
INTEGER, parameter, public cp_p_store = 2
INTEGER, parameter, public cp_p_file = 1
INTEGER, parameter, public cp_p_file_each = 5
INTEGER, parameter, public cp_p_store_each = 6
INTEGER, parameter, public cp_p_calc = 7
INTEGER, parameter, public cp_out_none = 0
INTEGER, parameter, public cp_out_file_if = IBSET(0, cp_p_file_if)
INTEGER, parameter, public cp_out_store_if = IBSET(0, cp_p_store_if)
INTEGER, parameter, public cp_out_file = IBSET(0, cp_p_file)
INTEGER, parameter, public cp_out_store = IBSET(0, cp_p_store)
INTEGER, parameter, public cp_out_calc = IBSET(0, cp_p_calc)
INTEGER, parameter, public cp_out_file_each = IBSET(0, cp_p_file_each)
INTEGER, parameter, public cp_out_store_each = IBSET(0, cp_p_store_each)
INTEGER, parameter, public cp_out_default = cp_out_file_if
INTEGER, save, private last_flags_id = 0

Detailed Description

routines to handle the output, The idea is to remove the decision of wheter to output and what to output from the code that does the output, and centralize it here.

Note:
These were originally together with the log handling routines, but have been spawned off. Some dependencies are still there, and some of the comments about log handling also applies to output handling:
See also:
cp_log_handling
History
12.2001 created [fawzi] 08.2002 updated to new logger [fawzi] 10.2004 big rewrite of the output methods, connected to the new input, and iteration_info [fawzi] 08.2005 property flags [fawzi]
Author:
Fawzi Mohamed

Function Documentation

subroutine,public cp_output_handling::cp_add_iter_level ( TYPE(cp_iteration_info_type),pointer  iteration_info,
CHARACTER(LEN=*),intent(in)  level_name,
INTEGER,intent(out),optional  n_rlevel_new,
TYPE(cp_error_type),intent(inout)  error 
)

Adds an iteration level.

Parameters:
iteration_infothe iteration info to which an iteration level has to be added
level_namethe name of this level, for pretty printing only, right now
n_level_newnumber of iteration levels after this call
errorvariable to control error logging, stopping,... see module cp_error_handling
Author:
fawzi

Definition at line 651 of file cp_output_handling.f90.

Referenced by cp2k_runs::cp2k_run(), cell_opt::cp_cell_opt(), geo_opt::cp_geo_opt(), geo_opt::cp_rot_opt(), bsse::do_bsse_calculation(), optimize_input::force_matching(), helium_sampling::helium_do_run(), metadynamics::hills(), linOp::linOp(), neb_methods::neb(), shell_opt::optimize_shell_core(), pint_methods::pint_do_run(), md_run::qs_mol_dyn_low(), tamc_run::qs_tamc(), replica_methods::rep_env_init_low(), rt_propagation::run_propagation(), qs_scf::scf_env_do_scf(), ep_methods::stupid_solve(), and xas_tp_scf::xas_do_tp_scf().

Here is the caller graph for this function:

CHARACTER(len=default_string_length),public cp_output_handling::cp_iter_string ( TYPE(cp_iteration_info_type),pointer  iter_info,
TYPE(section_vals_type),optional,pointer  print_key,
LOGICAL,intent(in),optional  for_file,
TYPE(cp_error_type),intent(inout)  error 
)

returns the iteration string, a string that is useful to create unique filenames (once you trim it)

Parameters:
iter_infothe iteration info from where to take the iteration number
print_keythe print key to optionally show the last iteration symbolically
for_fileif the string is to be used for file generation (and should consequently ignore some iteration levels depending on COMMON_ITERATION_LEVELS). Defaults to false.
errorvariable to control error logging, stopping,... see module cp_error_handling
Note:
If the root level is 1 removes it
Author:
fawzi

Definition at line 539 of file cp_output_handling.f90.

References string_utilities::compress().

Referenced by qs_loc_methods::centers_spreads_berry(), qs_loc_methods::centers_spreads_pipek(), cp_print_key_generate_filename(), cp_print_key_unit_nr(), fp_methods::fp_eval(), qs_loc_methods::print_wannier_centers(), qs_loc_methods::print_wannier_traj(), ep_methods::qs_check_i_alloc(), and qs_scf_post_gpw::qs_scf_post_loc_dip().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public cp_output_handling::cp_iterate ( TYPE(cp_iteration_info_type),pointer  iteration_info,
LOGICAL,intent(in),optional  last,
INTEGER,intent(in),optional  iter_nr,
INTEGER,intent(in),optional  increment,
INTEGER,intent(out),optional  iter_nr_out,
TYPE(cp_error_type),intent(inout)  error 
)

adds one to the actual iteration

Parameters:
iteration_infothe iteration info to update
lastif this iteration is the last one (defaults to false)
errorvariable to control error logging, stopping,... see module cp_error_handling
Note:
this is supposed to be called at the beginning of each iteration
Author:
fawzi

Definition at line 604 of file cp_output_handling.f90.

Referenced by f77_interface::calc_energy_force(), cg_optimizer::cp_cg_main(), bfgs_optimizer::geoopt_bfgs(), cp_lbfgs_geo::geoopt_lbfgs(), and ep_methods::stupid_solve().

Here is the caller graph for this function:

subroutine,public cp_output_handling::cp_print_key_finished_output ( INTEGER,intent(inout)  unit_nr,
TYPE(cp_logger_type),pointer  logger,
TYPE(section_vals_type),pointer  basis_section,
CHARACTER(len=*),intent(in),optional  print_key_path,
LOGICAL,intent(in),optional  local,
LOGICAL,intent(in),optional  ignore_should_output,
LOGICAL,intent(in),optional  on_file,
TYPE(cp_error_type),intent(inout)  error 
)

should be called after you finish working with a unit obtained with cp_print_key_unit_nr, so that the file that might have been opened can be closed.

the inputs should be exactly the same of the corresponding cp_print_key_unit_nr

Note:
closes if the corresponding filename of the printkey is not __STD_OUT__
History
08.2002 created [fawzi]
Author:
Fawzi Mohamed

Definition at line 1014 of file cp_output_handling.f90.

References cp_files::close_file(), cp_p_file, cp_print_key_should_output(), CPPostcondition, and error.

Referenced by md_vel_utils::angvel_control(), atom_basis::atom_basis_opt(), atom::atom_code(), atom_energy::atom_energy_opt(), atom_pseudo::atom_pseudo_opt(), se_fock_matrix_coulomb_mpi::build_fock_matrix_coulomb_lr(), se_fock_matrix_coulomb_ga::build_fock_matrix_coulomb_lr(), paw_proj_set_types::build_projector(), scptb_ks_matrix::build_scptb_ks_matrix(), se_fock_matrix_mpi::build_se_fock_matrix(), se_fock_matrix_ga::build_se_fock_matrix(), et_coupling::calc_et_coupling(), qs_dispersion_pairpot::calculate_dispersion_pairpot(), qs_initial_guess::calculate_first_density_matrix(), neb_utils::check_convergence(), ewald_spline_util::check_spline_interp_TabLR(), force_fields_util::clean_intra_force_kind(), colvar_methods::colvar_read(), averages_types::compute_averages(), md_vel_utils::comvel_control(), topology::connectivity_control(), wannier_states::construct_wannier_states(), topology::coordinate_control(), cp2k_debug::cp2k_debug_energy_and_forces(), environment::cp2k_finalize(), environment::cp2k_read(), environment::cp2k_setup(), cp_ddapc::cp_ddapc_apply_CD(), cp_ddapc::cp_ddapc_apply_RF(), cp_ddapc::cp_ddapc_apply_RS(), cp_ddapc_util::cp_ddapc_init(), dimer_methods::cp_eval_at_ts(), cp_lbfgs_optimizer_gopt::cp_opt_gopt_step(), cp_print_key_log(), qs_linres_op::current_operators(), gaussian_gridlevels::destroy_gaussian_gridlevel(), distribution_optimize::distribute_2d_monte_carlo(), qs_scf_diagonalization::do_block_davidson_diag(), qs_scf_diagonalization::do_block_krylov_diag(), free_energy_methods::dump_ac_info(), neb_io::dump_neb_info(), ep_methods::ep_env_calc_e0(), ep_methods::ep_env_transfer_psi0(), qs_linres_epr_utils::epr_env_init(), ewald_pw_types::ewald_pw_init(), farming_methods::farming_parse_input(), fist_environment::fist_init(), fist_pol_scf::fist_pol_evaluate_cg(), fist_pol_scf::fist_pol_evaluate_sc(), force_env_methods::force_env_calc_energy_force(), force_env_methods::force_env_calc_num_pressure(), force_fields_util::force_field_pack(), force_fields_util::force_field_qeff_output(), fp_types::fp_env_write(), free_energy_methods::free_energy_evaluate(), cp_ddapc_util::get_ddapc(), hfx_types::hfx_print_info(), topology_psf::idm_psf(), qs_rho0_methods::init_rho0(), orbital_transformation_matrices::init_spherical_harmonics(), md_vel_utils::initialize_cascade(), md_vel_utils::initialize_velocities(), qs_linres_op::issc_operators(), qs_kpp1_env_methods::kpp1_calc_k_p_p1(), library_tests::lib_test(), qs_linres_module::linres_calculation(), qs_linres_module::linres_init(), fist_neighbor_list_control::list_control(), force_env_methods::mixed_energy_forces(), mode_selective::molden_guess(), molden_utils::molden_out(), mp2::mp2_main(), mode_selective::ms_out(), scf_control_types::ot_diag_read_input(), qs_ot_scf::ot_scf_mini(), qs_ot_scf::ot_scf_read_input(), qs_p_env_methods::p_env_psi0_changed(), barostat_utils::print_barostat_status(), qmmm_init::print_image_charge_info(), metadynamics_utils::print_metadyn_info(), qmmm_init::print_qmmm_charges(), qmmm_init::print_qmmm_links(), topology_psf::psf_post_process(), hfx_admm_utils::pw_hfx(), qs_ks_qmmm_methods::qmmm_calculate_energy(), qmmm_topology_util::qmmm_connectivity_control(), qmmm_topology_util::qmmm_coordinate_control(), qmmm_main::qmmm_create_force_env_low(), qmmm_gpw_forces::qmmm_debug_forces(), force_env_methods::qmmm_energy_and_forces_low(), qmmm_gpw_forces::qmmm_forces(), qmmm_gaussian_init::qmmm_gaussian_initialize(), qmmm_per_elpot::qmmm_per_potential_init(), qs_diis::qs_diis_b_check_i_alloc(), qs_diis::qs_diis_b_step(), topology_amber::read_connectivity_amber(), topology_cif::read_coordinate_cif(), topology_cp2k::read_coordinate_cp2k(), topology_amber::read_coordinate_crd(), topology_gromos::read_coordinate_g96(), topology_pdb::read_coordinate_pdb(), topology_xtl::read_coordinate_xtl(), topology_xyz::read_coordinate_xyz(), environment::read_cp2k_section(), force_fields_input::read_eam_data(), ewald_environment_types::read_ewald_section(), force_fields_ext::read_force_field_amber(), force_fields_ext::read_force_field_charmm(), force_fields_ext::read_force_field_gromos(), environment::read_global_section(), simpar_methods::read_md_section(), mp2_setup::read_mp2_section(), topology_gromos::read_topology_gromos(), topology_psf::read_topology_psf(), motion_utils::rot_ana(), rt_propagation_output::rt_prop_output(), scf_control_types::scf_c_write_parameters(), qs_ks_scp_methods::scp_modify_hartree_pot(), ewald_spline_util::Setup_Ewald_Spline(), stm_images::stm_cubes(), ep_methods::stupid_solve(), metadynamics_utils::synchronize_multiple_walkers(), qs_tddfpt_module::tddfpt_calculation(), md_vel_utils::temperature_control(), thermostat_methods::thermostat_info(), topology_connectivity_util::topology_connectivity_pack(), topology_constraint_util::topology_constraint_pack(), topology::topology_control(), topology_coordinate_util::topology_coordinate_pack(), topology_generate_util::topology_generate_bend(), topology_generate_util::topology_generate_bond(), topology_generate_util::topology_generate_dihe(), topology_generate_util::topology_generate_impr(), topology_generate_util::topology_generate_molecule(), topology_generate_util::topology_generate_onfo(), topology_generate_util::topology_generate_ub(), topology_util::topology_molecules_check(), topology_util::topology_reorder_atoms(), topology_util::topology_set_atm_mass(), vibrational_analysis::vb_anal(), qs_wf_history_methods::wfi_extrapolate(), atomic_kind_types::write_atomic_kind_set(), cell_types::write_cell(), topology_pdb::write_coordinate_pdb(), qs_interactions::write_core_charge_radii(), cp_control_utils::write_dft_control(), qs_dispersion_pairpot::write_dispersion(), particle_types::write_fist_particle_coordinates(), qs_interactions::write_geminal_radii(), atomic_kind_types::write_gto_basis_sets(), qs_interactions::write_kind_radii(), lri_environment_types::write_lripaw_basis_sets(), molecule_kind_types::write_molecule_kind_set(), reftraj_util::write_output_reftraj(), particle_types::write_particle_distances(), qs_interactions::write_paw_radii(), qs_interactions::write_pgf_orb_radii(), qs_interactions::write_ppl_radii(), qs_interactions::write_ppnl_radii(), cp_control_utils::write_qs_control(), particle_types::write_qs_particle_coordinates(), motion_utils::write_simulation_cell(), motion_utils::write_stress_tensor(), particle_types::write_structure_data(), cp_symmetry::write_symmetry(), topology_psf::write_topology_psf(), motion_utils::write_trajectory(), and xas_control::write_xas_control().

Here is the call graph for this function:

CHARACTER(len=default_path_length),public cp_output_handling::cp_print_key_generate_filename ( TYPE(cp_logger_type),pointer  logger,
TYPE(section_vals_type),pointer  print_key,
CHARACTER(len=*),intent(in),optional  middle_name,
CHARACTER(len=*),intent(in)  extension,
LOGICAL,intent(in)  my_local,
TYPE(cp_error_type),intent(inout)  error 
)

Utility function that retuns a unit number to write the print key. Might open a file with a unique filename, generated from the print_key name and iteration info.

Normally a valid unit (>0) is returned only if cp_print_key_should_output says that the print_key should be printed, and if the unit is global only the io node has a valid unit. So in many cases you can decide if you should print just checking if the returned units is bigger than 0.

IMPORTANT you should call cp_finished_output when an iteration output is finished (to immediately close the file that might have been opened)

Parameters:
loggerthe logger for the parallel environment, iteration info and filename generation
basis_sectionsection that contains the printkey
print_key_pathpath to the printkey- "%" between sections, and optionally a "/" and a logical flag to check). Might be empty.
localif the unit should be local to this task, or global to the program (defaults to false).
log_filenameif a small log with the filename should be written to the main log (defaults to false)
extensionextension to be applied to the filename (including the ".")
middle_namename to be added to the generated filename, useful when print_key activates different distinct outputs, to be able to distinguish them
ignore_should_outputif true always returns a valid unit (ignoring cp_print_key_should_output)
errorvariable to control error logging, stopping,... see module cp_error_handling
Author:
Fawzi Mohamed

Definition at line 768 of file cp_output_handling.f90.

References cp_iter_string(), and error.

Referenced by cp_print_key_unit_nr().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public cp_output_handling::cp_print_key_log ( TYPE(cp_logger_type),pointer  logger,
TYPE(section_vals_type),pointer  basis_section,
CHARACTER(len=*),intent(in),optional  print_key_path,
CHARACTER(len=*),intent(in)  extension,
CHARACTER(len=*),intent(in)  message,
CHARACTER(len=*),intent(in),optional  middle_name,
LOGICAL,intent(in),optional  local,
LOGICAL,intent(in),optional  log_filename,
LOGICAL,intent(in),optional  ignore_should_output,
LOGICAL,intent(in),optional  on_file,
TYPE(cp_error_type),intent(inout)  error 
)

utility method to print out a string

Parameters:
loggerthe logger for the parallel environment, iteration info and filename generation
basis_sectionsection that contains the printkey
print_key_pathpath to the printkey- "%" between sections, and optionally a "/" and a logical flag to check). Might be empty.
extensionextension to be applied to the filename (including the ".")
messagethe message to write
localif the unit should be local to this task, or global to the program (defaults to false).
log_filenameif a small log with the filename should be written to the main log (defaults to false)
middle_namename to be added to the generated filename, useful when print_key activates different distinct outputs, to be able to distinguish them
ignore_should_outputif true always returns a valid unit (ignoring cp_print_key_should_output)
errorvariable to control error logging, stopping,... see module cp_error_handling
Author:
fawzi

Definition at line 1082 of file cp_output_handling.f90.

References cp_print_key_finished_output(), cp_print_key_unit_nr(), and error.

Referenced by ep_methods::ep_env_calc_e0(), and ep_methods::ep_env_init_low().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public cp_output_handling::cp_print_key_section_create ( TYPE(section_type),pointer  print_key_section,
CHARACTER(len=*),intent(in)  name,
CHARACTER(len=*),intent(in)  description,
INTEGER,intent(in),optional  print_level,
CHARACTER(LEN=*),dimension(:),intent(in),optional  each_iter_names,
INTEGER,dimension(:),intent(in),optional  each_iter_values,
INTEGER,intent(in),optional  add_last,
CHARACTER(LEN=*),intent(in),optional  filename,
INTEGER,intent(in),optional  common_iter_levels,
INTEGER,dimension(:),optional  citations,
LOGICAL,intent(in),optional  supported_feature,
CHARACTER(LEN=*),intent(in),optional  unit_str,
TYPE(cp_error_type),intent(inout)  error 
)

creates a print_key section

Parameters:
print_key_sectionthe print key to create
namethe name of the print key
descriptionthe description of the print key
print_levelprint level starting at which the printing takes place (defaults to debug_print_level)
errorvariable to control error logging, stopping,... see module cp_error_handling
unit_strspecifies an unit of measure for output quantity. If not provided the control is totally left to how the output was coded (i.e. USERS have no possibility to change it)
Author:
fawzi

Definition at line 154 of file cp_output_handling.f90.

References input_constants::add_last_no, cp_out_default, error, input_keyword_types::keyword_create(), and input_section_types::section_add_keyword().

Referenced by input_cp2k_distribution::create_2d_mc_section(), input_cp2k_atom::create_atom_print_section(), input_cp2k_atprop::create_atprop_section(), input_cp2k_motion::create_avgs_section(), input_cp2k_motion::create_band_section(), input_cp2k_dft::create_becke_restraint_section(), input_cp2k_motion::create_bfgs_section(), input_cp2k_motion::create_cell_opt_section(), input_cp2k_dft::create_chebyshev_section(), input_cp2k_colvar::create_colvar_section(), input_cp2k_constraints::create_constraint_section(), input_cp2k_properties_dft::create_current_section(), input_cp2k_dft::create_ddapc_restraint_section(), input_cp2k::create_debug_section(), input_cp2k_dft::create_density_fitting_section(), input_cp2k_mm::create_dipoles_section(), input_cp2k_eip::create_eip_print_section(), input_cp2k_dft::create_ep_section(), input_cp2k_properties_dft::create_epr_section(), input_cp2k_properties_dft::create_et_coupling_section(), input_cp2k_poisson::create_ewald_section(), input_cp2k_force_eval::create_f_env_print_section(), input_cp2k::create_farming_section(), input_cp2k_free_energy::create_fe_section(), input_cp2k_motion::create_fp_section(), input_cp2k_subsys::create_gen_print_section(), input_cp2k_motion::create_geoopt_section(), input_cp2k::create_global_section(), input_cp2k_poisson::create_gspace_interp_section(), input_cp2k_dft::create_gspace_interp_section(), input_cp2k_motion::create_helium_section(), input_cp2k_hfx::create_hf_load_balance_section(), input_cp2k_hfx::create_hf_ri_section(), input_cp2k_hfx::create_hfx_section(), input_cp2k_dft::create_implicit_solv_section(), input_cp2k_dft::create_interp_section(), input_cp2k_dft::create_kg_section(), input_cp2k_properties_dft::create_linres_section(), input_cp2k_dft::create_localize_section(), input_cp2k_motion::create_md_print_section(), input_cp2k_free_energy::create_metadyn_section(), input_cp2k_dft::create_mo_cubes_section(), input_cp2k_vib::create_mode_selective_section(), input_cp2k_dft::create_molecular_states_section(), input_cp2k_motion::create_motion_section(), input_cp2k_mp2::create_mp2_section(), input_cp2k_poisson::create_multipole_section(), input_cp2k_properties_dft::create_nmr_section(), input_cp2k_motion::create_opt_band_section(), input_optimize_input::create_optimize_input_section(), input_cp2k_motion::create_pint_section(), input_cp2k_dft::create_print_bsse_section(), input_cp2k_dft::create_print_dft_section(), input_cp2k_mixed::create_print_mix_section(), input_cp2k_mm::create_print_mm_section(), input_cp2k_qmmm::create_print_qmmm_section(), input_cp2k_resp::create_print_resp_section(), input_cp2k_thermostats::create_print_section(), input_cp2k_barostats::create_print_section(), input_cp2k_vib::create_print_vib_section(), input_cp2k_properties_dft::create_properties_section(), input_cp2k_qmmm::create_qmmm_force_mixing_section(), input_cp2k_qmmm::create_qmmm_interp_section(), input_cp2k_qmmm::create_qmmm_periodic_section(), input_cp2k_motion::create_reftraj_section(), input_cp2k_properties_dft::create_restraint_A(), input_cp2k_dft::create_rtp_section(), input_cp2k_dft::create_scf_section(), input_cp2k_dft::create_scp_section(), input_cp2k_dft::create_se_print_section(), input_cp2k_motion::create_shellcore_opt_section(), input_cp2k_properties_dft::create_spin_spin_section(), input_cp2k_dft::create_stm_section(), input_cp2k_subsys::create_structure_data_section(), input_cp2k_subsys::create_subsys_print_section(), input_cp2k::create_test_section(), input_cp2k_motion::create_thermal_region_section(), input_cp2k_subsys::create_topology_section(), input_cp2k_motion::create_ts_section(), input_cp2k_xc::create_vdw_potential_section(), input_cp2k_dft::create_wannier_states_section(), input_cp2k_dft::create_xas_section(), input_cp2k_colvar::keywords_colvar_path(), and input_cp2k_dft::print_wanniers().

Here is the call graph for this function:

function,public cp_output_handling::cp_print_key_should_output ( TYPE(cp_iteration_info_type),pointer  iteration_info,
TYPE(section_vals_type),pointer  basis_section,
CHARACTER(len=*),intent(in),optional  print_key_path,
TYPE(section_vals_type),optional,pointer  used_print_key,
LOGICAL,intent(out),optional  first_time,
TYPE(cp_error_type),intent(inout)  error 
)

returns what should be done with the given proprety if btest(res,cp_p_store) then the property should be stored in memory if btest(res,cp_p_file) then the property should be print ed to a file if res==0 then nothing should be done

Parameters:
iteration_infoinformation about the actual iteration level
basis_sectionsection that contains the printkey
print_key_pathpath to the printkey- "%" between sections, and optionally a "/" and a logical flag to check). Might be empty.
first_timeif it ist the first time that an output is written (not fully correct, but most of the time)
used_print_keyhere the print_key that was used is returned
errorvariable to control error logging, stopping,... see module cp_error_handling
Note:
not all the propreties support can be stored
Author:
fawzi

Definition at line 336 of file cp_output_handling.f90.

References cp_out_default, cp_p_calc, cp_p_file, cp_p_file_each, cp_p_file_if, cp_p_store, cp_p_store_each, cp_p_store_if, cp_printkey_is_iter(), cp_printkey_is_on(), and error.

Referenced by scptb_core_matrix::build_scptb_core_matrix(), cp_print_key_finished_output(), cp_print_key_unit_nr(), ep_methods::ep_env_calc_e0(), and ep_methods::ep_env_transfer_psi0().

Here is the call graph for this function:

Here is the caller graph for this function:

INTEGER,public cp_output_handling::cp_print_key_unit_nr ( TYPE(cp_logger_type),pointer  logger,
TYPE(section_vals_type),pointer  basis_section,
CHARACTER(len=*),intent(in),optional  print_key_path,
CHARACTER(len=*),intent(in)  extension,
CHARACTER(len=*),intent(in),optional  middle_name,
LOGICAL,intent(in),optional  local,
LOGICAL,intent(in),optional  log_filename,
LOGICAL,intent(in),optional  ignore_should_output,
CHARACTER(len=*),intent(in),optional  file_form,
CHARACTER(len=*),intent(in),optional  file_position,
CHARACTER(len=*),intent(in),optional  file_action,
CHARACTER(len=*),intent(in),optional  file_status,
LOGICAL,intent(in),optional  do_backup,
LOGICAL,intent(in),optional  on_file,
LOGICAL,intent(out),optional  is_new_file,
TYPE(cp_error_type),intent(inout)  error 
)
function cp_output_handling::cp_printkey_is_iter ( TYPE(cp_iteration_info_type),pointer  iteration_info,
TYPE(section_vals_type),pointer  print_key,
LOGICAL,intent(out),optional  first_time,
TYPE(cp_error_type),intent(inout)  error 
) [private]

returns if the actual iteration matches those selected by the given printkey. Does not check it the prinkey is active (at the actual print_level)

Parameters:
iteration_infoinformation about the actual iteration level
print_keythe section values of the key to be printed
first_timereturns if it is the first time that output is written (not fully correct, but most of the time)
errorvariable to control error logging, stopping,... see module cp_error_handling
Author:
fawzi

Definition at line 469 of file cp_output_handling.f90.

Referenced by cp_print_key_should_output().

Here is the caller graph for this function:

LOGICAL,public cp_output_handling::cp_printkey_is_on ( TYPE(cp_iteration_info_type),pointer  iteration_info,
TYPE(section_vals_type),pointer  print_key,
TYPE(cp_error_type),intent(inout)  error 
)

returns true if the printlevel activates this printkey does not look if this iteration it should be printed

Parameters:
iteration_infoinformation about the actual iteration level
print_keythe section values of the key to be printed
errorvariable to control error logging, stopping,... see module cp_error_handling
Author:
fawzi

Definition at line 431 of file cp_output_handling.f90.

Referenced by cp_ddapc_types::cp_ddapc_ewald_create(), and cp_print_key_should_output().

Here is the caller graph for this function:

subroutine,public cp_output_handling::cp_rm_iter_level ( TYPE(cp_iteration_info_type),pointer  iteration_info,
CHARACTER(LEN=*),intent(in)  level_name,
INTEGER,intent(in),optional  n_rlevel_att,
TYPE(cp_error_type),intent(inout)  error 
)

Removes an iteration level.

Parameters:
iteration_infothe iteration info to which an iteration level has to be removed
n_rlevel_attiteration level before the call (to do some checks)
level_namelevel_name to be destroyed (if does not match gives an error)
errorvariable to control error logging, stopping,... see module cp_error_handling
Author:
fawzi

Definition at line 705 of file cp_output_handling.f90.

References cp_iter_types::cp_iteration_info_release().

Referenced by ep_methods::stupid_solve().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

INTEGER,parameter,public cp_output_handling::cp_out_calc = IBSET(0, cp_p_calc)

Definition at line 95 of file cp_output_handling.f90.

INTEGER,parameter,public cp_output_handling::cp_out_file = IBSET(0, cp_p_file)

Definition at line 95 of file cp_output_handling.f90.

Definition at line 95 of file cp_output_handling.f90.

Definition at line 95 of file cp_output_handling.f90.

Definition at line 95 of file cp_output_handling.f90.

INTEGER,parameter,public cp_output_handling::cp_out_store = IBSET(0, cp_p_store)

Definition at line 95 of file cp_output_handling.f90.

Definition at line 95 of file cp_output_handling.f90.

Definition at line 95 of file cp_output_handling.f90.

INTEGER,parameter,public cp_output_handling::cp_p_calc = 7

Definition at line 93 of file cp_output_handling.f90.

Referenced by cp_print_key_should_output().

INTEGER,parameter,public cp_output_handling::cp_p_file = 1

Definition at line 93 of file cp_output_handling.f90.

Referenced by qs_core_hamiltonian::build_core_hamiltonian_matrix(), qs_dftb_matrices::build_dftb_matrices(), qs_elec_field::build_efg_matrix(), qs_fermi_contact::build_fermi_contact_matrix(), fist_neighbor_lists::build_fist_neighbor_lists(), qs_spin_orbit::build_pso_matrix(), qs_neighbor_lists::build_qs_neighbor_lists(), se_core_matrix::build_se_core_matrix(), qmmm_se_energy::build_se_qmmm_matrix(), admm_methods::calc_mixed_overlap_force(), qs_resp::calc_resp_matrix_nonper(), qs_pdos::calculate_projected_dos(), xas_methods::cls_calculate_spectrum(), dm_ls_chebyshev::compute_chebyshev(), molecular_states::construct_molecular_states(), cp_print_key_finished_output(), cp_print_key_should_output(), cp_print_key_unit_nr(), qs_linres_current::current_build_current(), qs_linres_current_utils::current_env_init(), qs_linres_current_utils::current_response(), hfx_derivatives::derivatives_four_center(), distribution_methods::distribute_molecules_1d(), distribution_methods::distribute_molecules_2d(), qs_core_hamiltonian::dump_info_core_hamiltonian(), eip_silicon::eip_bazant(), eip_silicon::eip_lenosky(), ep_methods::ep_env_calc_e0(), ep_methods::ep_env_transfer_psi0(), qs_linres_epr_ownutils::epr_g_print(), qs_linres_epr_nablavks::epr_nablavks(), qs_resp::get_fitting_points(), helium_io::helium_write_accepts(), helium_io::helium_write_coordinates(), helium_io::helium_write_energy(), helium_io::helium_write_force(), helium_io::helium_write_force_inst(), helium_io::helium_write_perm(), helium_io::helium_write_plength(), helium_io::helium_write_rdf(), helium_io::helium_write_rho(), helium_io::helium_write_sdensity(), helium_io::helium_write_wnumber(), hfx_energy_potential::integrate_four_center(), qs_linres_issc_utils::issc_print(), qs_linres_methods::linres_init_write_restart(), qs_linres_methods::linres_write_restart(), qs_loc_utils::loc_write_restart(), md_energies::md_write_output(), mixed_environment_utils::mixed_map_forces(), qs_linres_nmr_utils::nmr_env_init(), qs_linres_nmr_shift::nmr_shift_print(), pint_io::pint_write_centroids(), pint_io::pint_write_com(), pint_io::pint_write_ener(), pint_io::pint_write_rgyr(), pint_io::pint_write_trajectory(), dft_plus_u::plus_u(), qs_ks_methods::print_densities(), fist_force::print_fist(), qs_resp::print_pot_from_resp_charges(), force_fields::print_pot_parameter_file(), qs_resp::print_resp_charges(), thermal_region_utils::print_thermal_regions(), thermostat_utils::print_thermostat_status(), pw_env_methods::pw_env_rebuild(), qmmm_gpw_energy::qmmm_el_coupling(), qmmm_elpot::qmmm_potential_init(), qs_dftb_parameters::qs_dftb_param_init(), qs_force::qs_forces(), qs_environment::qs_init_subsys(), qs_ks_methods::qs_ks_build_kohn_sham_matrix(), qs_scf_post_se::qs_scf_post_charges(), qs_scf_post_se::qs_scf_post_efg(), qs_scf_post_se::qs_scf_post_epr(), qs_scf_post_se::qs_scf_post_loc_dip(), qs_scf_post_se::qs_scf_post_molopt(), qs_scf_post_se::qs_scf_post_moments(), qs_scf_post_se::qs_scf_post_optc(), qs_scf_post_se::qs_scf_post_xray(), qs_loc_utils::read_loc_section(), qs_scf_post_dftb::scf_post_calculation_dftb(), qs_scf_post_se::scf_post_calculation_se(), scptb_utils::scptb_parameter_init(), qs_loc_molecules::wfc_to_molecule(), qs_scf_post_se::write_available_results(), qs_dftb_utils::write_dftb_atom_param(), qmmm_image_charge::write_image_matrix(), qs_mo_types::write_mo_set_to_output_unit(), qs_mo_types::write_mo_set_to_restart(), qs_neighbor_lists::write_neighbor_lists(), input_cp2k_restarts::write_restart(), qs_mo_types::write_rt_mos_to_restart(), scptb_types::write_scptb_parameter(), semi_empirical_types::write_se_param(), xas_methods::xas_env_init(), and xas_restart::xas_write_restart().

Definition at line 93 of file cp_output_handling.f90.

Referenced by cp_print_key_should_output().

Definition at line 93 of file cp_output_handling.f90.

Referenced by cp_print_key_should_output().

Definition at line 93 of file cp_output_handling.f90.

Referenced by cp_print_key_should_output().

Definition at line 93 of file cp_output_handling.f90.

Referenced by cp_print_key_should_output().

LOGICAL,parameter,private cp_output_handling::debug_this_module = .TRUE.

Definition at line 62 of file cp_output_handling.f90.

Definition at line 102 of file cp_output_handling.f90.

CHARACTER(len=*),parameter,private cp_output_handling::moduleN = 'cp_output_handling'

Definition at line 63 of file cp_output_handling.f90.