CASM  1.1.0
A Clusters Approach to Statistical Mechanics
Handlers.hh
Go to the documentation of this file.
1 #ifndef HANDLERS_HH
2 #define HANDLERS_HH
3 
4 #include <boost/filesystem/path.hpp>
5 #include <boost/program_options.hpp>
6 #include <string>
7 #include <vector>
8 
11 #include "casm/global/enum.hh"
12 
13 namespace CASM {
14 namespace Completer {
39 class ArgHandler {
40  public:
41  enum ARG_TYPE {
56  REF,
57  ECI,
59  DOF,
61  };
62 
65  static ARG_TYPE determine_type(const po::option_description &boost_option);
66 
68  static std::string path();
69 
71  static std::string command();
72 
74  static std::string supercell();
75 
77  static std::string query();
78 
80  static std::string operation();
81 
83  static std::string configname();
84 
86  static std::string coordtype();
87 
89  static std::string dbtype();
90 
92  static std::string enummethod();
93 
95  static std::string configtype();
96 
98  static std::string calctype();
99 
101  static std::string bset();
102 
104  static std::string clex();
105 
107  static std::string ref();
108 
110  static std::string eci();
111 
113  static std::string property();
114 
116  static std::string dof();
117 
119  static std::string infomethod();
120 
123  static void void_to_bash(std::vector<std::string> &arguments);
124 
126  static void path_to_bash(std::vector<std::string> &arguments);
127 
130  static void command_to_bash(std::vector<std::string> &arguments);
131 
134  static void scelname_to_bash(std::vector<std::string> &arguments);
135 
138  static void configname_to_bash(std::vector<std::string> &arguments);
139 
141  static void query_to_bash(std::vector<std::string> &arguments);
142 
145  static void operator_to_bash(std::vector<std::string> &arguments);
146 
148  static void dbtype_to_bash(std::vector<std::string> &arguments);
149 
152  static void enummethod_to_bash(std::vector<std::string> &arguments);
153 
156  static void configtype_to_bash(std::vector<std::string> &arguments);
157 
160  static void calctype_to_bash(std::vector<std::string> &arguments);
161 
163  static void bset_to_bash(std::vector<std::string> &arguments);
164 
166  static void clex_to_bash(std::vector<std::string> &arguments);
167 
169  static void ref_to_bash(std::vector<std::string> &arguments);
170 
172  static void eci_to_bash(std::vector<std::string> &arguments);
173 
176  static void property_to_bash(std::vector<std::string> &arguments);
177 
179  static void dof_to_bash(std::vector<std::string> &arguments);
180 
183  static void infomethod_to_bash(std::vector<std::string> &arguments);
184 
185  private:
188  static const std::vector<std::pair<std::string, ARG_TYPE> > m_argument_table;
189 };
190 
230  public:
232  OptionHandlerBase(const std::string &init_option_tag);
233 
235  OptionHandlerBase(const std::string &init_option_tag,
236  const std::string &init_descriptor);
237 
239  po::variables_map &vm();
240 
242  const po::variables_map &vm() const;
243 
245  const po::options_description &desc();
246 
248  const po::options_description &desc() const;
249 
252  const std::string &tag() const;
253 
254  protected:
256  std::string m_tag;
257 
260  mutable po::options_description m_desc;
261 
263  po::variables_map m_vm;
264 
266  virtual void initialize() = 0;
267 
268  //-------------------------------------------------------------------------------------//
269 
271  void add_selection_suboption(const fs::path &_default = "MASTER");
272 
275 
277  void add_configlist_suboption(const fs::path &_default = "MASTER");
278 
281 
283  const fs::path &selection_path() const;
284 
285  //----------------------------//
286 
288  void add_selections_suboption(const fs::path &_default = "MASTER");
289 
291  void add_configlists_suboption(const fs::path &_default = "MASTER");
292 
294  std::vector<fs::path> m_selection_paths;
295 
297  const std::vector<fs::path> &selection_paths() const;
298 
299  //-------------------------------------------------------------------------------------//
300 
302  void add_prim_path_suboption(const fs::path &_default = "");
303 
305  fs::path m_prim_path;
306 
308  const fs::path &prim_path() const;
309 
310  //-------------------------------------------------------------------------------------//
311 
313  void add_file_path_suboption(const fs::path &_default = "");
314 
316  fs::path m_file_path;
317 
319  const fs::path &file_path() const;
320 
321  //-------------------------------------------------------------------------------------//
322 
325 
326  //----------------------------//
327 
330 
331  //-------------------------------------------------------------------------------------//
332 
334  void add_configtype_suboption(std::string _default,
335  std::set<std::string> _configtype_opts);
336 
338  std::string m_configtype;
339 
341  std::set<std::string> m_configtype_opts;
342 
343  std::string configtype() const;
344 
345  std::set<std::string> configtype_opts() const;
346 
347  //-------------------------------------------------------------------------------------//
348 
351  void add_db_type_suboption(std::string _default,
352  std::set<std::string> _configtype_opts);
353 
355  std::string m_db_type;
356 
358  std::set<std::string> m_db_type_opts;
359 
360  std::string db_type() const;
361 
362  std::set<std::string> db_type_opts() const;
363 
364  //-------------------------------------------------------------------------------------//
365 
367  void add_help_suboption();
368 
369  //-------------------------------------------------------------------------------------//
370 
373 
375  std::vector<std::string> m_help_opt_vec;
376 
378  const std::vector<std::string> &help_opt_vec() const;
379 
380  //-------------------------------------------------------------------------------------//
381 
385 
387  std::string m_verbosity_str;
388 
390  const std::string &verbosity_str() const;
391 
393  int verbosity() const;
394 
395  //-------------------------------------------------------------------------------------//
396 
399  void add_input_suboption(bool required = true);
400 
402  std::string m_input_str;
403 
405  std::string input_str() const;
406 
407  //-------------------------------------------------------------------------------------//
408 
411  void add_settings_suboption(bool required = true);
412 
414  fs::path m_settings_path;
415 
417  const fs::path settings_path() const;
418 
419  //-------------------------------------------------------------------------------------//
420 
422  void add_output_suboption();
423 
426  void add_output_suboption(const fs::path &_default);
427 
429  fs::path m_output_path;
430 
432  const fs::path output_path() const;
433 
434  //-------------------------------------------------------------------------------------//
435 
438  void add_gzip_suboption();
439 
442 
444  bool gzip_flag() const;
445 
446  //-------------------------------------------------------------------------------------//
447 
449  void add_scelname_suboption();
450 
452  std::string m_supercell_str;
453 
455  const std::string &supercell_str() const;
456 
457  //----------------------------//
458 
461 
463  std::vector<std::string> m_supercell_strs;
464 
466  const std::vector<std::string> &supercell_strs() const;
467 
468  //-------------------------------------------------------------------------------------//
469 
472 
474  std::string m_config_str;
475 
478  const std::string &config_str() const;
479 
480  //----------------------------//
481 
484 
486  std::vector<std::string> m_config_strs;
487 
490  const std::vector<std::string> &config_strs() const;
491 
492  //----------------------------//
493 
495  void add_names_suboption();
496 
498  std::vector<std::string> m_name_strs;
499 
502  const std::vector<std::string> &name_strs() const;
503 
504  //-------------------------------------------------------------------------------------//
505 
508 
511  std::string m_coordtype_str;
512 
514  const std::string &coordtype_str() const;
515 
517  COORD_TYPE coordtype_enum() const;
518 
519  //-------------------------------------------------------------------------------------//
520 
522  void add_dofs_suboption();
523 
525  std::vector<std::string> m_dof_strs;
526 
528  const std::vector<std::string> &dof_strs() const;
529 
530  //-------------------------------------------------------------------------------------//
531 
532  void add_dry_run_suboption(std::string msg = default_dry_run_msg());
533 
534  static std::string default_dry_run_msg();
535 
536  bool dry_run() const;
537 
538  //-------------------------------------------------------------------------------------//
539 
540  // Add more general suboption adding routines here//
541 };
542 
548  public:
551 
552  MonteOption();
553 
554  Index condition_index() const;
555 
556  private:
557  void initialize() override;
558 
560 };
561 
562 //*****************************************************************************************************//
563 
568 class RunOption : public OptionHandlerBase {
569  public:
571 
572  RunOption();
573 
574  const std::string &exec_str() const;
575 
576  private:
577  void initialize() override;
578 
579  std::string m_exec_str;
580 };
581 
582 //*****************************************************************************************************//
583 
589  public:
590  BsetOption();
591 
593 
594  private:
595  void initialize() override;
596 };
597 
598 //*****************************************************************************************************//
599 
605  public:
607 
608  const std::string &axis_choice_str() const;
609 
610  private:
611  void initialize() override;
612 
613  std::string m_axis_choice_str;
614 };
615 
616 //*****************************************************************************************************//
617 
622 class RefOption : public OptionHandlerBase {
623  public:
626 
627  RefOption();
628 
629  const std::string &set_str() const;
630 
631  private:
632  void initialize() override;
633 
634  std::string m_set_str;
635 };
636 
637 //*****************************************************************************************************//
638 
644  public:
647 
648  FilesOption();
649 
650  const std::vector<std::string> &calc_vec() const;
651 
652  const std::string &settings_str() const;
653 
654  private:
655  void initialize() override;
656 
657  std::vector<std::string> m_calc_vec;
658 
659  std::string m_settings_str;
660 };
661 
662 //*****************************************************************************************************//
663 
669  public:
670  FormatOption();
671 
672  private:
673  void initialize() override;
674 };
675 
676 //*****************************************************************************************************//
677 
683  public:
684  InitOption();
685 
687 
689 
691 
693 
695 
697 
698  private:
699  void initialize() override;
700 };
701 
702 //*****************************************************************************************************//
703 
709  public:
711 
712  PerturbOption();
713 
714  const fs::path &cspecs_path() const;
715 
716  private:
717  void initialize() override;
718 
719  fs::path m_cspecs_path;
720 };
721 
722 //*****************************************************************************************************//
723 
729  public:
730  SettingsOption();
731 
732  const std::string &input_str() const;
733 
734  const std::vector<std::string> &input_vec() const;
735 
736  private:
737  void initialize() override;
738 
739  std::string m_input_str;
740 
741  std::vector<std::string> m_input_vec;
742 };
743 
744 //*****************************************************************************************************//
745 
751  public:
752  StatusOption();
753 
754  private:
755  void initialize() override;
756 };
757 
758 //*****************************************************************************************************//
759 
765  public:
770 
771  SuperOption();
772 
773  const std::vector<fs::path> &transf_mat_paths() const;
774 
775  const fs::path &struct_path() const;
776 
777  const std::string &unit_scel_str() const;
778 
779  Index min_vol() const;
780 
781  double tolerance() const;
782 
783  private:
784  void initialize() override;
785 
786  std::vector<fs::path> m_transf_mat_paths;
787 
788  fs::path m_struct_path;
789 
790  std::string m_unit_scel_str;
791 
793 
794  double m_tolerance;
795 };
796 
797 //*****************************************************************************************************//
798 
804  public:
809 
810  ViewOption();
811  int m_images;
812 
813  private:
814  void initialize() override;
815 };
816 
818  public:
819  EnumOptionBase(std::string const &_name)
820  : OptionHandlerBase(_name), m_all_existing(false) {}
821 
827 
828  virtual ~EnumOptionBase() {}
829 
830  int min_volume() const { return m_min_volume; }
831 
832  int max_volume() const { return m_max_volume; }
833 
834  bool all_existing() const { return m_all_existing; }
835 
836  protected:
840 
841  private:
842  virtual void initialize() override {}
843 };
844 
845 //*****************************************************************************************************//
846 
851 class SymOption : public EnumOptionBase {
852  public:
857 
858  SymOption();
859 
860  bool wedges() const { return m_wedges; }
861 
862  double tol() const { return m_tol; }
863 
864  fs::path poscar_path() const { return m_poscar_path; }
865 
866  private:
867  bool m_wedges;
868  double m_tol;
869  fs::path m_poscar_path;
870 
871  void initialize() override;
872 };
873 
879 class EnumOption : public EnumOptionBase {
880  public:
881  EnumOption();
882 
885 
886  const std::vector<std::string> &desc_vec() const { return m_desc_vec; }
887 
888  std::string method() const { return m_method; }
889 
890  const std::string &filter_str() const { return m_filter_str; }
891 
892  private:
893  void initialize() override;
894 
895  std::vector<std::string> m_desc_vec;
896 
897  std::string m_method;
898  std::string m_filter_str;
899 };
900 
901 //*****************************************************************************************************//
902 
908  public:
911 
912  InfoOption();
913 
914  const std::vector<std::string> &desc_vec() const { return m_desc_vec; }
915 
916  std::string method() const { return m_method; }
917 
918  private:
919  void initialize() override;
920 
921  std::vector<std::string> m_desc_vec;
922  std::string m_method;
923 };
924 
925 //*****************************************************************************************************//
926 
932  public:
939 
940  QueryOption();
941 
942  bool verbatim_flag() const;
943 
944  const std::vector<std::string> &columns_vec() const;
945 
946  const std::vector<std::string> &new_alias_vec() const;
947 
948  private:
949  void initialize() override;
950 
951  std::vector<std::string> m_columns_vec;
952 
953  std::vector<std::string> m_new_alias_vec;
954 };
955 //*****************************************************************************************************//
956 
962  public:
967 
968  ImportOption();
969 
970  const std::vector<fs::path> &pos_vec() const;
971 
972  const fs::path &batch_path() const;
973 
974  private:
975  void initialize() override;
976 
977  std::vector<fs::path> m_pos_vec;
978 
979  fs::path m_batch_path;
980 };
981 //*****************************************************************************************************//
982 
988  public:
994 
995  SelectOption();
996 
997  const std::vector<std::string> &criteria_vec() const;
998 
999  private:
1000  void initialize() override;
1001 
1002  // vector necessary to allow --set/--set-on/--set-off with or without an
1003  // argument
1004  std::vector<std::string> m_criteria_vec;
1005 };
1006 //*****************************************************************************************************//
1007 
1012 class RmOption : public OptionHandlerBase {
1013  public:
1019 
1020  RmOption();
1021 
1022  bool force() const;
1023 
1024  bool data() const;
1025 
1026  private:
1027  void initialize() override;
1028 };
1029 
1030 //*****************************************************************************************************//
1031 
1037  public:
1043 
1044  UpdateOption();
1045 
1046  double vol_tolerance() const;
1047 
1048  double lattice_weight() const;
1049 
1050  double min_va_frac() const;
1051 
1052  double max_va_frac() const;
1053 
1054  private:
1055  void initialize() override;
1056 
1058 
1059  double m_lattice_weight; // TODO: Push to base? Other commands use this
1060 
1062 
1064 };
1065 
1066 //*****************************************************************************************************//
1067 
1068 } // namespace Completer
1069 } // namespace CASM
1070 
1071 #endif
static std::string path()
Get value_type string for path completion.
Definition: Handlers.cc:56
static const std::vector< std::pair< std::string, ARG_TYPE > > m_argument_table
Definition: Handlers.hh:188
static void ref_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for REF.
Definition: Handlers.cc:215
static std::string configname()
Get value_type string for configuration completion.
Definition: Handlers.cc:66
static void infomethod_to_bash(std::vector< std::string > &arguments)
Definition: Handlers.cc:261
static void void_to_bash(std::vector< std::string > &arguments)
Definition: Handlers.cc:92
static std::string dof()
Get value_type string for property mode completion.
Definition: Handlers.cc:88
static void configtype_to_bash(std::vector< std::string > &arguments)
Definition: Handlers.cc:175
static std::string configtype()
Get value_type string for configtype mode completion.
Definition: Handlers.cc:74
static void dof_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for DOF.
Definition: Handlers.cc:250
static ARG_TYPE determine_type(const po::option_description &boost_option)
Definition: Handlers.cc:28
static void eci_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for ECI.
Definition: Handlers.cc:226
static void calctype_to_bash(std::vector< std::string > &arguments)
Definition: Handlers.cc:182
static std::string operation()
Get value_type string for operation completion.
Definition: Handlers.cc:64
static std::string calctype()
Get value_type string for calctype mode completion.
Definition: Handlers.cc:76
static void operator_to_bash(std::vector< std::string > &arguments)
Definition: Handlers.cc:128
static void clex_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for CLEX.
Definition: Handlers.cc:204
static std::string property()
Get value_type string for property mode completion.
Definition: Handlers.cc:86
static std::string enummethod()
Get value_type string for enummethod mode completion.
Definition: Handlers.cc:72
static void property_to_bash(std::vector< std::string > &arguments)
Definition: Handlers.cc:239
static std::string eci()
Get value_type string for eci mode completion.
Definition: Handlers.cc:84
static std::string coordtype()
Get value_type string for coordinate mode completion.
Definition: Handlers.cc:68
static std::string infomethod()
Get value_type string for infomethod mode completion.
Definition: Handlers.cc:90
static std::string query()
Get value_type string for query completion.
Definition: Handlers.cc:62
static std::string dbtype()
Get value_type string for dbtype mode completion.
Definition: Handlers.cc:70
static std::string ref()
Get value_type string for ref mode completion.
Definition: Handlers.cc:82
static void command_to_bash(std::vector< std::string > &arguments)
Definition: Handlers.cc:99
static void scelname_to_bash(std::vector< std::string > &arguments)
Definition: Handlers.cc:104
static void dbtype_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for DBTYPE.
Definition: Handlers.cc:160
static void bset_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for BSET.
Definition: Handlers.cc:193
static std::string command()
Get value_type string for command completion (i.e. stuff in your $PATH)
Definition: Handlers.cc:58
static std::string bset()
Get value_type string for bset mode completion.
Definition: Handlers.cc:78
static void path_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for PATH.
Definition: Handlers.cc:94
static void enummethod_to_bash(std::vector< std::string > &arguments)
Definition: Handlers.cc:167
static std::string clex()
Get value_type string for clex mode completion.
Definition: Handlers.cc:80
static void query_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for QUERY.
Definition: Handlers.cc:140
static std::string supercell()
Get value_type string for supercell completion.
Definition: Handlers.cc:60
static void configname_to_bash(std::vector< std::string > &arguments)
Definition: Handlers.cc:116
void initialize() override
Fill in the options descriptions accordingly.
Definition: bset.cc:25
void initialize() override
Fill in the options descriptions accordingly.
Definition: composition.cc:49
const std::string & axis_choice_str() const
Definition: composition.cc:59
EnumOptionBase(std::string const &_name)
Definition: Handlers.hh:819
virtual void initialize() override
Fill in the options descriptions accordingly.
Definition: Handlers.hh:842
void initialize() override
Fill in the options descriptions accordingly.
Definition: enum.cc:22
const std::vector< std::string > & desc_vec() const
Definition: Handlers.hh:886
std::string method() const
Definition: Handlers.hh:888
const std::string & filter_str() const
Definition: Handlers.hh:890
std::vector< std::string > m_desc_vec
Definition: Handlers.hh:895
std::vector< std::string > m_calc_vec
Definition: Handlers.hh:657
const std::string & settings_str() const
Definition: files.cc:18
void initialize() override
Fill in the options descriptions accordingly.
Definition: files.cc:20
const std::vector< std::string > & calc_vec() const
Definition: files.cc:14
void initialize() override
Fill in the options descriptions accordingly.
Definition: format.cc:13
const std::vector< fs::path > & pos_vec() const
Definition: import.cc:18
std::vector< fs::path > m_pos_vec
Definition: Handlers.hh:977
const fs::path & batch_path() const
Definition: import.cc:20
void initialize() override
Fill in the options descriptions accordingly.
Definition: import.cc:22
const std::vector< std::string > & desc_vec() const
Definition: Handlers.hh:914
void initialize() override
Fill in the options descriptions accordingly.
Definition: info.cc:21
std::string method() const
Definition: Handlers.hh:916
std::vector< std::string > m_desc_vec
Definition: Handlers.hh:921
void initialize() override
Fill in the options descriptions accordingly.
Definition: init.cc:103
void initialize() override
Fill in the options descriptions accordingly.
Definition: monte.cc:76
Index condition_index() const
Definition: monte.cc:93
OptionHandlerBase(const std::string &init_option_tag)
Define the name of the command during construction.
Definition: Handlers.cc:298
std::set< std::string > db_type_opts() const
Definition: Handlers.cc:557
std::string configtype() const
Definition: Handlers.cc:530
COORD_TYPE coordtype_enum() const
Return the coordinate type recasted as the CASM defined enum.
Definition: Handlers.cc:398
void add_selections_suboption(const fs::path &_default="MASTER")
Add –selections suboption (defaults to MASTER)
Definition: Handlers.cc:443
const std::vector< std::string > & config_strs() const
Definition: Handlers.cc:382
fs::path m_file_path
The path string to go with add_file_path_suboption.
Definition: Handlers.hh:316
void add_prim_path_suboption(const fs::path &_default="")
Add –prim suboption.
Definition: Handlers.cc:500
void add_input_suboption(bool required=true)
Definition: Handlers.cc:610
fs::path m_selection_path
The selection string to go with add_config_suboption.
Definition: Handlers.hh:280
std::vector< std::string > m_dof_strs
The list of DoF type names.
Definition: Handlers.hh:525
void add_confignames_suboption()
Add a –confignames suboption.
Definition: Handlers.cc:691
void add_names_suboption()
Add a –names suboption.
Definition: Handlers.cc:706
std::string m_config_str
The name of a single configname to go with add_configname_suboption()
Definition: Handlers.hh:474
po::variables_map m_vm
Boost program options variable map.
Definition: Handlers.hh:263
const po::options_description & desc()
Get the program options, filled with the initialized values.
Definition: Handlers.cc:321
std::vector< fs::path > m_selection_paths
The selection string to go with add_config_suboption.
Definition: Handlers.hh:294
std::string input_str() const
Returns the path corresponding to add_input_suboption.
Definition: Handlers.cc:368
const std::vector< std::string > & supercell_strs() const
Returns the list of the supercells for add_scelnames_suboption()
Definition: Handlers.cc:390
void add_scelname_suboption()
Add a –scelname suboption.
Definition: Handlers.cc:654
static std::string default_dry_run_msg()
Definition: Handlers.cc:753
std::vector< std::string > m_help_opt_vec
The list of strings to go with add_general_help_suboption()
Definition: Handlers.hh:375
std::string m_configtype
User-specified config type.
Definition: Handlers.hh:338
po::variables_map & vm()
Get the variables map.
Definition: Handlers.cc:310
bool gzip_flag() const
Returns the value assigned for add_gzip_suboption()
Definition: Handlers.cc:372
const fs::path & selection_path() const
Returns the string corresponding to add_config_suboption()
Definition: Handlers.cc:338
void add_settings_suboption(bool required=true)
Definition: Handlers.cc:588
void add_help_suboption()
Add a plain –help and –desc suboptions.
Definition: Handlers.cc:561
std::vector< std::string > m_name_strs
The list of the supercell names of add_configname_suboption()
Definition: Handlers.hh:498
fs::path m_output_path
The path that goes with add_output_suboption.
Definition: Handlers.hh:429
const std::vector< std::string > & name_strs() const
Definition: Handlers.cc:721
void add_configlists_suboption(const fs::path &_default="MASTER")
Add –configs suboption (defaults to MASTER)
Definition: Handlers.cc:455
const fs::path & prim_path() const
Returns the string corsresponding to add_prim_path_suboption()
Definition: Handlers.cc:348
std::vector< std::string > m_config_strs
The list of the supercell names of add_configname_suboption()
Definition: Handlers.hh:486
po::options_description m_desc
Definition: Handlers.hh:260
const std::string & coordtype_str() const
Return the coordinate type in the form of a string.
Definition: Handlers.cc:394
const fs::path settings_path() const
Returns the path corresponding to add_settings_suboption.
Definition: Handlers.cc:364
void add_configlist_suboption(const fs::path &_default="MASTER")
Add –config suboption (defaults to MASTER)
Definition: Handlers.cc:431
std::set< std::string > configtype_opts() const
Definition: Handlers.cc:532
int verbosity() const
Will throw if not expected string or int in range [0, 100].
Definition: Handlers.cc:355
void add_db_type_suboption(std::string _default, std::set< std::string > _configtype_opts)
Definition: Handlers.cc:536
std::string m_tag
name of the casm command
Definition: Handlers.hh:256
void add_selection_no_default_suboption()
Add –selection suboption (no default)
Definition: Handlers.cc:420
std::string m_verbosity_str
The verbosity string to go with add_config_suboption.
Definition: Handlers.hh:387
void add_coordtype_suboption()
Add a –coord suboption to specify FRAC or CART.
Definition: Handlers.cc:725
std::set< std::string > m_configtype_opts
Set of valid config types.
Definition: Handlers.hh:341
const std::vector< std::string > & help_opt_vec() const
Returns the list of strings corresponding to add_general_help_suboption()
Definition: Handlers.cc:374
std::string m_input_str
The settings path to go with add_input_suboption()
Definition: Handlers.hh:402
void add_dry_run_suboption(std::string msg=default_dry_run_msg())
Definition: Handlers.cc:749
void add_configtype_suboption(std::string _default, std::set< std::string > _configtype_opts)
Add –type suboption (default, set of short_name of allowed ConfigTypes)
Definition: Handlers.cc:511
const std::vector< std::string > & dof_strs() const
Returns the names of the DoF type names for add_dofs_suboption()
Definition: Handlers.cc:403
void add_general_help_suboption()
Add a smart –help suboption that takes "properties" or "operators".
Definition: Handlers.cc:567
bool m_gzip_flag
The bool that goes with add_gzip_suboption.
Definition: Handlers.hh:441
void add_scelnames_suboption()
Add a –scelnames suboption.
Definition: Handlers.cc:665
virtual void initialize()=0
Fill in the options descriptions accordingly.
std::vector< std::string > m_supercell_strs
The list of supercell names of add_scelnames_suboption()
Definition: Handlers.hh:463
std::string db_type() const
Definition: Handlers.cc:555
void add_dofs_suboption()
Add a –dofs suboption to specify DoF Types.
Definition: Handlers.cc:737
const std::string & supercell_str() const
Returns the name of the supercell for add_scelname_suboption()
Definition: Handlers.cc:386
const std::string & config_str() const
Definition: Handlers.cc:378
void add_configname_suboption()
Add a –configname suboption.
Definition: Handlers.cc:677
void add_file_path_suboption(const fs::path &_default="")
Add –path suboption (defaults to MASTER)
Definition: Handlers.cc:490
std::set< std::string > m_db_type_opts
Set of valid config types.
Definition: Handlers.hh:358
void add_configlists_nodefault_suboption()
Add –configs suboption (no default)
Definition: Handlers.cc:478
std::string m_db_type
User-specified config type.
Definition: Handlers.hh:355
const fs::path & file_path() const
Returns the string corsresponding to add_file_path_suboption()
Definition: Handlers.cc:346
const std::vector< fs::path > & selection_paths() const
Returns the string corresponding to add_config_suboption()
Definition: Handlers.cc:342
void add_configlist_nodefault_suboption()
Add –config suboption (no default)
Definition: Handlers.cc:467
void add_selection_suboption(const fs::path &_default="MASTER")
Add –selection suboption (defaults to MASTER)
Definition: Handlers.cc:407
void add_output_suboption()
Add a –output suboption. Expects to allow "STDOUT" to print to screen.
Definition: Handlers.cc:626
const std::string & verbosity_str() const
Returns the string corresponding to add_verbosity_suboption()
Definition: Handlers.cc:350
fs::path m_prim_path
The path string to go with add_prim_path_suboption.
Definition: Handlers.hh:305
const std::string & tag() const
Definition: Handlers.cc:307
fs::path m_settings_path
The settings path to go with add_settings_suboption()
Definition: Handlers.hh:414
const fs::path output_path() const
Returns the path corresponding to add_output_suboption()
Definition: Handlers.cc:370
std::string m_supercell_str
The string of the supercell name of add_scelname_suboption()
Definition: Handlers.hh:452
void initialize() override
Fill in the options descriptions accordingly.
Definition: perturb.cc:12
const fs::path & cspecs_path() const
Definition: perturb.cc:10
std::vector< std::string > m_columns_vec
Definition: Handlers.hh:951
void initialize() override
Fill in the options descriptions accordingly.
Definition: query.cc:22
bool verbatim_flag() const
Definition: query.cc:70
const std::vector< std::string > & new_alias_vec() const
Definition: query.cc:76
const std::vector< std::string > & columns_vec() const
Definition: query.cc:72
std::vector< std::string > m_new_alias_vec
Definition: Handlers.hh:953
void initialize() override
Fill in the options descriptions accordingly.
Definition: ref.cc:149
const std::string & set_str() const
Definition: ref.cc:147
void initialize() override
Fill in the options descriptions accordingly.
Definition: rm.cc:23
bool data() const
Definition: rm.cc:21
bool force() const
Definition: rm.cc:19
void initialize() override
Fill in the options descriptions accordingly.
Definition: run.cc:20
const std::string & exec_str() const
Definition: run.cc:32
const std::vector< std::string > & criteria_vec() const
Definition: select.cc:17
void initialize() override
Fill in the options descriptions accordingly.
Definition: select.cc:21
std::vector< std::string > m_criteria_vec
Definition: Handlers.hh:1004
std::vector< std::string > m_input_vec
Definition: Handlers.hh:741
void initialize() override
Fill in the options descriptions accordingly.
Definition: settings.cc:38
const std::string & input_str() const
Definition: settings.cc:32
const std::vector< std::string > & input_vec() const
Definition: settings.cc:34
void initialize() override
Fill in the options descriptions accordingly.
Definition: status.cc:298
void initialize() override
Fill in the options descriptions accordingly.
Definition: super.cc:49
const std::string & unit_scel_str() const
Definition: super.cc:41
std::vector< fs::path > m_transf_mat_paths
Definition: Handlers.hh:786
const fs::path & struct_path() const
Definition: super.cc:39
double tolerance() const
Definition: super.cc:47
Index min_vol() const
Definition: super.cc:45
const std::vector< fs::path > & transf_mat_paths() const
Definition: super.cc:35
fs::path poscar_path() const
Definition: Handlers.hh:864
void initialize() override
Fill in the options descriptions accordingly.
Definition: sym.cc:16
void initialize() override
Fill in the options descriptions accordingly.
Definition: update.cc:19
void initialize() override
Fill in the options descriptions accordingly.
Definition: view.cc:29
Main CASM namespace.
Definition: APICommand.hh:8
COORD_TYPE
Definition: enum.hh:6
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39