CASM  1.1.0
A Clusters Approach to Statistical Mechanics
format.cc
Go to the documentation of this file.
1 #include <cstring>
2 
4 #include "casm/casm_io/Log.hh"
7 
8 namespace CASM {
9 
10 namespace Completer {
12 
15 
16  m_desc.add_options()("dir", "CASM project directory structure summary")(
17  "project_settings",
18  "Description and location of 'project_settings' file")(
19  "prim", "Description and location of 'prim.json' and 'PRIM' files")(
20  "sym",
21  "Description and location of 'lattice_point_group.json', "
22  "'factor_group.json' and 'crystal_point_group.json' files")(
23  "vasp", "Description and location of VASP settings files")(
24  "properties", "Description and location of properties.calc.json files")(
25  "qe", "Description and location of Quantum Espresso settings files")(
26  "comp", "Description and location of 'composition_axes.json' file")(
27  "bspecs", "Description and location of 'bspecs.json' file")(
28  "local_bspecs", "Description and location of 'local_bspecs.json' file")(
29  "clust", "Description and location of 'clust.json' file")(
30  "basis", "Description and location of 'basis.json' file")(
31  "clex", "Description and location of '$TITLE_Clexulator.*' files")(
32  "ref", "Description and location of 'chemical_reference.json' files")(
33  "scel", "Description and location of 'SCEL' file")(
34  "lat", "Description and location of 'LAT' files")(
35  "pos", "Description and location of 'POS' files")(
36  "eci", "Description and location of 'eci.json' file")(
37  "monte", "Description and location of the Monte Carlo input file");
38  return;
39 }
40 } // namespace Completer
41 
42 // ///////////////////////////////////////
43 // 'format' function for casm
44 // (add an 'if-else' statement in casm.cpp to call this)
45 
46 int format_command(const CommandArgs &args) {
47  po::variables_map vm;
48 
49  Completer::FormatOption format_opt;
50 
51  try {
52  po::store(
53  po::parse_command_line(args.argc(), args.argv(), format_opt.desc()),
54  vm);
55 
58  if (vm.count("help") || vm.size() == 0) {
59  log() << std::endl;
60  log() << format_opt.desc() << std::endl;
61 
62  return 0;
63  }
64 
65  if (vm.count("desc")) {
66  log() << "\n";
67  log() << format_opt.desc() << std::endl;
68 
69  log() << "DESCRIPTION\n"
70  " This option describes the files contained within a CASM "
71  "project \n"
72  " and where to find them. For a summary of the directory "
73  "structure\n"
74  " of a CASM project using VASP for calculating configuration "
75  "use \n"
76  " the --dir option. Not all files are always present. "
77  " \n";
78 
79  return 0;
80  }
81 
82  po::notify(vm);
83 
84  } catch (po::error &e) {
85  err_log() << "ERROR: " << e.what() << std::endl << std::endl;
86  err_log() << format_opt.desc() << std::endl;
87  return 1;
88  } catch (std::exception &e) {
89  err_log() << "Unhandled Exception reached the top of main: " << e.what()
90  << ", application will now exit" << std::endl;
91  return 1;
92  }
93 
94  if (vm.count("dir")) {
95  log() << "\n### dir ##################\n\n";
96 
97  log() << " The expected CASM project directory structure with VASP "
98  "settings \n"
99  " files: "
100  " \n"
101  " "
102  " \n"
103  " $ROOT/ "
104  " \n"
105  " prim.json "
106  " \n"
107  " (PRIM) "
108  " \n"
109  " LOG "
110  " \n"
111  " .casm/ "
112  " \n"
113  " composition_axes.json "
114  " \n"
115  " project_settings.json "
116  " \n"
117  " jsonDB/ "
118  " \n"
119  " config_list.json "
120  " \n"
121  " scel_list.json "
122  " \n"
123  " diff_trans_list.json "
124  " \n"
125  " diff_trans_config_list.json "
126  " \n"
127  " query/ "
128  " \n"
129  " Configuration/ "
130  " \n"
131  " Supercell/ "
132  " \n"
133  " symmetry/ "
134  " \n"
135  " lattice_point_group.json "
136  " \n"
137  " factor_group.json "
138  " \n"
139  " crystal_point_group.json "
140  " \n"
141  " basis_sets/ "
142  " \n"
143  " $CURR_BSET/ "
144  " \n"
145  " bspecs.json "
146  " \n"
147  " basis.json "
148  " \n"
149  " clust.json "
150  " \n"
151  " $TITLE_Clexulator.* "
152  " \n"
153  " training_data/ "
154  " \n"
155  " SCEL "
156  " \n"
157  " settings/$CURR_CALCTYPE/ "
158  " \n"
159  " relax.json "
160  " \n"
161  " INCAR "
162  " \n"
163  " SPECIES "
164  " \n"
165  " KPOINTS "
166  " \n"
167  " POSCAR "
168  " \n"
169  " $CURR_CALCTYPE/ "
170  " \n"
171  " $CURR_REF/ "
172  " \n"
173  " chemical_reference.json "
174  " \n"
175  " $SCELNAME/ "
176  " \n"
177  " LAT "
178  " \n"
179  " $CONFIGID/ "
180  " \n"
181  " POS "
182  " \n"
183  " config.json "
184  " \n"
185  " $CURR_CALCTYPE/ "
186  " \n"
187  " (DFT files) "
188  " \n"
189  " properties.calc.json "
190  " \n"
191  " cluster_expansions/ "
192  " \n"
193  " clex.formation_energy/ "
194  " \n"
195  " $CURR_BSET/ "
196  " \n"
197  " $CURR_CALCTYPE/ "
198  " \n"
199  " $CURR_REF/ "
200  " \n"
201  " $CURR_ECI/ "
202  " \n"
203  " eci.json "
204  " \n"
205  " \n"
206  " \n"
207  " Variable descriptions: "
208  " \n"
209  " \n"
210  " $ROOT: root directory of the CASM project "
211  " \n"
212  " \n"
213  " $CURR_BSET: Current basis set, by default this is "
214  "'bset.default'.\n"
215  " The current value can be inspected via 'casm settings -l'. "
216  " \n"
217  " \n"
218  " $CURR_CALCTYPE: Current calctype, by default this is "
219  "'calctype.default'.\n"
220  " The current value can be inspected via 'casm settings -l'. "
221  " \n"
222  " \n"
223  " $CURR_REF: Current composition axes and reference states, by "
224  " \n"
225  " default this is 'ref.default'. The current value can be "
226  "inspected\n"
227  " via 'casm settings -l'. "
228  " \n"
229  " \n"
230  " $SCELNAME: Supercell name, in the form SCELV_A_B_C_D_E_F. "
231  "'V' is\n"
232  " volume of the supercell in terms of the primitive cell, and "
233  " \n"
234  " 'A'-'F' are the values of the hermite normal form of the "
235  " \n"
236  " transformation matrix. "
237  " \n"
238  " \n"
239  " $CONFIGID: Configuration id, a unique integer. "
240  " \n"
241  " \n"
242  " $TITLE: Title of the CASM project "
243  " \n"
244  " \n"
245  " Note: The 'settings' heirarchy can be located at the project "
246  " \n"
247  " level as shown above, or at the supercell or configuration "
248  "level\n"
249  " in order to override calculation, composition, or reference "
250  " \n"
251  " state settings at the supercell or configuration level. The "
252  " \n"
253  " most local settings are always used for a configuration. "
254  " \n"
255  " \n";
256  }
257 
258  if (vm.count("project_settings")) {
259  log() << "\n### project_settings.json ##################\n\n";
260 
261  log() << "LOCATION WHEN GENERATED:\n";
262  log() << "$ROOT/.casm/project_settings.json\n\n\n";
263 
264  log() << "DESCRIPTION:\n";
265  log() << "Current CASM project settings.\n\n\n";
266 
267  log() << "EXAMPLE:\n";
268  log() << "-------\n";
269  log() << "{\n"
270  " \"cluster_expansions\" : {\n"
271  " \"formation_energy\" : {\n"
272  " \"bset\" : \"default\",\n"
273  " \"calctype\" : \"default\",\n"
274  " \"eci\" : \"default\",\n"
275  " \"name\" : \"formation_energy\",\n"
276  " \"property\" : \"formation_energy\",\n"
277  " \"ref\" : \"default\"\n"
278  " }\n"
279  " },\n"
280  " \"crystallography_tol\" : 1.0000000000000000e-05,\n"
281  " \"curr_properties\" : [ \"energy\" ],\n"
282  " \"default_clex\" : \"formation_energy\",\n"
283  " \"lin_alg_tol\" : 1.0000000000000000e-10,\n"
284  " \"name\" : \"ZrO\",\n"
285  " \"nlist_sublat_indices\" : [ 2, 3 ],\n"
286  " \"nlist_weight_matrix\" : [\n"
287  " [ 2, -1, 0 ],\n"
288  " [ -1, 2, 0 ],\n"
289  " [ 0, 0, 5 ]\n"
290  " ],\n"
291  " \"query_alias\" : {\n"
292  " },\n"
293  " \"view_command\" : \"casm.view \\\"open -a "
294  "/Applications/VESTA/VESTA.app\\\"\"\n"
295  "}"
296  << std::endl;
297  log() << "-------\n";
298  log() << std::endl << std::endl;
299  }
300 
301  if (vm.count("prim")) {
302  log()
303  << "\n### prim.json ##################\n\n"
304 
305  "LOCATION WHEN GENERATED:\n"
306  "$ROOT/prim.json\n"
307  "$ROOT/PRIM (legacy)\n\n\n"
308 
309  "DESCRIPTION:\n"
310  "'prim.json' describes the primitive cell structure and defines the "
311  " \n"
312  "allowed degrees of freedom. It lists vectors, crystal basis sites, "
313  " \n"
314  "global degrees of freedom, and site degrees of freedom, including "
315  " \n"
316  "allowed occupant species on each basis site.\n\n"
317 
318  "'prim.json' parameters: "
319  "\n\n"
320 
321  "\"title\" (string): "
322  "\n"
323  " A title for the project. Must consist of alphanumeric characters "
324  "\n"
325  " and underscores only. The first character may not be a number. "
326  "\n\n"
327 
328  "\"lattice_vectors\" (JSON array of 3 JSON arrays of 3 numbers): "
329  "\n"
330  " Lattice vectors for the primitive structure, in Angstroms. "
331  "\n\n"
332 
333  "\"coordinate_mode\" (string): "
334  "\n"
335  " Coordinate mode for basis sites. One of: "
336  "\n"
337  " \"Fractional\" or \"Direct\", "
338  "\n"
339  " \"Cartesian\" "
340  "\n\n"
341 
342  "\"dofs\" [OPTIONAL] (JSON dictionary of DoF JSON objects): \n"
343  " For each allowed type of global site DoF (typically strain), an "
344  "\n"
345  " object specifying how it is defined. "
346  "\n\n\n"
347 
348  "\"basis\" (JSON array of JSON objects): "
349  "\n\n"
350 
351  " /\"coordinate\" (JSON array of 3 numbers): "
352  "\n"
353  " Coordinate of the basis site with units as specified by the "
354  "\n"
355  " the \"coordinate_mode\" parameter. The default tolerance for "
356  "\n"
357  " checking symmetry is 1e-5, so basis site coordinates should "
358  "\n"
359  " include 6 significant digits or more. "
360  "\n\n"
361 
362  " /\"occupants\" (JSON array of string): "
363  "\n"
364  " A list of the possible occupant species that may reside at "
365  "each\n"
366  " site. The names are case sensitive, and \"Va\" is reserved for "
367  "\n"
368  " vacancies. "
369  "\n\n"
370 
371  " /\"dofs\" [OPTIONAL] (JSON dictionary of DoF JSON objects): \n"
372  " For each allowed type of site DoF (e.g., displacement, "
373  "magnetic\n"
374  " spin, etc.) an object specifying how it is defined. Within "
375  "\"dofs\"\n"
376  " object, each DoF is given by the key/object pair\n"
377  " \"$DOFNAME\" : {DOFOBJECT}\n"
378  " where $DOFNAME is the name specifier of a particular DoF type "
379  "\n"
380  " and the associated object specifies non-default options.\n\n\n"
381 
382  "\"species\" [OPTIONAL] (JSON dictionary of Molecule JSON "
383  "objects):\n"
384  " A dictionary used to define extended attributes of any species \n"
385  " listed as an allowed occupant in \"basis\"/\"occupants\". \n\n\n"
386 
387  "DoF JSON object:\n"
388  " DoFs are continuous vectors having a standard basis that "
389  "\n"
390  " is related to the fixed reference frame of the crystal. The DoF "
391  "\n"
392  " object encodes a user-specified basis in terms of the standard "
393  "basis.\n"
394  " User-specified basis may fully span the standard basis or only a "
395  " "
396  "\n"
397  " subspace.\n"
398  " EXAMPLE: Site displacement DoF:\n"
399  " \"disp\" : {\n"
400  " \"axis_names\" : [\"dxy\", \"dz\"],\n"
401  " \"basis\" : [[1.0, 1.0, 0.0],\n"
402  " [0.0, 0.0, 1.0]]\n"
403  " }\n\n\n"
404 
405  "Molecule JSON object:\n"
406  " Used to define species the comprise multiple atoms, "
407  "off-centered\n"
408  " atoms, or species with attributes such as a magnetic spin or or\n"
409  " charge state.\n\n"
410 
411  " Allowed fields:\n"
412  " \"atoms\" (JSON Array of JSON objects):\n"
413  " /\"name\" (string):\n"
414  " Name of atomic species.\n\n"
415 
416  " /\"coordinate\" (3D JSON Array of doubles):\n"
417  " Position of the atom, relative to the basis site at which "
418  "it\n"
419  " is placed. Coordinate mode is same as rest of prim.json.\n\n"
420 
421  " /\"attributes\" [OPTIONAL] (JSON dictionary of "
422  "SpeciesAttribute)\n"
423  " Additonal fixed attributes of the atom, such as magnetic "
424  "moment,\n"
425  " charge state, or selective dynamics flags. The name of each\n"
426  " attribute must correspond to a CASM-supported "
427  "SpeciesAttribute.\n\n"
428 
429  " /\"attributes\" [OPTIONAL] (JSON dictionary of "
430  "SpeciesAttribute)\n"
431  " Additonal fixed attributes of the molecule as a whole, such as "
432  "\n"
433  " magnetic spin, charge state, or selective dynamics flags. The "
434  "\n"
435  " name of each attribute must correspond to a CASM-supported \n"
436  " SpeciesAttribute.\n\n\n"
437 
438  " /\"name\" [OPTIONAL] (string)\n"
439  " Chemical name of molecule, used to override its name in the\n"
440  " enclosing dictionary. This name is used for chemical "
441  "comparisons\n"
442  " of molecules. Crystallographic and spatial comparisons are "
443  "not\n"
444  " dependent on molecule names.\n\n\n"
445 
446  "SpeciesAttribute JSON object:\n"
447  " Associates the discrete value of a vector property to an Atom or "
448  "Moleule.\n\n"
449  " Allowed fields:\n"
450  " \"value\" (JSON Array of doubles):\n"
451  " Dimension of array must match the dimension of the specified \n"
452  " SpeciesAttribute.\n\n";
453 
454  log() << "prim.json EXAMPLE 1: FCC ternary alloy of elements A, B, and C\n"
455  "-------\n"
456  "{\n"
457  " \"basis\" : [\n"
458  " {\n"
459  " \"coordinate\" : [ 0.000000000000, 0.000000000000, "
460  "0.000000000000 ],\n"
461  " \"occupants\" : [ \"A\", \"B\", \"C\" ]\n"
462  " }\n"
463  " ],\n"
464  " \"coordinate_mode\" : \"Fractional\",\n"
465  " \"description\" : \"Face-centered Cubic (FCC, cF)\",\n"
466  " \"lattice_vectors\" : [\n"
467  " [ 2.000000000000, 2.000000000000, 0.000000000000 ],\n"
468  " [ 0.000000000000, 2.000000000000, 2.000000000000 ],\n"
469  " [ 2.000000000000, 0.000000000000, 2.000000000000 ]\n"
470  " ],\n"
471  " \"title\" : \"ABC\"\n"
472  "}\n";
473  log() << "-------\n\n";
474 
475  log() << "prim.json EXAMPLE 2: FCC binary alloy of elements A and B with "
476  "Green-Lagrange strain DoF\n"
477  "-------\n"
478  "{\n"
479  " \"basis\" : [\n"
480  " {\n"
481  " \"coordinate\" : [ 0.000000000000, 0.000000000000, "
482  "0.000000000000 ],\n"
483  " \"occupants\" : [ \"A\", \"B\" ]\n"
484  " }\n"
485  " ],\n"
486  " \"dofs\" : {\n"
487  " \"strainGL\" : {},\n"
488  " }\n"
489  " \"coordinate_mode\" : \"Fractional\",\n"
490  " \"description\" : \"Face-centered Cubic (FCC, cF)\",\n"
491  " \"lattice_vectors\" : [\n"
492  " [ 2.000000000000, 2.000000000000, 0.000000000000 ],\n"
493  " [ 0.000000000000, 2.000000000000, 2.000000000000 ],\n"
494  " [ 2.000000000000, 0.000000000000, 2.000000000000 ]\n"
495  " ],\n"
496  " \"title\" : \"AB_with_Strain\"\n"
497  "}\n";
498  log() << "-------\n\n";
499 
500  log() << "prim.json EXAMPLE 3: Zincblende GaAs with Hencky strain DoF "
501  "along (x,x), (y,y), and (z,z) components\n"
502  "-------\n"
503  "{\n"
504  " \"basis\" : [\n"
505  " {\n"
506  " \"coordinate\" : [ 0.000000000000, 0.000000000000, "
507  "0.000000000000 ],\n"
508  " \"occupants\" : [ \"Ga\" ]\n"
509  " },\n"
510  " {\n"
511  " \"coordinate\" : [ 0.250000000000, 0.250000000000, "
512  "0.250000000000 ],\n"
513  " \"occupants\" : [ \"As\" ]\n"
514  " }\n"
515  " ],\n"
516  " \"dofs\" : {\n"
517  " \"strainH\" : {\n"
518  " \"axis_names\" : [ \"Exx\", \"Eyy\", \"Ezz\" ],\n"
519  " \"basis\" : [[1.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n"
520  " [0.0, 1.0, 0.0, 0.0, 0.0, 0.0],\n"
521  " [0.0, 0.0, 1.0, 0.0, 0.0, 0.0]]\n"
522  " },\n"
523  " }\n"
524  " \"coordinate_mode\" : \"Fractional\",\n"
525  " \"description\" : \"Zincblende GaAs with deviatoric strain\",\n"
526  " \"lattice_vectors\" : [\n"
527  " [ 0.00000, 2.82663, 2.82663 ],\n"
528  " [ 2.82663, 0.00000, 2.82663 ],\n"
529  " [ 2.82663, 2.82663, 0.00000 ]\n"
530  " ],\n"
531  " \"title\" : \"GaAs\"\n"
532  "}\n";
533  log() << "-------\n\n";
534 
535  log() << "prim.json EXAMPLE 4: BCC lithium with atomic displacement DoF\n"
536  "-------\n"
537  "{\n"
538  " \"basis\" : [\n"
539  " {\n"
540  " \"coordinate\" : [ 0.000000000000, 0.000000000000, "
541  "0.000000000000 ],\n"
542  " \"dofs\" : {\n"
543  " \"disp\" : {},\n"
544  " }\n"
545  " \"occupants\" : [ \"Li\" ]\n"
546  " }\n"
547  " ],\n"
548  " \"coordinate_mode\" : \"Fractional\",\n"
549  " \"description\" : \"Body-centered Cubic (BCC, cI)\",\n"
550  " \"lattice_vectors\" : [\n"
551  " [ -1.75445, 1.75445, 1.75445 ],\n"
552  " [ 1.75445, -1.75445, 1.75445 ],\n"
553  " [ 1.75445, 1.75445, -1.75445 ]\n"
554  " ],\n"
555  " \"title\" : \"Li_with_displacement\"\n"
556  "}\n";
557  log() << "-------\n\n";
558 
559  log() << "prim.json EXAMPLE 5: HCP Zr with O insertion at octahedral "
560  "interstitial positions\n"
561  "-------\n\n"
562  "{\n"
563  " \"basis\" : [\n"
564  " {\n"
565  " \"coordinate\" : [ 0.0, 0.0, 0.0 ],\n"
566  " \"occupants\" : [ \"Zr\" ]\n"
567  " },\n"
568  " {\n"
569  " \"coordinate\" : [ 0.666666, 0.333333, 0.5 ],\n"
570  " \"occupants\" : [ \"Zr\" ]\n"
571  " },\n"
572  " {\n"
573  " \"coordinate\" : [ 0.333333, 0.666666, 0.25 ],\n"
574  " \"occupants\" : [ \"Va\", \"O\" ]\n"
575  " },\n"
576  " {\n"
577  " \"coordinate\" : [ 0.333333, 0.666666, 0.75 ],\n"
578  " \"occupants\" : [ \"Va\", \"O\" ]\n"
579  " }\n"
580  " ],\n"
581  " \"coordinate_mode\" : \"Fractional\",\n"
582  " \"description\" : \"hcp Zr with oct (O) \",\n"
583  " \"lattice_vectors\" : [\n"
584  " [ 3.233986860000, 0.000000000000, 0.000000000000 ],\n"
585  " [ -1.616993430000, 2.800714770000, 0.000000000000 ],\n"
586  " [ -0.000000000000, 0.000000000000, 5.168678340000 ]\n"
587  " ],\n"
588  " \"title\" : \"ZrO\"\n"
589  "}\n";
590  log() << "-------\n\n";
591 
592  log() << "\n### PRIM ##################\n\n"
593 
594  "DESCRIPTION:\n"
595  "PRIM is the input file used by previous version of casm. It can "
596  "be read and \n"
597  "converted to 'prim.json'. The format of PRIM is very similar to "
598  "the VASP POSCAR \n"
599  "except a list of possible occupant molecules is included with "
600  "each basis site. \n\n"
601 
602  "- Molecule names are case sensitive.\n"
603  "- 'Va' is reserved for vacancies.\n"
604  "- The default tolerance for checking symmetry is 1e-5, so basis "
605  "site coordinates\n"
606  " should include 6 significant digits or more.\n\n\n"
607 
608  "EXAMPLE 1: An FCC ternary alloy of elements A, B, and C\n"
609  "-------\n"
610 
611  " Face-centered Cubic (FCC, cF)\n"
612  " 1.0\n"
613  " 0.00 2.00 2.00\n"
614  " 2.00 0.00 2.00\n"
615  " 2.00 2.00 0.00\n"
616  " 1\n"
617  " Direct\n"
618  " 0.00 0.00 0.00 A B C\n"
619  "-------\n\n";
620  log() << "EXAMPLE 2: A structure with some alloying sites and some "
621  "non-alloying sites\n"
622  "-------\n"
623  " LiTiO2 - Bronze\n"
624  " 1.00000000\n"
625  " 1.91357600 0.00000000 -6.23799200\n"
626  " 6.08935000 -1.87060000 0.00000000\n"
627  " 0.00000000 -3.74120000 0.00000000\n"
628  " 5 4 8\n"
629  " Direct\n"
630  " 0.0000000 0.0000000 0.0000000 Li Va\n"
631  " 0.3800000 0.9000000 0.5500000 Li Va\n"
632  " 0.6200000 0.1000000 0.4500000 Li Va\n"
633  " 0.0000000 0.2600000 0.3700000 Li Va\n"
634  " 0.0000000 0.7400000 0.6300000 Li Va\n"
635  " 0.7080000 0.3940000 0.8030000 Ti\n"
636  " 0.2920000 0.6060000 0.1970000 Ti\n"
637  " 0.2950000 0.1980000 0.9010000 Ti\n"
638  " 0.7050000 0.8020000 0.0990000 Ti\n"
639  " 0.9960000 0.2640000 0.8680000 O\n"
640  " 0.0040000 0.7360000 0.1320000 O\n"
641  " 0.3470000 0.5280000 0.7360000 O\n"
642  " 0.6530000 0.4720000 0.2640000 O\n"
643  " 0.6290000 0.1200000 0.9400000 O\n"
644  " 0.3710000 0.8800000 0.0600000 O\n"
645  " 0.7070000 0.7240000 0.6380000 O\n"
646  " 0.2930000 0.2760000 0.3620000 O\n"
647  "-------\n";
648  log() << std::endl << std::endl;
649  }
650 
651  if (vm.count("sym")) {
652  log() << "\n### sym ##################\n\n";
653 
654  log() << "LOCATION WHEN GENERATED:\n";
655  log() << "$ROOT/symmetry/lattice_point_group.json\n";
656  log() << "$ROOT/symmetry/factor_group.json\n";
657  log() << "$ROOT/symmetry/crystal_point_group.json\n\n\n";
658 
659  log() << "DESCRIPTION:\n"
660  "Symgroup files report each element of a group as representative "
661  " \n"
662  "linear transformations of 3-dimensional space (i.e., the "
663  "symmetry \n"
664  "operation). The symmetery operation transforms a spatial "
665  "coordinate \n"
666  "'x' according to x' = A*x+b, where 'A' is the 3x3 'operation "
667  "matrix'\n"
668  "and 'b' is the 'shift' vector. Operations are printed either in "
669  " \n"
670  "direct (fractional) coordinates or Cartesian coordinates, "
671  "depending \n"
672  "on command-line execution options.\n\n"
673 
674  "For a crystal or PRIM file, CASM reports the following groups: "
675  " \n\n"
676 
677  "lattice_point_group.json: "
678  " \n"
679  " This is the point group of the Bravais lattice, and is the "
680  "list of\n"
681  " operations that map the lattice vectors onto themselves. The "
682  " \n"
683  " 'shift' vectors will always be zero. "
684  " \n\n"
685 
686  "factor_group.json: "
687  " \n"
688  " This is a finite description of the crystal spacegroup, in "
689  "which \n"
690  " all redundant operations that differ only by a 'shift' are "
691  " \n"
692  " represented by a single operation, whose 'shift' lies within "
693  "the \n"
694  " primitive cell. Formally, this is a group formed by the cosets "
695  "of \n"
696  " 'T' in 'S', where 'T' is the translation group of the Bravais "
697  " \n"
698  " lattice and 'S' is the crystal space group. "
699  " \n\n"
700 
701  "crystal_point_group.json: "
702  " \n"
703  " This is a group of point operations formed by taking the "
704  " \n"
705  " factor group operations and setting their 'shifts' to zero. "
706  " \n"
707  " Macroscopic properties of the crystal must exhibit the "
708  "symmetries \n"
709  " of the crystal point group. It is, by definition a subgroup of "
710  " \n"
711  " the lattice point group.\n";
712 
713  log() << "\n\n";
714  }
715 
716  if (vm.count("vasp")) {
717  log() << "\n### vasp ##################\n\n";
718 
719  log() << "LOCATION WHEN GENERATED:\n\n";
720 
721  log() << "INPUT SETTINGS:\n";
722  log() << "$CALC_SETTINGS/relax.json\n";
723  log() << "$CALC_SETTINGS/INCAR\n";
724  log() << "$CALC_SETTINGS/SPECIES\n";
725  log() << "$CALC_SETTINGS/KPOINTS\n";
726  log() << "$CALC_SETTINGS/POSCAR\n\n";
727 
728  log() << "For global settings:\n";
729  log() << " CALC_SETTINGS = $ROOT/training_data/settings/$CURR_CALCTYPE\n";
730  log() << "For supercell specific settings:\n";
731  log() << " CALC_SETTINGS = "
732  "$ROOT/training_data/$SCELNAME/settings/$CURR_CALCTYPE\n";
733  log() << "For configuration specific settings:\n";
734  log() << " CALC_SETTINGS = "
735  "$ROOT/training_data/$SCELNAME/$CONFIGID/settings/"
736  "$CURR_CALCTYPE\n\n";
737 
738  log() << "RESULTS:\n";
739  log() << "$ROOT/training_data/$SCELNAME/$CONFIGID/$CURR_CALCTYPE/(VASP "
740  "results)\n";
741  log() << "$ROOT/training_data/$SCELNAME/$CONFIGID/$CURR_CALCTYPE/"
742  "properties.calc.json (read)\n";
743 
744  log() << "\n\n";
745 
746  log() << "DESCRIPTION:\n";
747  log() << "CASM comes with wrappers for using VASP to calculate the "
748  "properties \n"
749  "of configurations, but is designed so that any type of "
750  "calculation \n"
751  "software or method could be used if an appropriate set of "
752  "wrapper \n"
753  "scripts are available. By convention, input settings for "
754  "software \n"
755  "used to calculate the properties of a particular configuration "
756  " \n"
757  "should be checked for in the following directories: "
758  " \n"
759  " 1) "
760  "$ROOT/training_data/$SCELNAME/$CONFIGID/settings/$CURR_CALCTYPE\n"
761  " 2) $ROOT/training_data/$SCELNAME/settings/$CURR_CALCTYPE "
762  " \n"
763  " 3) $ROOT/training_data/settings/$CURR_CALCTYPE "
764  " \n\n"
765 
766  "The VASP wrappers included with CASM check for input settings "
767  "files \n"
768  "in the above directories, using the most local settings for a "
769  " \n"
770  "particular configuration. In most cases, the global settings "
771  "files \n"
772  "are stored in $ROOT/training_data/settings/$CURR_CALCTYPE and "
773  "used \n"
774  "for all configurations. Settings files are searched for on a "
775  "file-by-file\n"
776  "basis, so to set supercell or configuration specific settings it "
777  "is \n"
778  "sufficient to only include the particular files necessary in the "
779  " \n"
780  "supercell or configuration level settings folder. "
781  " \n\n"
782 
783  "PBS job submission using the VASP wrappers depends on using the "
784  "pbs \n"
785  "python module available here: "
786  "https://github.com/prisms-center/pbs \n\n"
787 
788  "Included with CASM, the 'vasp.relax' script can be executed by "
789  "the \n"
790  "'casm run' command to submit a batch of VASP jobs that for "
791  "selected \n"
792  "configurations. For each selected configuration, VASP is re-run "
793  " \n"
794  "using the output of the previous calculation until full "
795  "convergence \n"
796  "is achieved. The convergence criteria is: if the cell shape and "
797  " \n"
798  "volume remain constant (ISIF=0, 1, or 2) then a single "
799  "calculation \n"
800  "is performed; else the calculation is converged if at least 2 "
801  "jobs \n"
802  "are complete, and: 1) the last job completed with <= 3 ionic "
803  "steps \n"
804  " or, if \"nrg_convergence\" is set in the 'relax.json' file, 2) "
805  "the \n"
806  "last two calculations had final E0 differ by less than the value "
807  "of \n"
808  " \"nrg_convergence\". Once converged, a final constant volume "
809  " \n"
810  "calculation is performed with the following INCAR settings: "
811  "(ISIF=2,\n"
812  "ISMEAR=-5, NSW=0, IBRION=-1). "
813  " \n\n"
814 
815  "relax.json: "
816  " \n"
817  " This JSON file contains a single JSON object which contains "
818  " \n"
819  " parameters used to control PBS job submission settings. "
820  " \n"
821  " Required keys are: "
822  " \n"
823  " \"queue\": queue to submit job in "
824  " \n"
825  " \"ppn\": processors (cores) per node to request "
826  " \n"
827  " \"atom_per_proc\": max number of atoms per processor (core) "
828  " \n"
829  " \"walltime\": walltime to request (ex. \"48:00:00\") "
830  " \n\n"
831 
832  " Optional keys are: "
833  " \n"
834  " \"account\": account to submit job under (default None) "
835  " \n"
836  " \"pmem\": string for requested memory (default None) "
837  " \n"
838  " \"priority\": requested job priority (default \"0\") "
839  " \n"
840  " \"message\": when to send messages about jobs (ex. \"abe\", "
841  " \n"
842  " default \"a\") "
843  " \n"
844  " \"email\": where to send messages (ex. \"me@fake.com\", "
845  "default \n"
846  " None) "
847  " \n"
848  " \"qos\": quality of service, 'qos' option (ex. \"fluxoe\") "
849  " \n"
850  " \"npar\": vasp incar setting (default None) "
851  " \n"
852  " \"ncore\": vasp incar setting (default None) "
853  " \n"
854  " \"kpar\": vasp incar setting (default None) "
855  " \n"
856  " \"vasp_cmd\": vasp execution command (default is \"vasp\" if "
857  " \n"
858  " ncpus=1, else \"mpirun -np {NCPUS} vasp\" "
859  " \n"
860  " \"ncpus\": number of cpus (cores) to run on (default "
861  "$PBS_NP) \n"
862  " \"run_limit\": number of vasp runs until \"not_converging\" "
863  " \n"
864  " (default 10) "
865  " \n"
866  " \"nrg_convergence\": converged if last two runs complete and "
867  " \n"
868  " differ in energy by less than this amount "
869  " \n"
870  " (default None) "
871  " \n"
872  " \"move\": files to move at the end of a run (ex. \"POTCAR\", "
873  " \n"
874  " \"WAVECAR\"], default [\"POTCAR\"]) "
875  " \n"
876  " \"copy\": files to copy from run to run (ex. [\"INCAR\", "
877  " \n"
878  " \"KPOINTS\"], default [\"INCAR, KPOINTS\"]) "
879  " \n"
880  " \"remove\": files to remove at the end of a run (ex. "
881  "[\"IBZKPT\",\n"
882  " \"CHGCAR\"], default [\"IBKZPT\", \"CHG\", "
883  "\"CHGCAR\",\n"
884  " \"WAVECAR\", \"TMPCAR\", \"EIGENVAL\", \"DOSCAR\", "
885  " \n"
886  " \"PROCAR\", \"PCDAT\", \"XDATCAR\", \"LOCPOT\", "
887  "\"ELFCAR\",\n"
888  " \"PROOUT\"] "
889  " \n"
890  " \"compress\": files to compress at the end of a run (ex. "
891  " \n"
892  " [\"OUTCAR\", \"vasprun.xml\"], default []) "
893  " \n"
894  " \"backup\": files to compress to backups at the end of a "
895  "run, \n"
896  " used in conjunction with move (ex. [\"WAVECAR\"]) "
897  " \n"
898  " \"encut\": [START, STOP, STEP] values for converging ENCUT "
899  "to \n"
900  " within nrg_convergence (ex. [\"450\", \"Auto\", "
901  " \n"
902  " \"10\"], default [\"Auto\", \"Auto\", \"10\"] where "
903  " \n"
904  " \"Auto\" is either the largest ENMAX in all POTCARS "
905  " \n"
906  " called in SPECIES for START, or 2.0 * largest ENMAX "
907  " \n"
908  " for STOP) "
909  " \n"
910  " \"kpoints\": [start, stop, step] values for converging "
911  "KPOINTS \n"
912  " to within nrg_convergence (ex. [\"5\", \"50\", "
913  "\"1\"],\n"
914  " default [\"5\", \"Auto\", \"1\"] where \"Auto\" "
915  "can \n"
916  " only be used for STOP and means to keep "
917  "increasing \n"
918  " the KPOINTS length by STEP until either "
919  " \n"
920  " nrg_convergence or walltime is reached). For "
921  "meaning \n"
922  " of the KPOINTS length parameter see the VASP "
923  " \n"
924  " documentation at "
925  "http://cms.mpi.univie.ac.at/vasp/ \n"
926  " vasp/Automatic_k_mesh_generation.html "
927  " \n"
928  " \"extra_input_files\": extra input files to be copied from "
929  "the \n"
930  " settings directory, e.g., a vdW kernel "
931  " \n"
932  " file. "
933  " \n"
934  " \"initial\": location of INCAR with tags for the initial "
935  "run, \n"
936  " if desired (e.g. to generate a PBE WAVECAR for "
937  "use \n"
938  " with M06-L) "
939  " \n"
940  " \"final\": location of INCAR with tags for the final run, if "
941  " \n"
942  " desired (e.g. \"ISMEAR = -5\", etc). Otherwise, the "
943  " \n"
944  " settings enforced are (\"ISMEAR = -5\", \"NSW = "
945  "0\", \n"
946  " \"IBRION = -1\", \"ISIF = 2\") "
947  " \n"
948  " \"err_types\": list of errors to check for. Allowed entries "
949  "are \n"
950  " \"IbzkptError\" and \"SubSpaceMatrixError\". "
951  " \n"
952  " Default: [\"SubSpaceMatrixError\"] "
953  " \n"
954  "\n";
955 
956  log() << "EXAMPLE: relax.json \n";
957  log() << "-------\n";
958  log() << "{\n"
959  " \"account\":\"prismsprojectdebug_flux\",\n"
960  " \"queue\":\"flux\",\n"
961  " \"priority\":\"-200\",\n"
962  " \"walltime\":\"1:00:00\",\n"
963  " \"pmem\":\"3800mb\",\n"
964  " \"email\":\"username@univ.edu\",\n"
965  " \"ppn\":\"16\",\n"
966  " \"atom_per_proc\":\"2\",\n"
967  " \"run_limit\":10,\n"
968  " \"nrg_convergence\":0.002\n"
969  "}\n";
970  log() << "-------\n\n\n";
971 
972  log() << "SPECIES: "
973  " \n"
974  " This file contains information for selecting POTCARs and "
975  "specifing\n"
976  " parameters that must be set on an atom-by-atom basis in the "
977  "INCAR,\n"
978  " such as MAGMOM. The first line in the file specifies the value "
979  "of \n"
980  " 'POTCAR_DIR_PATH', which is the base path used to find POTCAR "
981  " \n"
982  " files. The second line contains column headings (at least 4), "
983  "and \n"
984  " then there are lines for each distinct species. The first "
985  "column \n"
986  " specifies the 'SPECIES' and must match a species names in the "
987  "PRIM\n"
988  " file. The second column gives an 'ALIAS' name for the species "
989  "which\n"
990  " is used for ordering like atoms in the generated POSCAR files. "
991  "The\n"
992  " third column should be either '0' or '1', such that only one "
993  " \n"
994  " species with a given ALIAS has a '1'. For that species the "
995  "fourth \n"
996  " column must contain the path that should be appended to the "
997  " \n"
998  " POTCAR_DIR_PATH to specify the POTCAR file for that species. "
999  " \n\n"
1000 
1001  " Additional columns, such as 'MAGMOM' in the example below are "
1002  " \n\n"
1003  " and used to specify the value used for a particular species in "
1004  "the\n"
1005  " INCAR. The column heading must match a valid VASP INCAR "
1006  "setting. \n\n";
1007 
1008  log() << "EXAMPLE: SPECIES \n";
1009  log() << "-------\n"
1010  "POTCAR_DIR_PATH = /absolute/path/to/vasp_potentials\n"
1011  "SPECIES ALIAS POTCAR POTCAR_location MAGMOM\n"
1012  "Mn3 Mn 0 - 3\n"
1013  "Mn4 Mn 1 PAW_PBE/Mn 4\n";
1014  log() << "-------\n\n\n";
1015 
1016  log() << "INCAR: "
1017  " \n"
1018  " This is a template INCAR used for VASP calculations. The "
1019  "settings \n"
1020  " are generally used as given though some may be automatically "
1021  "set \n"
1022  " based on settings in the 'relax.json' or 'SPECIES' files. "
1023  "Also, \n"
1024  " some settings might be added or changed if certain errors are "
1025  " \n"
1026  " during calculation. The actual INCAR used for each calculation "
1027  "is \n"
1028  " saved. "
1029  " \n\n";
1030 
1031  log() << "EXAMPLE: INCAR \n";
1032  log() << "-------\n"
1033  "System = Test of VASP submission\n"
1034  "ISPIN = 1 # non-spin polarized\n"
1035  "PREC = Accurate \n"
1036  "IBRION = 2 # conjugate gradient ionic minimization\n"
1037  "NSW = 61\n"
1038  "ISIF= 3 # relax ions and volume\n"
1039  "ENMAX = 400 \n"
1040  "ISMEAR = 1 # for metals\n"
1041  "SIGMA = 0.2 \n"
1042  "LWAVE = .FALSE.\n"
1043  "LCHARG = .FALSE.\n";
1044  log() << "-------\n\n\n";
1045 
1046  log() << "KPOINTS, POSCAR: "
1047  " \n"
1048  " This is a template KPOINTS file used for VASP calculations. If "
1049  "the\n"
1050  " mode (third line) is set to 'Auto', this file is used as is "
1051  "for all\n"
1052  " VASP calculations. Otherwise, if the mode is 'Gamma' or 'M', "
1053  "a \n"
1054  " reference POSCAR must also exist and a scaling method is used "
1055  "to \n"
1056  " calculate the kpoint mesh for a supercell, such that it has an "
1057  " \n"
1058  " equal or greater kpoint density than in the reference POSCAR. "
1059  " \n\n";
1060 
1061  log() << "-------\n";
1062  }
1063 
1064  if (vm.count("qe")) {
1065  log() << "\n### quantum espresso ##################\n\n";
1066 
1067  log() << "LOCATION WHEN GENERATED:\n\n";
1068 
1069  log() << "INPUT SETTINGS:\n";
1070  log() << "$CALC_SETTINGS/relax.json\n";
1071  log() << "$CALC_SETTINGS/$CUSTOM_INFILE_NAME\n";
1072  log() << "$CALC_SETTINGS/SPECIES\n";
1073 
1074  log() << "For global settings:\n";
1075  log() << " CALC_SETTINGS = $ROOT/training_data/settings/$CURR_CALCTYPE\n";
1076  log() << "For supercell specific settings:\n";
1077  log() << " CALC_SETTINGS = "
1078  "$ROOT/training_data/$SCELNAME/settings/$CURR_CALCTYPE\n";
1079  log() << "For configuration specific settings:\n";
1080  log() << " CALC_SETTINGS = "
1081  "$ROOT/training_data/$SCELNAME/$CONFIGID/settings/"
1082  "$CURR_CALCTYPE\n\n";
1083 
1084  log() << "RESULTS:\n";
1085  log() << "$ROOT/training_data/$SCELNAME/$CONFIGID/$CURR_CALCTYPE/(quantum "
1086  "espresso results)\n";
1087  log() << "$ROOT/training_data/$SCELNAME/$CONFIGID/$CURR_CALCTYPE/"
1088  "properties.calc.json (read)\n";
1089 
1090  log() << "\n\n";
1091 
1092  log() << "DESCRIPTION:\n";
1093  log()
1094  << "CASM comes with wrappers for using Quantum Espresso to calculate "
1095  "the properties \n"
1096  "of configurations, but is designed so that any type of calculation "
1097  " \n"
1098  "software or method could be used if an appropriate set of wrapper "
1099  " \n"
1100  "scripts are available. By convention, input settings for software "
1101  " \n"
1102  "used to calculate the properties of a particular configuration "
1103  " \n"
1104  "should be checked for in the following directories: "
1105  " \n"
1106  " 1) "
1107  "$ROOT/training_data/$SCELNAME/$CONFIGID/settings/$CURR_CALCTYPE\n"
1108  " 2) $ROOT/training_data/$SCELNAME/settings/$CURR_CALCTYPE "
1109  " \n"
1110  " 3) $ROOT/training_data/settings/$CURR_CALCTYPE "
1111  " \n\n"
1112 
1113  "The Quantum Espresso wrappers included with CASM check for input "
1114  "settings files \n"
1115  "in the above directories, using the most local settings for a "
1116  " \n"
1117  "particular configuration. In most cases, the global settings files "
1118  " \n"
1119  "are stored in $ROOT/training_data/settings/$CURR_CALCTYPE and used "
1120  " \n"
1121  "for all configurations. Settings files are searched for on a "
1122  "file-by-file\n"
1123  "basis, so to set supercell or configuration specific settings it "
1124  "is \n"
1125  "sufficient to only include the particular files necessary in the "
1126  " \n"
1127  "supercell or configuration level settings folder. "
1128  " \n\n"
1129 
1130  "PBS job submission using the Quantum Espresso wrappers depends on "
1131  "using the pbs \n"
1132  "python module available here: https://github.com/prisms-center/pbs "
1133  " \n\n"
1134 
1135  "Included with CASM, the 'qe.relax' script can be executed by the "
1136  "\n"
1137  "'casm run' command to submit a batch of Quantum Espresso jobs that "
1138  "for selected \n"
1139  "configurations. For each selected configuration, Quantum Espresso "
1140  "is re-run\n"
1141  "using the output of the previous calculation until full "
1142  "convergence \n"
1143  "is achieved. The convergence criteria is: if the cell shape and "
1144  " \n"
1145  "volume remain constant (calculation != vc-relax) then a single "
1146  "calculation \n"
1147  "is performed; else the calculation is converged if at least 2 jobs "
1148  " \n"
1149  "are complete, and: 1) the last job completed with <= 3 ionic steps "
1150  " \n"
1151  " or, if \"nrg_convergence\" is set in the 'relax.json' file, 2) "
1152  "the \n"
1153  "last two calculations had final energy differ by less than the "
1154  "value of \n"
1155  " \"nrg_convergence\". Once converged, a final constant volume "
1156  " \n"
1157  "calculation is performed with the following setting: (calculation "
1158  "= 'relax')\n"
1159 
1160  "relax.json: "
1161  " \n"
1162  " This JSON file contains a single JSON object which contains "
1163  " \n"
1164  " parameters used to control PBS job submission settings. "
1165  " \n"
1166  " Required keys are: "
1167  " \n"
1168  " \"queue\": queue to submit job in "
1169  " \n"
1170  " \"ppn\": processors (cores) per node to request "
1171  " \n"
1172  " \"atom_per_proc\": max number of atoms per processor (core) "
1173  " \n"
1174  " \"walltime\": walltime to request (ex. \"48:00:00\") "
1175  " \n\n"
1176  " \"software\": needs to be quantumespresso for quantum espresso "
1177  "to be used\n\n"
1178 
1179  " Optional keys are: "
1180  " \n"
1181  " \"account\": account to submit job under (default None) "
1182  " \n"
1183  " \"pmem\": string for requested memory (default None) "
1184  " \n"
1185  " \"priority\": requested job priority (default \"0\") "
1186  " \n"
1187  " \"message\": when to send messages about jobs (ex. \"abe\", "
1188  " \n"
1189  " default \"a\") "
1190  " \n"
1191  " \"email\": where to send messages (ex. \"me@fake.com\", "
1192  "default \n"
1193  " None) "
1194  " \n"
1195  " \"qos\": quality of service, 'qos' option (ex. \"fluxoe\") "
1196  " \n"
1197  " \"qe_cmd\": quantum espresso execution command (default is "
1198  "\"pw.x < {INFILE} > {OUTFILE}\" if \n"
1199  " ncpus=1, else \"mpirun -np {NCPUS} pw.x < {INFILE} "
1200  "> {OUTFILE}\" \n"
1201  " \"infile\": quantum espresso input file name (default is "
1202  "\"std.in\"\n"
1203  " \"outfile\": quantum espresso output file name (default is "
1204  "\"std.out\"\n"
1205  " \"ncpus\": number of cpus (cores) to run on (default $PBS_NP) "
1206  " \n"
1207  " \"run_limit\": number of vasp runs until \"not_converging\" "
1208  " \n"
1209  " (default 10) "
1210  " \n"
1211  " \"nrg_convergence\": converged if last two runs complete and "
1212  " \n"
1213  " differ in energy by less than this amount "
1214  " \n"
1215  " (default None) "
1216  " \n"
1217  " \"move\": files to move at the end of a run (ex. \"\", \n"
1218  " \".wfc\"], default []) \n"
1219  " \"copy\": files to copy from run to run default "
1220  "[$infilename]) \n"
1221  " \"remove\": files to remove at the end of a run "
1222  "\n"
1223  " default [\".wfc\", \".igk\", \".save\"] "
1224  "\n"
1225  " \"compress\": files to compress at the end of a run (ex. "
1226  " \n"
1227  " [$outfilename], default []) \n"
1228  " \"backup\": files to compress to backups at the end of a run, "
1229  " \n"
1230  " used in conjunction with move (ex. [\".wfc\"]) \n"
1231  " \"extra_input_files\": extra input files to be copied from the "
1232  " \n"
1233  " settings directory, e.g., an OCCUPATIONS "
1234  " \n"
1235  " file. "
1236  " \n"
1237  " \"initial\": location of $infile with tags for the initial "
1238  "run, \n"
1239  " if desired "
1240  " \n"
1241  " \"final\": location of $infile with tags for the final run, if "
1242  " \n"
1243  " desired "
1244  " \n"
1245  " \"err_types\": list of errors to check for. Not Implemented "
1246  "yet \n"
1247  "\n";
1248 
1249  log() << "EXAMPLE: relax.json \n";
1250  log() << "-------\n";
1251  log() << "{\n"
1252  " \"account\":\"prismsprojectdebug_flux\",\n"
1253  " \"queue\":\"flux\",\n"
1254  " \"priority\":\"-200\",\n"
1255  " \"walltime\":\"1:00:00\",\n"
1256  " \"pmem\":\"3800mb\",\n"
1257  " \"email\":\"username@univ.edu\",\n"
1258  " \"ppn\":\"16\",\n"
1259  " \"atom_per_proc\":\"2\",\n"
1260  " \"run_limit\":10,\n"
1261  " \"nrg_convergence\":0.002\n"
1262  " \"calculator\":\"quantumespresso\"\n"
1263  " \"infilename\":\"LixCoO2.in\"\n"
1264  " \"outfilename\":\"LixCoO2.out\"\n"
1265  "}\n";
1266  log() << "-------\n\n\n";
1267 
1268  log()
1269  << "SPECIES: "
1270  " \n"
1271  " This file contains information for selecting pseudopotentials "
1272  "and specifing\n"
1273  " parameters that must be set on an atom-by-atom basis in the "
1274  "infile,\n"
1275  " such as magnetic moment (non currently implemented).\n"
1276  " The first line in the file specifies the value of \n"
1277  " 'PSEUDO_DIR_PATH', which is the base path used to find UPF \n"
1278  " files. The second line contains column headings (at least 4), "
1279  "and \n"
1280  " then there are lines for each distinct species. The first column "
1281  " \n"
1282  " specifies the 'SPECIES' and must match a species names in the "
1283  "PRIM\n"
1284  " file. The second column gives an 'ALIAS' name for the species "
1285  "which\n"
1286  " is used for ordering like atoms in the generated input files. "
1287  "The\n"
1288  " third column should be either '0' or '1', such that only one "
1289  " \n"
1290  " species with a given ALIAS has a '1'. For that species the "
1291  "fourth \n"
1292  " column must contain the path that should be appended to the "
1293  " \n"
1294  " PSEUDO_DIR_PATH to specify the UPF file for that species. "
1295  "\n\n"
1296 
1297  " Additional columns, such as 'if_pos' in the example below are "
1298  " \n\n"
1299  " and used to specify the value used for a particular species in "
1300  "the\n"
1301  " infile. The column heading must match a valid quantum espresso "
1302  "input setting.\n"
1303  " For now only supported additional tag is if_pos, a way to fixed "
1304  "certain lattice positions.\n\n";
1305 
1306  log() << "EXAMPLE: SPECIES \n";
1307  log() << "-------\n"
1308  "PSEUDO_DIR_PATH = /absolute/path/to/quantumespresso_potentials\n"
1309  "SPECIES ALIAS UPF UPF_location if_pos\n"
1310  "Ni Ni 1 PAW_PBE/Ni.UPF 1,1,1\n"
1311  "Al Al 1 PAW_PBE/Al.UPF 1,1,1\n";
1312  log() << "-------\n\n\n";
1313 
1314  log() << "$infilename: "
1315  " \n"
1316  " This is a template input file used for Quantum Espresso "
1317  "calculations. The settings \n"
1318  " are generally used as given though some may be automatically "
1319  "set \n"
1320  " based on settings in the 'relax.json' or 'SPECIES' files. "
1321  "Also, \n"
1322  " some settings might be added or changed if certain errors are "
1323  " \n"
1324  " during calculation. The actual input file used for each "
1325  "calculation is \n"
1326  " saved. "
1327  " \n\n";
1328  log()
1329  << "Note: \n"
1330  " K_POINTS will be adjusted accordingly such that the density is "
1331  "maintained\n"
1332  " over all configurations in the project for all Quantum Espresso "
1333  "calculations\n"
1334  " this uses the CELL_PARAMETERS and the K_POINTS cards in the "
1335  "input file to calculate\n"
1336  " a density and rescale configurations k-point mesh accordingly\n";
1337 
1338  log() << "EXAMPLE: Mg2Ti4S8.in \n";
1339  log() << "-------\n"
1340  "System = Test of Quantum Espresso submission\n"
1341  "&CONTROL\n"
1342  " calculation = 'vc-relax',\n"
1343  " pseudo_dir = '/home/skolli/quantum_espresso/pseudo/',\n"
1344  " tprnfor = .true.,\n"
1345  " prefix = 'Mg2Ti4S8',\n"
1346  " restart_mode = 'from_scratch',\n"
1347  " tstress = .true.,\n"
1348  "/\n"
1349  "&SYSTEM\n"
1350  " ecutwfc = 45.0,\n"
1351  " occupations = 'fixed',\n"
1352  " celldm(1) = 7.3794,\n"
1353  " ibrav = 0,\n"
1354  " nat = 14,\n"
1355  " ntyp = 3,\n"
1356  " ecutrho = 200.0,\n"
1357  "/\n"
1358  "&ELECTRONS\n"
1359  " diagonalization = 'cg',\n"
1360  " mixing_mode = 'plain',\n"
1361  " mixing_beta = 0.7,\n"
1362  " conv_thr = 1e-08,\n"
1363  "/\n"
1364  "&IONS\n"
1365  " ion_dynamics = 'bfgs',\n"
1366  "/\n"
1367  "&CELL\n"
1368  " press = 0.1,\n"
1369  " cell_factor = 1.6,\n"
1370  " cell_dynamics = 'bfgs',\n"
1371  "/\n"
1372  "\n"
1373  "ATOMIC_SPECIES\n"
1374  " Mg 24.31 Mg.pbe-nsp-bpaw.UPF\n"
1375  " Ti 47.88 Ti.pbe-sp-hgh.UPF\n"
1376  " S 32.07 S.pbe-n-kjpaw_psl.0.1.UPF\n"
1377  "\n"
1378  "CELL_PARAMETERS angstrom\n"
1379  " 0.0000000000000000 5.1756022947592379 5.1756022947592388\n"
1380  " 5.1756022947592388 0.0000000000000000 5.1756022947592388\n"
1381  " 5.1756022947592388 5.1756022947592379 0.0000000000000000\n"
1382  "\n"
1383  "ATOMIC_POSITIONS crystal\n"
1384  "Mg 0.000000000 0.000000000 0.000000000\n"
1385  "Mg 0.250000000 0.250000000 0.250000000\n"
1386  "Ti 0.625000000 0.625000000 0.625000000\n"
1387  "Ti 0.125000000 0.625000000 0.625000000\n"
1388  "Ti 0.625000000 0.125000000 0.625000000\n"
1389  "Ti 0.625000000 0.625000000 0.125000000\n"
1390  "S 0.3842989149764762 0.3842989149764762 0.3842989149764762\n"
1391  "S 0.8657010850235238 0.8657010850235238 0.8657010850235238\n"
1392  "S 0.3842989149764762 0.8471032550705786 0.3842989149764762\n"
1393  "S 0.3842989149764762 0.3842989149764762 0.8471032550705786\n"
1394  "S 0.8471032550705786 0.3842989149764762 0.3842989149764762\n"
1395  "S 0.8657010850235238 0.8657010850235238 0.4028967449294214\n"
1396  "S 0.8657010850235238 0.4028967449294214 0.8657010850235238\n"
1397  "S 0.4028967449294214 0.8657010850235238 0.8657010850235238\n"
1398  "\n"
1399  "K_POINTS automatic\n"
1400  " 6 6 6 0 0 0\n"
1401  "\n";
1402  log() << "-------\n\n\n";
1403  }
1404  if (vm.count("properties")) {
1405  log() << "\n### properties.calc.json ##################\n\n";
1406 
1407  log() << "properties.calc.json: "
1408  " \n"
1409  " Results of calculations for a particular configuration should "
1410  "be \n"
1411  " stored in the directory "
1412  " \n"
1413  " $ROOT/training_data/$SCELNAME/$CONFIGID/$CURR_CALCTYPE, "
1414  " \n"
1415  " and calculated properties summarized in the file "
1416  " \n"
1417  " "
1418  "$ROOT/training_data/$SCELNAME/$CONFIGID/$CURR_CALCTYPE/"
1419  "properties.calc.json \n"
1420  " The 'properties.calc.json' file is read by CASM to extract the "
1421  " \n"
1422  " first-principles calculted properties of interest. If the "
1423  " \n"
1424  " 'properties.calc.json' file does not exist in the "
1425  " \n"
1426  " $ROOT/training_data/$SCELNAME/$CONFIGID/$CURR_CALCTYPE "
1427  "directory\n"
1428  " CASM assumes that no data is available for that configuration. "
1429  " \n"
1430  " The 'properties.calc.json' uses CASM standard units eV and "
1431  "Angstroms\n\n";
1432 
1433  log() << "EXAMPLE:\n";
1434  log() << "-------\n";
1435  log() << "{\n"
1436  " \"atom_type\": [\n"
1437  " \"A\", \n"
1438  " \"B\"\n"
1439  " ], \n"
1440  " \"atoms_per_type\": [\n"
1441  " 1, \n"
1442  " 2\n"
1443  " ], \n"
1444  " \"coord_mode\": \"direct\", \n"
1445  " \"is_complete\": true, \n"
1446  " \"relaxed_basis\": [\n"
1447  " [0.6666667, 0.6666667, 0.6666667],\n"
1448  " [0.00255632, 0.99488736, 0.00255632],\n"
1449  " [0.33077698, 0.33844594, 0.33077698]\n"
1450  " ], \n"
1451  " \"relaxed_energy\": -16.27773537, \n"
1452  " \"relaxed_mag_basis\": [\n"
1453  " -3.93,\n"
1454  " 3.82,\n"
1455  " 1.198\n"
1456  " ], \n"
1457  " \"relaxed_magmom\": -1.3086, \n"
1458  " \"relaxed_forces\": [\n"
1459  " [0.0, 0.0, 0.0], \n"
1460  " [0.0, 0.00987362, -0.00987362], \n"
1461  " [0.0, -0.00987362, 0.00987362]\n"
1462  " ], \n"
1463  " \"relaxed_lattice\": [\n"
1464  " [0.0, 1.9174843, 1.9174843], \n"
1465  " [1.61158655, -1.88219884, 3.79968315], \n"
1466  " [3.22317311, 0.0, 0.0]\n"
1467  " ]\n"
1468  " }\n";
1469  log() << "-------\n";
1470  }
1471  if (vm.count("comp")) {
1472  log() << "\n### composition_axes.json ##################\n\n";
1473 
1474  log() << "LOCATION WHEN GENERATED:\n";
1475  log() << "$ROOT/.casm/composition_axes.json\n";
1476  log() << "\n\n";
1477 
1478  log() << "DESCRIPTION:\n";
1479  log() << "This JSON file contains the currently selected composition axes, "
1480  "and \n"
1481  "a list of possible standard or custom composition axes. "
1482  " \n\n"
1483 
1484  "possible_axes: "
1485  " \n"
1486  " A JSON object containing each possible set of composition axes "
1487  " \n"
1488  " as an attribute with a unique string as the key. "
1489  " \n\n"
1490 
1491  "current_axes:\n"
1492  " A string denoting the key of currently selected composition "
1493  "axes\n"
1494  " from among the list of \"possible_axes\".\n\n"
1495 
1496  "enumerated:\n"
1497  " A list of strings denoting the keys of composition axes sets "
1498  "that\n"
1499  " from among the list of \"possible_axes\" that were "
1500  "automaticatlly\n"
1501  " enumerated by `casm composition --calc`.\n\n"
1502 
1503  "possible_axes:components "
1504  " \n"
1505  " A JSON array containing the names of possible species. "
1506  " \n\n"
1507 
1508  "possible_axes:independent_compositions \n"
1509  " The number of independent composition axes. "
1510  " \n\n"
1511 
1512  "possible_axes:origin \n"
1513  " The composition of origin the of composition axes in terms of "
1514  " \n"
1515  " number of each component species per primitive cell, ordered "
1516  "as in\n"
1517  " the 'components' array. "
1518  " \n\n"
1519 
1520  "possible_axes:a, b, c, ... \n"
1521  " The composition of end members a, b, c, etc. in terms of "
1522  "number of\n"
1523  " each component species per primitive cell, ordered as in the "
1524  " \n"
1525  " 'components' array. "
1526  " \n\n"
1527 
1528  "possible_axes:param_formula: \n"
1529  " The formula that converts 'comp_n' (# of each component per "
1530  " \n"
1531  " primitive cell) to 'comp' (composition relative the selected "
1532  " \n"
1533  " composition axes). "
1534  " \n\n"
1535 
1536  "possible_axes:mol_formula: \n"
1537  " The formula that converts 'comp' (composition relative the "
1538  " \n"
1539  " selected composition axes) to 'comp_n' (# of each component "
1540  "per \n"
1541  " primitive cell). "
1542  " \n\n\n";
1543 
1544  log() << "EXAMPLE:\n";
1545  log() << "-------\n";
1546  log() << "{\n"
1547  " \"current_axes\" : \"0\",\n"
1548  " \"enumerated\" : [\"0\", \"1\"],\n"
1549  " \"possible_axes\" : {\n"
1550  " \"0\" : {\n"
1551  " \"a\" : [\n"
1552  " [ 2.000000000000 ],\n"
1553  " [ 0.000000000000 ],\n"
1554  " [ 2.000000000000 ]\n"
1555  " ],\n"
1556  " \"components\" : [ \"Zr\", \"Va\", \"O\" ],\n"
1557  " \"independent_compositions\" : 1,\n"
1558  " \"mol_formula\" : \"Zr(2)Va(2-2a)O(2a)\",\n"
1559  " \"origin\" : [\n"
1560  " [ 2.000000000000 ],\n"
1561  " [ 2.000000000000 ],\n"
1562  " [ 0.000000000000 ]\n"
1563  " ],\n"
1564  " \"param_formula\" : \"a(0.5-0.25Va+0.25O)\"\n"
1565  " },\n"
1566  " \"1\" : {\n"
1567  " \"a\" : [\n"
1568  " [ 2.000000000000 ],\n"
1569  " [ 2.000000000000 ],\n"
1570  " [ 0.000000000000 ]\n"
1571  " ],\n"
1572  " \"components\" : [ \"Zr\", \"Va\", \"O\" ],\n"
1573  " \"independent_compositions\" : 1,\n"
1574  " \"mol_formula\" : \"Zr(2)Va(2a)O(2-2a)\",\n"
1575  " \"origin\" : [\n"
1576  " [ 2.000000000000 ],\n"
1577  " [ 0.000000000000 ],\n"
1578  " [ 2.000000000000 ]\n"
1579  " ],\n"
1580  " \"param_formula\" : \"a(0.5+0.25Va-0.25O)\"\n"
1581  " }\n"
1582  " }\n"
1583  "}\n";
1584 
1585  log() << "-------\n";
1586  }
1587 
1588  if (vm.count("bspecs")) {
1589  log() << "\n### bspecs.json ##################\n\n";
1590 
1591  log() << "LOCATION:\n";
1592  log() << "$ROOT/basis_sets/$CURR_BSET/bspecs.json\n";
1593  log() << "\n\n";
1594 
1595  log() << "DESCRIPTION:\n";
1596  log()
1597  << "This JSON file contains specifications for generating the cluster\n"
1598  "basis functions. If generating local clusters see EXAMPLE 2. "
1599  " \n\n";
1600 
1601  log() << "'site_basis_functions' may specify a string, which can be either "
1602  "'occupation' or \n"
1603  "'chebychev'. Otherwise, specifies a JSON object containing a "
1604  "composition vector or\n"
1605  "a JSON array containing multiple composition vectors. A single "
1606  "composition vector\n"
1607  "is formatted as, e.g.\n"
1608  " \"composition\" : {\"Au\" : 0.25, \"Cu\" : 0.75} \n"
1609  "The site basis functions will then be constructed as to be "
1610  "optimized for that composition.\n\n"
1611 
1612  "To specify different compositions on multiple sublattices, an "
1613  "array can be used. \n"
1614  "As an example, the following specifies a different composition "
1615  "on sublattice 0 than\n"
1616  "on sublattices 1 and 3: \n\n"
1617 
1618  " \"site_basis_functions\" : [\n"
1619  " {\n"
1620  " \"composition\" : {\"Ga\" : "
1621  "0.3, \"In\" : 0.7},\n"
1622  " \"sublat_indices\" : [0]\n"
1623  " },\n"
1624  " {\n"
1625  " \"composition\" : {\"Ga\" : "
1626  "1.0, \"In\" : 0.0},\n"
1627  " \"sublat_indices\" : [1,2]\n"
1628  " }\n"
1629  " ]\n\n"
1630 
1631  "Sublattices are specified in the same order as in prim.json. "
1632  "Sublattice compositions\n"
1633  "are not allowed to break the symmetry of the crystal. If "
1634  "equivalent sublattices are\n"
1635  "assigned inequivalent compositions, one will be chosen "
1636  "arbitrarily and propagated to\n"
1637  "all equivalent sublattices. The resulting site basis functions "
1638  "can be reviewed using\n"
1639  "'casm bset --functions'\n\n";
1640 
1641  log() << "The JSON object 'orbit_branch_specs' specifies the maximum size "
1642  "of pair, \n"
1643  "triplet, quadruplet, etc. clusters in terms of the maximum "
1644  "distance \n"
1645  "between any two sites in the cluster.\n\n";
1646 
1647  log() << "The JSON array 'orbit_specs' allows specifying particular custom "
1648  "orbits \n"
1649  "by providing the prototype cluster coordinates. The "
1650  "'include_subclusters' \n"
1651  "option allows including all orbits of subclusters of the "
1652  "specified cluster.\n"
1653  "The cluster coordinates may be in \"Direct\"/\"Fractional\" "
1654  "coordinates, \n"
1655  "\"Cartesian\" coordinates, or \"Integral\" coordinates. "
1656  "\"Integral\" \n"
1657  "coordinates are 4-element integer arrays indicating sublattice "
1658  "index, b, \n"
1659  "followed by unit cell indices, i, j, k. "
1660  " \n\n\n";
1661 
1662  log() << "EXAMPLE:\n";
1663  log() << "-------\n";
1664  log() << "{\n"
1665  " \"basis_functions\" : {\n"
1666  " \"site_basis_functions\" : \"occupation\"\n"
1667  " },\n"
1668  " \"orbit_branch_specs\" : {\n"
1669  " \"2\" : {\"max_length\" : 4.01},\n"
1670  " \"3\" : {\"max_length\" : 3.01}\n"
1671  " },\n"
1672  " \"orbit_specs\" : [\n"
1673  " {\n"
1674  " \"coordinate_mode\" : \"Direct\",\n"
1675  " \"prototype\" : [\n"
1676  " [ 0.000000000000, 0.000000000000, 0.000000000000 ],\n"
1677  " [ 1.000000000000, 0.000000000000, 0.000000000000 ],\n"
1678  " [ 2.000000000000, 0.000000000000, 0.000000000000 ],\n"
1679  " [ 3.000000000000, 0.000000000000, 0.000000000000 ]\n"
1680  " ],\n"
1681  " \"include_subclusters\" : true \n"
1682  " },\n"
1683  " {\n"
1684  " \"coordinate_mode\" : \"Integral\",\n"
1685  " \"prototype\" : [\n"
1686  " [ 0, 0, 0, 0 ],\n"
1687  " [ 1, 0, 0, 0 ],\n"
1688  " [ 0, 0, 0, 3 ]\n"
1689  " ],\n"
1690  " \"include_subclusters\" : true\n"
1691  " }\n"
1692  " ]\n"
1693  "}\n";
1694  log() << "-------\n";
1695 
1696  log() << "EXAMPLE2:\n";
1697  log() << "The bspecs format is slightly different when calling casm bset "
1698  "-u for a local basis set\n";
1699  log() << "'diff_trans' is the name of the hop the local cluster basis "
1700  "functions will be centered on\n";
1701  log() << "'local_bspecs' is a JSON object that represents a local_bspecs "
1702  "specification see casm format --local_bspecs for more info\n";
1703  log() << "-------\n";
1704  log() << "{\n"
1705  " \"diff_trans\" : \"diff_trans/0\",\n"
1706  " \"local_bspecs\" : {\n"
1707  " \"basis_functions\" : {\n"
1708  " \"site_basis_functions\" : \"occupation\"\n"
1709  " },\n"
1710  " \"orbit_branch_specs\" : {\n"
1711  " \"1\" : {\"cutoff_radius\" : 6.01},\n"
1712  " \"2\" : {\"cutoff_radius\" : 6.01,\"max_length\" : 4.01},\n"
1713  " \"3\" : {\"cutoff_radius\" : 4.01,\"max_length\" : 3.01}\n"
1714  " }\n"
1715  " }\n"
1716  "}\n";
1717  log() << "-------\n";
1718  }
1719 
1720  if (vm.count("local_bspecs")) {
1721  log() << "\n### local_bspecs.json ##################\n\n";
1722 
1723  log() << "LOCATION:\n";
1724  log() << "$ROOT/basis_sets/$CURR_BSET/local_bspecs.json\n";
1725  log() << "$ROOT/$your/$custom/$location\n";
1726  log() << "\n\n";
1727 
1728  log() << "DESCRIPTION:\n";
1729  log() << "This JSON file contains specifications for generating the local "
1730  "clusters\n"
1731  "around a currently unspecified hop. Used as an internal object "
1732  "for local basis function enumeration.\n"
1733  "Also used for enumerations of diff_trans_configs.\n\n";
1734 
1735  log() << "'site_basis_functions' may specify a string, which can be either "
1736  "'occupation' or \n"
1737  "'chebychev'. Otherwise, specifies a JSON object containing a "
1738  "composition vector or\n"
1739  "a JSON array containing multiple composition vectors. A single "
1740  "composition vector\n"
1741  "is formatted as, e.g.\n"
1742  " \"composition\" : {\"Au\" : 0.25, \"Cu\" : 0.75} \n"
1743  "The site basis functions will then be constructed as to be "
1744  "optimized for that composition.\n\n"
1745 
1746  "To specify different compositions on multiple sublattices, an "
1747  "array can be used. \n"
1748  "As an example, the following specifies a different composition "
1749  "on sublattice 0 than\n"
1750  "on sublattices 1 and 3: \n\n"
1751 
1752  " \"site_basis_functions\" : [\n"
1753  " {\n"
1754  " \"composition\" : {\"Ga\" : "
1755  "0.3, \"In\" : 0.7},\n"
1756  " \"sublat_indices\" : [0]\n"
1757  " },\n"
1758  " {\n"
1759  " \"composition\" : {\"Ga\" : "
1760  "1.0, \"In\" : 0.0},\n"
1761  " \"sublat_indices\" : [1,2]\n"
1762  " }\n"
1763  " ]\n\n"
1764 
1765  "Sublattices are specified in the same order as in prim.json. "
1766  "Sublattice compositions\n"
1767  "are not allowed to break the symmetry of the crystal. If "
1768  "equivalent sublattices are\n"
1769  "assigned inequivalent compositions, one will be chosen "
1770  "arbitrarily and propagated to\n"
1771  "all equivalent sublattices. The resulting site basis functions "
1772  "can be reviewed using\n"
1773  "'casm bset --functions'\n\n";
1774 
1775  log() << "The JSON object 'orbit_branch_specs' specifies the maximum size "
1776  "of pair, \n"
1777  "triplet, quadruplet, etc. clusters in terms of the maximum "
1778  "distance \n"
1779  "between any two sites in the cluster. This field also a "
1780  "cutoff_radius for the \n"
1781  "local bubble which can be customized for each orbit branch.\n\n";
1782 
1783  log() << "The JSON array 'orbit_specs' allows specifying particular custom "
1784  "orbits \n"
1785  "by providing the prototype cluster coordinates. The "
1786  "'include_subclusters' \n"
1787  "option allows including all orbits of subclusters of the "
1788  "specified cluster.\n"
1789  "The cluster coordinates may be in \"Direct\"/\"Fractional\" "
1790  "coordinates, \n"
1791  "\"Cartesian\" coordinates, or \"Integral\" coordinates. "
1792  "\"Integral\" \n"
1793  "coordinates are 4-element integer arrays indicating sublattice "
1794  "index, b, \n"
1795  "followed by unit cell indices, i, j, k. "
1796  " \n\n\n";
1797 
1798  log() << "EXAMPLE:\n";
1799  log() << "-------\n";
1800  log() << "{\n"
1801  " \"basis_functions\" : {\n"
1802  " \"site_basis_functions\" : \"occupation\"\n"
1803  " },\n"
1804  " \"orbit_branch_specs\" : {\n"
1805  " \"1\" : {\"cutoff_radius\" : 6.01},\n"
1806  " \"2\" : {\"cutoff_radius\" : 6.01, \"max_length\" : 4.01},\n"
1807  " \"3\" : {\"cutoff_radius\" : 5.01,\"max_length\" : 3.01}\n"
1808  " },\n"
1809  " \"orbit_specs\" : [\n"
1810  " {\n"
1811  " \"coordinate_mode\" : \"Direct\",\n"
1812  " \"prototype\" : [\n"
1813  " [ 0.000000000000, 0.000000000000, 0.000000000000 ],\n"
1814  " [ 1.000000000000, 0.000000000000, 0.000000000000 ],\n"
1815  " [ 2.000000000000, 0.000000000000, 0.000000000000 ],\n"
1816  " [ 3.000000000000, 0.000000000000, 0.000000000000 ]\n"
1817  " ],\n"
1818  " \"include_subclusters\" : true \n"
1819  " },\n"
1820  " {\n"
1821  " \"coordinate_mode\" : \"Integral\",\n"
1822  " \"prototype\" : [\n"
1823  " [ 0, 0, 0, 0 ],\n"
1824  " [ 1, 0, 0, 0 ],\n"
1825  " [ 0, 0, 0, 3 ]\n"
1826  " ],\n"
1827  " \"include_subclusters\" : true\n"
1828  " }\n"
1829  " ]\n"
1830  "}\n";
1831  log() << "-------\n";
1832  }
1833 
1834  if (vm.count("clust")) {
1835  log() << "\n### clust.json ##################\n\n";
1836 
1837  log() << "LOCATION:\n";
1838  log() << "$ROOT/basis_sets/$CURR_BSET/clust.json\n";
1839  log() << "\n\n";
1840 
1841  log() << "DESCRIPTION:\n";
1842  log() << "This JSON file contains the coordinates of sites in the "
1843  "prototype \n"
1844  "clusters generated using the 'bspecs.json' specifications. "
1845  " \n\n";
1846 
1847  log() << "Prototype clusters can be accessed via: "
1848  " \n"
1849  " "
1850  "[\"branches\"][branch_index][\"orbits\"][orbit_index]["
1851  "\"prototype\"]\n\n"
1852 
1853  "\"prototype\": (JSON object) "
1854  " \n"
1855 
1856  " /\"max_length\": (number) "
1857  " \n"
1858  " Maximum pair distance between sites in the cluster "
1859  " \n\n"
1860 
1861  " /\"min_length\": (number) "
1862  " \n"
1863  " Minimum pair distance between sites in the cluster "
1864  " \n\n"
1865 
1866  " /\"sites\": (JSON array of Integral coordinates) "
1867  " \n"
1868  " An array listing sites in the prototype cluster using "
1869  "Integral\n"
1870  " coordinates. Integral coordinates are 4-element integer "
1871  "arrays\n"
1872  " indicating sublattice index, b, followed by unit cell "
1873  "indices,\n"
1874  " i, j, k. "
1875  " \n\n"
1876 
1877  "\"bspecs\": (JSON object) "
1878  " \n"
1879  " For reference, the contents of the 'bspecs.json' file used to "
1880  " \n"
1881  " generate these clusters is reproduced here. "
1882  " \n\n"
1883 
1884  "\"lattice\": (JSON object) "
1885  " \n"
1886  " For reference, so that the Integral coordinates can be "
1887  "converted \n"
1888  " into Fractional or Cartesian coordinates, the lattice vectors "
1889  " \n"
1890  " of the primitive structure are reproduced here. "
1891  " \n\n"
1892  << std::endl;
1893  }
1894 
1895  if (vm.count("basis")) {
1896  log() << "\n### basis.json ##################\n\n";
1897 
1898  log() << "LOCATION:\n";
1899  log() << "$ROOT/basis_sets/$CURR_BSET/basis.json\n";
1900  log() << "\n\n";
1901 
1902  log() << "DESCRIPTION:\n";
1903  log() << "This JSON file contains the basis functions generated using the "
1904  " \n"
1905  "'bspecs.json' specifications. "
1906  " \n\n";
1907 
1908  log() << "\"site_functions\": (JSON array of JSON object) "
1909  " \n"
1910  " Gives the site basis functions. One JSON object for each basis "
1911  " \n"
1912  " site. \n\n"
1913 
1914  " /\"sublat\": (int) "
1915  " \n"
1916  " Basis site index. "
1917  " \n\n"
1918 
1919  " /\"asym_unit\": (int) "
1920  " \n"
1921  " Index of the asymmetric unit this basis site belongs to. "
1922  " \n\n"
1923 
1924  " /\"basis\": (JSON object) "
1925  " \n"
1926  " Gives the value of each site basis function for each "
1927  "possible \n"
1928  " occupant. Of the form: "
1929  " \n\n"
1930  " { \n"
1931  " \"\\\\phi_{bi}\": { \n"
1932  " \"A\": val, \n"
1933  " \"B\": val, \n"
1934  " ... \n"
1935  " }, \n"
1936  " ... \n"
1937  " } \n"
1938 
1939  "\"cluster_functions\": (JSON array of JSON object) "
1940  " \n"
1941  " Gives the cluster basis functions. One JSON object for each "
1942  " \n"
1943  " cluster basis function. "
1944  " \n\n"
1945 
1946  " /\"linear_function_index\": (int) "
1947  " \n"
1948  " Linear function index. This corresponds to ECI indices. "
1949  " \n\n"
1950 
1951  " /\"mult\": (int) "
1952  " \n"
1953  " Multiplicity of symmetrically equivalent cluter functions. "
1954  " \n\n"
1955 
1956  " /\"orbit\": (JSON array of 3 int) "
1957  " \n"
1958  " Gives the cluster branch index, cluster orbit index, and "
1959  "index\n"
1960  " of this basis function in the cluster basis. "
1961  " \n\n"
1962 
1963  " /\"prototype\": (JSON object) "
1964  " \n"
1965  " Specifies the prototype cluster, as in the 'clust.json' "
1966  "file. \n\n"
1967 
1968  " /\"prototype_function\": (string) "
1969  " \n"
1970  " Latex-style function for the prototype cluster. "
1971  " \n\n"
1972  << std::endl;
1973  }
1974 
1975  if (vm.count("clex")) {
1976  log() << "\n### $TITLE_Clexulator.* ##################\n\n";
1977 
1978  log() << "LOCATION:\n";
1979  log() << "$ROOT/basis_sets/$CURR_BSET/$TITLE_Clexulator.*\n";
1980  log() << "\n\n";
1981 
1982  log() << "DESCRIPTION:\n";
1983  log() << "$TITLE_Clexulator.cc contains C++ code generated by CASM for "
1984  " \n"
1985  "the cluster basis functions. It is automatically compiled into "
1986  " \n"
1987  "$TITLE_Clexulator.o and $TITLE_Clexulator.so for use by CASM. "
1988  " \n\n"
1989  << std::endl;
1990  }
1991 
1992  if (vm.count("ref")) {
1993  log() << "\n### ref ##################\n\n";
1994 
1995  log() << "LOCATION WHEN GENERATED:\n\n";
1996  log() << "$ROOT/training_data/settings/$CURR_CALCTYPE/$CURR_REF/"
1997  "chemical_reference.json\n";
1998  log() << "\n\n";
1999 
2000  log() << "DESCRIPTION:\n";
2001  log() << " The chemical reference determines the value of the formation "
2002  "energy \n"
2003  " and chemical potentials calculated by CASM. "
2004  " \n\n"
2005 
2006  " Chemical references states are set by specifying a "
2007  "hyperplane in \n"
2008  " energy/atom - composition (as atom_frac) space. This may be "
2009  "done by \n"
2010  " specifying the hyperplane explicitly, or by specifying "
2011  "several \n"
2012  " reference states with energy/atom and composition (as "
2013  "atom_frac) for \n"
2014  " enough states to span the composition space of the allowed "
2015  "occupants \n"
2016  " specified in the prim. For consistency with other CASM "
2017  "projects, \n"
2018  " additional reference states extending to other compositional "
2019  " \n"
2020  " dimensions may be included also. The pure Va reference is "
2021  "always 0. \n\n";
2022 
2023  log() << " The reference states are stored in the "
2024  "'chemical_reference.json' file\n"
2025  " in one of two formats: "
2026  " \n\n"
2027 
2028  " 1) Reference state composition and energy_per_species. "
2029  " \n"
2030  " In this format each reference state is represented by a "
2031  "JSON \n"
2032  " object storing the number of each species present in the "
2033  "reference\n"
2034  " state and the energy_per_species for that reference "
2035  "state. Species\n"
2036  " that are not in the primitive structure may also be "
2037  "included in \n"
2038  " the reference states as long as the composition space of "
2039  "the \n"
2040  " primitive structure is spanned by the hyperplane "
2041  "connecting the \n"
2042  " provided reference states. "
2043  " \n"
2044  R"( '[)"
2045  << "\n"
2046  R"( {"A": 3.4, "C": 2.0, "energy_per_species": 2.0},)"
2047  << "\n"
2048  R"( {"B": 2.0, "energy_per_species": 4.0}, )"
2049  << "\n"
2050  R"( {"C": 1.0, "energy_per_species": 3.0} )"
2051  << "\n"
2052  R"( ]')"
2053  << "\n\n"
2054 
2055  " 2) Input an array of energy_per_species, for each species in "
2056  "prim, \n"
2057  " including 0.0 for vacancy: "
2058  " \n"
2059  " '[X, X, X]' "
2060  " \n\n";
2061 
2062  log() << " When using '--set' it is also possible to specialize the "
2063  "chemical \n"
2064  " reference at the supercell or configuration level by adding "
2065  "the \n"
2066  " --scelname or --configname option. "
2067  " \n\n";
2068 
2069  log() << "EXAMPLE: chemical_reference.json\n";
2070  log() << "-------\n";
2071  log() << "{\n"
2072  " \"chemical_reference\" : {\n"
2073  " \"config\" : {\n"
2074  " \"SCEL4_2_2_1_1_1_0 / 0\" : [\n"
2075  " {\n"
2076  " \"A\" : 1.000000000000,\n"
2077  " \"energy_per_species\" : -1.500000000000\n"
2078  " },\n"
2079  " {\n"
2080  " \"B\" : 1.000000000000,\n"
2081  " \"energy_per_species\" : -2.000100000000\n"
2082  " },\n"
2083  " {\n"
2084  " \"C\" : 1.000000000000,\n"
2085  " \"energy_per_species\" : -8.030000000000\n"
2086  " }\n"
2087  " ],\n"
2088  " \"SCEL4_2_2_1_1_1_0 / 2\" : [ -1.520000000000, "
2089  "-2.000100000000, -8.030000000000 ]\n"
2090  " },\n"
2091  " \"global\" : [\n"
2092  " {\n"
2093  " \"A\" : 0.500000000000,\n"
2094  " \"B\" : 0.500000000000,\n"
2095  " \"energy_per_species\" : -1.500000000000\n"
2096  " },\n"
2097  " {\n"
2098  " \"B\" : 1.000000000000,\n"
2099  " \"energy_per_species\" : -2.000000000000\n"
2100  " },\n"
2101  " {\n"
2102  " \"C\" : 1.000000000000,\n"
2103  " \"energy_per_species\" : -8.000000000000\n"
2104  " },\n"
2105  " {\n"
2106  " \"D\" : 1.000000000000,\n"
2107  " \"energy_per_species\" : -4.000000000000\n"
2108  " }\n"
2109  " ],\n"
2110  " \"species_order\" : [ \"A\", \"B\", \"C\" ],\n"
2111  " \"supercell\" : {\n"
2112  " \"SCEL3_1_3_1_1_0_0\" : [\n"
2113  " {\n"
2114  " \"A\" : 1.000000000000,\n"
2115  " \"energy_per_species\" : -1.500000000000\n"
2116  " },\n"
2117  " {\n"
2118  " \"B\" : 1.000000000000,\n"
2119  " \"energy_per_species\" : -2.000000000000\n"
2120  " },\n"
2121  " {\n"
2122  " \"C\" : 1.000000000000,\n"
2123  " \"energy_per_species\" : -8.001000000000\n"
2124  " }\n"
2125  " ],\n"
2126  " \"SCEL4_2_2_1_1_1_0\" : [\n"
2127  " {\n"
2128  " \"A\" : 1.000000000000,\n"
2129  " \"energy_per_species\" : -1.500000000000\n"
2130  " },\n"
2131  " {\n"
2132  " \"B\" : 1.000000000000,\n"
2133  " \"energy_per_species\" : -2.000000000000\n"
2134  " },\n"
2135  " {\n"
2136  " \"C\" : 1.000000000000,\n"
2137  " \"energy_per_species\" : -8.030000000000\n"
2138  " }\n"
2139  " ]\n"
2140  " }\n"
2141  " }\n"
2142  "}\n";
2143  log() << "-------\n";
2144  }
2145  if (vm.count("scel")) {
2146  log() << "\n### scel ##################\n\n";
2147 
2148  log() << "LOCATION WHEN GENERATED:\n";
2149  log() << "$ROOT/training_data/SCEL\n\n\n";
2150 
2151  log() << "DESCRIPTION:\n";
2152  log() << "Contains a list of all the generated and imported supercells. "
2153  "Each \n"
2154  "entry gives the name of a supercell, its volume in number of "
2155  " \n"
2156  "primitive volumes, and the transformation matrix to go from the "
2157  " \n"
2158  "primitive cell to the supercell. The convention is "
2159  " \n"
2160  " LAT.scel = LAT.prim*transf_matrix, "
2161  " \n"
2162  "where the columns of the LAT matrices are the lattice vectors. "
2163  " \n\n\n";
2164 
2165  log() << "EXAMPLE:\n";
2166  log() << "-------\n";
2167  log() << "Supercell Name: 'SCEL1_1_1_1_0_0_0' Number: 0 Volume: 1\n"
2168  "Supercell Transformation Matrix: \n"
2169  "1 0 0\n"
2170  "0 1 0\n"
2171  "0 0 1\n"
2172  "\n"
2173  "Supercell Name: 'SCEL2_1_1_2_0_0_0' Number: 1 Volume: 2\n"
2174  "Supercell Transformation Matrix: \n"
2175  "1 0 -1\n"
2176  "0 1 0\n"
2177  "0 0 2\n"
2178  "\n"
2179  "Supercell Name: 'SCEL2_1_2_1_0_0_1' Number: 2 Volume: 2\n"
2180  "Supercell Transformation Matrix: \n"
2181  "1 -1 0\n"
2182  "0 1 -1\n"
2183  "0 1 1\n"
2184  "...\n";
2185  log() << "-------\n";
2186  }
2187 
2188  if (vm.count("lat")) {
2189  log() << "\n### lat ##################\n\n";
2190 
2191  log() << "LOCATION WHEN GENERATED:\n";
2192  log() << "$ROOT/training_data/$SCELNAME/LAT\n\n\n";
2193 
2194  log() << "DESCRIPTION:\n";
2195  log() << "Contains the lattice vectors of a particular supercell of your "
2196  "CASM \n"
2197  "project. The format is the same as the first lines in a standard "
2198  " \n"
2199  "vasp POSCAR file, excluding the title (scaling followed by the "
2200  "three\n"
2201  "lattice vectors as rows).\n\n\n";
2202 
2203  log() << "EXAMPLE:\n";
2204  log() << "-------\n";
2205  log() << " 1.00000000\n"
2206  " 10.52850134 0.00000000 0.00000000\n"
2207  " 0.00000000 10.52850134 0.00000000\n"
2208  " 0.00000000 0.00000000 10.52850134\n";
2209  log() << "-------\n";
2210  }
2211 
2212  if (vm.count("pos")) {
2213  log() << "\n### pos ##################\n\n";
2214 
2215  log() << "LOCATION WHEN GENERATED:\n";
2216  log() << "$ROOT/training_data/$SCELNAME/$CONFIGID/POS\n\n\n";
2217 
2218  log() << "DESCRIPTION:\n";
2219  log() << "This file is generated using the '--write-pos' option for 'casm "
2220  "run'.\n";
2221  log() << "Decorated configuration for a particular supercell. It is a "
2222  " \n"
2223  "supercell of your primitive structure after the enumeration on "
2224  "the \n"
2225  "alloying sites. The format is standard vasp 5.x format, and the "
2226  " \n"
2227  "coordinates of the sites for the configuration are the ideal "
2228  "sites \n"
2229  "specified in the PRIM file.\n\n\n";
2230 
2231  log() << "EXAMPLE:\n";
2232  log() << "-------\n";
2233  log() << "SCEL3_1_1_3_0_0_0\n"
2234  "1.00000000\n"
2235  " 0.00000000 1.75475022 1.75475022\n"
2236  " 1.75475022 0.00000000 1.75475022\n"
2237  " 3.50950045 3.50950045 -3.50950045\n"
2238  "Al Ni\n"
2239  "2 1\n"
2240  "Direct\n"
2241  " 0.3333333 0.3333333 0.3333333\n"
2242  " 0.6666667 0.6666667 0.6666667\n"
2243  " 0.0000000 0.0000000 0.0000000\n"
2244  "\n";
2245  log() << "-------\n";
2246  }
2247 
2248  if (vm.count("eci")) {
2249  log() << "\n### eci.json ##################\n\n";
2250 
2251  log() << "LOCATION:\n";
2252  log() << "$ROOT/cluster_expansions/clex.formation_energy/$CURR_BSET/"
2253  "$CURR_CALCTYPE/$CURR_REF/$CURR_ECI/eci.json\n";
2254  log() << "\n\n";
2255 
2256  log() << "DESCRIPTION:\n";
2257  log() << "This is a copy of the $ROOT/basis_sets/$CURR_BSET/'basis.json' "
2258  "file \n"
2259  "with the following additions: "
2260  " \n\n"
2261 
2262  "\"cluster_functions\": (JSON array of JSON object) "
2263  " \n\n"
2264 
2265  " /\"eci\": (number, optional, default=0.0) "
2266  " \n"
2267  " The value of the ECI for the cluster basis function. If not "
2268  " \n"
2269  " given, use 0.0. "
2270  " \n\n"
2271 
2272  "\"fit\": (JSON object) "
2273  " \n"
2274  " Data from 'casm-learn' specifying how the ECI where generated "
2275  "and\n"
2276  " some goodness of fit measures. "
2277  " \n\n"
2278  << std::endl;
2279  }
2280 
2281  if (vm.count("monte")) {
2282  log() << "\n### monte ##################\n\n";
2283 
2284  log() << "LOCATION WHEN GENERATED:\n";
2285  log() << " User determined\n\n\n";
2286 
2287  log() << "DESCRIPTION:\n";
2288  log()
2289  << " The Monte Carlo input file does not need to be in any particular "
2290  "\n"
2291  " location, as long as it is somewhere inside the CASM project "
2292  "\n"
2293  " directory or subdirectories. The input file contains a JSON "
2294  "\n"
2295  " object with \"ensemble\", \"method\", \"model\", \"supercell\", "
2296  "\n"
2297  " \"data\", and \"driver\" attributes, as described below. An "
2298  "\n"
2299  " optional attribute \"debug\" may also be included to print "
2300  "\n"
2301  " information that may be useful for debugging an input file. "
2302  "\n\n"
2303 
2304  "Input file parameters: "
2305  "\n\n"
2306 
2307  "\"ensemble\" (string): "
2308  "\n\n"
2309 
2310  " Possible options for \"ensemble\" are: "
2311  "\n\n"
2312 
2313  " \"GrandCanonical\" or \"grand_canonical\": Semi-grand "
2314  "canonical\n"
2315  " Monte Carlo calculation in which the total number of sites is "
2316  "\n"
2317  " fixed, but the occupants on each site may vary. One occupant "
2318  "\n"
2319  " change at a time is attempted. "
2320  "\n\n"
2321 
2322  " \"Canonical\" or \"canonical\": Canonical Monte Carlo \n"
2323  " calculation in which the total number of each type of occupant "
2324  "\n"
2325  " is fixed. Each Monte Carlo step attempts to swap a pair of "
2326  "\n"
2327  " occupants. "
2328  "\n\n\n"
2329 
2330  "\"method\" (string): "
2331  "\n\n"
2332 
2333  " Possible options for \"method\" are: "
2334  "\n\n"
2335 
2336  " \"Metropolis\" or \"metropolis\": Run Monte Carlo calculations "
2337  "\n"
2338  " using the Metropolis algorithm. "
2339  "\n\n"
2340 
2341  " \"LTE1\" or \"lte1\": Single spin flip low temperature "
2342  "\n"
2343  " expansion calculations. "
2344  "\n\n\n"
2345 
2346  "\"model\": (JSON object) "
2347  "\n\n"
2348 
2349  " /\"formation_energy\": (string, optional, "
2350  "default=\"formation_energy\")\n"
2351  " Specifies the cluster expansion to use to calculated formation "
2352  "\n"
2353  " energy. Should be one of the ones listed by 'casm settings "
2354  "-l'.\n\n\n"
2355 
2356  "\"supercell\": (3x3 JSON arrays of integers) "
2357  "\n"
2358  " The supercell transformation matrix. "
2359  "\n\n"
2360 
2361  "\"data\": (JSON object) "
2362  "\n\n"
2363 
2364  " /\"sample_by\": (string) "
2365  "\n"
2366  " Specify unit for the period between samples. May be either "
2367  "\n"
2368  " \"step\" (sample after every \"sample_period\" proposed Monte "
2369  "\n"
2370  " Carlo events), or \"pass\" (sample after the \"sample_period\" "
2371  "\n"
2372  " number of passes), where 1 pass is a number of steps equal to "
2373  "\n"
2374  " the number of sites in the supercell that have variable "
2375  "\n"
2376  " occupation). "
2377  "\n\n"
2378 
2379  " /\"sample_period\": (integer) "
2380  "\n"
2381  " Specify how many steps or passes to wait between data samples. "
2382  "\n\n"
2383 
2384  " /\"measurements\": (JSON array containing JSON objects) "
2385  "\n"
2386  " Specifies which properties to sample. Each JSON object should "
2387  "\n"
2388  " include \"quantity\" (string) specifying a property to be "
2389  "\n"
2390  " sampled. Optionally, it may also include \"precision\" "
2391  "(number),\n"
2392  " indicating the required (absolute) precision in the average of "
2393  "\n"
2394  " the quantity for the calculation to be considered converged. "
2395  "If\n"
2396  " a precision is given for any quantity, then the Monte Carlo "
2397  "\n"
2398  " calculations run in automatic convergence mode and continue "
2399  "\n"
2400  " until all quantities with a specified precision are converged "
2401  "\n"
2402  " to level requested. "
2403  "\n\n"
2404 
2405  " Possible options for \"quantity\" are: "
2406  "\n"
2407  " \"comp\": composition, relative the composition axes "
2408  "\n"
2409  " \"comp_n\": composition, number of atoms per unit cell "
2410  "\n"
2411  " \"site_frac\": composition, normalized per basis site "
2412  "\n"
2413  " \"atom_frac\": composition, normalized per total number of "
2414  "atoms\n"
2415  " \"formation_energy\": formation energy (per unit cell) "
2416  "\n"
2417  " \"potential_energy\": potential energy (per unit cell), "
2418  "\n"
2419  " (= formation_energy - sum_i(mu_i*comp_i)) "
2420  "\n"
2421  " \"non_zero_eci_correlations\": correlations (per unit cell) "
2422  "\n"
2423  " which have non-zero eci values. "
2424  "\n"
2425  " \"all_correlations\": correlations (per unit cell) "
2426  "\n"
2427  " \"<anything else>\": is interpreted as a 'casm query' query "
2428  "\n\n"
2429 
2430  " /\"confidence\": (number, range (0.0, 1.0), default 0.95) "
2431  "\n"
2432  " The confidence level used for calculating the precision in the "
2433  "\n"
2434  " average value of sampled quantities. "
2435  "\n\n"
2436 
2437  " /\"min_pass\", /\"min_step\", /\"min_sample\": (integer) "
2438  "\n"
2439  " If in automatic convergence mode, prevents the calculation "
2440  "from\n"
2441  " a minimum number of passes, steps, or samples have occurred. "
2442  "\n\n"
2443 
2444  " /\"max_pass\", /\"max_step\", /\"max_sample\": (integer) "
2445  "\n"
2446  " If in automatic convergence mode, stops the calculation if the "
2447  "\n"
2448  " specified number of passes, steps, or samples have occurred. "
2449  "\n\n"
2450 
2451  " /\"N_pass\", /\"N_step\", /\"N_sample\": (integer) "
2452  "\n"
2453  " When not in automatic convergence mode (no precision has been "
2454  "\n"
2455  " specified for any quantities being sampled), stops the "
2456  "\n"
2457  " calculation when the specified number of passes, steps, or "
2458  "\n"
2459  " samples have occurred. "
2460  "\n\n"
2461 
2462  " /\"equilibration_passes_first_run\": (integer) "
2463  "\n"
2464  " If included, the requested number of passes will be performed "
2465  "\n"
2466  " at the initial conditions as a preliminary step before the "
2467  "\n"
2468  " actual run begins. This may be useful when not running in "
2469  "\n"
2470  " automatic convergence mode. "
2471  "\n\n"
2472 
2473  " /\"equilibration_passes_each_run\": (integer) "
2474  "\n"
2475  " If included, the requested number of passes will be performed "
2476  "\n"
2477  " at each condition as a preliminary step before the actual run "
2478  "\n"
2479  " begins. This may be useful when not running in automatic "
2480  "\n"
2481  " convergence mode. "
2482  "\n\n"
2483 
2484  " /\"storage\": (JSON object) Options for writing results. "
2485  "\n\n"
2486 
2487  " /\"output_format\": (string or JSON array of string) "
2488  "\n"
2489  " Specifies the type or types of output files. Current options "
2490  "\n"
2491  " are \"csv\" or \"json\". Type names with either all lower "
2492  "\n"
2493  " case or all upper case are accepted. "
2494  "\n\n"
2495 
2496  " /\"write_observations\": (boolean, default false) "
2497  "\n"
2498  " If true, all individual observations of the quantities "
2499  "\n"
2500  " requested to be sampled will be written to compressed files: "
2501  "\n"
2502  " \"output_directory\"/conditions.i/observations.ext.gz "
2503  "\n"
2504  " where 'i' is the condition index and 'ext' is the output "
2505  "\n"
2506  " format. "
2507  "\n\n"
2508 
2509  " /\"write_trajectory\": (boolean, default false) "
2510  "\n"
2511  " If true, the value of all degrees of freedom at the time of "
2512  "\n"
2513  " each sample will be written to compressed files: "
2514  "\n"
2515  " \"output_directory\"/conditions.i/trajectory.ext.gz "
2516  "\n"
2517  " where 'i' is the condition index and 'ext' is the output "
2518  "\n"
2519  " format. "
2520  "\n\n"
2521 
2522  " /\"enumeration\": (JSON object, optional) "
2523  "\n"
2524  " If included, save configurations encountered during Monte "
2525  "\n"
2526  " Carlo calculations by keeping a 'hall of fame' of best scoring "
2527  "\n"
2528  " configurations. After the calculation at a particular set of "
2529  "\n"
2530  " thermodynamic conditions completes, the configurations in the "
2531  "\n"
2532  " hall of fame are saved to the project configuration list. "
2533  "\n\n"
2534 
2535  " /\"check\": (string, default=\"eq(1,1)\") "
2536  "\n"
2537  " A 'casm query'-like string that returns a boolean value "
2538  "\n"
2539  " indicating if (true) a configuration should be considered "
2540  "for\n"
2541  " for the enumeration hall of fame. The default always returns "
2542  "\n"
2543  " true. "
2544  "\n\n"
2545 
2546  " /\"metric\": (string, default=\"clex_hull_dist(ALL)\") "
2547  "\n"
2548  " A 'casm query'-like string that provides a metric for "
2549  "ranking\n"
2550  " ranking configurations as they are encountered during a "
2551  "Monte\n"
2552  " Carlo calculation. The resulting value is used to create a "
2553  "\n"
2554  " hall of fame of 'best' configurations encountered during the "
2555  "\n"
2556  " calculation. When the calculation is complete configurations "
2557  "\n"
2558  " in the hall of fame are added to the CASM project config "
2559  "\n"
2560  " list. The 'casm query'-like command should evaluate to a "
2561  "\n"
2562  " number. "
2563  "\n\n"
2564 
2565  " Besides the properties listed via 'casm query -h "
2566  "properties',\n"
2567  " and 'casm query -h operators', both \"check\" and \"metric\" "
2568  "\n"
2569  " can also use the property \"potential_energy\". "
2570  "\n\n"
2571 
2572  " /\"sample_mode\": (string, optional, default=\"on_sample\") "
2573  "\n"
2574  " Indicate when to attempt to insert configurations into the "
2575  "\n"
2576  " enumeration hall of fame. Options are: "
2577  "\n"
2578  " \"on_accept\": after each accepted Monte Carlo event "
2579  "\n"
2580  " \"on_sample\": after each data sample "
2581  "\n\n"
2582 
2583  " /\"check_existence\": (bool, optional, default=true) "
2584  "\n"
2585  " If true, only configurations that do not already exist in "
2586  "the\n"
2587  " config list are inserted into the enumeration hall of fame. "
2588  "\n\n"
2589 
2590  " /\"insert_canonical\": (bool, optional, default=true) "
2591  "\n"
2592  " If true, configurations are inserted into the enumeration "
2593  "\n"
2594  " hall of fame in their canonical form. If 'check_existence' "
2595  "is\n"
2596  " true, this must be set to true. "
2597  "\n\n"
2598 
2599  " /\"N_halloffame\": (integer, optional, default=100) "
2600  "\n"
2601  " The number of configurations that are allowed in the "
2602  "\n"
2603  " enumeration hall of fame. "
2604  "\n\n"
2605 
2606  " /\"tolerance\": (number, optional, default=1e-8) "
2607  "\n"
2608  " Tolerance used for floating point comparison of "
2609  "configuration\n"
2610  " scores in the enumeration hall of fame. "
2611  "\n\n\n"
2612 
2613  "\"driver\": (JSON object) "
2614  "\n\n"
2615 
2616  " /\"motif\": (JSON object) "
2617  "\n"
2618  " Specifies the initial occupation of the supercell. "
2619  "\n\n"
2620 
2621  " For canonical ensemble Monte Carlo calculations an "
2622  "additional\n"
2623  " step changes the occupants on random sites to make the "
2624  "actual\n"
2625  " composition as close as possible to the requested "
2626  "composition.\n\n"
2627 
2628  " /\"configname\": (string, optional) "
2629  "\n"
2630  " A configuration name, \"auto\", \"restricted_auto\", or "
2631  "\n"
2632  " \"default\". "
2633  "\n\n"
2634 
2635  " Specifies the configuration that is tiled to fill the "
2636  "\n"
2637  " supercell. If necessary, symmetry operations may be applied "
2638  "\n"
2639  " An error is thrown if the specified configuration can not be "
2640  "\n"
2641  " used to fill the \"supercell\". "
2642  "\n\n"
2643 
2644  " Possible options for \"configname\" are: "
2645  "\n"
2646  " A configuration name (ex. \"SCEL3_3_1_1_0_2_2/0\") "
2647  "\n"
2648  " \"auto\": (\"grand_canonical\" ensemble only) Enumerated "
2649  "\n"
2650  " configurations will be searched for the configuration with "
2651  "\n"
2652  " the lowest potential energy to use as the motif. "
2653  "\n"
2654  " \"default\": If the value \"default\" is used, the initial "
2655  "\n"
2656  " motif occupation is determined from the occupation order "
2657  "in\n"
2658  " the PRIM. "
2659  "\n"
2660  " \"restricted_auto\": (\"grand_canonical\" ensemble only) "
2661  "\n"
2662  " Same as \"auto\", but only configurations that can tile "
2663  "the\n"
2664  " supercell are considered. As a last resort, \"default\" is "
2665  "\n"
2666  " used. \n\n"
2667 
2668  " /\"configdof\": (string, optional) "
2669  "\n"
2670  " Specifies the path to a configdof JSON file, such as "
2671  "\n"
2672  " \"initial_state.json\" or \"final_state.json\", containing "
2673  "\n"
2674  " the degrees of freedom to initialize the supercell with "
2675  "\n\n"
2676 
2677  " /\"mode\": (string) "
2678  "\n"
2679  " Specify the drive mode. "
2680  "\n\n"
2681 
2682  " Possible options for \"mode\" are: "
2683  "\n"
2684  " \"incremental\": perform one or more calculations, starting "
2685  "\n"
2686  " at the initial conditions and incrementing by the "
2687  "\n"
2688  " incremental conditions up to (and including) the final "
2689  "\n"
2690  " conditions. "
2691  "\n\n"
2692  " \"custom\": perform one or more calculations, as specified "
2693  "by\n"
2694  " the \"custom_conditions\". "
2695  "\n\n"
2696 
2697  " /\"dependent_runs\": (boolean, default true) "
2698  "\n\n"
2699 
2700  " If true, begin the next calculation with the final DoF from "
2701  "the\n"
2702  " previous calculation. If false, begin each calculation with "
2703  "the\n"
2704  " DoF specified for the \"motif\".\n\n"
2705 
2706  " /\"initial_conditions\",\n"
2707  " /\"incremental_conditions\", \n"
2708  " /\"final_conditions\": (JSON object, optional) "
2709  " \n"
2710  " Specifies the applied conditions for the calculation. For "
2711  " \n"
2712  " \"incremental_conditions\", specifies the change in conditions "
2713  " \n"
2714  " between individual calculations. Each JSON object should "
2715  " \n"
2716  " include: "
2717  " \n\n"
2718 
2719  " /\"temperature\": (number) "
2720  " \n"
2721  " The temperature in K. "
2722  " \n\n"
2723 
2724  " /\"param_chem_pot\" (JSON object, \"grand_canonical\" ensemble "
2725  "only)\n"
2726  " The parametric chemical potential(s) "
2727  " \n\n"
2728 
2729  " /\"a\", /\"b\", ...: (number) "
2730  " \n"
2731  " The parametric chemical potentials conjugate to the "
2732  "parametric\n"
2733  " compositions. The number of parametric chemical potentials "
2734  " \n"
2735  " provided must match the number of independent compositions. "
2736  " \n\n"
2737 
2738  " /\"comp\" (JSON object, \"canonical\" ensemble only, option "
2739  "1)\n"
2740  " The parametric composition(s) \n\n"
2741 
2742  " /\"a\", /\"b\", ...: (number) "
2743  " \n"
2744  " The parametric composition. The number of entries provided "
2745  " \n"
2746  " must match the number of independent compositions. "
2747  " \n\n"
2748 
2749  " /\"comp\" (JSON array, \"canonical\" ensemble only, option 2)\n"
2750  " The parametric composition(s) \n\n"
2751 
2752  " [number, ...] "
2753  " \n"
2754  " An array containing the parametric composition. The number "
2755  "of \n"
2756  " entries provided must match the number of independent "
2757  " \n"
2758  " compositions. "
2759  " \n\n"
2760 
2761  " /\"comp_n\" (JSON object, \"canonical\" ensemble only, option "
2762  "3)\n"
2763  " The mol composition per unitcell "
2764  "\n\n"
2765 
2766  " /\"A\", /\"B\", ...: (number) "
2767  " \n"
2768  " The mol composition per unitcell. The entries provided must "
2769  " \n"
2770  " match occupant names in the 'prim.json' file. The values are "
2771  " \n"
2772  " summed, normalized, and then converted to parametric "
2773  "composition.\n\n"
2774 
2775  " /\"comp_n\" (JSON array, \"canonical\" ensemble only, option "
2776  "4)\n"
2777  " The mol composition per unitcell "
2778  "\n\n"
2779 
2780  " [number, ...] "
2781  " \n"
2782  " An array containing the mol composition per unitcell. The "
2783  " \n"
2784  " number of entries provided must match the number components. "
2785  " \n"
2786  " The values are summed, normalized, and converted to "
2787  "parametric\n"
2788  " composition. \n\n"
2789 
2790  " /\"tolerance\": (number) "
2791  " \n"
2792  " Specifies a numerical tolerance for comparing conditions. "
2793  " \n\n"
2794 
2795  " /\"custom_conditions\":\n"
2796  " (JSON array of JSON objects) An array specifying a custom "
2797  "\n"
2798  " path of conditions. "
2799  "\n\n"
2800 
2801  " Restarts: Metropolis Monte Carlo calculations that are stopped "
2802  "\n"
2803  " before the entire path has been calculated can be restarted as "
2804  "\n"
2805  " long as the conditions of the existing calculations agree with "
2806  "\n"
2807  " the conditions specified in the input settings. This means that "
2808  "\n"
2809  " the \"final_conditions\" might be changed to increase the length "
2810  "\n"
2811  " of a path, or additional \"custom_conditions\" might be added, "
2812  "\n"
2813  " but the \"incremental_conditions\" may not be changed. Upon "
2814  "\n"
2815  " restart, the results summary file is checked for the last "
2816  "\n"
2817  " finished conditions. Then the path is resumed from the next set "
2818  "\n"
2819  " of conditions. It is the responsibility of the user to ensure "
2820  "\n"
2821  " that other important settings, such as the \"model\" are not "
2822  "\n"
2823  " changed inappropriately. "
2824  "\n\n\n"
2825 
2826  "\"debug\" (bool, default false): "
2827  "\n\n"
2828 
2829  " If true, will print as much information as possible to assist in "
2830  "\n"
2831  " debugging input file settings. "
2832  "\n\n\n";
2833 
2834  log()
2835  << "EXAMPLE: Settings for an incremental Metropolis calculation \n"
2836  "with increasing temperature in automatic convergence mode.\n";
2837  log() << "-------\n";
2838  log() << "{\n"
2839  " \"comment\" : \"This is a sample input file. Unrecognized "
2840  "attributes (like the ones prepended with '_' are ignored.\",\n"
2841  " \"debug\" : false,\n"
2842  " \"ensemble\" : \"grand_canonical\",\n"
2843  " \"method\" : \"metropolis\",\n"
2844  " \"model\" : {\n"
2845  " \"formation_energy\" : \"formation_energy\"\n"
2846  " },\n"
2847  " \"supercell\" : [\n"
2848  " [10, 0, 0],\n"
2849  " [0, 10, 0],\n"
2850  " [0, 0, 10]\n"
2851  " ],\n"
2852  " \"data\" : {\n"
2853  " \"sample_by\" : \"pass\",\n"
2854  " \"sample_period\" : 1,\n"
2855  " \"_N_sample\" : 1000, \n"
2856  " \"_N_pass\" : 1000,\n"
2857  " \"_N_step\" : 1000,\n"
2858  " \"_max_pass\" : 10000,\n"
2859  " \"min_pass\" : 1000,\n"
2860  " \"_max_step\" : 10000,\n"
2861  " \"_max_sample\" : 500,\n"
2862  " \"_min_sample\" : 100,\n"
2863  " \"confidence\" : 0.95,\n"
2864  " \"measurements\" : [ \n"
2865  " { \n"
2866  " \"quantity\" : \"formation_energy\"\n"
2867  " },\n"
2868  " { \n"
2869  " \"quantity\" : \"potential_energy\"\n"
2870  " },\n"
2871  " { \n"
2872  " \"quantity\" : \"atom_frac\"\n"
2873  " },\n"
2874  " { \n"
2875  " \"quantity\" : \"site_frac\"\n"
2876  " },\n"
2877  " { \n"
2878  " \"quantity\" : \"comp\",\n"
2879  " \"precision\" : 1e-3\n"
2880  " },\n"
2881  " { \n"
2882  " \"quantity\" : \"comp_n\"\n"
2883  " }\n"
2884  " ],\n"
2885  " \"storage\" : {\n"
2886  " \"write_observations\" : false,\n"
2887  " \"write_trajectory\" : false,\n"
2888  " \"output_format\" : [\"csv\", \"json\"]\n"
2889  " }\n"
2890  " },\n"
2891  " \"driver\" : {\n"
2892  " \"mode\" : \"incremental\", \n"
2893  " \"motif\" : {\n"
2894  " \"configname\" : \"auto\",\n"
2895  " \"_configname\" : \"SCEL3_3_1_1_0_2_2/0\",\n"
2896  " \"_configdof\" : \"path/to/final_state.json\"\n"
2897  " },\n"
2898  " \"initial_conditions\" : {\n"
2899  " \"param_chem_pot\" : {\n"
2900  " \"a\" : -1.75\n"
2901  " },\n"
2902  " \"temperature\" : 100.0,\n"
2903  " \"tolerance\" : 0.001\n"
2904  " },\n"
2905  " \"final_conditions\" : {\n"
2906  " \"param_chem_pot\" : {\n"
2907  " \"a\" : -1.75\n"
2908  " },\n"
2909  " \"temperature\" : 1000.0,\n"
2910  " \"tolerance\" : 0.001\n"
2911  " },\n"
2912  " \"incremental_conditions\" : {\n"
2913  " \"param_chem_pot\" : {\n"
2914  " \"a\" : 0.0\n"
2915  " },\n"
2916  " \"temperature\" : 10.0,\n"
2917  " \"tolerance\" : 0.001\n"
2918  " }\n"
2919  " }\n"
2920  "}\n";
2921  log() << "-------\n\n";
2922 
2923  log()
2924  << "EXAMPLE: Settings for an custom drive mode LTE1 calculation with\n"
2925  "increasing temperature.\n";
2926  log() << "-------\n";
2927  log() << "{\n"
2928  " \"comment\" : \"This is a sample input file. Unrecognized "
2929  "attributes (like the ones prepended with '_' are ignored.\",\n"
2930  " \"debug\" : false,\n"
2931  " \"ensemble\" : \"grand_canonical\",\n"
2932  " \"method\" : \"lte1\",\n"
2933  " \"model\" : {\n"
2934  " \"formation_energy\" : \"formation_energy\"\n"
2935  " },\n"
2936  " \"supercell\" : [\n"
2937  " [9, 0, 0],\n"
2938  " [0, 9, 0],\n"
2939  " [0, 0, 9]\n"
2940  " ],\n"
2941  " \"data\" : {\n"
2942  " \"storage\" : {\n"
2943  " \"write_observations\" : false,\n"
2944  " \"write_trajectory\" : false,\n"
2945  " \"output_format\" : [\"csv\", \"json\"]\n"
2946  " }\n"
2947  " },\n"
2948  " \"driver\" : {\n"
2949  " \"mode\" : \"incremental\", \n"
2950  " \"motif\" : {\n"
2951  " \"configname\" : \"auto\",\n"
2952  " \"_configname\" : \"SCEL3_3_1_1_0_2_2/0\",\n"
2953  " \"_configdof\" : \"path/to/final_state.json\"\n"
2954  " },\n"
2955  " \"custom_conditions\" : [\n"
2956  " {\n"
2957  " \"param_chem_pot\" : {\n"
2958  " \"a\" : 0.0\n"
2959  " },\n"
2960  " \"temperature\" : 100.0,\n"
2961  " \"tolerance\" : 0.001\n"
2962  " },\n"
2963  " {\n"
2964  " \"param_chem_pot\" : {\n"
2965  " \"a\" : 0.0\n"
2966  " },\n"
2967  " \"temperature\" : 200.0,\n"
2968  " \"tolerance\" : 0.001\n"
2969  " },\n"
2970  " {\n"
2971  " \"param_chem_pot\" : {\n"
2972  " \"a\" : 0.0\n"
2973  " },\n"
2974  " \"temperature\" : 400.0,\n"
2975  " \"tolerance\" : 0.001\n"
2976  " },\n"
2977  " {\n"
2978  " \"param_chem_pot\" : {\n"
2979  " \"a\" : 0.0\n"
2980  " },\n"
2981  " \"temperature\" : 800.0,\n"
2982  " \"tolerance\" : 0.001\n"
2983  " }\n"
2984  " ]\n"
2985  " }\n"
2986  "}\n";
2987  log() << "-------\n";
2988  }
2989 
2990  return 0;
2991 }
2992 
2993 } // namespace CASM
int argc() const
Definition: CLIParse.hh:20
char ** argv() const
Definition: CLIParse.hh:22
void initialize() override
Fill in the options descriptions accordingly.
Definition: format.cc:13
const po::options_description & desc()
Get the program options, filled with the initialized values.
Definition: Handlers.cc:321
void add_help_suboption()
Add a plain –help and –desc suboptions.
Definition: Handlers.cc:561
po::options_description m_desc
Definition: Handlers.hh:260
Main CASM namespace.
Definition: APICommand.hh:8
int format_command(const CommandArgs &args)
Definition: format.cc:46
Log & log()
Definition: Log.hh:424
Log & err_log()
Definition: Log.hh:426
Data structure holding basic CASM command info.