00001 // QMcBeaver 00002 // 00003 // Constructed by 00004 // 00005 // Michael Todd Feldmann 00006 // and 00007 // David Randall "Chip" Kent IV 00008 // 00009 // Copyright 2000. All rights reserved. 00010 // 00011 // drkent@users.sourceforge.net mtfeldmann@users.sourceforge.net 00012 00013 #ifndef QMCFLAGS_H 00014 #define QMCFLAGS_H 00015 00016 #include <string> 00017 #include <fstream> 00018 #include <iostream> 00019 #include <stdio.h> 00020 #include <vector> 00021 #include <climits> 00022 #include <algorithm> 00023 00024 using namespace std; 00025 00030 class QMCFlags 00031 { 00032 public: 00036 QMCFlags(); 00037 00042 vector<long> programmersLongs; 00043 00048 string base_file_name; 00049 00054 string input_file_name; 00055 00060 string output_file_name; 00061 00077 string checkin_file_name; 00078 00087 string checkout_file_name; 00088 00093 string restart_file_name; 00094 00099 string results_file_name; 00100 00105 string config_file_name; 00106 00111 string density_file_name; 00112 00117 string force_file_name; 00118 00123 string walker_initialization_method; 00124 00129 int walker_initialization_combinations; 00130 00134 string run_type; 00135 00155 int one_e_per_iter; 00156 00162 int use_surfer; 00163 00167 int set_debug; 00168 00172 int use_jastrow; 00173 int detailed_energies; 00174 00179 string temp_dir; 00180 00184 string parallelization_method; 00185 00189 long iseed; 00190 00198 string nuclear_derivatives; 00199 00204 string sampling_method; 00205 00211 string QF_modification_type; 00212 00218 string energy_modification_type; 00219 00226 double umrigar93_equalelectrons_parameter; 00227 00231 string walker_reweighting_method; 00232 00240 double trail_eps2; 00241 00249 double e_0; 00250 00257 string branching_method; 00258 00264 double branching_threshold; 00265 00271 double fusion_threshold; 00272 00278 int synchronize_dmc_ensemble; 00279 00283 int synchronize_dmc_ensemble_interval; 00284 00290 int old_walker_acceptance_parameter; 00291 00296 int warn_verbosity; 00297 00301 double rel_cutoff; 00302 00306 int limit_branching; 00307 00324 double dt; 00325 00331 double accel_delta; 00332 double accel_tm; 00333 00338 double dt_run; 00339 00343 double dt_effective; 00344 00354 double desired_convergence; 00355 00361 unsigned long max_time_steps; 00362 unsigned long original_max_time_steps; 00363 00380 double max_time; 00381 00392 long walkers_per_pass; 00393 00414 vector<int> future_walking; 00415 00416 long gpu_walkers_per_pass; 00417 00421 long number_of_walkers; 00422 00427 long number_of_walkers_initial; 00428 00433 int use_basis_function_interpolation; 00434 00439 int number_basis_function_interpolation_grid_points; 00440 00444 double basis_function_interpolation_first_point; 00445 00460 int psuedo_gridLevel; 00461 00466 double psuedo_cutoff; 00467 00473 int use_psuedopotential; 00474 00478 int output_interval; 00479 00487 int zero_out_checkpoint_statistics; 00488 00492 unsigned long equilibration_steps; 00493 00501 double dt_equilibration; 00502 00507 string equilibration_function; 00508 00517 unsigned int CKAnnealingEquilibration1_parameter; 00518 00528 int use_equilibration_array; 00529 00541 int mpireduce_interval; 00542 00554 int mpipoll_interval; 00555 00560 int checkpoint_interval; 00561 00565 int checkpoint; 00566 00570 int use_available_checkpoints; 00571 00575 int checkpoint_energy_only; 00576 00581 int print_transient_properties_interval; 00582 00587 int print_transient_properties; 00588 00592 int Natoms; 00593 00598 int charge; 00599 00603 int Norbitals; 00604 00609 int Nbasisfunc; 00610 00614 int Ndeterminants; 00615 00619 string trial_function_type; 00620 00624 int calculate_bf_density; 00625 00629 double energy_trial; 00630 00634 double energy_estimated; 00635 00640 double energy_estimated_original; 00641 00646 int correct_population_size_bias; 00647 00664 int print_configs; 00665 00669 int print_config_frequency; 00670 00684 int optimize_Psi; 00685 00693 int max_optimize_Psi_steps; 00694 00702 double optimize_Psi_barrier_parameter; 00703 00710 int calculate_Derivatives; 00711 00717 int optimize_EE_Jastrows; 00718 int optimize_EN_Jastrows; 00719 int optimize_NEE_Jastrows; 00720 int optimize_CI; 00721 int optimize_Orbitals; 00722 00727 int optimize_L; 00728 00729 int use_three_body_jastrow; 00730 00735 int reproduce_NE_with_NEE_jastrow; 00736 00741 int reproduce_EE_with_NEE_jastrow; 00742 00751 double a_diag; 00752 00759 double ksi; 00760 00764 string optimize_Psi_criteria; 00765 00783 string optimize_Psi_method; 00784 00789 string numerical_derivative_surface; 00790 00799 int optimization_max_iterations; 00800 00805 double optimization_error_tolerance; 00806 00812 int ck_genetic_algorithm_1_population_size; 00813 00819 double ck_genetic_algorithm_1_mutation_rate; 00820 00825 double ck_genetic_algorithm_1_initial_distribution_deviation; 00826 00831 string line_search_step_length; 00832 00841 double singularity_penalty_function_parameter; 00842 00847 int link_Jastrow_parameters; 00848 int link_NEE_Jastrows; 00849 00858 int link_Orbital_parameters; 00859 int constrain_Orbital_zeros; 00860 int constrain_Orbital_same; 00868 int link_Determinant_parameters; 00869 00874 int replace_electron_nucleus_cusps; 00875 00881 string energy_cutoff_type; 00882 00888 int equilibrate_every_opt_step; 00889 00896 int equilibrate_first_opt_step; 00897 00902 double population_control_parameter; 00903 00908 int write_all_energies_out; 00909 00914 int write_electron_densities; 00915 00920 double max_pair_distance; 00921 00927 int writePllxCorrelationDiagram; 00928 00933 double pllxCorrelationDiagramMin; 00934 00939 double pllxCorrelationDiagramMax; 00940 00946 int writePllyCorrelationDiagram; 00947 00952 double pllyCorrelationDiagramMin; 00953 00958 double pllyCorrelationDiagramMax; 00959 00965 int writePllzCorrelationDiagram; 00966 00971 double pllzCorrelationDiagramMin; 00972 00977 double pllzCorrelationDiagramMax; 00978 00984 int writeOppxCorrelationDiagram; 00985 00990 double oppxCorrelationDiagramMin; 00991 00996 double oppxCorrelationDiagramMax; 00997 01003 int writeOppyCorrelationDiagram; 01004 01009 double oppyCorrelationDiagramMin; 01010 01015 double oppyCorrelationDiagramMax; 01016 01022 int writeOppzCorrelationDiagram; 01023 01028 double oppzCorrelationDiagramMin; 01029 01034 double oppzCorrelationDiagramMax; 01035 01039 string chip_and_mike_are_cool; 01040 01044 int my_rank; 01045 01049 int nprocs; 01050 01056 int use_hf_potential; 01057 01061 int hf_num_average; 01062 01066 int lock_trial_energy; 01067 01074 void read_flags(string InFileName); 01075 01082 void set_filenames(string runfile); 01083 01092 bool checkFlags(); 01093 01111 int getNumGPUWalkers() 01112 { 01113 #if defined QMC_GPU 01114 if(gpu_walkers_per_pass < 0) 01115 { 01116 return walkers_per_pass; 01117 } else { 01118 return gpu_walkers_per_pass; 01119 } 01120 #else 01121 return 0; 01122 #endif 01123 } 01128 friend ostream& operator <<(ostream& strm, QMCFlags& flags); 01129 }; 01130 01131 #endif 01132 01133 01134 01135 01136 01137 01138 01139 01140 01141 01142 01143 01144 01145 01146 01147 01148 01149