10#ifndef _AFLOW_PFLOW_MAIN_CPP_
11#define _AFLOW_PFLOW_MAIN_CPP_
55#include "aflowlib/aflowlib_database.h"
56#include "aflowlib/aflowlib_libraries.h"
57#include "aflowlib/aflowlib_web_interface.h"
58#include "flow/aflow_avasp.h"
59#include "flow/aflow_bader.h"
60#include "flow/aflow_ivasp.h"
61#include "flow/aflow_kvasp.h"
62#include "flow/aflow_pflow.h"
63#include "flow/aflow_support_types.h"
64#include "flow/aflow_xclasses.h"
65#include "interfaces/aflow_pthreads.h"
66#include "modules/APL/aflow_apl.h"
67#include "modules/CCE/aflow_cce.h"
68#include "modules/COMPARE/aflow_compare_structure.h"
69#include "modules/GFA/aflow_gfa.h"
70#include "modules/HULL/aflow_chull.h"
71#include "modules/POCC/aflow_pocc.h"
72#include "modules/POCC/aflow_pocc_old.h"
73#include "modules/PROTOTYPES/aflow_anrl.h"
74#include "modules/QCA/aflow_qca.h"
75#include "modules/SYM/aflow_spacegroup.h"
76#include "modules/SYM/aflow_symmetry.h"
77#include "modules/SYM/aflow_symmetry_spacegroup.h"
78#include "modules/SYM/aflow_wyckoff.h"
79#include "structure/aflow_defects.h"
80#include "structure/aflow_lattice.h"
81#include "structure/aflow_surface.h"
82#include "structure/aflow_xatom.h"
83#include "structure/aflow_xstructure.h"
92using std::istringstream;
95using std::ostringstream;
96using std::setprecision;
98using std::stringstream;
109 const bool LDEBUG = (
false ||
XHOST.DEBUG);
117 if (!vpflow.
flag(
"PROTOS_ICSD")) {
127 if (vpflow.
flag(
"AGROUP")) {
137 if (
XHOST.vflag_control.flag(
"WWW")) {
138 vpflow.
flag(
"SYMMETRY::SCREEN_ONLY",
true);
152 vpflow.
args2addattachedscheme(argv, cmds,
"AFLOWLIB_AUID2AURL",
"--aflowlib_auid2aurl=|--auid2aurl=",
"");
153 vpflow.
args2addattachedscheme(argv, cmds,
"AFLOWLIB_AURL2AUID",
"--aflowlib_aurl2auid=|--aurl2auid=",
"");
154 vpflow.
args2addattachedscheme(argv, cmds,
"AFLOWLIB_AUID2LOOP",
"--aflowlib_auid2loop=|--auid2loop=",
"");
155 vpflow.
args2addattachedscheme(argv, cmds,
"AFLOWLIB_AURL2LOOP",
"--aflowlib_aurl2loop=|--aurl2loop=",
"");
161 if (vpflow.
flag(
"AFLUX::SUMMONS")) {
169 if (vpflow.
flag(
"DOSDATA2JSON")) {
179 if (vpflow.
flag(
"BADER")) {
181 if (
XHOST.vflag_control.flag(
"DIRECTORY")) {
182 vpflow.
push_attached(
"BADER::DIRECTORY",
XHOST.vflag_control.getattachedscheme(
"DIRECTORY"));
192 vpflow.
args2addattachedscheme(argv, cmds,
"BADER::REFINE_EDGE_METHOD",
"--refine_edge_method=|--rem=|--r=",
"");
198 vpflow.
args2addattachedscheme(argv, cmds,
"BADER::PRINT_SELECT_ATOM",
"--print_select_atom=|--print_sel_atom=",
"");
199 vpflow.
args2addattachedscheme(argv, cmds,
"BADER::PRINT_SELECT_BADER",
"--print_select_bader=|--print_sel_bader=",
"");
203 vpflow.
flag(
"BADER::CONSOLIDATE_ATOMS2SPECIES",
aurostd::args2flag(argv, cmds,
"--consolidate_atoms2species|--a2s"));
204 if (vpflow.
flag(
"BADER::CONSOLIDATE_ATOMS2SPECIES")) {
209 if (vpflow.
flag(
"BADER::JVXL_ALL_SPECIES")) {
212 vpflow.
flag(
"BADER::KEEP::JVXL_ONLY",
aurostd::args2flag(argv, cmds,
"--keep=jvxl_only|--keep_jvxl_only|--jvxl_only"));
218 vpflow.
flag(
"BANDSTRUCTURE",
aurostd::args2flag(argv, cmds,
"--bandstructure|--bandsstructures|--bands_structures|--band_structures|--bands_structure|--band_structure|--bs"));
220 vpflow.
args2addattachedscheme(argv, cmds,
"BZPLOTUSEKPOINTS",
"--bzplotuseKPOINTS=|--bzplotdusekpoints=",
"");
222 vpflow.
args2addattachedscheme(argv, cmds,
"BZPLOTDATAUSEKPOINTS",
"--bzplotdatauseKPOINTS=|--bzplotdatausekpoints=",
"");
228 vpflow.
args2addattachedscheme(argv, cmds,
"FULLSYMMETRY",
"--aflow-sym=|--AFLOW-SYM=|--AFLOWSYM=|--aflowSYM=|--aflowsym=|--full_symmetry=|--full_sym=|--fullsym=",
"");
229 if (vpflow.
flag(
"FULLSYMMETRY")) {
231 if (
aurostd::args2attachedflag(argv,
"--aflow-sym=|--AFLOW-SYM=|--AFLOWSYM=|--aflowSYM=|--aflowsym=|--full_symmetry=|--full_sym=|--fullsym=")) {
233 "--aflow-sym=|--AFLOW-SYM=|--AFLOWSYM=|--aflowSYM=|--aflowsym=|--full_symmetry=|--full_sym=|--fullsym=",
"");
247 vpflow.
args2addattachedscheme(argv, cmds,
"BANDGAPDOS",
"--bandgap_from_dos=|--bandgap_from_DOS=|--bandgap_dos=|--bandgapdos=",
"./");
248 vpflow.
flag(
"BANDGAPLISTDOS",
aurostd::args2flag(argv, cmds,
"--bandgaplist_from_dos|--bandgaplist_from_DOS"));
251 if (vpflow.
flag(
"BZDIRECTION")) {
253 vpflow.
args2addattachedscheme(argv, cmds,
"BZDIRECTION::LATTICE",
"--bzdirection=|--bzdirections=|--bzd=",
"1");
256 vpflow.
flag(
"BZDIRECTION::PRINT_TRANSFORMATION_MATRIX",
aurostd::args2flag(argv, cmds,
"--print_transformation_matrix"));
275 vpflow.
flag(
"CCE_CORRECTION::GET_CCE_CORRECTION",
aurostd::args2flag(argv, cmds,
"--get_cce_correction|--get_cce_cor|--get_cce_corrections|--get_cce_cors"));
276 vpflow.
flag(
"CCE_CORRECTION", vpflow.
flag(
"CCE_CORRECTION::USAGE") || !vpflow.
getattachedscheme(
"CCE_CORRECTION::POSCAR_PATH").empty());
278 vpflow.
flag(
"CCE_CORRECTION::USAGE",
true);
281 argv, cmds,
"CCE_CORRECTION::ENTHALPIES_FORMATION_DFT",
282 "--enthalpies_formation_dft=|--enthalpy_formation_dft=|--dft_formation_enthalpies=|--dft_formation_energies=|--dft_formation_enthalpy=|--dft_formation_energy=|--dftes=|--dfte=",
"");
283 vpflow.
args2addattachedscheme(argv, cmds,
"CCE_CORRECTION::FUNCTIONALS",
"--functional=|--func=|--functionals=|--funcs=",
"");
284 vpflow.
args2addattachedscheme(argv, cmds,
"CCE_CORRECTION::OXIDATION_NUMBERS",
"--oxidation_numbers=|--ox_nums=|--oxidation_number=|--ox_num=",
"");
287 vpflow.
flag(
"CCE_CORRECTION::GET_OXIDATION_NUMBERS",
aurostd::args2flag(argv, cmds,
"--get_oxidation_numbers|--get_ox_nums|--get_oxidation_number|--get_ox_num|--poscar2ox_nums|--poscar2ox_num"));
289 "--get_cation_coordination_numbers|--get_cation_coord_nums|--get_cation_coordination_number|--get_cation_coord_num|--get_"
290 "coordination_numbers_cation|--get_coordination_number_cation|--get_coordination_numbers_cations|--get_coordination_number_"
291 "cations|--get_coord_num_cation|--get_coord_nums_cation|--get_coord_nums_cations|--get_coord_num_cations|--poscar2cation_"
292 "coord_nums|--poscar2cation_coord_num"));
293 vpflow.
args2addattachedscheme(argv, cmds,
"CCE_CORRECTION::DIST_TOL",
"--tolerance=|dist_tol=|distance_tolerance=|dist_tolerance=|distance_tol=",
"");
300 if (vpflow.
flag(
"CHGCAR2JVXL")) {
307 if (vpflow.
flag(
"CHGDIFF")) {
315 if (vpflow.
flag(
"CHGSUM")) {
327 vpflow.
flag(
"PFLOW::LOAD_API",
aurostd::args2flag(argv, cmds,
"--load_API|--load_api|--loadapi|--lapi|--api"));
328 vpflow.
flag(
"PFLOW::LOAD_ENTRIES_ENTRY_OUTPUT",
aurostd::args2flag(argv, cmds,
"--load_entries_entry_output|--loadentriesentryoutput|--leo"));
329 if (vpflow.
flag(
"CHULL::INIT")) {
333 vpflow.
flag(
"CHULL::GNUPLOT_DOC",
false);
335 if (vpflow.
flag(
"CHULL::SCREEN_ONLY")) {
338 if (
XHOST.QUIET && vpflow.
flag(
"PFLOW::LOAD_ENTRIES_ENTRY_OUTPUT")) {
339 vpflow.
flag(
"PFLOW::LOAD_ENTRIES_ENTRY_OUTPUT",
false);
342 vector<string> keep_parts;
343 if (vpflow.
flag(
"CHULL::KEEP")) {
347 if (!vpflow.
flag(
"CHULL::LOG")) {
348 for (
size_t i = 0; i < keep_parts.size(); i++) {
349 if (!keep_parts[i].empty()) {
350 if (keep_parts[i][0] ==
'L' || keep_parts[i][0] ==
'l') {
351 vpflow.
flag(
"CHULL::LOG",
true);
356 vpflow.
args2addattachedscheme(argv, cmds,
"PFLOW::LOAD_LIBRARY",
"--load_library=|--loadlibrary=|--ll=",
"");
359 vpflow.
args2addattachedscheme(argv, cmds,
"CHULL::REMOVE_EXTREMA",
"--remove_extreme_points=|--removeextremepoints=|--remove_extrema=|--removeextrema=|--rep=",
361 vpflow.
flag(
"CHULL::ENTROPIC_TEMPERATURE",
aurostd::args2flag(argv, cmds,
"--entropic_temperature|--entropictemperature|--entroptemp"));
363 vpflow.
flag(
"CHULL::SKIP_STRUCTURE_COMPARISON",
aurostd::args2flag(argv, cmds,
"--skip_structure_comparison|--skipstructruecomparison|--skipstructcomp|--ssc"));
365 "--skip_stability_criterion_analysis|--skip_stability_criterion|--skipstabilitycriterionanalysis|--skipstabilitycriterion|--skip_"
366 "scriterion|--skipscriterion|--sscriterion"));
368 "--skip_n_plus_1_enthalpy_gain_analysis|--skip_n_plus_1_energy_gain_analysis|--skipnplus1enthalpygainanalysis|--"
369 "skipnplus1energygainanalysis|--skip_nplus1|--skipnplus1|--snp1|--snpo"));
370 vpflow.
flag(
"CHULL::INCLUDE_SKEWED_HULLS",
aurostd::args2flag(argv, cmds,
"--include_skewed_hulls|--include_skewed|--ish"));
371 vpflow.
flag(
"CHULL::INCLUDE_UNRELIABLE_HULLS",
aurostd::args2flag(argv, cmds,
"--include_unreliable_hulls|--include_unreliable|--iuh"));
373 vpflow.
flag(
"CHULL::STRICT_OUTLIER_ANALYSIS",
aurostd::args2flag(argv, cmds,
"--strict_outlier_analysis|--soa"));
374 vpflow.
flag(
"CHULL::INCLUDE_ILL_CONVERGED",
aurostd::args2flag(argv, cmds,
"--include_ill_converged|--iic"));
376 vpflow.
flag(
"CHULL::LATEX_INTERACTIVE",
aurostd::args2flag(argv, cmds,
"--latex_interactive|--latexinteractive"));
377 if (vpflow.
flag(
"CHULL::LATEX_INTERACTIVE") && !vpflow.
flag(
"CHULL::LATEX_OUTPUT")) {
378 vpflow.
flag(
"CHULL::LATEX_OUTPUT",
true);
380 vpflow.
flag(
"CHULL::PLOT_ISO_MAX_LATENT_HEAT",
aurostd::args2flag(argv, cmds,
"--plot_iso_max_latent_heat|--plot_isomax|--iso_max|--isomax"));
383 if (vpflow.
flag(
"CHULL::OUTPUT")) {
384 vector<string> out_forms;
387 if (out_forms.size() > 1) {
388 vpflow.
flag(
"CHULL::MULTI_OUTPUT",
true);
390 for (
size_t i = 0; i < out_forms.size(); i++) {
392 if (out_form[0] ==
'A') {
393 vpflow.
flag(
"CHULL::APOOL_OUT",
true);
394 }
else if (out_form[0] ==
'F') {
395 vpflow.
flag(
"CHULL::TEXT_DOC",
true);
396 vpflow.
flag(
"CHULL::JSON_DOC",
true);
397 vpflow.
flag(
"CHULL::LATEX_DOC",
true);
398 }
else if (out_form[0] ==
'T') {
399 vpflow.
flag(
"CHULL::TEXT_DOC",
true);
400 }
else if (out_form[0] ==
'J') {
401 if (out_form ==
"JUPYTER2") {
402 vpflow.
flag(
"CHULL::WRITE_JUPYTER2",
true);
403 }
else if (out_form ==
"JUPYTER3") {
404 vpflow.
flag(
"CHULL::WRITE_JUPYTER3",
true);
405 }
else if (out_form ==
"JUPYTER") {
406 vpflow.
flag(
"CHULL::WRITE_JUPYTER3",
true);
408 vpflow.
flag(
"CHULL::JSON_DOC",
true);
410 }
else if (out_form[0] ==
'W') {
411 vpflow.
flag(
"CHULL::WEB_DOC",
true);
413 vpflow.
flag(
"FORCE",
true);
414 XHOST.vflag_control.flag(
"WWW",
true);
416 }
else if (out_form[0] ==
'L' || (out_form[0] ==
'P' && out_form !=
"PNG") || out_form ==
"PDF") {
417 vpflow.
flag(
"CHULL::LATEX_DOC",
true);
418 }
else if (out_form ==
"PNG") {
419 vpflow.
flag(
"CHULL::PNG_IMAGE",
true);
423 if (out_forms.size() == 2 && vpflow.
flag(
"CHULL::LATEX_DOC") && vpflow.
flag(
"CHULL::PNG_IMAGE")) {
424 vpflow.
flag(
"CHULL::MULTI_OUTPUT",
false);
427 vpflow.
flag(
"CHULL::LATEX_DOC",
true);
429 vpflow.
args2addattachedscheme(argv, cmds,
"CHULL::DIST2HULL",
"--distance_to_hull=|--distancetohull=|--distance2hull=|--dist2hull=|--d2h=",
"");
430 vpflow.
args2addattachedscheme(argv, cmds,
"CHULL::STABILITY_CRITERION",
"--stability_criterion=|--stabilitycriterion=|--stable_criterion=|--scriterion=|--sc=",
"");
432 "--n+1_enthalpy_gain=|--n+1_energy_gain=|--n+1enthalpygain=|--n+1energygain=|--n+1egain=|--n1egain=|--n+1_enthalpygain=|--n+1+energygain=|--n+1_egain=|--nplus1=",
"");
433 vpflow.
args2addattachedscheme(argv, cmds,
"CHULL::CALCULATE_FAKE_HULL_STABILITY_CRITERION",
"--fake_hull_sc=",
"");
434 vpflow.
flag(
"CHULL::CALCULATE_FAKE_HULL_N+1_ENTHALPY_GAIN",
aurostd::args2flag(argv, cmds,
"--fake_hull_np1eg"));
435 vpflow.
flag(
"CHULL::CALCULATE_HIGHEST_DIMENSION_ONLY",
aurostd::args2flag(argv, cmds,
"--calculate_highest_dimension_only|--calc_ND_only"));
436 vpflow.
args2addattachedscheme(argv, cmds,
"CHULL::HULL_FORMATION_ENTHALPY",
"--hull_formation_enthalpy=|--hull_enthalpy=|--hull_energy=",
"");
437 if (vpflow.
flag(
"CHULL::STABILITY_CRITERION") || vpflow.
flag(
"CHULL::N+1_ENTHALPY_GAIN") || vpflow.
flag(
"CHULL::HULL_FORMATION_ENTHALPY")) {
441 vpflow.
flag(
"CHULL::LATEX_DOC",
false);
443 if (vpflow.
flag(
"CHULL::LATEX_DOC") || vpflow.
flag(
"CHULL::PNG_IMAGE")) {
444 vpflow.
flag(
"CHULL::DOC_ONLY",
aurostd::args2flag(argv, cmds,
"--document_only|--documentonly|--doc_only|--doconly|--doc"));
445 vpflow.
flag(
"CHULL::NO_DOC",
aurostd::args2flag(argv, cmds,
"--no_document|--nodocument|--no_doc|--nodoc|--full_page_image|--fullpageimage"));
446 if (vpflow.
flag(
"CHULL::NO_DOC") && vpflow.
flag(
"CHULL::DOC_ONLY")) {
447 vpflow.
flag(
"CHULL::DOC_ONLY",
false);
450 if (!vpflow.
flag(
"CHULL::KEEP_TEX")) {
451 for (
size_t i = 0; i < keep_parts.size(); i++) {
452 if (!keep_parts[i].empty()) {
453 if (keep_parts[i][0] ==
'T' || keep_parts[i][0] ==
't') {
454 vpflow.
flag(
"CHULL::KEEP_TEX",
true);
459 vpflow.
flag(
"CHULL::IMAGE_ONLY",
aurostd::args2flag(argv, cmds,
"--image_only|--imageonly|--image|--picture_only|--pictureonly|--picture|--pic"));
460 if (vpflow.
flag(
"CHULL::IMAGE_ONLY") && vpflow.
flag(
"CHULL::DOC_ONLY")) {
461 vpflow.
flag(
"CHULL::IMAGE_ONLY",
false);
463 vpflow.
flag(
"CHULL::LIGHT_CONTRAST",
aurostd::args2flag(argv, cmds,
"--light_contrast|--lightcontrast|--lc"));
464 vpflow.
flag(
"CHULL::LARGE_FONT",
aurostd::args2flag(argv, cmds,
"--large_font|--largefont|--large|--lf"));
465 if (vpflow.
flag(
"CHULL::PNG_IMAGE") &&
466 !(vpflow.
flag(
"CHULL::NO_DOC") || vpflow.
flag(
"CHULL::IMAGE_ONLY"))) {
467 vpflow.
flag(
"CHULL::IMAGE_ONLY",
true);
469 if (vpflow.
flag(
"CHULL::PNG_IMAGE")) {
470 vpflow.
args2addattachedscheme(argv, cmds,
"CHULL::PNG_RESOLUTION",
"--png_resolution=|--pngresolution=|--pngr=",
"");
473 vpflow.
args2addattachedscheme(argv, cmds,
"CHULL::DIST_FOR_EQUIVALENCE_ANALYSIS",
"--distance_for_equivalence_analysis=|--dist4equi=|--d4e=",
"0.0");
474 if (vpflow.
flag(
"CHULL::DIST_FOR_EQUIVALENCE_ANALYSIS")) {
487 "--compare_atom_decoration|--compare_atom_decorations|--unique_atom_decoration|--unique_atom_decorations|--compare_permutation|--compare_"
488 "permutations|--unique_permutation|--unique_permutations"));
493 if (vpflow.
flag(
"COMPARE_DATABASE_ENTRIES") || vpflow.
flag(
"COMPARE_MATERIAL") || vpflow.
flag(
"COMPARE_STRUCTURE") || vpflow.
flag(
"COMPARE_PERMUTATION") || vpflow.
flag(
"COMPARE2DATABASE") ||
494 vpflow.
flag(
"COMPARE2PROTOTYPES")) {
500 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE::MAGNETIC",
"--mag=|--magnetic=|--magmom=|--magmoms=|--magnetic_moment=|--magnetic_moments=",
"");
508 vpflow.
flag(
"COMPARE::IGNORE_ENVIRONMENT_ANALYSIS",
aurostd::args2flag(argv, cmds,
"--ignore_environment|--ignore_environment_analysis|--ignore_env"));
509 vpflow.
flag(
"COMPARE::REMOVE_DUPLICATE_COMPOUNDS",
aurostd::args2flag(argv, cmds,
"--remove_duplicates|--remove_duplicate_compounds"));
511 argv, cmds,
"--match_to_aflow_prototypes|--add_matching_aflow_prototypes|--add_matching_aflow_protos|--add_matching_prototypes|--add_matching_protos"));
512 vpflow.
flag(
"COMPARE::ADD_AFLOW_PROTOTYPE_DESIGNATION",
513 aurostd::args2flag(argv, cmds,
"--add_prototype_designation|--add_aflow_prototype_designation|--add_anrl_designation|--add_prototype|--add_prototype_information"));
514 vpflow.
flag(
"COMPARE::UNDECORATED_COMPARISON",
aurostd::args2flag(argv, cmds,
"--undecorated_comparison|--undecorated|--no_atom_decoration"));
516 vpflow.
flag(
"COMPARE::MINKOWSKI",
aurostd::args2flag(argv, cmds,
"--minkowski|--minkowski_reduction|--minkowski_lattice_reduction"));
517 vpflow.
flag(
"COMPARE::NIGGLI",
aurostd::args2flag(argv, cmds,
"--niggli|--niggli_reduction|--niggli_lattice_reduction"));
520 vpflow.
flag(
"COMPARE::DO_NOT_CALCULATE_UNIQUE_PERMUTATIONS",
aurostd::args2flag(argv, cmds,
"--ignore_atom_decoration_comparison|--ignore_decoration_comparison|--ignore_decorations"));
522 if (
XHOST.vflag_control.flag(
"WWW")) {
523 vpflow.
flag(
"COMPARE::SCREEN_ONLY",
true);
528 if (vpflow.
flag(
"COMPARE_DATABASE_ENTRIES")) {
531 vpflow.
flag(
"COMPARE_DATABASE_ENTRIES::STRUCTURE",
aurostd::args2flag(argv, cmds,
"--structure|--structure_comparison|--ignore_species"));
533 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE_DATABASE_ENTRIES::ALLOY",
"--compare_alloy=|--alloy=|--species=",
"");
535 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE_DATABASE_ENTRIES::CATALOG",
"--catalog=|--library=",
"");
536 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE_DATABASE_ENTRIES::PROPERTY_LIST",
"--properties=|--property_list=|--property=",
"");
537 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE_DATABASE_ENTRIES::RELAXATION_STEP",
"--relaxation_step=|--relaxation=",
"");
538 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE_DATABASE_ENTRIES::SPACE_GROUP",
"--space_group=|--spacegroup=|--sg=",
"");
539 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE_DATABASE_ENTRIES::STOICHIOMETRY",
"--stoichiometry=|--stoich=",
"");
540 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE_DATABASE_ENTRIES::WYCKOFF",
"--Wyckoff=|--wyckoff=",
"");
542 if (vpflow.
flag(
"COMPARE_MATERIAL") || vpflow.
flag(
"COMPARE_STRUCTURE")) {
543 vpflow.
flag(
"COMPARE_STRUCTURE::PRINT",
aurostd::args2flag(argv, cmds,
"--print|--print_mapping|--print_mappings"));
545 if (
aurostd::args2attachedflag(argv,
"--compare_material=|--compare_materials=|--compare_structure=|--compare_structures=")) {
546 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE_STRUCTURE::STRUCTURE_LIST",
"--compare_material=|--compare_materials=|--compare_structure=|--compare_structures=",
"");
549 if (
XHOST.vflag_control.flag(
"DIRECTORY")) {
550 vpflow.
push_attached(
"COMPARE_STRUCTURE::DIRECTORY",
XHOST.vflag_control.getattachedscheme(
"DIRECTORY"));
551 }
else if (
aurostd::args2attachedflag(argv,
"--compare_material_directory|--compare_material_dir|--compare_structure_directory|--compare_structure_dir")) {
555 if (
XHOST.vflag_control.flag(
"FILE")) {
556 vpflow.
push_attached(
"COMPARE_STRUCTURE::FILE",
XHOST.vflag_control.getattachedscheme(
"FILE"));
559 if (vpflow.
flag(
"COMPARE_PERMUTATION")) {
560 vpflow.
flag(
"COMPARE_PERMUTATION::PRINT",
aurostd::args2flag(argv, cmds,
"--print_misfit|--print|--misfit"));
562 if (vpflow.
flag(
"COMPARE2DATABASE")) {
563 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE2DATABASE::PROPERTY_LIST",
"--properties=|--property_list=|--property=",
"");
564 vpflow.
args2addattachedscheme(argv, cmds,
"COMPARE2DATABASE::RELAXATION_STEP",
"--relaxation_step=|--relaxation=",
"");
567 if (vpflow.
flag(
"COMPARE2PROTOTYPES")) {
577 vpflow.
flag(
"DATA_CRYSTAL_POINT_GROUP",
aurostd::args2attachedflag(argv, cmds,
"--point_group_crystal_data|--pointgroup_crystal_data|--pgroupxtal_data|--pgroup_xtal_data"));
579 vpflow.
flag(
"DATA_REAL_LATTICE",
aurostd::args2attachedflag(argv, cmds,
"--lattice_data|--data_lattice|--real_lattice_data|--data_real_lattice"));
580 vpflow.
flag(
"DATA_RECIPROCAL_LATTICE",
aurostd::args2attachedflag(argv, cmds,
"--reciprocal_lattice_data|--reciprocallattice_data|--klattice_data|--data_reciprocal_lattice"));
585 if (vpflow.
flag(
"DATA") || vpflow.
flag(
"DATA_CRYSTAL_POINT_GROUP") || vpflow.
flag(
"DATA_EDATA") || vpflow.
flag(
"DATA_REAL_LATTICE") || vpflow.
flag(
"DATA_RECIPROCAL_LATTICE") || vpflow.
flag(
"DATA_SGDATA") ||
586 vpflow.
flag(
"DATA_SUPERLATTICE")) {
588 vpflow.
flag(
"DATA::SUPPRESS_WYCKOFF_PRINTING",
aurostd::args2flag(argv, cmds,
"--suppress_Wyckoff|--suppress_Wyckoff_printing|--suppress_wyckoff|--suppress_wyckoff_printing"));
592 "--data=|--lattice_data=|--data_lattice=|--real_lattice_data=|--data_real_lattice=|--point_group_crystal_data=|--pointgroup_crystal_data=|--pgroupxtal_data=|--pgroup_xtal_"
593 "data=|--reciprocal_lattice_data=|--reciprocallattice_data=|--klattice_data=|--data_reciprocal_lattice=|--superlattice_data=|--data_superlattice=|--edata=|--sgdata=|--space_"
596 "--data=|--lattice_data=|--data_lattice=|--real_lattice_data=|--data_real_lattice=|--point_group_crystal_data=|--pointgroup_crystal_data=|--pgroupxtal_data=|--pgroup_xtal_"
597 "data=|--reciprocal_lattice_data=|--reciprocallattice_data=|--klattice_data=|--data_reciprocal_lattice=|--superlattice_data=|--data_superlattice=|--edata=|--sgdata=|--space_"
617 vpflow.
args2addattachedscheme(argv, cmds,
"EQUIVALENT",
"--equivalent=|--equiv=|--inequivalent=|--inequiv=|--iatoms=|--eatoms=",
"");
618 if (vpflow.
flag(
"EQUIVALENT")) {
621 vpflow.
args2addattachedscheme(argv, cmds,
"SYMMETRY::TOLERANCE",
"--equivalent=|--equiv=|--inequivalent=|--inequiv=|--iatoms=|--eatoms=",
"");
634 if (vpflow.
flag(
"FGROUP")) {
644 if (
XHOST.vflag_control.flag(
"WWW")) {
645 vpflow.
flag(
"SYMMETRY::SCREEN_ONLY",
true);
653 vpflow.
flag(
"FRAC",
aurostd::args2flag(argv, cmds,
"--frac|-frac|--fractional|-fract|--fract|--direct|-direct|-f|-d"));
654 vpflow.
flag(
"FROZSL_VASPSETUP_AFLOW",
aurostd::args2flag(argv, cmds,
"--frozsl_vaspsetup_aflow|--frozsl_vaspsetup|--frozsl_vasp|--frozsl_setup|--phvaspsetup"));
662 if (vpflow.
flag(
"GFA::INIT")) {
663 vpflow.
args2addattachedscheme(argv, cmds,
"GFA::AE_FILE",
"--atomic_environments_file=|--ae_file=|aef=",
"none");
664 vpflow.
args2addattachedscheme(argv, cmds,
"GFA::FORMATION_ENTHALPY_CUTOFF",
"--cutoff_formation_enthalpy=|--cutoff_enthalpy=|--cutoff_energy=|--cut=",
"0.05");
668 if (vpflow.
flag(
"ATOMIC_ENVIRONMENT::INIT")) {
676 if (vpflow.
flag(
"GENERATE_CERAMICS")) {
685 vpflow.
flag(
"GETTEMP",
aurostd::args2flag(argv, cmds,
"--getTEMP|--getTEMPS|--Init::GetTEMPs|--gettemp|--gettemps|--getemp|--getemps"));
688 vpflow.
args2addattachedscheme(argv, cmds,
"FLAG::XVASP_KPOINTS_DELTA",
"--delta_kpoints=|--dkpoints=|-dkpoints=|-dk=",
"0.01");
692 vpflow.
flag(
"JOINSTRLIST",
aurostd::args2flag(argv, cmds,
"--join_strlist") && argv.at(1) ==
"--join_strlist");
700 if (vpflow.
flag(
"IAP::INIT")) {
722 vpflow.
flag(
"ICSD_NOBROKENBASIS",
aurostd::args2flag(argv, cmds,
"--icsd_nobrokenbasis|--icsd_completebasis"));
724 vpflow.
flag(
"ICSD_ORTHORHOMBIC",
aurostd::args2flag(argv, cmds,
"--icsd_orthorhombic|--icsd_orthorombic|--icsd_ortorhombic|--icsd_ortorombic"));
726 vpflow.
flag(
"ICSD_RHOMBOHEDRAL",
aurostd::args2flag(argv, cmds,
"--icsd_rhombohedral|--icsd_rombohedral|--icsd_trigonal"));
764 vpflow.
flag(
"ISOPOINTAL_PROTOTYPES",
aurostd::args2attachedflag(argv, cmds,
"--get_isopointal_prototypes|--isopointal_prototypes|--get_same_symmetry_prototypes"));
765 if (vpflow.
flag(
"ISOPOINTAL_PROTOTYPES")) {
777 vpflow.
flag(
"HNF", (
aurostd::args2flag(argv, cmds,
"--hnf|--HNF|--hfn|--HFN|--hnftol|--HNFTOL|--hfntol|--HFNTOL|--pocc_hnf")));
778 vpflow.
flag(
"HNFCELL",
aurostd::args2flag(argv, cmds,
"--hnfcell|--hfncell|--pocc_show_unique_structures|--pocc_show_unique|--pocc_print_unique"));
779 vpflow.
flag(
"POCC_COUNT_TOTAL",
aurostd::args2flag(argv, cmds,
"--pocc_count_total_structures|--pocc_count_total"));
780 vpflow.
flag(
"POCC_COUNT_UNIQUE",
aurostd::args2flag(argv, cmds,
"--pocc_count_unique_structures|--pocc_count_unique"));
783 if (vpflow.
flag(
"HNF") || vpflow.
flag(
"POCC_COUNT_TOTAL") || vpflow.
flag(
"POCC_COUNT_UNIQUE") || vpflow.
flag(
"POCC_COUNT_UNIQUE_FAST")) {
784 vpflow.
flag(
"HNFCELL",
true);
786 if (vpflow.
flag(
"HNFCELL")) {
787 vpflow.
flag(
"POCC_SKIP_WRITING_FILES",
true);
789 if (
XHOST.vflag_control.flag(
"WWW")) {
790 vpflow.
flag(
"POCC_SKIP_WRITING_FILES",
true);
797 vpflow.
args2addattachedscheme(argv, cmds,
"POCC::CONVOLUTION",
"--pocc_convolution=|--pocc_conv=|--poccconv=",
"");
811 vpflow.
args2addattachedscheme(argv, cmds,
"LATTICE_TYPE",
"--lattice_type=|--lattice=|--lattice_crystal=",
"");
813 vpflow.
args2addattachedscheme(argv, cmds,
"LATTICE::TOLERANCE",
"--lattice_type=|--lattice=|--lattice_crystal=",
"");
815 vpflow.
args2addattachedscheme(argv, cmds,
"LATTICE_LATTICE_TYPE",
"--lattice_lattice_type=|--lattice_lattice=",
"");
817 vpflow.
args2addattachedscheme(argv, cmds,
"LATTICE_LATTICE::TOLERANCE",
"--lattice_lattice_type=|--lattice_lattice=",
"");
822 vpflow.
flag(
"LIST_PROTOTYPE_LABELS", (
aurostd::args2flag(argv, cmds,
"--prototype_labels|--proto_labels")));
823 if (vpflow.
flag(
"LIST_PROTOTYPE_LABELS")) {
825 vpflow.
args2addattachedscheme(argv, cmds,
"LIST_PROTOTYPE_LABELS::ARITY",
"--arity=|--number_of_species=|--species_count=",
"");
826 vpflow.
args2addattachedscheme(argv, cmds,
"LIST_PROTOTYPE_LABELS::STOICHIOMETRY",
"--stoichiometry=|--stoich=",
"");
827 vpflow.
args2addattachedscheme(argv, cmds,
"LIST_PROTOTYPE_LABELS::SPACE_GROUP",
"--space_group_number=|--space_group=|--sg=",
"");
828 vpflow.
args2addattachedscheme(argv, cmds,
"LIST_PROTOTYPE_LABELS::WYCKOFF_STRING",
"--Wyckoff_letters=|--wyckoff_letters=|--Wyckoff=|--wyckoff=",
"");
835 vpflow.
args2addattachedscheme(argv, cmds,
"MAXATOMS",
"--maxatoms=|--max_atoms=|--atomsmax=|--atoms_max=",
"");
837 vpflow.
flag(
"MAKESTRLIST",
aurostd::args2flag(argv, cmds,
"--make_strlist") && argv.at(1) ==
"--make_strlist");
839 vpflow.
flag(
"MINKOWSKI_BASIS_REDUCTION",
aurostd::args2flag(argv, cmds,
"--minkowski_basis_reduction|--minkowski|--mink"));
840 vpflow.
flag(
"MISCIBILITY",
aurostd::args2flag(argv, cmds,
"--MIX|--mix|--MISCIBILITY|--miscibility|--MISCIBILE|--miscibile"));
848 vpflow.
flag(
"NAMES", (
aurostd::args2flag(argv, cmds,
"--names|--species") && (argv.at(1) ==
"--names" || argv.at(1) ==
"--species")));
849 vpflow.
flag(
"NANOPARTICLE", (
aurostd::args2flag(argv, cmds,
"--nanoparticle") && argv.at(1) ==
"--nanoparticle"));
854 vpflow.
flag(
"NOORDERPARAMETER",
aurostd::args2flag(argv, cmds,
"--noorderparameter|--norderparameter|--noorder|--norder"));
861 if (vpflow.
flag(
"PEARSON_SYMBOL")) {
864 vpflow.
args2addattachedscheme(argv, cmds,
"PEARSON_SYMBOL::TOLERANCE",
"--pearson_symbol=|--pearson=|--Pearson_symbol=|--Pearson=",
"");
867 vpflow.
args2addattachedscheme(argv, cmds,
"PEARSON_SYMBOL::TOLERANCE_SPECTRUM",
"--tolerance_spectrum=|--tol_spectrum=",
"0.01,1.0,100");
869 vpflow.
args2addattachedscheme(argv, cmds,
"PEARSON_SYMBOL::MAGNETIC",
"--mag=|--magnetic=|--magmom=",
"");
880 if (vpflow.
flag(
"PGROUP")) {
887 if (
XHOST.vflag_control.flag(
"WWW")) {
888 vpflow.
flag(
"SYMMETRY::SCREEN_ONLY",
true);
894 vpflow.
args2addattachedscheme(argv, cmds,
"PGROUPX",
"--pointgroup_crystal=|--pgroup_crystal=|--pgroup_xtal=|--pgroupx=|--pgroupX=",
"");
895 if (vpflow.
flag(
"PGROUPX")) {
898 vpflow.
args2addattachedscheme(argv, cmds,
"SYMMETRY::TOLERANCE",
"--pointgroup_crystal=|--pgroup_crystal=|--pgroup_xtal=|--pgroupx=|--pgroupX=",
"");
905 if (
XHOST.vflag_control.flag(
"WWW")) {
906 vpflow.
flag(
"SYMMETRY::SCREEN_ONLY",
true);
913 if (vpflow.
flag(
"PGROUPK")) {
920 if (
XHOST.vflag_control.flag(
"WWW")) {
921 vpflow.
flag(
"SYMMETRY::SCREEN_ONLY",
true);
927 vpflow.
args2addattachedscheme(argv, cmds,
"PGROUPK_PATTERSON",
"--pointgroupk_Patterson=|--pgroupk_Patterson=",
"");
928 if (vpflow.
flag(
"PGROUPK_PATTERSON")) {
931 vpflow.
args2addattachedscheme(argv, cmds,
"SYMMETRY::TOLERANCE",
"--pointgroupk_Patterson=|--pgroupk_Patterson=",
"");
935 if (
XHOST.vflag_control.flag(
"WWW")) {
936 vpflow.
flag(
"SYMMETRY::SCREEN_ONLY",
true);
943 if (vpflow.
flag(
"PGROUPK_XTAL")) {
946 vpflow.
args2addattachedscheme(argv, cmds,
"SYMMETRY::TOLERANCE",
"--pointgroupkcrystal=|--pgroupk_xtal=",
"");
950 if (
XHOST.vflag_control.flag(
"WWW")) {
951 vpflow.
flag(
"SYMMETRY::SCREEN_ONLY",
true);
960 if (
aurostd::args2flag(argv, cmds,
"--plotband|--plotbands|--plot_band|--plot_bands")) {
961 vpflow.
flag(
"PLOT_BAND",
true);
964 vpflow.
args2addattachedscheme(argv, cmds,
"PLOT_BAND",
"--plotband=|--plotbands=|--plot_band=|--plot_bands=",
"./");
966 vpflow.
args2addattachedscheme(argv, cmds,
"PLOT_BANDSPINSPLIT",
"--plotband_spinsplit=|--plot_band_spin_split=|--plotbands_spinsplit=|--plot_bands_spin_split=",
"./");
967 vpflow.
args2addattachedscheme(argv, cmds,
"PLOT_BAND2",
"--plotband2=|--plot_band2=|--plotbands2=|--plot_bands2=",
"./");
968 if (
aurostd::args2flag(argv, cmds,
"--plotbanddos|--plotbandsdos|--plot_band_dos|--plot_bands_dos|--plotdosband|--plotdosbands|--plot_dos_band|--plot_dos_bands")) {
969 vpflow.
flag(
"PLOT_BANDDOS",
true);
972 vpflow.
args2addattachedscheme(argv, cmds,
"PLOT_BANDDOS",
"--plotbanddos=|--plotbandsdos=|--plot_band_dos=|--plot_bands_dos=|--plotdosband=|--plotdosbands=|--plot_dos_band=|--plot_dos_bands=",
"./");
975 vpflow.
flag(
"PLOT_DOS",
true);
982 if (
aurostd::args2flag(argv, cmds,
"--plotpedos|--plotpdos|--plot_pedos|--plot_pdos")) {
983 vpflow.
flag(
"PLOT_PDOS",
true);
986 vpflow.
args2addattachedscheme(argv, cmds,
"PLOT_PDOS",
"--plotpedos=|--plotpdos=|--plot_pedos=|--plot_pdos=",
"./");
988 if (
aurostd::args2flag(argv, cmds,
"--plotpedosall|--plotpdosall|--plot_pedos_all|--plot_pdos_all")) {
989 vpflow.
flag(
"PLOT_PDOSALL",
true);
992 vpflow.
args2addattachedscheme(argv, cmds,
"PLOT_PDOSALL",
"--plotpedosall=|--plotpdosall=|--plot_pedos_all=|--plot_pdos_all=",
"./");
997 vpflow.
flag(
"PLOT_THERMO",
true);
1002 if (
aurostd::args2flag(argv, cmds,
"--plottcond|--plotthermalconductivity|--plot_tcond|--plot_thermal_conductivity")) {
1003 vpflow.
flag(
"PLOT_TCOND",
true);
1006 vpflow.
args2addattachedscheme(argv, cmds,
"PLOT_TCOND",
"--plottcond=|--plotthermalconductivity=|--plot_tcond=|--plot_thermal_conductivity=",
"./");
1009 vpflow.
flag(
"PLOT_PHDOS",
true);
1014 if (
aurostd::args2flag(argv, cmds,
"--plotphdisp|--plotphonondispersion|--plotphononsdispersion|--pphdis|--plot_phdisp|--plot_phonon_dispersion|--plot_phonons_dispersion")) {
1015 vpflow.
flag(
"PLOT_PHDISP",
true);
1018 vpflow.
args2addattachedscheme(argv, cmds,
"PLOT_PHDISP",
"--plotphdisp=|--plotphonondispersion=|--plotphononsdispersion=|--pphdis=|--plot_phdisp=|--plot_phonon_dispersion=|--plot_phonons_dispersion=",
"./");
1021 vpflow.
flag(
"PLOT_PHDISPDOS",
true);
1037 vpflow.
flag(
"PLOT_THERMO_QHA",
true);
1045 if (
aurostd::args2flag(argv, cmds,
"--plotgrdisp|--plotgruneisendispersion|--plotgrueneisendispersion")) {
1046 vpflow.
flag(
"PLOT_GRUENEISEN_DISPERSION",
true);
1057 vpflow.
args2addattachedscheme(argv, cmds,
"POCC_MINIMUM_CONFIGURATION",
"--pocc_minimum_configuration|--pocc_min",
"./");
1066 if (vpflow.
flag(
"RENDER")) {
1070 vpflow.
flag(
"POSCAR2AFLOWIN",
aurostd::args2flag(argv, cmds,
"--poscar2aflowin|--poscaraflowin|--poscar2aflow|--poscaraflow"));
1073 vpflow.
args2addattachedscheme(argv, cmds,
"PREPARE_CHGCAR_4_JMOL",
"--prepare_chgcar_4_jmol=|--prep4jmol=",
"");
1074 if (vpflow.
flag(
"PREPARE_CHGCAR_4_JMOL")) {
1088 if (vpflow.
flag(
"POCC_PARAMS")) {
1090 cerr <<
"PflowARGs(): BEFORE pocc_params=" << vpflow.
getattachedscheme(
"POCC_PARAMS") << endl;
1094 cerr <<
"PflowARGs(): AFTER pocc_params=" << vpflow.
getattachedscheme(
"POCC_PARAMS") << endl;
1098 if (vpflow.
flag(
"PROTO") || vpflow.
flag(
"PROTO_AFLOW")) {
1116 vpflow.
flag(
"PROTO::USE_ANRL_LATTICE_PARAM",
aurostd::args2flag(argv, cmds,
"--use_anrl_lattice_param|--use_anrl_lattice_parameter"));
1117 vpflow.
flag(
"BADER",
false);
1118 vpflow.
flag(
"ITC",
false);
1119 vpflow.
flag(
"QE",
false);
1120 vpflow.
flag(
"ABCCAR",
false);
1121 vpflow.
flag(
"ABINIT",
false);
1122 vpflow.
flag(
"AIMS",
false);
1123 vpflow.
flag(
"CIF",
false);
1124 vpflow.
flag(
"ELK",
false);
1125 vpflow.
flag(
"LMP",
false);
1128 if (vpflow.
flag(
"PROTO_AFLOW")) {
1130 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::PRESSURE",
"--pressure=|--PRESSURE=|--pstress=|--PSTRESS=",
"");
1131 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::POTENTIAL",
"--potential=|--pp=|--potentials=",
"");
1132 if (vpflow.
flag(
"PROTO_AFLOW::POTENTIAL")) {
1133 vlist +=
"--potential=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::POTENTIAL") +
" ";
1137 if (vpflow.
flag(
"AFLOW::MODULE")) {
1141 if (vpflow.
flag(
"PROTO_AFLOW::APL_SUPERCELL")) {
1142 vlist +=
"--apl_supercell=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::APL_SUPERCELL") +
" ";
1145 vpflow.
flag(
"PROTO_AFLOW::BADER",
aurostd::args2flag(argv, cmds,
"--bader|--run_bader|--BADER|--RUN_BADER"));
1146 if (vpflow.
flag(
"PROTO_AFLOW::BADER")) {
1147 vlist +=
"--bader ";
1149 vpflow.
flag(
"PROTO_AFLOW::SPIN_REMOVE_RELAX_1",
aurostd::args2flag(argv, cmds,
"--spin_remove_relax_1|--SPIN_REMOVE_RELAX_1"));
1150 if (vpflow.
flag(
"PROTO_AFLOW::SPIN_REMOVE_RELAX_1")) {
1151 vlist +=
"--spin_remove_relax_1 ";
1153 vpflow.
flag(
"PROTO_AFLOW::SPIN_REMOVE_RELAX_2",
aurostd::args2flag(argv, cmds,
"--spin_remove_relax_2|--SPIN_REMOVE_RELAX_2"));
1154 if (vpflow.
flag(
"PROTO_AFLOW::SPIN_REMOVE_RELAX_2")) {
1155 vlist +=
"--spin_remove_relax_2 ";
1159 if (vpflow.
flag(
"PROTO_AFLOW::POTIM")) {
1163 if (vpflow.
flag(
"PROTO_AFLOW::RELAX_TYPE")) {
1164 vlist +=
"--relax_type=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::RELAX_TYPE") +
" ";
1167 if (vpflow.
flag(
"PROTO_AFLOW::RELAX_MODE")) {
1168 vlist +=
"--relax_mode=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::RELAX_MODE") +
" ";
1170 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::RELAX_COUNT",
"--relax_count=|--RELAX_COUNT=",
"");
1171 if (vpflow.
flag(
"PROTO_AFLOW::RELAX_COUNT")) {
1172 vlist +=
"--relax_count=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::RELAX_COUNT") +
" ";
1174 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::RUN_RELAX_STATIC",
"--run_relax_static|--RUN_RELAX_STATIC|--relax_static",
"");
1175 if (vpflow.
flag(
"PROTO_AFLOW::RUN_RELAX_STATIC")) {
1176 vlist +=
"--run_relax_static ";
1178 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::RUN_RELAX_STATIC_BANDS",
"--run_relax_static_bands|--RUN_RELAX_STATIC_BANDS|--relax_static_bands|--bands|--band",
"");
1179 if (vpflow.
flag(
"PROTO_AFLOW::RUN_RELAX_STATIC_BANDS")) {
1180 vlist +=
"--run_relax_static_bands ";
1182 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::RUN_RELAX_STATIC_DIELECTRIC",
"--run_relax_static_dielectric|--RUN_RELAX_STATIC_DIELECTRIC|--relax_static_dielectric|--dielectric",
"");
1183 if (vpflow.
flag(
"PROTO_AFLOW::RUN_RELAX_STATIC_DIELECTRIC")) {
1184 vlist +=
"--run_relax_static_dielectric ";
1186 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::RUN_STATIC",
"--run_static|--RUN_STATIC|--static",
"");
1187 if (vpflow.
flag(
"PROTO_AFLOW::RUN_STATIC")) {
1188 vlist +=
"--run_static ";
1190 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::RUN_STATIC_BANDS",
"--run_static_bands|--RUN_STATIC_BANDS|--static_bands",
"");
1191 if (vpflow.
flag(
"PROTO_AFLOW::RUN_STATIC_BANDS")) {
1192 vlist +=
"--run_static_bands ";
1194 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::RUN_STATIC_DIELECTRIC",
"--run_static_dielectric|--RUN_STATIC_DIELECTRIC|--static_dielectric",
"");
1195 if (vpflow.
flag(
"PROTO_AFLOW::RUN_STATIC_DIELECTRIC")) {
1196 vlist +=
"--run_static_dielectric ";
1198 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::PRECISION",
"--prec=|--PREC=|--precision=|--PRECISION=",
"");
1199 if (vpflow.
flag(
"PROTO_AFLOW::PRECISION")) {
1200 vlist +=
"--precision=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::PRECISION") +
" ";
1202 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::ALGORITHM",
"--algo=|--ALGO=|--algorithm=|--ALGORITHM=",
"");
1203 if (vpflow.
flag(
"PROTO_AFLOW::ALGORITHM")) {
1204 vlist +=
"--algorithm=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::ALGORITHM") +
" ";
1207 if (vpflow.
flag(
"PROTO_AFLOW::METAGGA")) {
1211 if (vpflow.
flag(
"PROTO_AFLOW::IVDW")) {
1215 if (vpflow.
flag(
"PROTO_AFLOW::TYPE")) {
1218 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::CONVERT_UNIT_CELL",
"--convert_unit_cell=|--CONVERT_UNIT_CELL=",
"");
1219 if (vpflow.
flag(
"PROTO_AFLOW::CONVERT_UNIT_CELL")) {
1220 vlist +=
"--convert_unit_cell=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::CONVERT_UNIT_CELL") +
" ";
1222 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::VOLUME_PLUS_EQUAL",
"--volume_plus_equal=|--VOLUME_PLUS_EQUAL=",
"");
1223 if (vpflow.
flag(
"PROTO_AFLOW::VOLUME_PLUS_EQUAL")) {
1224 vlist +=
"--volume_plus_equal=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::VOLUME_PLUS_EQUAL") +
" ";
1226 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::VOLUME_MULTIPLY_EQUAL",
"--volume_multiply_equal=|--VOLUME_MULTIPLY_EQUAL=",
"");
1227 if (vpflow.
flag(
"PROTO_AFLOW::VOLUME_MULTIPLY_EQUAL")) {
1228 vlist +=
"--volume_multiply_equal=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::VOLUME_MULTIPLY_EQUAL") +
" ";
1230 vpflow.
flag(
"PROTO_AFLOW::VOLUME_PRESERVED",
aurostd::args2flag(argv, cmds,
"--volume_preserved|--no_volume_adjustment"));
1231 if (vpflow.
flag(
"PROTO_AFLOW::VOLUME_PRESERVED")) {
1232 vlist +=
"--volume_preserved ";
1235 if (vpflow.
flag(
"PROTO_AFLOW::EDIFFG")) {
1240 if (vpflow.
flag(
"PROTO_AFLOW::KSCHEME")) {
1243 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::KSCHEME_STATIC",
"--kscheme_static=|--KSCHEME_STATIC=",
"");
1244 if (vpflow.
flag(
"PROTO_AFLOW::KSCHEME_STATIC")) {
1245 vlist +=
"--kscheme_static=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::KSCHEME_STATIC") +
" ";
1247 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::KSCHEME_DIELECTRIC",
"--kscheme_dielectric=|--KSCHEME_DIELECTRIC=",
"");
1248 if (vpflow.
flag(
"PROTO_AFLOW::KSCHEME_DIELECTRIC")) {
1249 vlist +=
"--kscheme_dielectric=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::KSCHEME_DIELECTRIC") +
" ";
1253 if (vpflow.
flag(
"PROTO_AFLOW::KPPRA") && vpflow.
flag(
"KPOINTS")) {
1254 vpflow.
flag(
"KPOINTS",
false);
1256 if (vpflow.
flag(
"PROTO_AFLOW::KPPRA")) {
1259 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::KPPRA_STATIC",
"--kppra_static=|--KPPRA_STATIC=",
"");
1260 if (vpflow.
flag(
"PROTO_AFLOW::KPPRA_STATIC")) {
1261 vlist +=
"--kppra_static=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::KPPRA_STATIC") +
" ";
1263 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::KPPRA_DIELECTRIC",
"--kppra_dielectric=|--KPPRA_DIELECTRIC=",
"");
1264 if (vpflow.
flag(
"PROTO_AFLOW::KPPRA_DIELECTRIC")) {
1265 vlist +=
"--kppra_dielectric=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::KPPRA_DIELECTRIC") +
" ";
1268 if (vpflow.
flag(
"PROTO_AFLOW::BANDS_GRID")) {
1269 vlist +=
"--bands_grid=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::BANDS_GRID") +
" ";
1272 vpflow.
args2addattachedscheme(argv, cmds,
"PROTO_AFLOW::ENMAX_MULTIPLY",
"--enmax_multiply=|--ENMAX_MULTIPLY=",
"");
1273 if (vpflow.
flag(
"PROTO_AFLOW::ENMAX_MULTIPLY")) {
1274 vlist +=
"--enmax_multiply=" + vpflow.
getattachedscheme(
"PROTO_AFLOW::ENMAX_MULTIPLY") +
" ";
1278 vpflow.
flag(
"PROTO_AFLOW::POTENTIAL_TYPE",
aurostd::args2flag(argv, cmds,
"--potential_type|--pottype|--potentials_type|--potstype|--pott"));
1279 if (vpflow.
flag(
"PROTO_AFLOW::POTENTIAL_TYPE")) {
1280 vlist +=
"--potential_type ";
1282 vpflow.
flag(
"PROTO_AFLOW::POTENTIAL_COMPLETE",
aurostd::args2flag(argv, cmds,
"--potential_complete|--potcomplete|--potentials_complete|--potscomplete|--potc|--potential_type_date|--potentialtypedate"));
1283 if (vpflow.
flag(
"PROTO_AFLOW::POTENTIAL_COMPLETE")) {
1284 vlist +=
"--potential_complete ";
1287 if (vpflow.
flag(
"PROTO_AFLOW::MISSING")) {
1288 vlist +=
"--missing ";
1291 if (vpflow.
flag(
"PROTO_AFLOW::NOAUTOPP")) {
1292 vlist +=
"--noautopp ";
1295 if (vpflow.
flag(
"PROTO_AFLOW::LDAU")) {
1299 if (vpflow.
flag(
"PROTO_AFLOW::NOLDAU")) {
1300 vlist +=
"--noldau ";
1302 vpflow.
flag(
"PROTO_AFLOW::NEGLECT_NOMIX",
aurostd::args2flag(argv, cmds,
"--neglect_nomix|--neglectnomix"));
1303 if (vpflow.
flag(
"PROTO_AFLOW::NEGLECT_NOMIX")) {
1304 vlist +=
"--neglect_nomix ";
1307 if (vpflow.
flag(
"PROTO_AFLOW::STDOUT")) {
1308 vlist +=
"--stdout ";
1311 if (vpflow.
flag(
"PROTO_AFLOW::QE")) {
1315 if (vpflow.
flag(
"PROTO_AFLOW::ABCCAR")) {
1316 vlist +=
"--abccar ";
1319 if (vpflow.
flag(
"PROTO_AFLOW::ABINIT")) {
1320 vlist +=
"--abinit ";
1323 if (vpflow.
flag(
"PROTO_AFLOW::AIMS")) {
1327 if (vpflow.
flag(
"PROTO_AFLOW::CIF")) {
1331 if (vpflow.
flag(
"PROTO_AFLOW::ELK")) {
1335 if (vpflow.
flag(
"PROTO_AFLOW::LMP")) {
1339 if (vpflow.
flag(
"PROTO_AFLOW::HEX")) {
1343 if (vpflow.
flag(
"PROTO_AFLOW::RHL")) {
1347 if (vpflow.
flag(
"PROTO_AFLOW::VASP")) {
1351 if (vpflow.
flag(
"PROTO_AFLOW::ITC")) {
1355 if (vpflow.
flag(
"PROTO_AFLOW::HTQC")) {
1360 if (vpflow.
flag(
"PROTO_AFLOW::LIST")) {
1363 vpflow.
flag(
"KPOINTS",
false);
1364 vpflow.
flag(
"ITC",
false);
1365 vpflow.
flag(
"QE",
false);
1366 vpflow.
flag(
"ABCCAR",
false);
1367 vpflow.
flag(
"ABINIT",
false);
1368 vpflow.
flag(
"AIMS",
false);
1369 vpflow.
flag(
"CIF",
false);
1370 vpflow.
flag(
"ELK",
false);
1371 vpflow.
flag(
"LMP",
false);
1377 vpflow.
args2addattachedscheme(argv, cmds,
"PSEUDOPOTENTIALS_CHECK",
"--pseudopotentials_check=|--pp_check=|--ppk=",
"");
1378 if (vpflow.
flag(
"PSEUDOPOTENTIALS_CHECK")) {
1384 vpflow.
flag(
"PYTHON_MODULES",
true);
1387 vpflow.
args2addattachedscheme(argv, cmds,
"PYTHON_MODULES",
"--python_modules=|--create_python_modules=",
"");
1402 if (!(vpflow.
flag(
"PROTO_AFLOW") || vpflow.
flag(
"PROTO"))) {
1405 if (vpflow.
flag(
"CIF")) {
1426 if (vpflow.
flag(
"QCA::INIT")) {
1438 vpflow.
args2addattachedscheme(argv, cmds,
"QCA::CONC_CURVE_RANGE",
"--conc_curve_range=|--conc_curve=",
"");
1442 vpflow.
args2addattachedscheme(argv, cmds,
"QCA::AFLOWLIB_DIRECTORY",
"--aflowlib_directory=|--aflowlib_dir=",
"");
1447 if (vpflow.
flag(
"SOLIQUIDY::INIT")) {
1460 if (!vpflow.
flag(
"RDF")) {
1474 vpflow.
flag(
"SETORIGIN", (
aurostd::args2flag(argv, cmds,
"--setorigin") && argv.at(1) ==
"--setorigin"));
1480 if (vpflow.
flag(
"SGROUP")) {
1491 if (
XHOST.vflag_control.flag(
"WWW")) {
1492 vpflow.
flag(
"SYMMETRY::SCREEN_ONLY",
true);
1499 if (!vpflow.
flag(
"LIST_PROTOTYPE_LABELS")) {
1501 vpflow.
args2addattachedscheme(argv, cmds,
"SG::AFLOW_LABEL",
"--aflowSG_label=|--space_group_label=|--sg_label=",
"");
1502 vpflow.
args2addattachedscheme(argv, cmds,
"SG::AFLOW_NUMBER",
"--aflowSG_number=|--space_group_number=|--sg_number=",
"");
1505 if (vpflow.
flag(
"SG::AFLOW") || vpflow.
flag(
"SG::AFLOW_LABEL") || vpflow.
flag(
"SG::AFLOW_NUMBER")) {
1507 if (
aurostd::args2attachedflag(argv,
"--aflowSG=|--aflowSG_label=|--aflowSG_number=|--space_group=|--space_group_label=|--space_group_number=|--sg=|--sg_label=|--sg_number=")) {
1508 vpflow.
args2addattachedscheme(argv, cmds,
"SG::TOLERANCE",
"--aflowSG=|--aflowSG_label=|--aflowSG_number=|--space_group=|--space_group_label=|--space_group_number=|--sg=|--sg_label=|--sg_number=",
"");
1511 vpflow.
args2addattachedscheme(argv, cmds,
"SG::TOLERANCE_SPECTRUM",
"--tolerance_spectrum=|--tol_spectrum=",
"0.01,1.0,100");
1523 if (vpflow.
flag(
"SG::PLATON") || vpflow.
flag(
"SG::PLATON_LABEL") || vpflow.
flag(
"SG::PLATON_NUMBER")) {
1525 vpflow.
args2addattachedscheme(argv, cmds,
"SG::TOLERANCE",
"--platonSG=|--platonSG_label=|--platonSG_number=",
"1");
1536 if (vpflow.
flag(
"SG::FINDSYM") || vpflow.
flag(
"SG::FINDSYM_LABEL") || vpflow.
flag(
"SG::FINDSYM_NUMBER") || vpflow.
flag(
"SG::FINDSYM_PRINT") || vpflow.
flag(
"SG::FINDSYM_EXEC")) {
1538 vpflow.
args2addattachedscheme(argv, cmds,
"SG::TOLERANCE",
"--findsymSG=|--findsymSG_label=|--findsymSG_number=|--findsym_print=|--findsym=",
"1");
1550 if (vpflow.
flag(
"GENERALIZED_STACKING_FAULT_ENERGY")) {
1551 vpflow.
args2addattachedscheme(argv, cmds,
"GENERALIZED_STACKING_FAULT_ENERGY::SHEAR_DIRECTION",
"--shear_direction=|--shear=",
"");
1552 vpflow.
args2addattachedscheme(argv, cmds,
"GENERALIZED_STACKING_FAULT_ENERGY::STEP_SIZE",
"--step_size=",
"");
1554 vpflow.
args2addattachedscheme(argv, cmds,
"GENERALIZED_STACKING_FAULT_ENERGY::FIXED_LAYERS",
"--fixed_layers=",
"");
1555 vpflow.
flag(
"GENERALIZED_STACKING_FAULT_ENERGY::SPIN_OFF",
aurostd::args2flag(argv, cmds,
"--spin_off"));
1556 vpflow.
flag(
"GENERALIZED_STACKING_FAULT_ENERGY::PARTIAL_DISSOCIATION",
aurostd::args2flag(argv, cmds,
"--partial_dissociation"));
1560 if (vpflow.
flag(
"CLEAVAGE_ENERGY")) {
1561 vpflow.
args2addattachedscheme(argv, cmds,
"CLEAVAGE_ENERGY::RELAXATION_LAYERS",
"--relaxation_layers=",
"");
1564 vpflow.
args2addattachedscheme(argv, cmds,
"CREATE_SLAB::PLANE_INTEREST",
"--plane_interest=|--plane=",
"");
1568 vpflow.
flag(
"STDCONVCELL",
aurostd::args2flag(argv, cmds,
"--sc|--standard_conventional|--std_conv|--sconv"));
1569 vpflow.
flag(
"STDPRIMCELL",
aurostd::args2flag(argv, cmds,
"--sp|--standard_primitive|--std_prim|--sprim"));
1572 if (vpflow.
flag(
"STRUCTURE2ANRL")) {
1575 vpflow.
args2addattachedscheme(argv, cmds,
"STRUCTURE2ANRL::TOLERANCE_SPECTRUM",
"--tolerance_spectrum=",
"");
1576 vpflow.
flag(
"STRUCTURE2ANRL::FORCE_WYCKOFF",
aurostd::args2flag(argv, cmds,
"--force_Wyckoff|--force_wyckoff|--force_Wyckoff_order|--force_wyckoff_order"));
1577 vpflow.
flag(
"STRUCTURE2ANRL::PRINT_ELEMENT_NAMES",
aurostd::args2flag(argv, cmds,
"--print_element_names|--print_element_name|--print_element"));
1578 vpflow.
flag(
"STRUCTURE2ANRL::PRINT_ATOMIC_NUMBERS",
aurostd::args2flag(argv, cmds,
"--print_atomic_numbers|--print_atomic_number"));
1606 if (vpflow.
flag(
"VISUALIZE_PHONONS")) {
1614 vpflow.
push_attached(
"ADISP::DIRECTORY",
XHOST.vflag_control.getattachedscheme(
"DIRECTORY"));
1627 vpflow.
flag(
"PLOT_XRAY::FORCE_GENERIC_TITLE",
aurostd::args2flag(argv, cmds,
"--force_generic_title|--force_title|--title"));
1638 if (vpflow.
flag(
"XXX")) {
1639 cout <<
"XXX" << endl;
1643 if (vpflow.
flag(
"LIB2RAW")) {
1647 if (vpflow.
flag(
"LIB2LIB")) {
1653 if (vpflow.
flag(
"XPLUG::INIT")) {
1656 vpflow.
args2addattachedscheme(argv, cmds,
"XPLUG::LAST_MOD_DAYS",
"--last_mod=|--lm=|--mod_last=|--ml=",
"3.0");
1657 vpflow.
args2addattachedscheme(argv, cmds,
"XPLUG::ZIP_SIZE_GB",
"--zip_size=|--zs=|--size_zip=|--sz=",
"9");
1668 vpflow.
args2addattachedscheme(argv, cmds,
"XELEMENT",
"--xelement=|--XELEMENT=|--element=|--ELEMENT=",
"");
1671 vpflow.
args2addattachedscheme(argv, cmds,
"ZVAL::CELL",
"--zval_cell=|--ZVAL_CELL=|--zvalcell=|--ZVALCELL=",
"");
1672 vpflow.
args2addattachedscheme(argv, cmds,
"ZVAL::ATOM",
"--zval_atom=|--ZVAL_ATOM=|--zvalatom=|--ZVALATOM=",
"");
1675 vpflow.
args2addattachedscheme(argv, cmds,
"POMASS::ATOM",
"--pomass_atom=|--POMASS_ATOM=|--pomassatom=|--POMASSATOM=",
"");
1681 vpflow.
flag(
"PRIMITIVE_LATTICE_RHT",
aurostd::args2flag(argv, cmds,
"--primr | --fastprimitivecell | --fprim"));
1683 vpflow.
args2addattachedscheme(argv, cmds,
"WYCKOFF_POSITIONS",
"--Wyckoff=|--Wyckoff_positions=|--wyckoff=|--wyckoff_positions=|--wyccar=",
"");
1684 if (vpflow.
flag(
"WYCKOFF_POSITIONS")) {
1691 vpflow.
flag(
"WYCKOFF_POSITIONS::PRINT_SITE_SYMMETRIES_ONLY",
aurostd::args2flag(argv, cmds,
"--site_symmetries_only"));
1692 vpflow.
flag(
"WYCKOFF_POSITIONS::PRINT_MULTIPLICITIES_ONLY",
aurostd::args2flag(argv, cmds,
"--multiplicities_only"));
1694 vpflow.
args2addattachedscheme(argv, cmds,
"WYCKOFF_POSITIONS::TOLERANCE",
"--Wyckoff=|--Wyckoff_positions=|--wyckoff=|--wyckoff_positions=|--wyccar=",
"");
1699 vpflow.
args2addattachedscheme(argv, cmds,
"WYCKOFF_POSITIONS::MAGNETIC",
"--mag=|--magnetic=|--magmom=",
"");
1725 cout <<
"PflowARGs: xscheme=" << vpflow.
xscheme << endl;
1728 cout <<
"PflowARGs: vxscheme.size()=" << vpflow.
vxscheme.size() << endl;
1731 cout <<
"PflowARGs: argv.size()=" << argv.size() << endl;
1738 int main(vector<string>& argv, vector<string>& cmds) {
1739 const bool LDEBUG = (
false ||
XHOST.DEBUG);
1750 const ostringstream aus;
1752 const string progname = argv.at(0);
1761 aflags.Directory =
"./";
1765 vpflow =
XHOST.vflag_pflow;
1767 if (vpflow.
flag(
"PFLOW_HELP") && argv.size() == 2) {
1768 cout <<
"**************************************************************************************************" << endl;
1769 cout <<
" aflow --readme=pflow | --readme=processor | --readme=aconvasp | --readme_aconvasp" << endl;
1770 cout <<
" Returns the HELP information for the \"processing machinery\"" << endl;
1775 if (vpflow.
flag(
"PFLOW_HELP") && argv.size() == 3) {
1778 if (vpflow.
flag(
"PROTOS")) {
1784 if (vpflow.
flag(
"FIX_BANDS")) {
1789 const string EXTRACT_KPOINTS =
aurostd::args2string(argv, cmds,
"--extract_kpoints|--xkpoints",
"nan");
1790 const string EXTRACT_INCAR =
aurostd::args2string(argv, cmds,
"--extract_incar|--xincar",
"nan");
1791 const string EXTRACT_POSCAR =
aurostd::args2string(argv, cmds,
"--extract_poscar|--xposcar",
"nan");
1792 const string EXTRACT_POTCAR =
aurostd::args2string(argv, cmds,
"--extract_potcar|--xpotcar",
"nan");
1793 const string EXTRACT_PARTCAR =
aurostd::args2string(argv, cmds,
"--extract_partcar|--xpartcar",
"nan");
1796 aflags.AFLOW_PERFORM_CLEAN =
XHOST.vflag_aflow.flag(
"CLEAN");
1797 vpflow.
flag(
"CLEAN", aflags.AFLOW_PERFORM_CLEAN);
1798 aflags.AFLOW_PERFORM_DIRECTORY =
XHOST.vflag_control.flag(
"DIRECTORY");
1799 aflags.AFLOW_PERFORM_FILE =
XHOST.vflag_control.flag(
"FILE");
1800 if (vpflow.
flag(
"CLEAN")) {
1801 if (!aflags.AFLOW_PERFORM_DIRECTORY) {
1802 cerr <<
"AFLOW: to use --clean, you must specify the directory" << endl;
1807 opts_clean.
flag(
"SAVE_CONTCAR_OUTCAR_COMPLETE",
aurostd::args2flag(argv, cmds,
"--contcar_save_outcar_complete|--save_contcar_outcar_complete"));
1823 bool _PROGRAMRUN =
false;
1825 if (argv.size() == 1 && !_PROGRAMRUN) {
1833 if (!argv.empty() && !_PROGRAMRUN) {
1834 if (vpflow.
flag(
"BADER")) {
1835 cout << bader_functions::BaderCalc(vpflow);
1838 if (vpflow.
flag(
"AFLOWMACHL::CoordCE_CSV")) {
1842 if (vpflow.
flag(
"CHGCAR2JVXL")) {
1843 cout << pflow::CHGCAR2JVXL(vpflow);
1846 if (vpflow.
flag(
"CHGDIFF")) {
1850 if (vpflow.
flag(
"CHGSUM")) {
1854 if (vpflow.
flag(
"CLEAVAGE_ENERGY")) {
1855 pflow::CleavageEnergyCalculation(vpflow, cin);
1859 if (vpflow.
flag(
"COMPARE_DATABASE_ENTRIES")) {
1860 cout << compare::compareDatabaseEntries(vpflow);
1863 if (vpflow.
flag(
"COMPARE_MATERIAL") || vpflow.
flag(
"COMPARE_STRUCTURE")) {
1864 if (
XHOST.vflag_control.flag(
"DIRECTORY") ||
XHOST.vflag_control.flag(
"FILE") || vpflow.
flag(
"COMPARE_STRUCTURE::STRUCTURE_LIST")) {
1865 cout << compare::compareInputStructures(vpflow);
1868 cout << compare::compareInputStructures(vpflow, cin);
1873 if (vpflow.
flag(
"COMPARE_PERMUTATION")) {
1874 cout << compare::compareAtomDecorations(cin, vpflow);
1877 if (vpflow.
flag(
"GFA::INIT")) {
1881 if (vpflow.
flag(
"ATOMIC_ENVIRONMENT::INIT")) {
1885 if (vpflow.
flag(
"FIND_CLOSED_PACKING_PLANE")) {
1886 pflow::findClosedPackingPlane(cin);
1889 if (vpflow.
flag(
"GENERATE_CERAMICS")) {
1894 if (vpflow.
flag(
"FULLSYMMETRY")) {
1899 if (vpflow.
flag(
"STRUCTURE2ANRL")) {
1900 cout << anrl::structure2anrl(cin, vpflow);
1903 if (vpflow.
flag(
"COMPARE2PROTOTYPES")) {
1904 cout << compare::printMatchingPrototypes(cin, vpflow);
1907 if (vpflow.
flag(
"COMPARE2DATABASE")) {
1908 cout << compare::printCompare2Database(cin, vpflow);
1911 if (vpflow.
flag(
"GENERALIZED_STACKING_FAULT_ENERGY")) {
1912 pflow::GeneralizedStackingFaultEnergyCalculation(vpflow, cin);
1915 if (vpflow.
flag(
"PREPARE_CHGCAR_4_JMOL")) {
1916 cout << bader_functions::prepare_CHGCAR_4_Jmol(vpflow);
1919 if (vpflow.
flag(
"PFLOW::QUEUE_STATUS")) {
1920 cout << pflow::getQueueStatus(vpflow);
1924 if (vpflow.
flag(
"SOLIQUIDY::INIT")) {
1930 if (argv.size() == 2 && !_PROGRAMRUN) {
1932 if (vpflow.
flag(
"BZPLOT")) {
1933 LATTICE::BZPLOTDATA(
"", cin, 1);
1936 if (vpflow.
flag(
"BZPLOTDATA")) {
1937 LATTICE::BZPLOTDATA(
"", cin, 0);
1940 if (vpflow.
flag(
"ICSD_MAKELABEL")) {
1941 pflow::ICSD(argv, cin);
1944 if (vpflow.
flag(
"KPATH")) {
1948 if (vpflow.
flag(
"NANOPARTICLE")) {
1949 cout << pflow::NANOPARTICLE(cin, xvector<double>(0));
1956 if (argv.size() >= 2 && !_PROGRAMRUN) {
1959 if (vpflow.
flag(
"ABCCAR") || vpflow.
flag(
"ABINIT") || vpflow.
flag(
"AIMS") || vpflow.
flag(
"ATAT") || vpflow.
flag(
"CIF") || vpflow.
flag(
"ELK") || vpflow.
flag(
"LMP") || vpflow.
flag(
"QE") ||
1960 vpflow.
flag(
"VASP") || vpflow.
flag(
"VASP5") || vpflow.
flag(
"ITC") || vpflow.
flag(
"INCELL") || vpflow.
flag(
"INCOMPACT") || vpflow.
flag(
"INWS") || vpflow.
flag(
"MINKOWSKI_BASIS_REDUCTION") ||
1961 vpflow.
flag(
"NIGGLI") || vpflow.
flag(
"STDCONVCELL") || vpflow.
flag(
"STDPRIMCELL") || vpflow.
flag(
"CART") || vpflow.
flag(
"FRAC")) {
1963 xstructure xstr(cin);
1965 if (vpflow.
flag(
"ABCCAR")) {
1966 xstr.xstructure2abccar();
1968 if (vpflow.
flag(
"ABINIT")) {
1969 xstr.xstructure2abinit();
1971 if (vpflow.
flag(
"AIMS")) {
1972 xstr.xstructure2aims();
1974 if (vpflow.
flag(
"ATAT")) {
1975 xstr.xstructure2atat();
1977 if (vpflow.
flag(
"CIF")) {
1979 xstr.xstructure2cif();
1981 if (vpflow.
flag(
"ELK")) {
1982 xstr.xstructure2elk();
1984 if (vpflow.
flag(
"LMP")) {
1985 xstr.xstructure2lmp();
1987 if (vpflow.
flag(
"QE")) {
1988 xstr.xstructure2qe();
1990 if (vpflow.
flag(
"VASP") || vpflow.
flag(
"VASP5")) {
1991 xstr.xstructure2vasp();
1992 if (vpflow.
flag(
"VASP5")) {
1993 a.is_vasp4_poscar_format =
false;
1994 a.is_vasp5_poscar_format =
true;
1997 if (vpflow.
flag(
"ITC")) {
1998 xstr.xstructure2itc();
2001 if (vpflow.
flag(
"INCELL")) {
2004 if (vpflow.
flag(
"INCOMPACT")) {
2005 xstr.BringInCompact();
2007 if (vpflow.
flag(
"INWS")) {
2008 xstr.BringInWignerSeitz();
2010 if (vpflow.
flag(
"MINKOWSKI_BASIS_REDUCTION")) {
2011 xstr.MinkowskiBasisReduction();
2013 if (vpflow.
flag(
"NIGGLI")) {
2014 xstr.NiggliUnitCellForm();
2016 if (vpflow.
flag(
"STDCONVCELL")) {
2017 xstr.Standard_Conventional_UnitCellForm();
2019 if (vpflow.
flag(
"STDPRIMCELL")) {
2020 xstr.Standard_Primitive_UnitCellForm();
2023 if (vpflow.
flag(
"CART")) {
2026 if (vpflow.
flag(
"FRAC")) {
2034 if (vpflow.
flag(
"ACE")) {
2038 if (vpflow.
flag(
"AFLOWIN")) {
2042 if (vpflow.
flag(
"AGROUP")) {
2046 if (vpflow.
flag(
"AGROUP2")) {
2050 if (vpflow.
flag(
"AGROUP2m")) {
2054 if (vpflow.
flag(
"ALPHABETIC")) {
2058 if (vpflow.
flag(
"ANGLES")) {
2062 if (vpflow.
flag(
"ALPHA_COMPOUND")) {
2066 if (vpflow.
flag(
"ALPHA_SPECIES")) {
2070 if (vpflow.
flag(
"AFLOWLIB::ENTRY_JSON")) {
2071 aflowlib::WEB_Aflowlib_Entry(vpflow.
getattachedscheme(
"AFLOWLIB::ENTRY_JSON"), cout);
2074 if (vpflow.
flag(
"AFLOWLIB_AUID2AURL")) {
2075 cout << aflowlib::AflowlibLocator(vpflow.
getattachedscheme(
"AFLOWLIB_AUID2AURL"),
"AFLOWLIB_AUID2AURL");
2078 if (vpflow.
flag(
"AFLOWLIB_AURL2AUID")) {
2079 cout << aflowlib::AflowlibLocator(vpflow.
getattachedscheme(
"AFLOWLIB_AURL2AUID"),
"AFLOWLIB_AURL2AUID");
2082 if (vpflow.
flag(
"AFLOWLIB_AUID2LOOP")) {
2083 cout << aflowlib::AflowlibLocator(vpflow.
getattachedscheme(
"AFLOWLIB_AUID2LOOP"),
"AFLOWLIB_AUID2LOOP");
2086 if (vpflow.
flag(
"AFLOWLIB_AURL2LOOP")) {
2087 cout << aflowlib::AflowlibLocator(vpflow.
getattachedscheme(
"AFLOWLIB_AURL2LOOP"),
"AFLOWLIB_AURL2LOOP");
2090 if (vpflow.
flag(
"AFLUX::SUMMONS")) {
2091 cout << aflowlib::AFLUXCall(vpflow) << endl;
2094 if (vpflow.
flag(
"AFLOWSYM_PYTHON")) {
2095 SYM::writePythonScript(cout);
2098 if (vpflow.
flag(
"AFLUX")) {
2099 cout << aflowlib::AFLUXCall(vpflow) << endl;
2104 if (vpflow.
flag(
"BANDGAP_WAHYU")) {
2105 AConvaspBandgap(argv);
2108 if (vpflow.
flag(
"BANDGAP")) {
2112 if (vpflow.
flag(
"BZPLOTDATAUSEKPOINTS")) {
2116 if (vpflow.
flag(
"BZPLOTUSEKPOINTS")) {
2120 if (vpflow.
flag(
"BANDSTRUCTURE")) {
2124 if (vpflow.
flag(
"BANDGAPS")) {
2125 AConvaspBandgaps(cin, cout);
2128 if (vpflow.
flag(
"BANDGAPDOS")) {
2132 if (vpflow.
flag(
"BANDGAPDOS_WAHYU")) {
2133 AConvaspBandgapFromDOS(cin);
2136 if (vpflow.
flag(
"BANDGAPLISTDOS")) {
2137 AConvaspBandgapListFromDOS(cin);
2140 if (vpflow.
flag(
"BZDIRECTION")) {
2141 if (vpflow.
flag(
"BZDIRECTION::LATTICE")) {
2149 if (vpflow.
flag(
"BZMAX")) {
2153 if (vpflow.
flag(
"BANDS")) {
2167 if (vpflow.
flag(
"CCE_CORRECTION")) {
2171 if (vpflow.
flag(
"CCE_CORRECTION::POSCAR2CCE")) {
2172 cce::run(vpflow, std::cin);
2175 if (vpflow.
flag(
"CCE_CORRECTION::GET_CCE_CORRECTION")) {
2176 cce::run(vpflow, std::cin);
2179 if (vpflow.
flag(
"CCE_CORRECTION::GET_OXIDATION_NUMBERS")) {
2180 cce::run(vpflow, std::cin);
2183 if (vpflow.
flag(
"CCE_CORRECTION::GET_CATION_COORDINATION_NUMBERS")) {
2184 cce::run(vpflow, std::cin);
2187 if (vpflow.
flag(
"CHECKINTEGRITIY")) {
2191 if (vpflow.
flag(
"CHANGESUFFIX")) {
2196 if (vpflow.
flag(
"CLEANALL")) {
2200 if (vpflow.
flag(
"CORNERS")) {
2204 if (vpflow.
flag(
"CALCULATED_ICSD_RANDOM")) {
2209 if (vpflow.
flag(
"CALCULATED")) {
2213 if (vpflow.
flag(
"CLAT")) {
2217 if (vpflow.
flag(
"CHULL::INIT")) {
2218 chull::convexHull(vpflow);
2221 if (vpflow.
flag(
"COMPARE")) {
2226 if (vpflow.
flag(
"DATA")) {
2230 if (vpflow.
flag(
"DATA_CRYSTAL_POINT_GROUP")) {
2231 pflow::DATA(cin, vpflow,
"CRYSTAL_POINT_GROUP", cout);
2234 if (vpflow.
flag(
"DATA_EDATA")) {
2238 if (vpflow.
flag(
"DATA_REAL_LATTICE")) {
2242 if (vpflow.
flag(
"DATA_RECIPROCAL_LATTICE")) {
2243 pflow::DATA(cin, vpflow,
"RECIPROCAL_LATTICE", cout);
2246 if (vpflow.
flag(
"DATA_SGDATA")) {
2250 if (vpflow.
flag(
"DATA_SUPERLATTICE")) {
2254 if (vpflow.
flag(
"DEBYE")) {
2258 if (vpflow.
flag(
"DIFF")) {
2262 if (vpflow.
flag(
"DISP")) {
2266 if (vpflow.
flag(
"DIST")) {
2272 if (vpflow.
flag(
"EDOS")) {
2276 if (vpflow.
flag(
"EFFMASS")) {
2281 if (vpflow.
flag(
"EIGCURV")) {
2286 if (vpflow.
flag(
"EQUIVALENT")) {
2290 if (vpflow.
flag(
"EWALD")) {
2295 if (vpflow.
flag(
"FROZSL_VASPSETUP_AFLOW")) {
2299 if (vpflow.
flag(
"FROZSL_VASPSETUP_POSCAR")) {
2303 if (vpflow.
flag(
"FROZSL_ANALYZE")) {
2308 if (vpflow.
flag(
"FROZSL_README")) {
2312 if (vpflow.
flag(
"FROZSL_INPUT")) {
2316 if (vpflow.
flag(
"FROZSL_OUTPUT")) {
2320 if (vpflow.
flag(
"FGROUP")) {
2326 if (vpflow.
flag(
"GETTEMP")) {
2331 if (vpflow.
flag(
"GEOMETRY")) {
2335 if (vpflow.
flag(
"GULP")) {
2340 if (vpflow.
flag(
"HKL")) {
2344 if (vpflow.
flag(
"HKL_SEARCH_TRIVIAL")) {
2348 if (vpflow.
flag(
"HKL_SEARCH_SIMPLE")) {
2352 if (vpflow.
flag(
"HKL_SEARCH_COMPLETE")) {
2356 if (vpflow.
flag(
"HNFCELL")) {
2361 if (vpflow.
flag(
"IAP::INIT")) {
2365 if (vpflow.
flag(
"ICSD") || vpflow.
flag(
"ICSD_CHEM") || vpflow.
flag(
"ICSD_PROTO") || vpflow.
flag(
"ICSD_ID") || vpflow.
flag(
"ICSD_LESSTHAN") || vpflow.
flag(
"ICSD_MORETHAN") ||
2366 vpflow.
flag(
"ICSD_DENSLESSTHAN") || vpflow.
flag(
"ICSD_DENSMORETHAN") || vpflow.
flag(
"ICSD_SG") || vpflow.
flag(
"ICSD_SGLESSTHAN") || vpflow.
flag(
"ICSD_SGMORETHAN") || vpflow.
flag(
"ICSD_TRICLINIC") ||
2367 vpflow.
flag(
"ICSD_MONOCLINIC") || vpflow.
flag(
"ICSD_ORTHORHOMBIC") || vpflow.
flag(
"ICSD_TETRAGONAL") || vpflow.
flag(
"ICSD_RHOMBOHEDRAL") || vpflow.
flag(
"ICSD_TRIGONAL") || vpflow.
flag(
"ICSD_HEXAGONAL") ||
2368 vpflow.
flag(
"ICSD_CUBIC") || vpflow.
flag(
"ICSD_UNIQUE") || vpflow.
flag(
"ICSD_BASISLT") || vpflow.
flag(
"ICSD_BASISGT") || vpflow.
flag(
"ICSD_NOBROKENBASIS") || vpflow.
flag(
"ICSD_NOPARTIALOCC") ||
2369 vpflow.
flag(
"ICSD_N_ARY") || vpflow.
flag(
"ICSD_REMOVE_AND") || vpflow.
flag(
"ICSD_REMOVE_OR") || vpflow.
flag(
"ICSD_REMOVEMETALS") || vpflow.
flag(
"ICSD_ALLLESSTHAN") || vpflow.
flag(
"ICSD_ALLMORETHAN") ||
2370 vpflow.
flag(
"ICSD_TRI") || vpflow.
flag(
"ICSD_MCL") || vpflow.
flag(
"ICSD_MCLC") || vpflow.
flag(
"ICSD_ORC") || vpflow.
flag(
"ICSD_ORCC") || vpflow.
flag(
"ICSD_ORCF") || vpflow.
flag(
"ICSD_ORCI") ||
2371 vpflow.
flag(
"ICSD_TET") || vpflow.
flag(
"ICSD_BCT") || vpflow.
flag(
"ICSD_RHL") || vpflow.
flag(
"ICSD_HEX") || vpflow.
flag(
"ICSD_CUB") || vpflow.
flag(
"ICSD_FCC") || vpflow.
flag(
"ICSD_BCC")) {
2372 pflow::ICSD(argv, cin);
2375 if (vpflow.
flag(
"ICSD_LISTMETALS")) {
2376 pflow::ICSD_ListMetals();
2379 if (vpflow.
flag(
"ICSD2POSCAR")) {
2380 pflow::ICSD_2POSCAR(cin);
2383 if (vpflow.
flag(
"ICSD2PROTO")) {
2384 pflow::ICSD_2PROTO(cin);
2387 if (vpflow.
flag(
"ICSD2WYCK")) {
2388 pflow::ICSD_2WYCK(cin, vpflow.
flag(
"SOF"));
2391 if (vpflow.
flag(
"IDENTICAL")) {
2397 if (vpflow.
flag(
"INTPOL")) {
2402 if (vpflow.
flag(
"INFLATE_LATTICE")) {
2406 if (vpflow.
flag(
"INFLATE_VOLUME")) {
2410 if (vpflow.
flag(
"ISOPOINTAL_PROTOTYPES")) {
2411 cout << compare::isopointalPrototypes(cin, vpflow) << endl;
2415 if (vpflow.
flag(
"JUSTAFTER")) {
2419 if (vpflow.
flag(
"JUSTBEFORE")) {
2423 if (vpflow.
flag(
"JUSTBETWEEN")) {
2427 if (vpflow.
flag(
"JMOL")) {
2432 if (vpflow.
flag(
"KBAND")) {
2436 if (vpflow.
flag(
"KPOINTS")) {
2440 if (vpflow.
flag(
"FLAG::XVASP_KPOINTS_DELTA")) {
2444 if (vpflow.
flag(
"KILL")) {
2449 if (vpflow.
flag(
"LATTICEREDUCTION")) {
2455 if (vpflow.
flag(
"LATTICE_TYPE")) {
2459 if (vpflow.
flag(
"LATTICE_LATTICE_TYPE")) {
2463 if (vpflow.
flag(
"LATTICE_HISTOGRAM")) {
2464 CheckLatticeHistogram();
2467 if (vpflow.
flag(
"LIST_PROTOTYPE_LABELS")) {
2471 if (vpflow.
flag(
"LIB2RAW")) {
2472 XHOST.sensors_allowed =
false;
2474 XHOST.sensors_allowed =
true;
2477 if (vpflow.
flag(
"LIB2LIB")) {
2478 XHOST.sensors_allowed =
false;
2480 XHOST.sensors_allowed =
true;
2483 if (vpflow.
flag(
"LTCELL")) {
2487 if (vpflow.
flag(
"LTCELLFV")) {
2492 if (vpflow.
flag(
"MULTI=SH")) {
2493 AFLOW_PTHREADS::MULTI_sh(argv);
2496 if (vpflow.
flag(
"MAGNETICPARAMETERS")) {
2501 if (vpflow.
flag(
"MSI")) {
2505 if (vpflow.
flag(
"MOM")) {
2509 if (vpflow.
flag(
"MULTIENUMALL")) {
2510 pocc::MultienumPrintAllXstr(cin);
2513 if (vpflow.
flag(
"MULTIENUMSORT")) {
2514 pocc::MultienumPrintSortedXstr(cin);
2517 if (vpflow.
flag(
"MAXATOMS")) {
2522 if (vpflow.
flag(
"NAMES") && argv.size() >= 2) {
2526 if (vpflow.
flag(
"NUMNAMES") && argv.size() >= 2) {
2530 if (vpflow.
flag(
"NATOMS")) {
2534 if (vpflow.
flag(
"NBONDXX")) {
2538 if (vpflow.
flag(
"NDATA")) {
2543 if (vpflow.
flag(
"NNDIST")) {
2547 if (vpflow.
flag(
"NOORDERPARAMETER")) {
2551 if (vpflow.
flag(
"NSPECIES")) {
2560 if (vpflow.
flag(
"DOSDATA2JSON")) {
2564 if (vpflow.
flag(
"BANDSDATA2JSON")) {
2570 if (vpflow.
flag(
"PLOT_BANDSPINSPLIT")) {
2574 if (vpflow.
flag(
"PLOT_BAND2")) {
2578 if (vpflow.
flag(
"PLOT_DOSWEB")) {
2582 if (vpflow.
flag(
"PLOT_PEDOS")) {
2586 if (vpflow.
flag(
"PLOT_PEDOSALL")) {
2590 if (vpflow.
flag(
"PLOT_PEDOSALL_AFLOWLIB")) {
2595 if (vpflow.
flag(
"PLOT_BAND")) {
2600 if (vpflow.
flag(
"PLOT_DOS")) {
2605 if (vpflow.
flag(
"PLOT_BANDDOS")) {
2610 if (vpflow.
flag(
"PLOT_PDOS")) {
2615 if (vpflow.
flag(
"PLOT_PDOSALL")) {
2621 if (vpflow.
flag(
"PLOT_PHDOS")) {
2626 if (vpflow.
flag(
"PLOT_PHDISP")) {
2631 if (vpflow.
flag(
"PLOT_PHDISPDOS")) {
2636 if (vpflow.
flag(
"PLOT_THERMO")) {
2641 if (vpflow.
flag(
"PLOT_TCOND")) {
2648 if (vpflow.
flag(
"PLOT_THERMO_QHA")) {
2655 if (vpflow.
flag(
"PLOT_GRUENEISEN_DISPERSION")) {
2661 if (vpflow.
flag(
"PROTOS_ICSD")) {
2667 if (vpflow.
flag(
"POCC_DOS")) {
2671 if (vpflow.
flag(
"POCC_MAG")) {
2675 if (vpflow.
flag(
"POCC_BANDGAP")) {
2679 if (vpflow.
flag(
"POCC_MINIMUM_CONFIGURATION")) {
2680 cout << pocc::POCC_MINIMUM_CONFIGURATION(vpflow) << endl;
2684 if (vpflow.
flag(
"PROTO")) {
2685 if ((vpflow.
flag(
"PROTO::SYMBOLS_ONLY")) || (vpflow.
flag(
"PROTO::EQUATIONS_ONLY"))) {
2693 if (vpflow.
flag(
"PROTO_AFLOW")) {
2697 if (vpflow.
flag(
"PLATON") && argv.size() >= 2) {
2701 if (vpflow.
flag(
"POMASS")) {
2705 if (vpflow.
flag(
"POMASS::CELL")) {
2709 if (vpflow.
flag(
"POMASS::ATOM")) {
2713 if (vpflow.
flag(
"PEARSON_SYMBOL")) {
2717 if (vpflow.
flag(
"PDB")) {
2721 if (vpflow.
flag(
"PGROUP")) {
2725 if (vpflow.
flag(
"PGROUPX")) {
2729 if (vpflow.
flag(
"PGROUPK")) {
2733 if (vpflow.
flag(
"PGROUPK_PATTERSON")) {
2737 if (vpflow.
flag(
"PGROUPK_XTAL")) {
2741 if (vpflow.
flag(
"POSCAR")) {
2745 if (vpflow.
flag(
"RENDER")) {
2749 if (vpflow.
flag(
"POSCAR2AFLOWIN")) {
2753 if (vpflow.
flag(
"POSCAR2ENUM")) {
2754 pocc::POSCAR2ENUM(cin);
2757 if (vpflow.
flag(
"POSCAR2GULP")) {
2758 pocc::POSCAR2GULP(cin);
2761 if (vpflow.
flag(
"POCC_INPUT")) {
2762 pflow::POCC_INPUT();
2765 if (vpflow.
flag(
"POCC::CONVOLUTION")) {
2766 pocc::POCC_Convolution(vpflow);
2769 if (vpflow.
flag(
"POSCAR2WYCKOFF")) {
2773 if (vpflow.
flag(
"PRIM")) {
2777 if (vpflow.
flag(
"PRIM1")) {
2781 if (vpflow.
flag(
"PRIM2")) {
2785 if (vpflow.
flag(
"PRIM3")) {
2789 if (vpflow.
flag(
"PSEUDOPOTENTIALS_CHECK")) {
2793 if (vpflow.
flag(
"PYTHON_MODULES")) {
2800 if (vpflow.
flag(
"QCA::INIT")) {
2801 qca::quasiChemicalApprox(vpflow);
2804 if (vpflow.
flag(
"QDEL")) {
2808 if (vpflow.
flag(
"QMVASP")) {
2812 if (vpflow.
flag(
"QSUB")) {
2817 if (vpflow.
flag(
"RDF")) {
2821 if (vpflow.
flag(
"RDFCMP")) {
2825 if (vpflow.
flag(
"RMCOPIES")) {
2829 if (vpflow.
flag(
"RSM")) {
2833 if (vpflow.
flag(
"RASMOL")) {
2839 if (vpflow.
flag(
"REBUILDDB") || vpflow.
flag(
"UPDATEDB") || vpflow.
flag(
"PATCHDB")) {
2840 int return_code = 199;
2844 if (vpflow.
flag(
"REBUILDDB") || vpflow.
flag(
"UPDATEDB")) {
2845 return_code = db.rebuildDatabase(patchfiles, vpflow.
flag(
"REBUILDDB"));
2846 }
else if (vpflow.
flag(
"PATCHDB")) {
2848 return_code = db.patchDatabase(patchfiles,
false);
2850 if ((return_code < 100) || (return_code >= 200)) {
2856 if (vpflow.
flag(
"ANALYZEDB")) {
2863 if (vpflow.
flag(
"RMATOM")) {
2868 if (vpflow.
flag(
"SHELL")) {
2872 if (vpflow.
flag(
"SHIFT")) {
2876 if (vpflow.
flag(
"SLAB")) {
2880 if (vpflow.
flag(
"STATDIEL")) {
2885 if (vpflow.
flag(
"SG::AFLOW") && argv.size() >= 2) {
2886 cout <<
pflow::SG(vpflow, cin,
"AFLOW",
"ALL") << endl;
2889 if (vpflow.
flag(
"SG::AFLOW_LABEL") && argv.size() >= 2) {
2890 cout <<
pflow::SG(vpflow, cin,
"AFLOW",
"LABEL") << endl;
2893 if (vpflow.
flag(
"SG::AFLOW_NUMBER") && argv.size() >= 2) {
2894 cout <<
pflow::SG(vpflow, cin,
"AFLOW",
"NUMBER") << endl;
2897 if (vpflow.
flag(
"SG::PLATON") && argv.size() >= 2) {
2898 cout <<
pflow::SG(vpflow, cin,
"PLATON",
"ALL") << endl;
2901 if (vpflow.
flag(
"SG::PLATON_LABEL") && argv.size() >= 2) {
2902 cout <<
pflow::SG(vpflow, cin,
"PLATON",
"LABEL") << endl;
2905 if (vpflow.
flag(
"SG::PLATON_NUMBER") && argv.size() >= 2) {
2906 cout <<
pflow::SG(vpflow, cin,
"PLATON",
"NUMBER") << endl;
2909 if (vpflow.
flag(
"SG::FINDSYM") && argv.size() >= 2) {
2910 cout <<
pflow::SG(vpflow, cin,
"FINDSYM",
"ALL") << endl;
2913 if (vpflow.
flag(
"SG::FINDSYM_LABEL") && argv.size() >= 2) {
2914 cout <<
pflow::SG(vpflow, cin,
"FINDSYM",
"LABEL") << endl;
2917 if (vpflow.
flag(
"SG::FINDSYM_NUMBER") && argv.size() >= 2) {
2918 cout <<
pflow::SG(vpflow, cin,
"FINDSYM",
"NUMBER") << endl;
2922 if (vpflow.
flag(
"SG::FINDSYM_PRINT")) {
2926 if (vpflow.
flag(
"SG::FINDSYM_EXEC")) {
2931 if (vpflow.
flag(
"SUPERCELL")) {
2935 if (vpflow.
flag(
"SUPERCELLSTRLIST")) {
2939 if (vpflow.
flag(
"SD") && argv.size() >= 2) {
2943 if (vpflow.
flag(
"SG")) {
2947 if (vpflow.
flag(
"SGROUP")) {
2951 if (vpflow.
flag(
"SPECIES")) {
2957 if (vpflow.
flag(
"SCALE")) {
2961 if (vpflow.
flag(
"STRUCTURE2JSON")) {
2963 cout << xstructure2json(xstr).toString() << endl;
2969 if (vpflow.
flag(
"UFFENERGY")) {
2975 if (vpflow.
flag(
"VISUALIZE_PHONONS")) {
2976 apl::createAtomicDisplacementSceneFile(vpflow);
2979 if (vpflow.
flag(
"VOLUME::EQUAL")) {
2983 if (vpflow.
flag(
"VOLUME::MULTIPLY_EQUAL")) {
2987 if (vpflow.
flag(
"VOLUME::PLUS_EQUAL")) {
2992 if (vpflow.
flag(
"XPLUG::INIT")) {
2993 aflowlib::XPLUG(vpflow);
2996 if (vpflow.
flag(
"XYZ")) {
3000 if (vpflow.
flag(
"XYZWS")) {
3004 if (vpflow.
flag(
"XRAY")) {
3008 if (vpflow.
flag(
"XRAY_PEAKS")) {
3012 if (vpflow.
flag(
"PLOT_XRAY")) {
3016 if (vpflow.
flag(
"PLOT_XRAY_FILE")) {
3020 if (vpflow.
flag(
"XRD_DIST")) {
3024 if (vpflow.
flag(
"XELEMENT")) {
3028 if (vpflow.
flag(
"XTALFINDER_PYTHON")) {
3029 compare::writePythonScript(cout);
3034 if (vpflow.
flag(
"ZVAL")) {
3038 if (vpflow.
flag(
"ZVAL::CELL")) {
3042 if (vpflow.
flag(
"ZVAL::ATOM")) {
3048 if (vpflow.
flag(
"REVERSE_SPACEGROUP_RHT")) {
3049 cout << SYM::ReverseSpaceGroup(argv) << endl;
3052 if (vpflow.
flag(
"ORTHODEFECT_RHT")) {
3053 SYM::OrthoDefect(cin);
3056 if (vpflow.
flag(
"PRIMITIVE_LATTICE_RHT")) {
3057 xstructure str(cin);
3058 str.GetPrimitiveCell();
3059 cout << str << endl;
3065 if (vpflow.
flag(
"WYCKOFF_POSITIONS")) {
3073 if (argv.size() == 3 && !_PROGRAMRUN) {
3074 if (vpflow.
flag(
"CHGINT")) {
3078 if (EXTRACT_KPOINTS !=
"nan") {
3082 if (EXTRACT_INCAR !=
"nan") {
3086 if (EXTRACT_POSCAR !=
"nan") {
3090 if (EXTRACT_POTCAR !=
"nan") {
3094 if (EXTRACT_PARTCAR !=
"nan") {
3098 if (vpflow.
flag(
"EXTRACT_SYMMETRY")) {
3102 if (vpflow.
flag(
"KPATH")) {
3106 if (vpflow.
flag(
"INSPHERE")) {
3110 if (vpflow.
flag(
"NANOPARTICLE")) {
3111 cout << pflow::NANOPARTICLE(cin, aurostd::args2xvectorutype<double>(argv,
"--nanoparticle", argv.size() - 2));
3114 if (vpflow.
flag(
"POCC")) {
3119 if (vpflow.
flag(
"RAYTRACE")) {
3123 if (vpflow.
flag(
"SETORIGIN")) {
3124 cout << pflow::SETORIGIN(cin, (uint) aurostd::string2utype<int>(argv.at(2)));
3127 if (vpflow.
flag(
"SEWALD")) {
3131 if (vpflow.
flag(
"SGROUP")) {
3136 if (vpflow.
flag(
"WYCKOFF")) {
3142 if (argv.size() >= 3 && !_PROGRAMRUN) {
3143 if (vpflow.
flag(
"MISCIBILITY")) {
3149 if (argv.size() == 4 && !_PROGRAMRUN) {
3150 if (vpflow.
flag(
"JOINSTRLIST")) {
3154 if (vpflow.
flag(
"MAKESTRLIST")) {
3158 if (vpflow.
flag(
"NANOPARTICLE")) {
3159 cout << pflow::NANOPARTICLE(cin, aurostd::args2xvectorutype<double>(argv,
"--nanoparticle", argv.size() - 2));
3162 if (vpflow.
flag(
"PDOS")) {
3166 if (vpflow.
flag(
"PLANEDENS")) {
3174 if (vpflow.
flag(
"RBANAL")) {
3178 if (vpflow.
flag(
"SUMPDOS")) {
3182 if (vpflow.
flag(
"SWAP")) {
3186 if (vpflow.
flag(
"XFIXX")) {
3187 aflowlib::XFIX_LIBRARY_ALL(
"LIB2", argv);
3192 if (argv.size() == 5 && !_PROGRAMRUN) {
3193 if (vpflow.
flag(
"RBDIST")) {
3197 if (vpflow.
flag(
"SETCM")) {
3198 cout << pflow::SETCM(cin, aurostd::args2xvectorutype<double>(argv,
"--setcm", 3));
3201 if (vpflow.
flag(
"SETORIGIN")) {
3202 cout << pflow::SETORIGIN(cin, aurostd::args2xvectorutype<double>(argv,
"--setorigin", 3));
3205 if (vpflow.
flag(
"CMPSTR")) {
3215 cerr <<
"aflow: the number of arguments is not correct" << endl;
3216 cerr <<
"Try \'aflow --help\' for more information" << endl;
3217 for (
size_t i = 0; i < argv.size(); i++) {
3219 cerr << argv[i] <<
" ";
3235 vector<string> tokens;
3238 for (
int i = argv.size() - 1; i >= 1 && !found; i--) {
3240 for (
size_t j = 0; j < cmds.size() && !found; j++) {
3241 if (_cmd == cmds[j]) {
3247 for (
int i = argv.size() - 1; i >= 1 && !found; i--) {
3250 _cmd = tokens.at(0) +
"=";
3251 for (
size_t j = 0; j < cmds.size() && !found; j++) {
3252 if (_cmd == cmds[j]) {
3260 cerr <<
"ERROR - pflow::CheckCommands: command not found: " << _cmd << endl;
3273 stringstream strstream;
3274 const string tab =
" ";
3276 for (
size_t i = 0; i < x.size(); i++) {
3280 strstream <<
"******* BEGIN POSTPROCESSING MODE ******************************************************************" << endl;
3281 strstream << tab << x <<
" --help [-h] option_name" << endl;
3283 strstream << tab << x <<
" --abccar < POSCAR | WYCCAR" << endl;
3284 strstream << tab << x <<
" --abinit < POSCAR" << endl;
3285 strstream << tab << x <<
" --aims < POSCAR" << endl;
3286 strstream << tab << x <<
" --ace < POSCAR" << endl;
3287 strstream << tab << x <<
" --use_aflow.in=XXX" << endl;
3288 strstream << tab << x <<
" --aflowin < POSCAR" << endl;
3289 strstream << tab << x <<
" --aflowSG[_label,_number][=<tolerance_value>|=tight|=loose] < POSCAR" << endl;
3290 strstream << tab << x
3291 <<
" --aflow-sym|--AFLOW-SYM|--AFLOWSYM|--aflowSYM|--aflowsym|--full_symmetry|--full_sym|--fullsym[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] [--screen_only] "
3292 "[--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR"
3294 strstream << tab << x <<
" --poscar2aflowin < POSCAR" << endl;
3295 strstream << tab << x <<
" --angle=cutoff < POSCAR" << endl;
3296 strstream << tab << x <<
" --agroup|--sitepointgroup[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] [--screen_only] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR" << endl;
3297 strstream << tab << x <<
" --agroup2 < POSCAR" << endl;
3298 strstream << tab << x <<
" --agroup2m < POSCAR" << endl;
3299 strstream << tab << x <<
" --alphabetic < POSCAR" << endl;
3300 strstream << tab << x <<
" --alpha_compound=string1,string2...." << endl;
3301 strstream << tab << x <<
" --alpha_species=string1,string2..." << endl;
3302 strstream << tab << x <<
" --aflowlib=entry [--print=txt|json]" << endl;
3303 strstream << tab << x <<
" --aflowlib_auid2aurl=auid1,auid2....|--auid2aurl=..." << endl;
3304 strstream << tab << x <<
" --aflowlib_aurl2auid=aurl1,aurl2.... [ --aurl2auid=..." << endl;
3305 strstream << tab << x <<
" --aflowlib_auid2loop=auid1,auid2....|--auid2loop=..." << endl;
3306 strstream << tab << x <<
" --aflowlib_aurl2loop=aurl1,aurl2.... [ --aurl2loop=..." << endl;
3307 strstream << tab << x <<
" --atat < POSCAR" << endl;
3308 strstream << tab << x <<
" [options] --bader -D DIRECTORY" << endl;
3309 strstream << tab << xspaces <<
" " <<
"options are: --usage" << endl;
3310 strstream << tab << xspaces <<
" " <<
" --critical_points|--cp" << endl;
3311 strstream << tab << xspaces <<
" " <<
" --calculate=|--calc=bader|voronoi" << endl;
3312 strstream << tab << xspaces <<
" " <<
" --nocalculate=|--nocalc=bader|voronoi" << endl;
3313 strstream << tab << xspaces <<
" " <<
" --partition=|--part=neargrid|ongrid" << endl;
3314 strstream << tab << xspaces <<
" " <<
" --refine_edge_method=|--rem=-1|-2|-3" << endl;
3315 strstream << tab << xspaces <<
" " <<
" --reference=|--ref=REF_FILE" << endl;
3316 strstream << tab << xspaces <<
" " <<
" --vacuum=|--vac=off|auto|DENSITY_THRESHOLD" << endl;
3317 strstream << tab << xspaces <<
" " <<
" --terminate=|--term=known|max" << endl;
3318 strstream << tab << xspaces <<
" " <<
" --print_all=atom|bader|both" << endl;
3319 strstream << tab << xspaces <<
" " <<
" --print_index=|--print_idx=atom|bader|both" << endl;
3320 strstream << tab << xspaces <<
" " <<
" --print_select_atom=|--print_sel_atom=[LIST OR RANGE]" << endl;
3321 strstream << tab << xspaces <<
" " <<
" --print_select_bader=|--print_sel_bader=[LIST OR RANGE]" << endl;
3322 strstream << tab << xspaces <<
" " <<
" --print_sum_atom=[LIST OR RANGE]" << endl;
3323 strstream << tab << xspaces <<
" " <<
" --print_sum_bader=[LIST OR RANGE]" << endl;
3324 strstream << tab << xspaces <<
" " <<
" --quiet|--q" << endl;
3325 strstream << tab << xspaces <<
" " <<
" --consolidate_atoms2species|--a2s" << endl;
3326 strstream << tab << xspaces <<
" " <<
" --remove_bader_atoms|--rba" << endl;
3327 strstream << tab << xspaces <<
" " <<
" --jvxl_all_species=|--jvxl=CUTOFF1,CUTOFF2...[::DOWNSAMPLE1,DOWNSAMPLE2,..]|CUTOFF1[,DOWNSAMPLE1:CUTOFF2,DOWNSAMPLE2:...]|CUTOFF[,DOWNSAMPLE]" << endl;
3328 strstream << tab << xspaces <<
" " <<
" --keep=jvxl_only|--jvxl_only" << endl;
3329 strstream << tab << x <<
" --bands=PROOUT < POSCAR [AFLOW: NEED VERIFICATION]" << endl;
3330 strstream << tab << x <<
" --bandgap[=bands_directory1[,bands_directory2,...]]" << endl;
3331 strstream << tab << x <<
" --bandgaps < file_containing_bands_directories" << endl;
3332 strstream << tab << x <<
" --bandgapdos[=bands_directory1[,bands_directory2,...]]" << endl;
3333 strstream << tab << x <<
" --bandgaplistdos < DOSCAR_list" << endl;
3334 strstream << tab << x <<
" --bandstructure|--bs" << endl;
3335 strstream << tab << x <<
" --bzdirections|--bzd < POSCAR" << endl;
3336 strstream << tab << x <<
" --bzdirections=|--bzd=LATTICE" << endl;
3337 strstream << tab << x <<
" --BZmax < POSCAR" << endl;
3338 strstream << tab << x <<
" --bzplot|--plotbz < POSCAR" << endl;
3339 strstream << tab << x <<
" --bzplotuseKPOINTS=KPOINTS < POSCAR" << endl;
3340 strstream << tab << x <<
" --bzplotdata < POSCAR" << endl;
3341 strstream << tab << x <<
" --bzplotdatauseKPOINTS=KPOINTS < POSCAR" << endl;
3342 strstream << tab << x <<
" --cart [-c] < POSCAR" << endl;
3343 strstream << tab << x
3344 <<
" [--cce (prints user instructions and exits)] --cce=POSCAR_FILE_PATH [--oxidation_numbers=ox_num_1,ox_num_2,...] [--enthalpies_formation_dft=form_enthalpy_1,form_enthalpy_2,...] "
3345 "[--functionals=functional_1,functional_2,...]"
3347 strstream << tab << x <<
" [options] --chgcar2jvxl=|--c2j=CHGCAR11[,CHGCAR2,...]::CUTOFF1,CUTOFF2...[::DOWNSAMPLE1,DOWNSAMPLE2,...]|CHGCAR1,CUTOFF1[,DOWNSAMPLE1:CHGCAR2,CUTOFF2[,DOWNSAMPLE2:...]]|CHGCAR,CUTOFF[,DOWNSAMPLE]"
3349 strstream << tab << xspaces <<
" " <<
"options are: --usage" << endl;
3350 strstream << tab << xspaces <<
" " <<
" --output=|--o=OUTPUT_FILE" << endl;
3351 strstream << tab << x <<
" [options]--chgdiff=CHGCAR1,CHGCAR2" << endl;
3352 strstream << tab << xspaces <<
" " <<
"options are: --usage" << endl;
3353 strstream << tab << xspaces <<
" " <<
" --output=|--o=CHGCAR_OUT" << endl;
3354 strstream << tab << x <<
" --chgsum=CHGCAR1,CHGCAR2,..." << endl;
3355 strstream << tab << xspaces <<
" " <<
"options are: --usage" << endl;
3356 strstream << tab << xspaces <<
" " <<
" --output=|--o=CHGCAR_OUT" << endl;
3357 strstream << tab << x <<
" --check_integrity|--checki" << endl;
3358 strstream << tab << x <<
" --cif < POSCAR" << endl;
3359 strstream << tab << x <<
" --clean -D DIRECTORY" << endl;
3360 strstream << tab << x <<
" --clean_all < LIST_DIRECTORIES" << endl;
3361 strstream << tab << x <<
" --compare2database < POSCAR" << endl;
3362 strstream << tab << x <<
" --compare2prototypes < POSCAR" << endl;
3363 strstream << tab << x <<
" --compare_database_entries [--alloy=AlgAlMn...] [--nspecies=<number>] [--stoichiometry=1,2,3,...] [--space_group=225,186,227,...]" << endl;
3364 strstream << tab << x <<
" --compare_materials=POSCAR1,POSCAR2,...| -D <path> | -F=<filename> [--np=xx (default 1)]" << endl;
3365 strstream << tab << x <<
" --compare_structures=POSCAR1,POSCAR2,...| -D <path> | -F=<filename> [--np=xx (default 1)]" << endl;
3366 strstream << tab << x <<
" --convex_hull=|--chull --alloy=MnPdPt[,AlCuZn,...] [--np=1] [chull_options] [--destination=[DIRECTORY]]" << endl;
3367 strstream << tab << xspaces <<
" " <<
"chull_options are:" << endl;
3369 strstream << tab << xspaces <<
" " <<
"GENERAL OPTIONS:" << endl;
3370 strstream << tab << xspaces <<
" " <<
" --usage" << endl;
3371 strstream << tab << xspaces <<
" " <<
" --output=|--o=|--print=|--p=latex|pdf|png|json|text|jupyter|jupyter2|jupyter3" << endl;
3372 strstream << tab << xspaces <<
" " <<
" --screen_only" << endl;
3373 strstream << tab << xspaces <<
" " <<
" --keep=tex|--keep_tex|--keeptex|--tex" << endl;
3374 strstream << tab << xspaces <<
" " <<
" --keep=log|--keep_log|--keeplog|--log" << endl;
3375 strstream << tab << xspaces <<
" " <<
" --keep=tex,log" << endl;
3377 strstream << tab << xspaces <<
" " <<
"LOADING OPTIONS:" << endl;
3378 strstream << tab << xspaces <<
" " <<
" --load_library=|--loadlibrary=|--ll=icsd|lib1|lib2|lib3" << endl;
3379 strstream << tab << xspaces <<
" " <<
" --load_API|--load_api|--loadapi|--lapi|--api" << endl;
3380 strstream << tab << xspaces <<
" " <<
" --load_entries_entry_output|--loadentriesentryoutput|--leo" << endl;
3381 strstream << tab << xspaces <<
" " <<
" --neglect=|--ban=aflow:bb0d45ab555bc208);aflow:fb9eaa58604ce774" << endl;
3382 strstream << tab << xspaces <<
" " <<
" --see_neglect|--seeneglect|--sn" << endl;
3383 strstream << tab << xspaces <<
" " <<
" --remove_extreme_points=|--removeextremepoints=|--remove_extrema=|--removeextrema=|--rep=-1000" << endl;
3384 strstream << tab << xspaces <<
" " <<
" --entropic_temperature|--entropictemperature|--entroptemp" << endl;
3385 strstream << tab << xspaces <<
" " <<
" --include_paw_gga|--paw_gga" << endl;
3387 strstream << tab << xspaces <<
" " <<
"ANALYSIS OPTIONS:" << endl;
3388 strstream << tab << xspaces <<
" " <<
" --distance_to_hull=|--distancetohull=|--distance2hull=|--dist2hull=|--d2h=aflow:bb0d45ab555bc208,aflow:fb9eaa58604ce774" << endl;
3389 strstream << tab << xspaces <<
" " <<
" --stability_criterion=|--stabilitycriterion=|--stable_criterion=|--scriterion=|--sc=aflow:bb0d45ab555bc208,aflow:fb9eaa58604ce774" << endl;
3390 strstream << tab << xspaces <<
" "
3392 "--n+1_enthalpy_gain=|--=|--n+1enthalpygain=|--n+1energygain=|--n+1egain=|--n1egain=|--n+1_enthalpygain=|--n+1+energygain=|--n+1_egain=|--nplus1=aflow:bb0d45ab555bc208,aflow:fb9eaa58604ce774"
3394 strstream << tab << xspaces <<
" " <<
" --hull_formation_enthalpy=|--hull_enthalpy=|--hull_energy=0.25,0.25" << endl;
3395 strstream << tab << xspaces <<
" " <<
" --skip_structure_comparison|--skipstructruecomparison|--skipstructcomp|--ssc" << endl;
3396 strstream << tab << xspaces <<
" " <<
" --skip_stability_criterion_analysis|--skipstabilitycriterionanalysis|--skipscriterion|--sscriterion" << endl;
3397 strstream << tab << xspaces <<
" "
3398 <<
" --skip_n_plus_1_enthalpy_gain_analysis|--skip_n_plus_1_energy_gain_analysis|--skipnplus1enthalpygainanalysis|--skipnplus1energygainanalysis|--skipnplus1|--snp1|--snpo" << endl;
3399 strstream << tab << xspaces <<
" " <<
" --include_skewed_hulls|--include_skewed|--ish" << endl;
3400 strstream << tab << xspaces <<
" " <<
" --include_unreliable_hulls|--include_unreliable|--iuh" << endl;
3401 strstream << tab << xspaces <<
" " <<
" --include_outliers|--io" << endl;
3402 strstream << tab << xspaces <<
" " <<
" --strict_outlier_analysis|--soa" << endl;
3403 strstream << tab << xspaces <<
" " <<
" --include_ill_converged|--iic" << endl;
3404 strstream << tab << xspaces <<
" " <<
" --force" << endl;
3406 strstream << tab << xspaces <<
" " <<
"LATEX/PDF/PNG OPTIONS:" << endl;
3407 strstream << tab << xspaces <<
" " <<
" --image_only|--imageonly|--image" << endl;
3408 strstream << tab << xspaces <<
" " <<
" --no_document|--nodocument|--no_doc|--nodoc|--full_page_image|--fullpageimage" << endl;
3409 strstream << tab << xspaces <<
" " <<
" --document_only|--documentonly|--doc_only|--doconly|--doc" << endl;
3410 strstream << tab << xspaces <<
" " <<
" --latex_output|--latexoutput" << endl;
3411 strstream << tab << xspaces <<
" " <<
" --latex_interactive|--latexinteractive" << endl;
3412 strstream << tab << xspaces <<
" " <<
" --light_contrast|--lightcontrast|--lc" << endl;
3413 strstream << tab << xspaces <<
" " <<
" --large_font|--largefont|--large|--lf" << endl;
3414 strstream << tab << xspaces <<
" " <<
" --png_resolution=|--pngresolution=|--pngr=300" << endl;
3415 strstream << tab << xspaces <<
" " <<
" --plot_iso_max_latent_heat|--plot_isomax|--iso_max|--isomax" << endl;
3416 strstream << tab << x <<
" --corners|--corner < POSCAR" << endl;
3417 strstream << tab << x <<
" --data[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] < POSCAR" << endl;
3418 strstream << tab << x <<
" --data1=rcut < POSCAR" << endl;
3419 strstream << tab << x <<
" --data2 < POSCAR" << endl;
3420 strstream << tab << x <<
" --debye=THERMO[.bz2|.gz|.xz]" << endl;
3421 strstream << tab << x <<
" --diff=POSCAR1,POSCAR2" << endl;
3422 strstream << tab << x <<
" --disp=cutoff < POSCAR" << endl;
3423 strstream << tab << x <<
" --dist=cutoff < POSCAR" << endl;
3424 strstream << tab << x <<
" --delta_kpoints=number [or --dkpoints=number|-dkpoints=number|-dk=number] < POSCAR" << endl;
3425 strstream << tab << x <<
" --edata[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] < POSCAR" << endl;
3426 strstream << tab << x <<
" --effective-mass|--em DIRECTORY" << endl;
3427 strstream << tab << x <<
" --eigcurv=DIRECTORY(with bands)" << endl;
3428 strstream << tab << x <<
" --element=Z|name|symbol[,property[,property]....]" << endl;
3429 strstream << tab << x <<
" --enum|--multienum < POSCAR" << endl;
3430 strstream << tab << x <<
" --enumsort|--multienumsort < POSCAR" << endl;
3431 strstream << tab << x <<
" --equivalent|--equiv|--inequivalent|--inequiv|--iatoms|--eatoms[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR"
3433 strstream << tab << x <<
" --ewald[=eta] < POSCAR" << endl;
3434 strstream << tab << x <<
" --findsym[=tolerance_relative: default " <<
DEFAULT_FINDSYM_TOL <<
"] < POSCAR" << endl;
3435 strstream << tab << x <<
" --findsym_print[=tolerance_relative: default " <<
DEFAULT_FINDSYM_TOL <<
"] < POSCAR" << endl;
3436 strstream << tab << x <<
" --findsymSG[_label,_number][=tolerance_relative: default " <<
DEFAULT_FINDSYM_TOL <<
"] < POSCAR" << endl;
3437 strstream << tab << x <<
" --frac [-f,-d,--fract,--fractional,--direct] < POSCAR" << endl;
3438 strstream << tab << x <<
" --getTEMP [--runstat|--runbar|--refresh=X|--warning_beep=T|--warning_halt=T]" << endl;
3439 strstream << tab << x <<
" --gfa --alloy=CaCu [--ae_file=All_atomic_environments_read.dat] [--cutoff_energy=0.05]" << endl;
3440 strstream << tab << x <<
" --generate_ceramics --nm=C --m=Mo,Nb,Ta,V,W -N=5" << endl;
3441 strstream << tab << x <<
" --get_isopointal_prototype < POSCAR" << endl;
3442 strstream << tab << x <<
" --gulp < POSCAR" << endl;
3443 strstream << tab << x <<
" --identical < POSCAR" << endl;
3444 strstream << tab << x <<
" --incell < POSCAR" << endl;
3445 strstream << tab << x <<
" --incompact < POSCAR" << endl;
3446 strstream << tab << x <<
" --insphere radius < POSCAR" << endl;
3447 strstream << tab << x <<
" --inwignerseitz [--inws] < POSCAR" << endl;
3448 strstream << tab << x <<
" --inflate_lattice=coefficient|--ilattice coefficient=coefficient < POSCAR" << endl;
3449 strstream << tab << x <<
" --inflate_volume=coefficient|--ivolume=coefficient < POSCAR" << endl;
3450 strstream << tab << x <<
" --jgif < POSCAR" << endl;
3451 strstream << tab << x <<
" --jmol[=n1[,n2[,n3[,color[,true/false]]]]] < POSCAR" << endl;
3452 strstream << tab << x <<
" --pocc_hnf < POSCAR" << endl;
3453 strstream << tab << x <<
" --pocc_count_total < PARTCAR" << endl;
3454 strstream << tab << x <<
" --pocc_count_unique < PARTCAR" << endl;
3455 strstream << tab << x <<
" --pocc_show_unique < PARTCAR" << endl;
3456 strstream << tab << x <<
" --kpath [--grid=XX] < POSCAR" << endl;
3457 strstream << tab << x <<
" --kpoints=KDENS [or --kppra=KDENS|-k=KDENS] < POSCAR" << endl;
3458 strstream << tab << x <<
" --maxatoms=N|--max_atoms=N|--atoms_max=N|--atomsmax=N < POSCAR" << endl;
3459 strstream << tab << x <<
" --msi < POSCAR" << endl;
3460 strstream << tab << x <<
" --latticehistogram < POSCAR" << endl;
3461 strstream << tab << x <<
" --latticereduction < POSCAR" << endl;
3462 strstream << tab << x <<
" --lattice_type|--lattice|--lattice_crystal < POSCAR" << endl;
3463 strstream << tab << x <<
" --lattice_lattice_type|--lattice_lattice < POSCAR" << endl;
3464 strstream << tab << x <<
" --latticehistogram < POSCAR" << endl;
3465 strstream << tab << x <<
" --use_LOCK=XXX" << endl;
3466 strstream << tab << x <<
" --ltcell=a11,a12,a13,a21,a22,a23,a31,a32,a33 < POSCAR" << endl;
3467 strstream << tab << x <<
" --ltcell=a11,a22,a33 < POSCAR" << endl;
3468 strstream << tab << x <<
" --ltcell=file < POSCAR" << endl;
3469 strstream << tab << x <<
" --ltcellfv=v1,v2,v3,phi < POSCAR" << endl;
3470 strstream << tab << x <<
" --magpara=directory|--magpara" << endl;
3471 strstream << tab << x <<
" --minkowski_basis_reduction|--minkowski|--mink < POSCAR" << endl;
3472 strstream << tab << x <<
" --miscibility|--mix string" << endl;
3473 strstream << tab << x <<
" --mom < POSCAR" << endl;
3474 strstream << tab << x <<
" --natoms|--numatoms < POSCAR" << endl;
3475 strstream << tab << x <<
" --nbondxx < POSCAR" << endl;
3476 strstream << tab << x <<
" --names|--species A1 A2 ... < POSCAR" << endl;
3477 strstream << tab << x <<
" --nanoparticle radius distance < POSCAR" << endl;
3478 strstream << tab << x <<
" --ndata < POSCAR" << endl;
3479 strstream << tab << x <<
" --niggli < POSCAR" << endl;
3480 strstream << tab << x <<
" --nn < POSCAR" << endl;
3481 strstream << tab << x <<
" --noorderparameter < POSCAR" << endl;
3482 strstream << tab << x <<
" --nosd < POSCAR" << endl;
3483 strstream << tab << x <<
" --numnames A1 A2 ... < POSCAR" << endl;
3484 strstream << tab << x <<
" --nspecies|--numspecies< POSCAR" << endl;
3485 strstream << tab << x <<
" --OrthoDefect < POSCAR" << endl;
3486 strstream << tab << x <<
" --pdb < POSCAR" << endl;
3487 strstream << tab << x <<
" --rsm < POSCAR" << endl;
3488 strstream << tab << x <<
" --rsm --z atom_num1 atom_num2 atom_num3 < POSCAR" << endl;
3489 strstream << tab << x <<
" --rsm --z atom_symbol1 atom_symbol2 atom_symbol3 < POSCAR" << endl;
3490 strstream << tab << x <<
" --pearson_symbol|--pearson < POSCAR" << endl;
3491 strstream << tab << x <<
" --platon[=EQUAL|EXACT][,ang,d1,d2,d3] < POSCAR|platonSG" << endl;
3492 strstream << tab << x <<
" --platonSG[_label,_number][=EQUAL|EXACT][,ang,d1,d2,d3] < POSCAR" << endl;
3493 strstream << tab << x <<
" --plotband|--plotbands[=directory[,Emin[,Emax]]]] [--keep=gpl] [--print=pdf|gif|eps|jpg|png] [--title=] [--outfile=]" << endl;
3494 strstream << tab << x <<
" --plotband_spinsplit[=directory[,DOS_Emin[,DOS_Emax[,DOSSCALE]]]]]" << endl;
3495 strstream << tab << x <<
" --plotbanddos|--plotbandsdos[=directory[,Emin[,Emax[,DOSSCALE]]]]] [--keep=gpl] [--noshift] [--print=pdf|eps|gif|jpg|png] [--projection=atoms|lm|none|orbitals] [--title=] [--outfile=]" << endl;
3496 strstream << tab << x <<
" --plotdos[=directory[,Emin[,Emax[,DOSSCALE]]]]] [--print=pdf|eps|gif|jpg|png] [--keep=gpl] [--noshift] [--projection=atoms|lm|none|orbitals] [--title=] [--outfile=]" << endl;
3497 strstream << tab << x <<
" --plotdosweb[=directory[,DOS_Emin[,DOS_Emax[,DOSSCALE]]]]" << endl;
3498 strstream << tab << x <<
" --plotpdos|--plotpedos[=directory[,atom[,Emin[,Emax[,DOSSCALE]]]]] [--keep=gpl] [--noshift] [--print=pdf|eps|gif|jpg|png] [--projection=lm|none|orbitals] [--title=] [--outfile=]" << endl;
3499 strstream << tab << x <<
" --plotpdosall|--plotpedosall[=directory[,Emin[,Emax[,DOSSCALE]]]] [--keep=gpl] [--noshift] [--print=pdf|eps|gif|jpg|png] [--projection=lm|none|orbitals] [--title=] [--outfile=]" << endl;
3500 strstream << tab << x <<
" --plotpedosall_nonquivalent[=directory[,DOS_Emin[,DOS_Emax[,DOSSCALE]]]]" << endl;
3501 strstream << tab << x <<
" --plotphdisp|--plotphonondispersion|--pphdis[=directory,[Emin,[Emax]]] [--keep=gpl] [--print=pdf|eps|gif|jpg|png] [--title=] [--unit=THz|Hz|eV|meV|rcm|cm-1] [--outfile=]" << endl;
3502 strstream << tab << x <<
" --plotphdos[=directory,[Emin,[Emax[,DOSSCALE]]]] [--keep=gpl] [--print=pdf|eps|gif|jpg|png] [--title=] [--unit=THz|Hz|eV|meV|rcm|cm-1] [--outfile=]" << endl;
3503 strstream << tab << x <<
" --plotphdispdos[=directory,[Emin,[Emax[,DOSSCALE]]]] [--keep=gpl] [--print=pdf|eps|gif|jpg|png] [--title=] [--unit=THz|Hz|eV|meV|rcm|cm-1] [--outfile=]" << endl;
3504 strstream << tab << x <<
" --plotthermo[=directory[,Tmin[,Tmax]]] [--keep=gpl] [--print=pdf|eps|gif|jpg|png] [--title=] [--outfile=]" << endl;
3505 strstream << tab << x <<
" --plotcond|--plothermalconductivity[=directory[,Tmin[,Tmax]]] [--keep=gpl] [--print=pdf|eps|gif|jpg|png] [--title=] [--outfile=]" << endl;
3506 strstream << tab << x <<
" --plotthermoqha[=directory[,Tmin[,Tmax]]] [--keep=gpl] [--print=pdf|eps|gif|jpg|png] [--title=] [--eosmodel=] [--outfile=]" << endl;
3507 strstream << tab << x <<
" --plotgrdisp|--plotgrueneisendispersion|--plotgruneisendispersion[=directory,[Emin,[Emax]]] [--keep=gpl] [--print=pdf|eps|gif|jpg|png] [--title=] [--outfile=]" << endl;
3508 strstream << tab << x <<
" --pomass[=directory]" << endl;
3509 strstream << tab << x <<
" --pomass_atom[=directory]" << endl;
3510 strstream << tab << x <<
" --pomass_cell[=directory]" << endl;
3511 strstream << tab << x <<
" --pocc_input" << endl;
3512 strstream << tab << x <<
" --pocc_dos[=directory[,T[,DOS_Emin[,DOS_Emax[,DOSSCALE]]]]]" << endl;
3513 strstream << tab << x <<
" --pocc_mag[=directory[,T[,DOS_Emin[,DOS_Emax[,DOSSCALE]]]]]" << endl;
3514 strstream << tab << x <<
" --pocc_bandgap[=directory[,T[,DOS_Emin[,DOS_Emax[,DOSSCALE]]]]]" << endl;
3515 strstream << tab << x <<
" --pocc_minimum_configuration[=directory]" << endl;
3516 strstream << tab << x <<
" --poscar < ABCCAR | WYCCAR" << endl;
3517 strstream << tab << x <<
" --poscar2aflowin < POSCAR" << endl;
3518 strstream << tab << x <<
" --poscar2wyckoff < POSCAR" << endl;
3519 strstream << tab << x <<
" --poscar2gulp < POSCAR" << endl;
3520 strstream << tab << x <<
" [options] --prepare_chgcar_4_jmol=|--prep4jmol=CHGCAR1[,CHGACAR2,...]" << endl;
3521 strstream << tab << xspaces <<
" " <<
"options are: --usage" << endl;
3522 strstream << tab << xspaces <<
" " <<
" --outcar=OUTCAR" << endl;
3523 strstream << tab << xspaces <<
" " <<
" --zip" << endl;
3524 strstream << tab << x <<
" --prim < POSCAR" << endl;
3525 strstream << tab << x <<
" --prim2 < POSCAR" << endl;
3526 strstream << tab << x <<
" --primr|--fastprimitivecell|--fprim < POSCAR" << endl;
3527 strstream << tab << x <<
" --prototype < POSCAR" << endl;
3528 strstream << tab << x
3529 <<
" --pseudopotentials_check=[POTCAR|OUTCAR]["
3530 "|.bz2|.gz|.xz] | --pp_check= | --ppk="
3532 strstream << tab << x <<
" --python_modules[=module1,module2] | --create_python_modules=[module1,module2] [-D directory]" << endl;
3533 strstream << tab << x <<
" --qe < POSCAR" << endl;
3534 strstream << tab << x <<
" --qmvasp [--static] [-D directory]" << endl;
3535 strstream << tab << x <<
" --quasi_chem_approx|--qca --plattice=|--plat=fcc --elements=|--elem=Au,Pt[,Zn] [qca_options] [--directory=[DIRECTORY]]" << endl;
3536 strstream << tab << xspaces <<
" " <<
"options are:" << endl;
3538 strstream << tab << xspaces <<
" " <<
"GENERAL OPTIONS:" << endl;
3539 strstream << tab << xspaces <<
" " <<
" --usage" << endl;
3540 strstream << tab << xspaces <<
" " <<
" --screen_only" << endl;
3541 strstream << tab << xspaces <<
" " <<
" --image_only|--image" << endl;
3542 strstream << tab << xspaces <<
" " <<
" --aflowlib_directory=|--aflowlib_dir=..." << endl;
3543 strstream << tab << xspaces <<
" " <<
" --print=|--p=|--output=|--o=txt" << endl;
3545 strstream << tab << xspaces <<
" " <<
"BINODAL OPTIONS:" << endl;
3546 strstream << tab << xspaces <<
" " <<
" --binodal" << endl;
3547 strstream << tab << xspaces <<
" " <<
" --use_sg" << endl;
3548 strstream << tab << xspaces <<
" " <<
" --aflow_max_num_atoms=4" << endl;
3549 strstream << tab << xspaces <<
" " <<
" --max_num_atoms=|--mna=8" << endl;
3550 strstream << tab << xspaces <<
" " <<
" --cv_cutoff=|--cv_cut=0.05" << endl;
3551 strstream << tab << xspaces <<
" " <<
" --conc_curve_range=|--conc_curve=0,1,1,0" << endl;
3552 strstream << tab << xspaces <<
" " <<
" --conc_npts=20" << endl;
3553 strstream << tab << xspaces <<
" " <<
" --temp_range=|--temp=300,5000" << endl;
3554 strstream << tab << xspaces <<
" " <<
" --temp_npts=150" << endl;
3555 strstream << tab << x <<
" --rasmol[=n1[,n2[,n3]]] < POSCAR" << endl;
3556 strstream << tab << x <<
" --revsg [#] [n] [l] [m]" << endl;
3557 strstream << tab << x <<
" --rm_atom iatom < POSCAR" << endl;
3558 strstream << tab << x <<
" --rm_copies < POSCAR" << endl;
3559 strstream << tab << x <<
" --rdf[=rmax[,nbins[,sigma[,window_gaussian]]]] [--raw_counts] < POSCAR" << endl;
3560 strstream << tab << x <<
" --scale=s < POSCAR" << endl;
3561 strstream << tab << x <<
" --sd A1 A2 ... < POSCAR" << endl;
3562 strstream << tab << x <<
" --setcm cm1 cm2 cm3 < POSCAR" << endl;
3563 strstream << tab << x <<
" --setorigin r1 r2 r3 | atom# < POSCAR" << endl;
3564 strstream << tab << x <<
" --sewald eta < POSCAR" << endl;
3565 strstream << tab << x <<
" --sgdata|--space_group_data[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR" << endl;
3566 strstream << tab << x <<
" --shell=ns,r1,r2,name,dens < POSCAR" << endl;
3567 strstream << tab << x <<
" --shift=Sx,Sy,Sz[,cCdD] < POSCAR" << endl;
3568 strstream << tab << x <<
" --sitepointgroup|--agroup < POSCAR" << endl;
3569 strstream << tab << x <<
" --slab=h,k,l[,#filled_layers[,#vacuum layers]] < POSCAR" << endl;
3570 strstream << tab << x <<
" --spacegroup radius < POSCAR" << endl;
3571 strstream << tab << x <<
" --species < POSCAR" << endl;
3572 strstream << tab << x <<
" --statdiel OUTCAR*" << endl;
3573 strstream << tab << x <<
" --std_conv|--standard_conventional|--sconv|--sc < POSCAR" << endl;
3574 strstream << tab << x <<
" --std_prim|--standard_primitive|--sprim|--sp < POSCAR" << endl;
3575 strstream << tab << x <<
" --suffix=[directory,]\"from2to\" where from/to=[n=none;r1=relax1;r2=relax2;r3=relax3;s=static;b=bands] or without abbreviations" << endl;
3576 strstream << tab << x <<
" --supercell=a11,a12,a13,a21,a22,a23,a31,a32,a33 < POSCAR" << endl;
3577 strstream << tab << x <<
" --supercell=a11,a22,a33 < POSCAR" << endl;
3578 strstream << tab << x <<
" --supercell=file < POSCAR" << endl;
3579 strstream << tab << x <<
" --supercell_strlist=a11,a12,a13,a21,a22,a23,a31,a32,a33,strlist" << endl;
3580 strstream << tab << x <<
" --supercell_strlist=a11,a22,a33,strlist" << endl;
3581 strstream << tab << x <<
" --supercell_strlist=file,strlist" << endl;
3582 strstream << tab << x <<
" --swap specie0 specie1 < POSCAR" << endl;
3583 strstream << tab << x <<
" --uffenergy|--ue < POSCAR" << endl;
3584 strstream << tab << x <<
" --unique_atom_decorations < POSCAR" << endl;
3585 strstream << tab << x <<
" --vasp < GEOM" << endl;
3586 strstream << tab << x <<
" --itc < GEOM" << endl;
3587 strstream << tab << x <<
" --volume=x|--volume*=x|--volume+=x < POSCAR" << endl;
3588 strstream << tab << x <<
" --wyccar [TOL] < POSCAR" << endl;
3589 strstream << tab << x <<
" --wyccman|--WyccarManual|--wm [TOL] [ITERATION] < POSCAR" << endl;
3590 strstream << tab << x <<
" --xray=lambda < POSCAR" << endl;
3591 strstream << tab << x <<
" --xray_peaks=lambda < POSCAR" << endl;
3592 strstream << tab << x <<
" --xrd_dist=h,k,l < POSCAR" << endl;
3593 strstream << tab << x <<
" --xyz[=n1[,n2[,n3]]] < POSCAR" << endl;
3594 strstream << tab << x <<
" --xyzwignerseitz [--xyzws] < POSCAR" << endl;
3595 strstream << tab << x <<
" --zval[=directory]" << endl;
3596 strstream << tab << x <<
" --zval_atom[=directory]" << endl;
3597 strstream << tab << x <<
" --zval_cell[=directory]" << endl;
3599 strstream << tab << x <<
" --pointgroup|--pgroup[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] [--screen_only] < POSCAR" << endl;
3600 strstream << tab << x
3601 <<
" --pointgroup_crystal|--pgroup_crystal|--pgroup_xtal|--pgroupx|--pgroupX[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] [--screen_only] "
3602 "[--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR"
3604 strstream << tab << x <<
" --pgl < POSCAR" << endl;
3605 strstream << tab << x <<
" --pgx < POSCAR" << endl;
3606 strstream << tab << x <<
" --factorgroup|--fgroup[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|=json] [--screen_only] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR" << endl;
3607 strstream << tab << x <<
" --sitepointgroup|--agroup < POSCAR" << endl;
3608 strstream << tab << x <<
" --spacegroup|--sgroup[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|=json] [--screen_only] [--radius] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR" << endl;
3609 strstream << tab << x <<
" --pointgroupklattice|--pgroupk[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] [--screen_only] < POSCAR" << endl;
3610 strstream << tab << x <<
" --pointgroupkcrystal|--pgroupk_xtal[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] [--screen_only] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR" << endl;
3611 strstream << tab << x <<
" --pointgroupk_Patterson|--pgroupk_Patterson[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] [--screen_only] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR"
3614 strstream <<
" Prototypes HTQC" << endl;
3615 strstream << tab << x <<
" --prototypes|--protos" << endl;
3616 strstream << tab << x <<
" [options] --proto=label*[:speciesA*[:speciesB*]..[:volumeA*[:volumeB*]..|:volume]] [--params=... [--hex]]" << endl;
3618 strstream <<
" Prototypes ICSD (from the local machine or aflowlib servers)" << endl;
3619 strstream << tab << x <<
" [--server=nnnnnnnnnn] --prototypes_icsd[=N]|--protos_icsd[=N]" << endl;
3620 strstream << tab << x <<
" [--server=nnnnnnnnnn] [--vasp|--itc|--qe|--abinit|--aims] --proto_icsd=label" << endl;
3622 strstream <<
" Order Parameter [EXPERIMENTA]" << endl;
3623 strstream << tab << x <<
" --order_parameter [--order_parameter_sum XXX] [--Li8Mn16O32] < POSCAR [EXPERIMENTA]" << endl;
3625 strstream <<
" Partial Occupation [EXPERIMENTA]" << endl;
3626 strstream << tab << x <<
" --partial_occupation|--partialoccupation|--pocc < POSCAR [EXPERIMENTA]" << endl;
3628 strstream <<
" AFLOW Operations" << endl;
3629 strstream << tab << x <<
" [options] --aflow_proto=label*:speciesA*[:speciesB*][:volumeA*[:volumeB*]|:volume]" << endl;
3630 strstream << tab << x <<
" [options] --aflow_proto_icsd=label* potential_type (ICSD capable)" << endl;
3631 strstream << tab << xspaces <<
" " <<
"options are: --potential=pot_LDA|pot_GGA|potpaw_LDA|potpaw_GGA|potpaw_PBE|potpaw_LDA_KIN|potpaw_PBE_KIN" << endl;
3632 strstream << tab << xspaces <<
" " <<
" --potential_complete" << endl;
3633 strstream << tab << xspaces <<
" " <<
" --module=[APL|QHA|AAPL]" << endl;
3634 strstream << tab << xspaces <<
" " <<
" --apl_supercell=NxNxN" << endl;
3635 strstream << tab << xspaces <<
" " <<
" --usage" << endl;
3636 strstream << tab << xspaces <<
" " <<
" --missing" << endl;
3637 strstream << tab << xspaces <<
" " <<
" --noautopp" << endl;
3638 strstream << tab << xspaces <<
" " <<
" --bader (default: DEFAULT_VASP_FORCE_OPTION_BADER)" << endl;
3639 strstream << tab << xspaces <<
" " <<
" --spin_remove_relax_1 (default: DEFAULT_VASP_FORCE_OPTION_SPIN_REMOVE_RELAX_1)" << endl;
3640 strstream << tab << xspaces <<
" " <<
" --spin_remove_relax_2 (default: DEFAULT_VASP_FORCE_OPTION_SPIN_REMOVE_RELAX_2)" << endl;
3641 strstream << tab << xspaces <<
" " <<
" --kscheme=[M|G] (default: DEFAULT_KSCHEME in .aflow.rc) --kscheme_static=[M|G] (default: DEFAULT_KSCHEME_STATIC in .aflow.rc)" << endl;
3642 strstream << tab << xspaces <<
" " <<
" --kppra=NNNN (default: DEFAULT_KPPRA in .aflow.rc) --kppra_static=NNNN (default: DEFAULT_KPPRA_STATIC in .aflow.rc) --bands_grid=NNNN (default: DEFAULT_BANDS_GRID in .aflow.rc )"
3644 strstream << tab << xspaces <<
" " <<
" --enmax_multiply=NNNN (default: VASP_PREC_ENMAX_XXXX in .aflow.rc)" << endl;
3645 strstream << tab << xspaces <<
" " <<
" --pressure=0,1,2 (kB) (default:0.0)" << endl;
3646 strstream << tab << xspaces <<
" " <<
" --potim=XXX (default 0.05) (VASP)" << endl;
3647 strstream << tab << xspaces <<
" " <<
" --relax_type=[ALL|IONS|CELL_SHAPE|CELL_VOLUME|IONS_CELL_VOLUME|IONS_CELL_SHAPE]" << endl;
3648 strstream << tab << xspaces <<
" " <<
" --relax_mode=[ENERGY|FORCES|ENERGY_FORCES|FORCES_ENERGY] (default: DEFAULT_VASP_FORCE_OPTION_RELAX_MODE_SCHEME in .aflow.rc) (VASP)" << endl;
3649 strstream << tab << xspaces <<
" " <<
" --relax_count=XX (default: DEFAULT_VASP_FORCE_OPTION_RELAX_COUNT in .aflow.rc) (VASP)" << endl;
3650 strstream << tab << xspaces <<
" " <<
" --run_relax_static" << endl;
3651 strstream << tab << xspaces <<
" " <<
" --run_relax_static_bands" << endl;
3652 strstream << tab << xspaces <<
" " <<
" --run_static" << endl;
3653 strstream << tab << xspaces <<
" " <<
" --run_static_bands" << endl;
3654 strstream << tab << xspaces <<
" " <<
" --precision=[(LOW|MEDIUM|NORMAL|HIGH|ACCURATE), PRESERVED] (default: DEFAULT_VASP_FORCE_OPTION_PREC_SCHEME in .aflow.rc) (VASP)" << endl;
3655 strstream << tab << xspaces <<
" " <<
" --algorithm=[(NORMAL|VERYFAST|FAST|ALL|DAMPED), PRESERVED] (default: DEFAULT_VASP_FORCE_OPTION_ALGO_SCHEME in .aflow.rc) (VASP)" << endl;
3656 strstream << tab << xspaces <<
" " <<
" --metagga=[TPSS|RTPSS|M06L|MBJL|SCAN|MS0|MS1|MS2|NONE] (default: DEFAULT_VASP_FORCE_OPTION_METAGGA_SCHEME in .aflow.rc) (VASP)" << endl;
3657 strstream << tab << xspaces <<
" " <<
" --ivdw=[number_for_VASP_see_manual_for_IVDW|0] (default: DEFAULT_VASP_FORCE_OPTION_IVDW_SCHEME in .aflow.rc) (VASP)" << endl;
3658 strstream << tab << xspaces <<
" " <<
" --type=[METAL|INSULATOR|SEMICONDUCTOR|DEFAULT] (default: DEFAULT_VASP_FORCE_OPTION_TYPE_SCHEME in .aflow.rc (VASP)" << endl;
3659 strstream << tab << xspaces <<
" " <<
" --convert_unit_cell=[SPRIM, SCONV, NIGGLI, MINK, INCELL, COMPACT, WS, CART, FRAC, PRES]" << endl;
3660 strstream << tab << xspaces <<
" " <<
" --volume_plus_equal=XXX" << endl;
3661 strstream << tab << xspaces <<
" " <<
" --volume_multiply_equal=XXX" << endl;
3662 strstream << tab << xspaces <<
" " <<
" --volume_preserved" << endl;
3663 strstream << tab << xspaces <<
" " <<
" --ediffg=XXX (default: DEFAULT_VASP_PREC_EDIFFG in .aflow.rc)" << endl;
3664 strstream << tab << xspaces <<
" " <<
" --ldau2" << endl;
3665 strstream << tab << xspaces <<
" " <<
" --noldau2" << endl;
3666 strstream << tab << xspaces <<
" " <<
" --neglect_nomix" << endl;
3667 strstream << tab << xspaces <<
" " <<
" --stdout" << endl;
3668 strstream << tab << xspaces <<
" " <<
" --qe" << endl;
3669 strstream << tab << xspaces <<
" " <<
" --abinit" << endl;
3670 strstream << tab << xspaces <<
" " <<
" --aims" << endl;
3671 strstream << tab << xspaces <<
" " <<
" --params=... { check aflow --readme=anrl }" << endl;
3672 strstream << tab << xspaces <<
" " <<
" --hex { check aflow --readme=anrl }" << endl;
3673 strstream << tab << xspaces <<
" " <<
" --list" << endl;
3674 strstream << tab << x <<
" --extract_kpoints|--xkpoints " <<
_AFLOWIN_ <<
"" << endl;
3675 strstream << tab << x <<
" --extract_incar|--xincar " <<
_AFLOWIN_ <<
"" << endl;
3676 strstream << tab << x <<
" --extract_poscar|--xposcar " <<
_AFLOWIN_ <<
"" << endl;
3677 strstream << tab << x <<
" --extract_potcar|--xpotcar " <<
_AFLOWIN_ <<
"" << endl;
3679 strstream <<
" CAGES SEARCH" << endl;
3680 strstream << tab << x <<
" --cages[=roughness] < POSCAR" << endl;
3682 strstream <<
" HKL and HKL searches for surfaces" << endl;
3683 strstream << tab << x <<
" --miller=h,k,l[,nlayer[,elayer]] < POSCAR" << endl;
3684 strstream << tab << x <<
" --hkl=h,k,l[,bond] < POSCAR" << endl;
3685 strstream << tab << x <<
" --hkl_search[=khlmax[,bond[,step]]] < POSCAR" << endl;
3686 strstream << tab << x <<
" --hkl_search_simple[=cutoff[,bond[,khlmax[,step]]]] < POSCAR " << endl;
3687 strstream << tab << x <<
" --hkl_search_complete[=cutoff[,bond[,khlmax[,step]]]] < POSCAR" << endl;
3689 strstream << tab << x <<
" --chgint CHGCAR" << endl;
3690 strstream << tab << x <<
" --clat=a,b,c,alpha,beta,gamma" << endl;
3691 strstream << tab << x <<
" --cmp_str POSCAR1 POSCAR2 rcut" << endl;
3692 strstream << tab << x <<
" --compare=a,b,c,d,e,f,g,h,k,j,i,l" << endl;
3693 strstream << tab << x <<
" --intpol=file1,file2,nimages,nearest_image_flag" << endl;
3694 strstream << tab << x <<
" --join_strlist strlist1 strlist2" << endl;
3695 strstream << tab << x <<
" --make_strlist OUTCAR XDATCAR" << endl;
3696 strstream << tab << x <<
" --pdos pdos.in PROOUT [AFLOW: NEED VERIFICATION]" << endl;
3697 strstream << tab << x <<
" --planedens dens2d.in CHGCAR" << endl;
3698 strstream << tab << x <<
" --pocc PROOUT [AFLOW: NEED VERIFICATION]" << endl;
3699 strstream << tab << x <<
" --raytrace rtfile" << endl;
3700 strstream << tab << x <<
" --rbanal nim nearest_image_flag" << endl;
3701 strstream << tab << x <<
" --rbdist POSCAR1 POSCAR2 n|N|e|E" << endl;
3702 strstream << tab << x <<
" --rdfcmp=rmax,nbins,sigma,nshmax,POSCAR1,POSCAR2" << endl;
3703 strstream << tab << x <<
" --spline npt < file" << endl;
3704 strstream << tab << x <<
" --sumpdos pdos.in PROOUT [AFLOW: NEED VERIFICATION]" << endl;
3706 strstream <<
" ICSD MODE" << endl;
3707 strstream << tab <<
"ICSD input can be ternary.icsd, binary.icsd or other collections" << endl;
3708 strstream << tab <<
"of databases like sub-databases generated with and/or as follow." << endl;
3709 strstream << tab << x <<
" --icsd symbol/Z symbol/Z symbol/Z < input.icsd" << endl;
3710 strstream << tab << x <<
" --icsd_alllessthan symbol/Z" << endl;
3711 strstream << tab << x <<
" --icsd_allmorethan symbol/Z" << endl;
3712 strstream << tab << x <<
" --icsd_basislessthan #basis < input.icsd" << endl;
3713 strstream << tab << x <<
" --icsd_basismorethan #basis < input.icsd" << endl;
3714 strstream << tab << x <<
" --icsd_chem MgB4 < input.icsd" << endl;
3715 strstream << tab << x <<
" --icsd_cubic < input.icsd" << endl;
3716 strstream << tab << x <<
" --icsd_triclinic < input.icsd" << endl;
3717 strstream << tab << x <<
" --icsd_monoclinic < input.icsd" << endl;
3718 strstream << tab << x <<
" --icsd_orthorhombic < input.icsd" << endl;
3719 strstream << tab << x <<
" --icsd_tetragonal < input.icsd" << endl;
3720 strstream << tab << x <<
" --icsd_rhombohedral < input.icsd" << endl;
3721 strstream << tab << x <<
" --icsd_trigonal < input.icsd" << endl;
3722 strstream << tab << x <<
" --icsd_hexagonal < input.icsd" << endl;
3723 strstream << tab << x <<
" --icsd_cubic --icsd_orthorhombic < input.icsd" << endl;
3724 strstream << tab << x <<
" --icsd_tri < input.icsd" << endl;
3725 strstream << tab << x <<
" --icsd_mcl < input.icsd" << endl;
3726 strstream << tab << x <<
" --icsd_mclc < input.icsd" << endl;
3727 strstream << tab << x <<
" --icsd_orc < input.icsd" << endl;
3728 strstream << tab << x <<
" --icsd_orcc < input.icsd" << endl;
3729 strstream << tab << x <<
" --icsd_orcf < input.icsd" << endl;
3730 strstream << tab << x <<
" --icsd_orci < input.icsd" << endl;
3731 strstream << tab << x <<
" --icsd_tet < input.icsd" << endl;
3732 strstream << tab << x <<
" --icsd_bct < input.icsd" << endl;
3733 strstream << tab << x <<
" --icsd_rhl < input.icsd" << endl;
3734 strstream << tab << x <<
" --icsd_hex < input.icsd" << endl;
3735 strstream << tab << x <<
" --icsd_cub < input.icsd" << endl;
3736 strstream << tab << x <<
" --icsd_fcc < input.icsd" << endl;
3737 strstream << tab << x <<
" --icsd_bcc < input.icsd" << endl;
3738 strstream << tab << x <<
" --icsd_denslessthan X.X < input.icsd" << endl;
3739 strstream << tab << x <<
" --icsd_densmorethan Y.Y < input.icsd" << endl;
3740 strstream << tab << x <<
" --icsd_denslessthan X.X --icsd_densmorethan Y.Y < input.icsd" << endl;
3741 strstream << tab << x <<
" --icsd_id #ICSD_ID < input.icsd" << endl;
3742 strstream << tab << x <<
" --icsd_makelabel < input" << endl;
3743 strstream << tab << x <<
" --icsd_lessthan symbol/Z < input.icsd" << endl;
3744 strstream << tab << x <<
" --icsd_morethan symbol/Z < input.icsd" << endl;
3745 strstream << tab << x <<
" --icsd_lessthan symbol/Z --icsd_morethan symbol/Z < input.icsd" << endl;
3746 strstream << tab << x <<
" --icsd_listmetals" << endl;
3747 strstream << tab << x <<
" --icsd_nobrokenbasis < input.icsd" << endl;
3748 strstream << tab << x <<
" --icsd_nopartialocc < input.icsd" << endl;
3749 strstream << tab << x <<
" --icsd_n_ary #species < input.icsd" << endl;
3750 strstream << tab << x <<
" --icsd_proto #Nspecies1 #Nspecies2 #Nspecies3 ... < input.icsd" << endl;
3751 strstream << tab << x <<
" --icsd_remove_all symbol/Z symbol/Z" << endl;
3752 strstream << tab << x <<
" --icsd_remove_or symbol/Z symbol/Z" << endl;
3753 strstream << tab << x <<
" --icsd_removemetals" << endl;
3754 strstream << tab << x <<
" --icsd_sg #SG < input.icsd" << endl;
3755 strstream << tab << x <<
" --icsd_sglessthan #SG < input.icsd" << endl;
3756 strstream << tab << x <<
" --icsd_sgmorethan #SG < input.icsd" << endl;
3757 strstream << tab << x <<
" --icsd_sgmorethan #SG --icsd_sglessthan #SG < input.icsd" << endl;
3758 strstream << tab << x <<
" --icsd_unique < input.icsd" << endl;
3759 strstream << tab << x <<
" --icsd2aflowin < input.icsd" << endl;
3760 strstream << tab << x <<
" --icsd2poscar < input.icsd" << endl;
3761 strstream << tab << x <<
" --icsd2proto < input.icsd" << endl;
3762 strstream << tab << x <<
" --icsd2wyck < input.icsd" << endl;
3763 strstream << tab << x <<
" --icsd2wyck --sof < input.icsd" << endl;
3764 strstream << tab << x <<
" --icsdproto2aflowin < input.proto" << endl;
3766 strstream <<
" FROZSL" << endl;
3767 strstream << tab <<
"scripting for using the FROZSL phonon framework" << endl;
3768 strstream << tab << x <<
" --frozsl_vaspsetup_aflow|--frozsl_vaspsetup < FROZSL.output" << endl;
3769 strstream << tab << x <<
" --frozsl_vaspsetup_aflow --file" << endl;
3770 strstream << tab << x <<
" --frozsl_vaspsetup_poscar < FROZSL.output" << endl;
3771 strstream << tab << x <<
" --frozsl_vaspsetup_poscar --file" << endl;
3772 strstream << tab << x <<
" --frozsl_analyze < aflow.frozsl.out" << endl;
3773 strstream << tab << x <<
" --frozsl_input" << endl;
3774 strstream << tab << x <<
" --frozsl_output" << endl;
3775 strstream << tab << x <<
" --readme=frozsl" << endl;
3777 strstream <<
" ICSD/LIBN MODE (only for duke.edu computers)" << endl;
3778 strstream << tab <<
"scripting for the ICSD/LIBN libraries" << endl;
3779 strstream << tab << x <<
" [--force] --lib2raw=FCC/La1Se1_ICSD_27104" << endl;
3780 strstream << tab << x <<
" [--force] --lib2raw=AgCdZr/T0001.A2BC" << endl;
3781 strstream << tab << x <<
" [--force] --lib2raw=all[,directory]" << endl;
3782 strstream << tab << x <<
" [--force] --lib2scrub=[all,lib0,lib1,...,lib9,icsd]" << endl;
3784 strstream << tab << x <<
" --xfixX system structure" << endl;
3786 strstream <<
" CALCULATED DATABASE" << endl;
3787 strstream << tab << x <<
" --calculated" << endl;
3788 strstream << tab << x <<
" --calculated=icsd --random" << endl;
3789 strstream << tab << x <<
" --calculated[[=]all|icsd|lib1|lib2|lib3]" << endl;
3791 strstream <<
" CLUSTER EXPANSION (very primitive, only fcc and bcc)" << endl;
3792 strstream << tab << x <<
" --cluster-expansion=...|--ce=structure_type,A,B,EA,EB" << endl;
3793 strstream << tab << x <<
" --superlattice=structure_type,n_min,n_max < POSCAR" << endl;
3794 strstream << tab << x <<
" --superlattice=VASP,structure_type,A,B < superlattice_name (CHECK) ???" << endl;
3795 strstream << tab << x <<
" --cluster=structure_type,n_min,n_max,m_min,m_max" << endl;
3796 strstream << tab << x <<
" --special-quasirandom-structure=..|--sqs=structure_type,atom_num,neighbor_num,sl_num_min,sl_num_max,A,B" << endl;
3797 strstream << tab << x <<
" --special-quasirandom-structure=..|--sqs=structure_type n1 n2 < POSCAR (CHECK)" << endl;
3799 strstream <<
" TERNARY CONVEX HULL (only for duke.edu computers)" << endl;
3800 strstream << tab << x <<
" --terdata=A:B:C [--fonts=XX|--keep=eps|--print=jpg|--print=gif|--print=png]" << endl;
3801 strstream << tab << x <<
" --terdata_exist list" << endl;
3803 strstream <<
"******* END POSTPROCESSING MODE ********************************************************************" << endl;
3806 return strstream.str();
3828 pflow::PrintACE(xstructure(input,
IOAFLOW_AUTO), cout);
3838 const bool LDEBUG = (
false ||
XHOST.DEBUG);
3839 if (vmag.size() != a.atoms.size()) {
3840 cerr <<
XPID <<
"pflow::AddSpinToXstructure (collinear): ERROR: Number of magnetic moments (" << vmag.size() <<
") does not match the number of atoms (" << a.atoms.size() <<
")." << endl;
3844 for (
size_t i = 0; i < a.atoms.size(); i++) {
3845 a.atoms[i].spin = vmag[i];
3846 a.atoms[i].spin_is_given =
true;
3848 cerr <<
XPID <<
"pflow::AddSpinToXstructure (collinear): atom " << i <<
" magnetic moment: " << a.atoms[i].spin << endl;
3862 const bool LDEBUG = (
false ||
XHOST.DEBUG);
3863 if (vmag_noncoll.size() != a.atoms.size()) {
3864 cerr <<
XPID <<
"pflow::AddSpinToXstructure (non-collinear): ERROR: Number of magnetic moments (" << vmag_noncoll.size() <<
") does not match the number of atoms (" << a.atoms.size() <<
")." << endl;
3868 for (
size_t i = 0; i < a.atoms.size(); i++) {
3869 a.atoms[i].noncoll_spin = vmag_noncoll[i];
3870 a.atoms[i].noncoll_spin_is_given =
true;
3872 cerr <<
XPID <<
"pflow::AddSpinToXstructure (non-collinear): atom " << i <<
" magnetic moment: " << a.atoms[i].noncoll_spin << endl;
3886 const bool LDEBUG = (
false ||
XHOST.DEBUG);
3887 stringstream message;
3891 if (magmom_info.empty()) {
3893 cerr <<
__AFLOW_FUNC__ <<
" Spin information is empty; no spin information added to structure." << endl;
3898 const uint num_atoms = a.atoms.size();
3899 bool is_noncoll =
false;
3900 vector<xvector<double>> vmag_noncoll;
3901 bool is_coll =
false;
3902 vector<double> vmag;
3908 cerr <<
__AFLOW_FUNC__ <<
" Non-collinear spin system detected." << endl;
3912 message <<
"(non-collinear): Number of magnetic moments (" << vmag_noncoll.size() <<
") does not match the number of atoms (" << a.atoms.size() <<
")." << endl;
3921 cerr <<
__AFLOW_FUNC__ <<
" Collinear spin system detected." << endl;
3925 message <<
"(collinear): Number of magnetic moments (" << vmag.size() <<
") does not match the number of atoms (" << a.atoms.size() <<
")." << endl;
3932 if (!is_noncoll && !is_coll) {
3933 message <<
"Could not detect collinear or non-collinear spin(s). Check spin input.";
3960 const stringstream oss;
3963 AVASP_DefaultValuesBinary_AFLOWIN(xvasp);
3965 xvasp.AVASP_flag_PRECISION_scheme =
"H";
3968 if (xvasp.str.atoms.empty()) {
3971 if (xvasp.str.atoms[0].name_is_given ==
false) {
3974 if (!module.empty()) {
3975 xvasp.aopts.push_attached(
"AFLOWIN_FLAG::MODULE", module);
3978 stringstream aflowin;
3979 AVASP_MakeSingleAFLOWIN(xvasp, aflowin,
false, -1);
3986 const bool LDEBUG = (
false ||
XHOST.DEBUG);
3992 bool osswrite =
true;
3996 string sym_specific_options;
4000 if (
XHOST.vflag_control.flag(
"PRINT_MODE::PYTHON")) {
4001 SYM::writePythonScript(oss);
4006 if (vpflow.
flag(
"AGROUP")) {
4008 aliases =
"--sitepointgroup|--agroup";
4009 sym_specific_options =
"[--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]]";
4011 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
4012 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
4013 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
true;
4014 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
true;
4015 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
4016 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON =
false;
4017 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
4018 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
true;
4019 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
true;
4020 kflags.KBIN_SYMMETRY_PGROUP_WRITE =
true;
4021 kflags.KBIN_SYMMETRY_PGROUPK_WRITE =
false;
4022 kflags.KBIN_SYMMETRY_FGROUP_WRITE =
true;
4023 kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE =
true;
4024 kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE =
false;
4025 kflags.KBIN_SYMMETRY_PGROUPK_PATTERSON_WRITE =
false;
4026 kflags.KBIN_SYMMETRY_SGROUP_WRITE =
false;
4027 kflags.KBIN_SYMMETRY_IATOMS_WRITE =
true;
4028 kflags.KBIN_SYMMETRY_AGROUP_WRITE =
true;
4031 else if (vpflow.
flag(
"FGROUP")) {
4033 aliases =
"--factorgroup|--fgroup";
4034 sym_specific_options =
"[--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]]";
4036 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
4037 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
4038 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
true;
4039 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
false;
4040 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
4041 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON =
false;
4042 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
4043 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
4044 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
4045 kflags.KBIN_SYMMETRY_PGROUP_WRITE =
true;
4046 kflags.KBIN_SYMMETRY_PGROUPK_WRITE =
false;
4047 kflags.KBIN_SYMMETRY_FGROUP_WRITE =
true;
4048 kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE =
false;
4049 kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE =
false;
4050 kflags.KBIN_SYMMETRY_PGROUPK_PATTERSON_WRITE =
false;
4051 kflags.KBIN_SYMMETRY_SGROUP_WRITE =
false;
4052 kflags.KBIN_SYMMETRY_IATOMS_WRITE =
false;
4053 kflags.KBIN_SYMMETRY_AGROUP_WRITE =
false;
4056 else if (vpflow.
flag(
"PGROUP")) {
4058 aliases =
"--pointgroup|--pgroup";
4060 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
4061 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
4062 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
false;
4063 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
false;
4064 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
4065 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON =
false;
4066 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
4067 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
4068 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
4069 kflags.KBIN_SYMMETRY_PGROUP_WRITE =
true;
4070 kflags.KBIN_SYMMETRY_PGROUPK_WRITE =
false;
4071 kflags.KBIN_SYMMETRY_FGROUP_WRITE =
false;
4072 kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE =
false;
4073 kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE =
false;
4074 kflags.KBIN_SYMMETRY_PGROUPK_PATTERSON_WRITE =
false;
4075 kflags.KBIN_SYMMETRY_SGROUP_WRITE =
false;
4076 kflags.KBIN_SYMMETRY_IATOMS_WRITE =
false;
4077 kflags.KBIN_SYMMETRY_AGROUP_WRITE =
false;
4080 else if (vpflow.
flag(
"PGROUPK")) {
4082 aliases =
"--pointgroupklattice|--pgroupk";
4084 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
4085 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
true;
4086 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
false;
4087 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
false;
4088 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
4089 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON =
false;
4090 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
4091 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
4092 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
4093 kflags.KBIN_SYMMETRY_PGROUP_WRITE =
true;
4094 kflags.KBIN_SYMMETRY_PGROUPK_WRITE =
true;
4095 kflags.KBIN_SYMMETRY_FGROUP_WRITE =
false;
4096 kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE =
false;
4097 kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE =
false;
4098 kflags.KBIN_SYMMETRY_PGROUPK_PATTERSON_WRITE =
false;
4099 kflags.KBIN_SYMMETRY_SGROUP_WRITE =
false;
4100 kflags.KBIN_SYMMETRY_IATOMS_WRITE =
false;
4101 kflags.KBIN_SYMMETRY_AGROUP_WRITE =
false;
4104 else if (vpflow.
flag(
"PGROUPX")) {
4106 aliases =
"--pointgroup_crystal|--pgroup_crystal|--pgroup_xtal|--pgroupx|--pgroupX";
4107 sym_specific_options =
"[--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]]";
4109 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
4110 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
4111 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
true;
4112 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
true;
4113 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
4114 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON =
false;
4115 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
4116 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
4117 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
4118 kflags.KBIN_SYMMETRY_PGROUP_WRITE =
true;
4119 kflags.KBIN_SYMMETRY_PGROUPK_WRITE =
false;
4120 kflags.KBIN_SYMMETRY_FGROUP_WRITE =
true;
4121 kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE =
true;
4122 kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE =
false;
4123 kflags.KBIN_SYMMETRY_PGROUPK_PATTERSON_WRITE =
false;
4124 kflags.KBIN_SYMMETRY_SGROUP_WRITE =
false;
4125 kflags.KBIN_SYMMETRY_IATOMS_WRITE =
false;
4126 kflags.KBIN_SYMMETRY_AGROUP_WRITE =
false;
4129 else if (vpflow.
flag(
"PGROUPK_XTAL")) {
4131 aliases =
"--pointgroupkcrystal|--pgroupk_xtal";
4132 sym_specific_options =
"[--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]]";
4134 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
4135 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
4136 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
true;
4137 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
true;
4138 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
true;
4139 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON =
false;
4140 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
4141 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
4142 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
4143 kflags.KBIN_SYMMETRY_PGROUP_WRITE =
true;
4144 kflags.KBIN_SYMMETRY_PGROUPK_WRITE =
false;
4145 kflags.KBIN_SYMMETRY_FGROUP_WRITE =
true;
4146 kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE =
true;
4147 kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE =
true;
4148 kflags.KBIN_SYMMETRY_PGROUPK_PATTERSON_WRITE =
false;
4149 kflags.KBIN_SYMMETRY_SGROUP_WRITE =
false;
4150 kflags.KBIN_SYMMETRY_IATOMS_WRITE =
false;
4151 kflags.KBIN_SYMMETRY_AGROUP_WRITE =
false;
4155 else if (vpflow.
flag(
"PGROUPK_PATTERSON")) {
4157 aliases =
"--pointgroupk_Patterson|--pgroupk_Patterson";
4158 sym_specific_options =
"[--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]]";
4160 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
4161 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
4162 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
true;
4163 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
true;
4164 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
true;
4165 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON =
true;
4166 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
4167 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
4168 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
4169 kflags.KBIN_SYMMETRY_PGROUP_WRITE =
true;
4170 kflags.KBIN_SYMMETRY_PGROUPK_WRITE =
false;
4171 kflags.KBIN_SYMMETRY_FGROUP_WRITE =
true;
4172 kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE =
true;
4173 kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE =
true;
4174 kflags.KBIN_SYMMETRY_PGROUPK_PATTERSON_WRITE =
true;
4175 kflags.KBIN_SYMMETRY_SGROUP_WRITE =
false;
4176 kflags.KBIN_SYMMETRY_IATOMS_WRITE =
false;
4177 kflags.KBIN_SYMMETRY_AGROUP_WRITE =
false;
4181 else if (vpflow.
flag(
"SGROUP")) {
4183 aliases =
"--spacegroup|--sgroup";
4184 sym_specific_options =
"[--radius] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]]";
4187 if (vpflow.
flag(
"SYMMETRY::SGROUP_RADIUS")) {
4190 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
4191 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
4192 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
true;
4193 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
false;
4194 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
4195 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON =
false;
4196 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
true;
4197 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
4198 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
4199 kflags.KBIN_SYMMETRY_PGROUP_WRITE =
true;
4200 kflags.KBIN_SYMMETRY_PGROUPK_WRITE =
false;
4201 kflags.KBIN_SYMMETRY_FGROUP_WRITE =
true;
4202 kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE =
false;
4203 kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE =
false;
4204 kflags.KBIN_SYMMETRY_PGROUPK_PATTERSON_WRITE =
false;
4205 kflags.KBIN_SYMMETRY_SGROUP_WRITE =
true;
4206 kflags.KBIN_SYMMETRY_IATOMS_WRITE =
false;
4207 kflags.KBIN_SYMMETRY_AGROUP_WRITE =
false;
4211 vector<string> tokens;
4213 if (tokens.size() == 1) {
4214 if (tokens[0] ==
"usage" || tokens[0] ==
"USAGE") {
4216 aurostd::liststring2string(
"aflow " + aliases +
"[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] [--screen_only] " + sym_specific_options +
4217 " < POSCAR default: tolerance=(minimum_interatomic_distance)/100.0, print=txt"));
4224 if (
XHOST.vflag_control.flag(
"DIRECTORY")) {
4225 directory =
XHOST.vflag_control.getattachedscheme(
"DIRECTORY");
4227 aflags.Directory = directory;
4228 const string print_directory =
" [dir=" + a.directory +
"]";
4230 oss <<
"ERROR: Unable to locate " << directory <<
"." << endl;
4231 oss <<
"Exiting." << endl;
4245 double tolerance = pflow::getSymmetryTolerance(a, vpflow.
getattachedscheme(
"SYMMETRY::TOLERANCE"));
4247 string format =
"txt";
4248 if (
XHOST.vflag_control.flag(
"PRINT_MODE::TXT")) {
4250 }
else if (
XHOST.vflag_control.flag(
"PRINT_MODE::JSON")) {
4256 if (vpflow.
flag(
"SYMMETRY::SCREEN_ONLY")) {
4258 kflags.KBIN_SYMMETRY_PGROUP_WRITE =
false;
4259 kflags.KBIN_SYMMETRY_PGROUPK_WRITE =
false;
4260 kflags.KBIN_SYMMETRY_FGROUP_WRITE =
false;
4261 kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE =
false;
4262 kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE =
false;
4263 kflags.KBIN_SYMMETRY_SGROUP_WRITE =
false;
4264 kflags.KBIN_SYMMETRY_IATOMS_WRITE =
false;
4265 kflags.KBIN_SYMMETRY_AGROUP_WRITE =
false;
4269 const bool force_perform =
true;
4270 if (vpflow.
flag(
"SYMMETRY::NO_SCAN")) {
4271 a.sym_eps_no_scan =
true;
4274 bool tocompress =
true;
4275 ofstream FileMESSAGE(
"/dev/null");
4280 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
4289 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
4318 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
4327 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
4357 if (!
pflow::PerformFullSymmetry(a, tolerance, a.sym_eps_no_scan, force_perform, FileMESSAGE, aflags, kflags, osswrite, oss, format)) {
4361 if (print ==
true) {
4362 if (
XHOST.vflag_control.flag(
"WWW")) {
4363 KBIN_SymmetryToScreenWeb(a, oss, mode);
4365 KBIN_SymmetryToScreen(a, format, oss, mode);
4371 if (format ==
"txt") {
4399 }
else if (format ==
"json") {
4438 void AGROUP(_aflags& aflags, istream& input) {
4440 aflags.QUIET =
true;
4442 const bool WRITE =
true;
4443 ofstream File(
"/dev/null");
4451 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
4452 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
4453 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
true;
4454 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
true;
4455 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
4456 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON =
false;
4457 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
4458 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
true;
4459 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
true;
4470 const int Nbasis = a.atoms.size();
4471 const vector<vector<uint>> Bsitesym(Nbasis);
4472 const bool ComMidss =
false;
4473 SYM::CalculateSitePointGroup2(a, ComMidss);
4483 const int Nbasis = a.atoms.size();
4484 const vector<vector<uint>> Bsitesym(Nbasis);
4485 const bool ComMidss =
true;
4486 SYM::CalculateSitePointGroup2(a, ComMidss);
4497 a.SpeciesPutAlphabetic();
4507 const bool LDEBUG = (
false ||
XHOST.DEBUG);
4511 vector<string> tokens;
4513 if (tokens.empty()) {
4517 stringstream output;
4518 for (
size_t i = 0; i < tokens.size(); i++) {
4519 string system = string(tokens[i]);
4520 vector<string> vsystem;
4521 vector<double> vnumber;
4522 XATOM_AlphabetizationCompound(system, vsystem, vnumber);
4523 output << system << endl;
4528 return output.str();
4537 const bool LDEBUG = (
false ||
XHOST.DEBUG);
4541 vector<string> tokens;
4543 if (tokens.empty()) {
4547 stringstream output;
4548 for (
size_t i = 0; i < tokens.size(); i++) {
4549 string system = string(tokens[i]);
4550 vector<string> vsystem;
4551 vector<double> vnumber;
4552 XATOM_AlphabetizationSpecies(system, vsystem, vnumber);
4553 output << system << endl;
4558 return output.str();
4566 void ANGLES(
const string& options, istream& input) {
4567 const bool LDEBUG = (
false ||
XHOST.DEBUG);
4571 vector<string> tokens;
4573 if (tokens.size() != 1) {
4577 double cutoff = 0.0;
4578 if (!tokens.empty()) {
4584 pflow::PrintAngles(a, cutoff, cout);
4595 string ATOMSMAX(
const string& options, istream& input) {
4596 const bool LDEBUG = (
false ||
XHOST.DEBUG);
4600 vector<string> tokens;
4602 if (tokens.size() != 1) {
4607 if (!tokens.empty()) {
4613 if (a.atoms.size() > N) {
4614 oss <<
"MAX ATOMS SIZE = " << N << endl;
4615 oss <<
"your structure has " << a.atoms.size() <<
" atoms" << endl;
4630 void BANDS(
const string& options, istream& input) {
4631 const bool LDEBUG = (
false ||
XHOST.DEBUG);
4635 vector<string> tokens;
4637 if (tokens.size() != 1) {
4642 if (!tokens.empty()) {
4643 filename = (tokens[0]);
4648 pflow::projdata prd;
4649 prd.PROOUTinfile = filename;
4650 pflow::ReadInProj(prd);
4652 pflow::PrintBands(prd);
4664 const bool LDEBUG = (
false ||
XHOST.DEBUG);
4669 if (input.empty()) {
4672 vector<string> dirs;
4674 for (
size_t i = 0; i < dirs.size(); i++) {
4684 const bool LDEBUG = (
false ||
XHOST.DEBUG);
4686 if (input.empty()) {
4689 vector<string> dirs;
4691 for (
size_t i = 0; i < dirs.size(); i++) {
4708 aflags.QUIET =
true;
4709 string directory_LIB;
4710 string directory_RAW;
4711 directory_LIB = aflags.Directory;
4712 directory_RAW = directory_LIB +
"./BANDS";
4715 vector<string> vspecies;
4716 vector<string> vfiles;
4717 aflowlib::_aflowlib_entry data;
4718 aflowlib::GetSpeciesDirectory(directory_LIB, vspecies);
4719 for (
size_t i = 0; i < vspecies.size(); i++) {
4720 data.species += vspecies[i];
4721 if (i < vspecies.size() - 1) {
4722 data.species +=
",";
4725 aflowlib::LIB2RAW_Loop_Bands(directory_LIB, directory_RAW, vfiles, data,
"pflow::BANDSTRUCTURE");
4734 const bool LDEBUG = (
false ||
XHOST.DEBUG);
4738 vector<string> tokens;
4740 if (tokens.size() != 1) {
4743 if (tokens.at(0) !=
"TRI1a" && tokens.at(0) !=
"TRI1b" && tokens.at(0) !=
"TRI2a" && tokens.at(0) !=
"TRI2b" && tokens.at(0) !=
"MCL" && tokens.at(0) !=
"MCLC1" && tokens.at(0) !=
"MCLC2" &&
4744 tokens.at(0) !=
"MCLC3" && tokens.at(0) !=
"MCLC4" && tokens.at(0) !=
"MCLC5" && tokens.at(0) !=
"ORC" && tokens.at(0) !=
"ORCC" && tokens.at(0) !=
"ORCF1" && tokens.at(0) !=
"ORCF2" &&
4745 tokens.at(0) !=
"ORCF3" && tokens.at(0) !=
"ORCI" && tokens.at(0) !=
"TET" && tokens.at(0) !=
"BCT1" && tokens.at(0) !=
"BCT2" && tokens.at(0) !=
"RHL1" && tokens.at(0) !=
"RHL2" &&
4746 tokens.at(0) !=
"HEX" && tokens.at(0) !=
"CUB" && tokens.at(0) !=
"FCC" && tokens.at(0) !=
"BCC") {
4747 cout <<
"LATTICES = (the ones with \"\") " << endl;
4748 cout <<
"1. TRI order: kalpha,kbeta,kgamma > 90 (kgamma<kalpha, kgamma<kbeta) " << endl;
4749 cout <<
" or kalpha,kbeta,kgamma < 90 (kgamma>kalpha, kgamma>kbeta) " << endl;
4750 cout <<
" special case when kgamma=90 " << endl;
4751 cout <<
" \"TRI1a\" kalpha>90 kbeta>90 kgamma>90 " << endl;
4752 cout <<
" \"TRI1b\" kalpha<90 kbeta<90 kgamma<90 " << endl;
4753 cout <<
" \"TRI2a\" kalpha>90 kbeta>90 kgamma=90 " << endl;
4754 cout <<
" \"TRI2b\" kalpha<90 kbeta<90 kgamma=90 " << endl;
4755 cout <<
"2. \"MCL\" unique (order b<=c) " << endl;
4756 cout <<
"3. MCLC (order alpha<90) " << endl;
4757 cout <<
" \"MCLC1\" kgamma>90 " << endl;
4758 cout <<
" \"MCLC2\" kgamma=90 " << endl;
4759 cout <<
" \"MCLC3\" kgamma<90, b*cos(alpha)/c + (b*sin(alpha)/a)^2 < 1 " << endl;
4760 cout <<
" \"MCLC4\" kgamma<90, b*cos(alpha)/c + (b*sin(alpha)/a)^2 = 1 " << endl;
4761 cout <<
" \"MCLC5\" kgamma<90, b*cos(alpha)/c + (b*sin(alpha)/a)^2 > 1 " << endl;
4762 cout <<
"4. \"ORC\" unique (order a<b<c) " << endl;
4763 cout <<
"5. \"ORCC\" unique (order a<b) " << endl;
4764 cout <<
"6. ORCF (order a<b<c) " << endl;
4765 cout << R
"( "ORCF1" "ORCF_invb2+invc2<inva2" for 1/a^2 > 1/b^2 + 1/c^2 )" << endl;
4766 cout << R"( "ORCF2" "ORCF_inva2<invb2+invc2" for 1/a^2 < 1/b^2 + 1/c^2 )" << endl;
4767 cout << " \"ORCF3\" for 1/a^2 = 1/b^2 + 1/c^2 " << endl;
4768 cout <<
"7. \"ORCI\" unique (order a<b<c) " << endl;
4769 cout <<
"8. \"TET\" unique (order a a c) " << endl;
4770 cout <<
"9. BCT (order a a c) " << endl;
4771 cout << R
"( "BCT1" "BCT_c<a" for c<a )" << endl;
4772 cout << R"( "BCT2" "BCT_c>a" for c>a )" << endl;
4773 cout << "10. \"RHL1\" alpha<90 " << endl;
4774 cout <<
" \"RHL2\" alpha>90 " << endl;
4775 cout <<
"11. \"HEX\" unique (order 60 90 90) " << endl;
4776 cout <<
"12. \"CUB\" unique " << endl;
4777 cout <<
"13. \"FCC\" unique (order 60 60 60) " << endl;
4778 cout <<
"14. \"BCC\" unique " << endl;
4783 const double grid = 20.0;
4786 rlattice[1][1] = 1.0;
4787 rlattice[2][2] = 1.0;
4788 rlattice[3][3] = 1.0;
4792 return LATTICE::KPOINTS_Directions(tokens.at(0), rlattice, grid,
IOVASP_AUTO, foundBZ);
4803 const double grid = 20.0;
4806 a.GetLatticeType(str_sp, str_sc);
4809 if (!vpflow.
flag(
"BZDIRECTION::TRANSFORM2ORIGINAL")) {
4811 }
else if (a.volume_changed_original2new ==
true) {
4814 cerr <<
"LATTICE INFORMATION" << endl;
4815 cerr <<
" Real space lattice primitive = " << a.bravais_lattice_type << endl;
4816 cerr <<
" Real space lattice variation = " << a.bravais_lattice_variation_type << endl;
4818 cerr <<
" Real space Pearson symbol = " << a.pearson_symbol << endl;
4819 cerr <<
" Reciprocal lattice primitive = " << a.reciprocal_lattice_type << endl;
4820 cerr <<
" Reciprocal lattice variation = " << a.reciprocal_lattice_variation_type << endl;
4821 if (vpflow.
flag(
"BZDIRECTION::TRANSFORM2ORIGINAL") && vpflow.
flag(
"BZDIRECTION::PRINT_TRANSFORMATION_MATRIX")) {
4822 cerr <<
"TRANSFORMATION MATRIX (P)" << endl;
4823 cerr << roundoff(
aurostd::inverse(a.transform_coordinates_original2new), 1e-8) << endl;
4824 cerr <<
"TRANSFORMATION MATRIX (Q=P^-1)" << endl;
4825 cerr << roundoff(a.transform_coordinates_original2new, 1e-8) << endl;
4828 cerr <<
"KPOINTS FILE" << endl;
4830 return LATTICE::KPOINTS_Directions(a.bravais_lattice_variation_type, str_sp.lattice, a.transform_coordinates_original2new, grid, a.iomode, foundBZ);
4838 void CAGES(_aflags& aflags,
const string& options, istream& input) {
4839 const bool LDEBUG = (
false ||
XHOST.DEBUG);
4843 vector<string> tokens;
4845 if (!tokens.empty() && tokens.size() != 1) {
4848 double roughness = -1.0;
4849 if (!tokens.empty()) {
4853 vector<acage> cagesirreducible;
4854 vector<acage> cagesreducible;
4855 vector<acage> cages4;
4856 vector<acage> cages3;
4857 vector<acage> cages2;
4859 const bool ofwrite = !
XHOST.vflag_control.flag(
"WWW");
4860 GetCages(a, aflags, cagesirreducible, cagesreducible, cages4, cages3, cages2, roughness, ofwrite,
true, cout);
4889 vector<string> vfile{
"AECCAR0",
"AECCAR1",
"AECCAR2",
"INCAR",
"POSCAR",
"POTCAR",
"KPOINTS",
"CONTCAR",
"OUTCAR",
"EIGENVAL",
"DOSCAR",
"IBZKPT",
4890 "OSZICAR",
"PCDAT",
"XDATCAR",
"CHG",
"CHGCAR",
"PROCAR",
"ELFCAR",
"WAVECAR",
"LOCPOT",
"vasprun.xml",
DEFAULT_VASP_OUT};
4891 vector<string> tokens;
4895 if (tokens.empty()) {
4897 operation = _operation;
4899 if (tokens.size() == 1) {
4901 operation = tokens.at(0);
4903 if (tokens.size() == 2) {
4904 directory = tokens.at(0) +
"/";
4905 operation = tokens.at(1);
4907 if (!operation.empty()) {
4908 for (
size_t i = 0; i < vfile.size(); i++) {
4912 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
4969 if (!from.empty() || !to.empty()) {
4971 cout <<
XPID <<
"pflow::ChangeSuffix: mv " << f << from <<
" " << f << to << endl;
4992 const int test_xv_size = 5;
4993 const int _max_int = 100;
4994 const int _tol_int = 0;
4995 const float _tol_float = 1.0e-6;
4996 const double _tol_double = 1.0e-6;
5006 srand(time(
nullptr));
5009 for (
int i = 1; i < test_xv_size + 1; i++) {
5010 test_int_xv_a[i] = rand() % _max_int;
5011 test_int_xv_b[i] = rand() % _max_int;
5012 test_float_xv_a[i] =
PI * float((rand() % _max_int));
5013 test_float_xv_b[i] =
PI * float((rand() % _max_int));
5014 test_double_xv_a[i] =
EULERSNUMBER * float((rand() % _max_int));
5015 test_double_xv_b[i] =
EULERSNUMBER * float((rand() % _max_int));
5018 const int line_width = 60;
5019 for (
int i = 0; i < line_width; i++) {
5023 cout <<
"Shidong Wang - 2011 " << endl;
5024 for (
int i = 0; i < line_width; i++) {
5028 cout <<
"xvector\n";
5034 if (identical(test_int_xv_a, test_int_xv_a, _tol_int) && (!identical(test_int_xv_a, test_int_xv_b, _tol_int))) {
5035 cout <<
">>> Testing Integer INDENTICAL with given tolerance: PASS\n";
5037 cout <<
">>> Testing Integer INDENTICAL with given tolerance: ***FAIL***!\n"
5039 << test_int_xv_a << endl
5041 << test_int_xv_a << endl
5042 <<
" are identical? " << std::boolalpha << identical(test_int_xv_a, test_int_xv_a, _tol_int) << endl;
5043 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_int_xv_a, test_int_xv_b, _tol_int)) << endl;
5046 if (identical(test_float_xv_a, test_float_xv_a, _tol_float) && (!identical(test_float_xv_a, test_float_xv_b, _tol_float))) {
5047 cout <<
">>> Testing Float INDENTICAL with given tolerance: PASS\n";
5049 cout <<
">>> Testing Float INDENTICAL with given tolerance: ***FAIL***!\n"
5051 << test_float_xv_a << endl
5053 << test_float_xv_a << endl
5054 <<
" are identical? " << std::boolalpha << identical(test_float_xv_a, test_float_xv_a, _tol_float) << endl;
5055 cout <<
"2) \n" << test_float_xv_a << endl <<
" and \n" << test_float_xv_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_float_xv_a, test_float_xv_b, _tol_float)) << endl;
5058 if (identical(test_double_xv_a, test_double_xv_a, _tol_double) && (!identical(test_double_xv_a, test_double_xv_b, _tol_double))) {
5059 cout <<
">>> Testing Double INDENTICAL with default tolerance: PASS\n";
5061 cout <<
">>> Testing Double INDENTICAL with default tolerance: ***FAIL***!\n"
5063 << test_double_xv_a << endl
5065 << test_double_xv_a << endl
5066 <<
" are identical? " << std::boolalpha << identical(test_double_xv_a, test_double_xv_a, _tol_double) << endl;
5067 cout <<
"2) \n" << test_double_xv_a << endl <<
" and \n" << test_double_xv_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_double_xv_a, test_double_xv_b, _tol_double)) << endl;
5072 if (identical(test_int_xv_a, test_int_xv_a) && (!identical(test_int_xv_a, test_int_xv_b))) {
5073 cout <<
">>> Testing Integer INDENTICAL with default tolerance: PASS\n";
5075 cout <<
">>> Testing Integer INDENTICAL with default tolerance: ***FAIL***!\n"
5077 << test_int_xv_a << endl
5079 << test_int_xv_a << endl
5080 <<
" are identical? " << std::boolalpha << identical(test_int_xv_a, test_int_xv_a) << endl;
5081 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_int_xv_a, test_int_xv_b)) << endl;
5084 if (identical(test_float_xv_a, test_float_xv_a) && (!identical(test_float_xv_a, test_float_xv_b))) {
5085 cout <<
">>> Testing Float INDENTICAL with default tolerance: PASS\n";
5087 cout <<
">>> Testing Float INDENTICAL with default tolerance: ***FAIL***!\n"
5089 << test_float_xv_a << endl
5091 << test_float_xv_a << endl
5092 <<
" are identical? " << std::boolalpha << identical(test_float_xv_a, test_float_xv_a) << endl;
5093 cout <<
"2) \n" << test_float_xv_a << endl <<
" and \n" << test_float_xv_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_float_xv_a, test_float_xv_b)) << endl;
5096 if (identical(test_double_xv_a, test_double_xv_a) && (!identical(test_double_xv_a, test_double_xv_b))) {
5097 cout <<
">>> Testing Double INDENTICAL with default tolerance: PASS\n";
5099 cout <<
">>> Testing Double INDENTICAL with default tolerance: ***FAIL***!\n"
5101 << test_double_xv_a << endl
5103 << test_double_xv_a << endl
5104 <<
" are identical? " << std::boolalpha << identical(test_double_xv_a, test_double_xv_a) << endl;
5105 cout <<
"2) \n" << test_double_xv_a << endl <<
" and \n" << test_double_xv_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_double_xv_a, test_double_xv_b)) << endl;
5110 if ((test_int_xv_a == test_int_xv_a) && !(test_int_xv_a == test_int_xv_b)) {
5111 cout <<
">>> Testing Integer == with default tolerance: PASS\n";
5113 cout <<
">>> Testing Integer == with default tolerance: ***FAIL***!\n"
5115 << test_int_xv_a << endl
5117 << test_int_xv_a << endl
5118 <<
" are identical? " << std::boolalpha << identical(test_int_xv_a, test_int_xv_a) << endl;
5119 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_int_xv_a, test_int_xv_b)) << endl;
5122 if ((test_float_xv_a == test_float_xv_a) && (!(test_float_xv_a == test_float_xv_b))) {
5123 cout <<
">>> Testing Float == with default tolerance: PASS\n";
5125 cout <<
">>> Testing Float == with default tolerance: ***FAIL***!\n"
5127 << test_float_xv_a << endl
5129 << test_float_xv_a << endl
5130 <<
" are identical? " << std::boolalpha << (test_float_xv_a == test_float_xv_a) << endl;
5131 cout <<
"2) \n" << test_float_xv_a << endl <<
" and \n" << test_float_xv_b << endl <<
" are not identical? " << std::boolalpha << (!(test_float_xv_a == test_float_xv_b)) << endl;
5134 if (identical(test_double_xv_a, test_double_xv_a) && (!identical(test_double_xv_a, test_double_xv_b))) {
5135 cout <<
">>> Testing Double == with default tolerance: PASS\n";
5137 cout <<
">>> Testing Double == with default tolerance: ***FAIL***!\n"
5139 << test_double_xv_a << endl
5141 << test_double_xv_a << endl
5142 <<
" are identical? " << std::boolalpha << (test_double_xv_a == test_double_xv_a) << endl;
5143 cout <<
"2) \n" << test_double_xv_a << endl <<
" and \n" << test_double_xv_b << endl <<
" are not identical? " << std::boolalpha << (!(test_double_xv_a == test_double_xv_b)) << endl;
5148 if (!isdifferent(test_int_xv_a, test_int_xv_a, _tol_int) && isdifferent(test_int_xv_a, test_int_xv_b, _tol_int)) {
5149 cout <<
">>> Testing Integer ISDIFFERENT with given tolerance: PASS\n";
5151 cout <<
">>> Testing Integer ISDIFFERENT with default tolerance: ***FAIL***!\n"
5153 << test_float_xv_a << endl
5155 << test_float_xv_a << endl
5156 <<
" are different? " << std::boolalpha << isdifferent(test_int_xv_a, test_int_xv_a, _tol_int) << endl;
5157 cout <<
"2) \n" << test_float_xv_a << endl <<
" and \n" << test_float_xv_b << endl <<
" are not different? " << std::boolalpha << (!isdifferent(test_int_xv_a, test_int_xv_b, _tol_int)) << endl;
5160 if (!isdifferent(test_float_xv_a, test_float_xv_a, _tol_float) && (isdifferent(test_float_xv_a, test_float_xv_b, _tol_float))) {
5161 cout <<
">>> Testing Float ISDIFFERENT with given tolerance: PASS\n";
5163 cout <<
">>> Testing Float ISDIFFERENT with given tolerance: ***FAIL***!\n"
5165 << test_float_xv_a << endl
5167 << test_float_xv_a << endl
5168 <<
" are different? " << std::boolalpha << isdifferent(test_float_xv_a, test_float_xv_a, _tol_float) << endl;
5169 cout <<
"2) \n" << test_float_xv_a << endl <<
" and \n" << test_float_xv_b << endl <<
" are not different? " << std::boolalpha << (isdifferent(test_float_xv_a, test_float_xv_b, _tol_float)) << endl;
5172 if (!isdifferent(test_double_xv_a, test_double_xv_a, _tol_double) && (isdifferent(test_double_xv_a, test_double_xv_b, _tol_double))) {
5173 cout <<
">>> Testing Double ISDIFFERENT with given tolerance: PASS\n";
5175 cout <<
">>> Testing Double ISDIFFERENT with given tolerance: ***FAIL***!\n"
5177 << test_double_xv_a << endl
5179 << test_double_xv_a << endl
5180 <<
" are different? " << std::boolalpha << isdifferent(test_double_xv_a, test_double_xv_a, _tol_double) << endl;
5181 cout <<
"2) \n" << test_double_xv_a << endl <<
" and \n" << test_double_xv_b << endl <<
" are not different? " << std::boolalpha << (!isdifferent(test_double_xv_a, test_double_xv_b, _tol_double)) << endl;
5186 if (!isdifferent(test_int_xv_a, test_int_xv_a) && isdifferent(test_int_xv_a, test_int_xv_b)) {
5187 cout <<
">>> Testing Integer ISDIFFERENT xvector with default tolerance: PASS\n";
5189 cout <<
">>> Testing Integer ISDIFFERENT xvector with default tolerance: ***FAIL***!\n"
5191 << test_int_xv_a << endl
5193 << test_int_xv_a << endl
5194 <<
" are different? " << std::boolalpha << isdifferent(test_int_xv_a, test_int_xv_a) << endl;
5195 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not different? " << std::boolalpha << (!isdifferent(test_int_xv_a, test_int_xv_b)) << endl;
5198 if (!isdifferent(test_float_xv_a, test_float_xv_a) && (isdifferent(test_float_xv_a, test_float_xv_b))) {
5199 cout <<
">>> Testing Float ISDIFFERENT with default tolerance: PASS\n";
5201 cout <<
">>> Testing Float ISDIFFERENT with default tolerance: ***FAIL***!\n"
5203 << test_float_xv_a << endl
5205 << test_float_xv_a << endl
5206 <<
" are different? " << std::boolalpha << isdifferent(test_float_xv_a, test_float_xv_a) << endl;
5207 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not different? " << std::boolalpha << (isdifferent(test_float_xv_a, test_float_xv_b)) << endl;
5210 if (!isdifferent(test_double_xv_a, test_double_xv_a) && (isdifferent(test_double_xv_a, test_double_xv_b))) {
5211 cout <<
">>> Testing Double ISDIFFERENT with default tolerance: PASS\n";
5213 cout <<
">>> Testing Double ISDIFFERENT with default tolerance: ***FAIL***!\n"
5215 << test_double_xv_a << endl
5217 << test_double_xv_a << endl
5218 <<
" are different? " << std::boolalpha << isdifferent(test_double_xv_a, test_double_xv_a) << endl;
5219 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not different? " << std::boolalpha << (!isdifferent(test_double_xv_a, test_double_xv_b)) << endl;
5225 cout <<
">>> Testing Integer ISEQUAL with given tolerance: PASS\n";
5227 cout <<
">>> Testing Integer ISEQUAL with given tolerance: ***FAIL***!\n"
5229 << test_int_xv_a << endl
5231 << test_int_xv_a << endl
5232 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_int_xv_a, test_int_xv_a, _tol_int) << endl;
5233 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_int_xv_a, test_int_xv_b, _tol_int)) << endl;
5237 cout <<
">>> Testing Float ISEQUAL with given tolerance: PASS\n";
5239 cout <<
">>> Testing Float ISEQUAL with given tolerance: ***FAIL***!\n"
5241 << test_float_xv_a << endl
5243 << test_float_xv_a << endl
5244 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_float_xv_a, test_float_xv_a, _tol_float) << endl;
5245 cout <<
"2) \n" << test_float_xv_a << endl <<
" and \n" << test_float_xv_b << endl <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_float_xv_a, test_float_xv_b, _tol_float)) << endl;
5249 cout <<
">>> Testing Double ISEQUAL with default tolerance: PASS\n";
5251 cout <<
">>> Testing Double ISEQUAL with default tolerance: ***FAIL***!\n"
5253 << test_double_xv_a << endl
5255 << test_double_xv_a << endl
5256 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_double_xv_a, test_double_xv_a, _tol_double) << endl;
5258 << test_double_xv_a << endl
5260 << test_double_xv_b << endl
5261 <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_double_xv_a, test_double_xv_b, _tol_double)) << endl;
5267 cout <<
">>> Testing Integer ISEQUAL with default tolerance: PASS\n";
5269 cout <<
">>> Testing Integer ISEQUAL with default tolerance: ***FAIL***!\n"
5271 << test_int_xv_a << endl
5273 << test_int_xv_a << endl
5274 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_int_xv_a, test_int_xv_a) << endl;
5275 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_int_xv_a, test_int_xv_b)) << endl;
5279 cout <<
">>> Testing Float ISEQUAL with default tolerance: PASS\n";
5281 cout <<
">>> Testing Float ISEQUAL with default tolerance: ***FAIL***!\n"
5283 << test_float_xv_a << endl
5285 << test_float_xv_a << endl
5286 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_float_xv_a, test_float_xv_a) << endl;
5287 cout <<
"2) \n" << test_float_xv_a << endl <<
" and \n" << test_float_xv_b << endl <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_float_xv_a, test_float_xv_b)) << endl;
5291 cout <<
">>> Testing Double ISEQUAL with default tolerance: PASS\n";
5293 cout <<
">>> Testing Double ISEQUAL with default tolerance: ***FAIL***!\n"
5295 << test_double_xv_a << endl
5297 << test_double_xv_a << endl
5298 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_double_xv_a, test_double_xv_a) << endl;
5299 cout <<
"2) \n" << test_double_xv_a << endl <<
" and \n" << test_double_xv_b << endl <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_double_xv_a, test_double_xv_b)) << endl;
5304 if (!(test_int_xv_a != test_int_xv_a) && ((test_int_xv_a != test_int_xv_b))) {
5305 cout <<
">>> Testing Integer != with default tolerance: PASS\n";
5307 cout <<
">>> Testing Integer != with default tolerance: ***FAIL***!\n"
5309 << test_int_xv_a << endl
5311 << test_int_xv_a << endl
5312 <<
" are different? " << std::boolalpha << (test_int_xv_a != test_int_xv_a) << endl;
5313 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not different? " << std::boolalpha << ((test_int_xv_a != test_int_xv_b)) << endl;
5316 if (!(test_float_xv_a != test_float_xv_a) && ((test_float_xv_a != test_float_xv_b))) {
5317 cout <<
">>> Testing Float != with default tolerance: PASS\n";
5319 cout <<
">>> Testing Float != with default tolerance: ***FAIL***!\n"
5321 << test_int_xv_a << endl
5323 << test_int_xv_a << endl
5324 <<
" are different? " << std::boolalpha << (test_float_xv_a != test_float_xv_a) << endl;
5325 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not different? " << std::boolalpha << ((test_float_xv_a != test_float_xv_b)) << endl;
5328 if (!(test_double_xv_a != test_double_xv_a) && ((test_double_xv_a != test_double_xv_b))) {
5329 cout <<
">>> Testing Double != with default tolerance: PASS\n";
5331 cout <<
">>> Testing Double != with default tolerance: ***FAIL***!\n"
5333 << test_int_xv_a << endl
5335 << test_int_xv_a << endl
5336 <<
" are different? " << std::boolalpha << (test_double_xv_a != test_double_xv_a) << endl;
5337 cout <<
"2) \n" << test_int_xv_a << endl <<
" and \n" << test_int_xv_b << endl <<
" are not different? " << std::boolalpha << ((test_double_xv_a != test_double_xv_b)) << endl;
5340 const int test_xm_size = 3;
5341 xmatrix<int> test_int_xm_a(test_xm_size, test_xm_size);
5342 xmatrix<int> test_int_xm_b(test_xm_size, test_xm_size);
5349 srand(time(
nullptr));
5352 for (
int i = 1; i < test_xm_size + 1; i++) {
5353 for (
int j = 1; j < test_xm_size + 1; j++) {
5354 test_int_xm_a[i][j] = rand() % _max_int;
5355 test_int_xm_b[i][j] = rand() % _max_int;
5356 test_float_xm_a[i][j] =
PI * float((rand() % _max_int));
5357 test_float_xm_b[i][j] =
PI * float((rand() % _max_int));
5358 test_double_xm_a[i][j] =
EULERSNUMBER * double((rand() % _max_int));
5359 test_double_xm_b[i][j] =
EULERSNUMBER * double((rand() % _max_int));
5363 for (
int i = 0; i < line_width; i++) {
5368 cout <<
"xmatrix\n";
5374 if (identical(test_int_xm_a, test_int_xm_a, _tol_int) && (!identical(test_int_xm_a, test_int_xm_b, _tol_int))) {
5375 cout <<
">>> Testing Integer INDENTICAL with given tolerance: PASS\n";
5377 cout <<
">>> Testing Integer INDENTICAL with given tolerance: ***FAIL***!\n"
5379 << test_int_xm_a << endl
5381 << test_int_xm_a << endl
5382 <<
" are identical? " << std::boolalpha << identical(test_int_xm_a, test_int_xm_a, _tol_int) << endl;
5383 cout <<
"2) \n" << test_int_xm_a << endl <<
" and \n" << test_int_xm_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_int_xm_a, test_int_xm_b, _tol_int)) << endl;
5386 if (identical(test_float_xm_a, test_float_xm_a, _tol_float) && (!identical(test_float_xm_a, test_float_xm_b, _tol_float))) {
5387 cout <<
">>> Testing Float INDENTICAL with given tolerance: PASS\n";
5389 cout <<
">>> Testing Float INDENTICAL with given tolerance: ***FAIL***!\n"
5391 << test_float_xm_a << endl
5393 << test_float_xm_a << endl
5394 <<
" are identical? " << std::boolalpha << identical(test_float_xm_a, test_float_xm_a, _tol_float) << endl;
5395 cout <<
"2) \n" << test_float_xm_a << endl <<
" and \n" << test_float_xm_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_float_xm_a, test_float_xm_b, _tol_float)) << endl;
5398 if (identical(test_double_xm_a, test_double_xm_a, _tol_double) && (!identical(test_double_xm_a, test_double_xm_b, _tol_double))) {
5399 cout <<
">>> Testing Double INDENTICAL with default tolerance: PASS\n";
5401 cout <<
">>> Testing Double INDENTICAL with default tolerance: ***FAIL***!\n"
5403 << test_double_xm_a << endl
5405 << test_double_xm_a << endl
5406 <<
" are identical? " << std::boolalpha << identical(test_double_xm_a, test_double_xm_a, _tol_double) << endl;
5407 cout <<
"2) \n" << test_double_xm_a << endl <<
" and \n" << test_double_xm_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_double_xm_a, test_double_xm_b, _tol_double)) << endl;
5412 if (identical(test_int_xm_a, test_int_xm_a) && (!identical(test_int_xm_a, test_int_xm_b))) {
5413 cout <<
">>> Testing Integer INDENTICAL with default tolerance: PASS\n";
5415 cout <<
">>> Testing Integer INDENTICAL with default tolerance: ***FAIL***!\n"
5417 << test_int_xm_a << endl
5419 << test_int_xm_a << endl
5420 <<
" are identical? " << std::boolalpha << identical(test_int_xm_a, test_int_xm_a) << endl;
5421 cout <<
"2) \n" << test_int_xm_a << endl <<
" and \n" << test_int_xm_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_int_xm_a, test_int_xm_b)) << endl;
5424 if (identical(test_float_xm_a, test_float_xm_a) && (!identical(test_float_xm_a, test_float_xm_b))) {
5425 cout <<
">>> Testing Float INDENTICAL with default tolerance: PASS\n";
5427 cout <<
">>> Testing Float INDENTICAL with default tolerance: ***FAIL***!\n"
5429 << test_float_xm_a << endl
5431 << test_float_xm_a << endl
5432 <<
" are identical? " << std::boolalpha << identical(test_float_xm_a, test_float_xm_a) << endl;
5433 cout <<
"2) \n" << test_float_xm_a << endl <<
" and \n" << test_float_xm_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_float_xm_a, test_float_xm_b)) << endl;
5436 if (identical(test_double_xm_a, test_double_xm_a) && (!identical(test_double_xm_a, test_double_xm_b))) {
5437 cout <<
">>> Testing Double INDENTICAL with default tolerance: PASS\n";
5439 cout <<
">>> Testing Double INDENTICAL with default tolerance: ***FAIL***!\n"
5441 << test_double_xm_a << endl
5443 << test_double_xm_a << endl
5444 <<
" are identical? " << std::boolalpha << identical(test_double_xm_a, test_double_xm_a) << endl;
5445 cout <<
"2) \n" << test_double_xm_a << endl <<
" and \n" << test_double_xm_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_double_xm_a, test_double_xm_b)) << endl;
5450 if ((test_int_xm_a == test_int_xm_a) && !(test_int_xm_a == test_int_xm_b)) {
5451 cout <<
">>> Testing Integer == with default tolerance: PASS\n";
5453 cout <<
">>> Testing Integer == with default tolerance: ***FAIL***!\n"
5455 << test_int_xm_a << endl
5457 << test_int_xm_a << endl
5458 <<
" are identical? " << std::boolalpha << identical(test_int_xm_a, test_int_xm_a) << endl;
5459 cout <<
"2) \n" << test_int_xm_a << endl <<
" and \n" << test_int_xm_b << endl <<
" are not identical? " << std::boolalpha << (!identical(test_int_xm_a, test_int_xm_b)) << endl;
5462 if ((test_float_xm_a == test_float_xm_a) && (!(test_float_xm_a == test_float_xm_b))) {
5463 cout <<
">>> Testing Float == with default tolerance: PASS\n";
5465 cout <<
">>> Testing Float == with default tolerance: ***FAIL***!\n"
5467 << test_float_xm_a << endl
5469 << test_float_xm_a << endl
5470 <<
" are identical? " << std::boolalpha << (test_float_xm_a == test_float_xm_a) << endl;
5471 cout <<
"2) \n" << test_float_xm_a << endl <<
" and \n" << test_float_xm_b << endl <<
" are not identical? " << std::boolalpha << (!(test_float_xm_a == test_float_xm_b)) << endl;
5474 if (identical(test_double_xm_a, test_double_xm_a) && (!identical(test_double_xm_a, test_double_xm_b))) {
5475 cout <<
">>> Testing Double == with default tolerance: PASS\n";
5477 cout <<
">>> Testing Double == with default tolerance: ***FAIL***!\n"
5479 << test_double_xm_a << endl
5481 << test_double_xm_a << endl
5482 <<
" are identical? " << std::boolalpha << (test_double_xm_a == test_double_xm_a) << endl;
5483 cout <<
"2) \n" << test_double_xm_a << endl <<
" and \n" << test_double_xm_b << endl <<
" are not identical? " << std::boolalpha << (!(test_double_xm_a == test_double_xm_b)) << endl;
5488 if (!isdifferent(test_int_xm_a, test_int_xm_a, _tol_int) && isdifferent(test_int_xm_a, test_int_xm_b, _tol_int)) {
5489 cout <<
">>> Testing Integer ISDIFFERENT with given tolerance: PASS\n";
5491 cout <<
">>> Testing Integer ISDIFFERENT with default tolerance: ***FAIL***!\n"
5493 << test_int_xm_a << endl
5495 << test_int_xm_a << endl
5496 <<
" are different? " << std::boolalpha << isdifferent(test_int_xm_a, test_int_xm_a, _tol_int) << endl;
5497 cout <<
"2) \n" << test_int_xm_a << endl <<
" and \n" << test_int_xm_b << endl <<
" are not different? " << std::boolalpha << (!isdifferent(test_int_xm_a, test_int_xm_b, _tol_int)) << endl;
5500 if (!isdifferent(test_float_xm_a, test_float_xm_a, _tol_float) && (isdifferent(test_float_xm_a, test_float_xm_b, _tol_float))) {
5501 cout <<
">>> Testing Float ISDIFFERENT with given tolerance: PASS\n";
5503 cout <<
">>> Testing Float ISDIFFERENT with given tolerance: ***FAIL***!\n"
5505 << test_float_xm_a << endl
5507 << test_float_xm_a << endl
5508 <<
" are different? " << std::boolalpha << isdifferent(test_float_xm_a, test_float_xm_a, _tol_float) << endl;
5509 cout <<
"2) \n" << test_float_xm_a << endl <<
" and \n" << test_float_xm_b << endl <<
" are not different? " << std::boolalpha << (isdifferent(test_float_xm_a, test_float_xm_b, _tol_float)) << endl;
5512 if (!isdifferent(test_double_xm_a, test_double_xm_a, _tol_double) && (isdifferent(test_double_xm_a, test_double_xm_b, _tol_double))) {
5513 cout <<
">>> Testing Double ISDIFFERENT with given tolerance: PASS\n";
5515 cout <<
">>> Testing Double ISDIFFERENT with given tolerance: ***FAIL***!\n"
5517 << test_double_xm_a << endl
5519 << test_double_xm_a << endl
5520 <<
" are different? " << std::boolalpha << isdifferent(test_double_xm_a, test_double_xm_a, _tol_double) << endl;
5521 cout <<
"2) \n" << test_double_xm_a << endl <<
" and \n" << test_double_xm_b << endl <<
" are not different? " << std::boolalpha << (!isdifferent(test_double_xm_a, test_double_xm_b, _tol_double)) << endl;
5526 if (!isdifferent(test_int_xm_a, test_int_xm_a) && isdifferent(test_int_xm_a, test_int_xm_b)) {
5527 cout <<
">>> Testing Integer ISDIFFERENT xvector with default tolerance: PASS\n";
5529 cout <<
">>> Testing Integer ISDIFFERENT xvector with default tolerance: ***FAIL***!\n"
5531 << test_int_xm_a << endl
5533 << test_int_xm_a << endl
5534 <<
" are different? " << std::boolalpha << isdifferent(test_int_xm_a, test_int_xm_a) << endl;
5535 cout <<
"2) \n" << test_int_xm_a << endl <<
" and \n" << test_int_xm_b << endl <<
" are not different? " << std::boolalpha << (!isdifferent(test_int_xm_a, test_int_xm_b)) << endl;
5538 if (!isdifferent(test_float_xm_a, test_float_xm_a) && (isdifferent(test_float_xm_a, test_float_xm_b))) {
5539 cout <<
">>> Testing Float ISDIFFERENT with default tolerance: PASS\n";
5541 cout <<
">>> Testing Float ISDIFFERENT with default tolerance: ***FAIL***!\n"
5543 << test_float_xm_a << endl
5545 << test_float_xm_a << endl
5546 <<
" are different? " << std::boolalpha << isdifferent(test_float_xm_a, test_float_xm_a) << endl;
5547 cout <<
"2) \n" << test_float_xm_a << endl <<
" and \n" << test_float_xm_b << endl <<
" are not different? " << std::boolalpha << (isdifferent(test_float_xm_a, test_float_xm_b)) << endl;
5550 if (!isdifferent(test_double_xm_a, test_double_xm_a) && (isdifferent(test_double_xm_a, test_double_xm_b))) {
5551 cout <<
">>> Testing Double ISDIFFERENT with default tolerance: PASS\n";
5553 cout <<
">>> Testing Double ISDIFFERENT with default tolerance: ***FAIL***!\n"
5555 << test_double_xm_a << endl
5557 << test_double_xm_a << endl
5558 <<
" are different? " << std::boolalpha << isdifferent(test_double_xm_a, test_double_xm_a) << endl;
5559 cout <<
"2) \n" << test_double_xm_a << endl <<
" and \n" << test_double_xm_b << endl <<
" are not different? " << std::boolalpha << (!isdifferent(test_double_xm_a, test_double_xm_b)) << endl;
5565 cout <<
">>> Testing Integer ISEQUAL with given tolerance: PASS\n";
5567 cout <<
">>> Testing Integer ISEQUAL with given tolerance: ***FAIL***!\n"
5569 << test_int_xm_a << endl
5571 << test_int_xm_a << endl
5572 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_int_xm_a, test_int_xm_a, _tol_int) << endl;
5573 cout <<
"2) \n" << test_int_xm_a << endl <<
" and \n" << test_int_xm_b << endl <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_int_xm_a, test_int_xm_b, _tol_int)) << endl;
5577 cout <<
">>> Testing Float ISEQUAL with given tolerance: PASS\n";
5579 cout <<
">>> Testing Float ISEQUAL with given tolerance: ***FAIL***!\n"
5581 << test_float_xm_a << endl
5583 << test_float_xm_a << endl
5584 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_float_xm_a, test_float_xm_a, _tol_float) << endl;
5585 cout <<
"2) \n" << test_float_xm_a << endl <<
" and \n" << test_float_xm_b << endl <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_float_xm_a, test_float_xm_b, _tol_float)) << endl;
5589 cout <<
">>> Testing Double ISEQUAL with default tolerance: PASS\n";
5591 cout <<
">>> Testing Double ISEQUAL with default tolerance: ***FAIL***!\n"
5593 << test_double_xm_a << endl
5595 << test_double_xm_a << endl
5596 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_double_xm_a, test_double_xm_a, _tol_double) << endl;
5598 << test_double_xm_a << endl
5600 << test_double_xm_b << endl
5601 <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_double_xm_a, test_double_xm_b, _tol_double)) << endl;
5607 cout <<
">>> Testing Integer ISEQUAL with default tolerance: PASS\n";
5609 cout <<
">>> Testing Integer ISEQUAL with default tolerance: ***FAIL***!\n"
5611 << test_int_xm_a << endl
5613 << test_int_xm_a << endl
5614 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_int_xm_a, test_int_xm_a) << endl;
5615 cout <<
"2) \n" << test_int_xm_a << endl <<
" and \n" << test_int_xm_b << endl <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_int_xm_a, test_int_xm_b)) << endl;
5619 cout <<
">>> Testing Float ISEQUAL with default tolerance: PASS\n";
5621 cout <<
">>> Testing Float ISEQUAL with default tolerance: ***FAIL***!\n"
5623 << test_float_xm_a << endl
5625 << test_float_xm_a << endl
5626 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_float_xm_a, test_float_xm_a) << endl;
5627 cout <<
"2) \n" << test_float_xm_a << endl <<
" and \n" << test_float_xm_b << endl <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_float_xm_a, test_float_xm_b)) << endl;
5631 cout <<
">>> Testing Double ISEQUAL with default tolerance: PASS\n";
5633 cout <<
">>> Testing Double ISEQUAL with default tolerance: ***FAIL***!\n"
5635 << test_double_xm_a << endl
5637 << test_double_xm_a << endl
5638 <<
" are identical? " << std::boolalpha <<
aurostd::isequal(test_double_xm_a, test_double_xm_a) << endl;
5639 cout <<
"2) \n" << test_double_xm_a << endl <<
" and \n" << test_double_xm_b << endl <<
" are not identical? " << std::boolalpha << (!
aurostd::isequal(test_double_xm_a, test_double_xm_b)) << endl;
5644 if (!(test_int_xm_a != test_int_xm_a) && ((test_int_xm_a != test_int_xm_b))) {
5645 cout <<
">>> Testing Integer != with default tolerance: PASS\n";
5647 cout <<
">>> Testing Integer != with default tolerance: ***FAIL***!\n"
5649 << test_int_xm_a << endl
5651 << test_int_xm_a << endl
5652 <<
" are different? " << std::boolalpha << (test_int_xm_a != test_int_xm_a) << endl;
5653 cout <<
"2) \n" << test_int_xm_a << endl <<
" and \n" << test_int_xm_b << endl <<
" are not different? " << std::boolalpha << ((test_int_xm_a != test_int_xm_b)) << endl;
5656 if (!(test_float_xm_a != test_float_xm_a) && ((test_float_xm_a != test_float_xm_b))) {
5657 cout <<
">>> Testing Float != with default tolerance: PASS\n";
5659 cout <<
">>> Testing Float != with default tolerance: ***FAIL***!\n"
5661 << test_float_xm_a << endl
5663 << test_float_xm_a << endl
5664 <<
" are different? " << std::boolalpha << (test_float_xm_a != test_float_xm_a) << endl;
5665 cout <<
"2) \n" << test_float_xm_a << endl <<
" and \n" << test_float_xm_b << endl <<
" are not different? " << std::boolalpha << ((test_float_xm_a != test_float_xm_b)) << endl;
5668 if (!(test_double_xm_a != test_double_xm_a) && ((test_double_xm_a != test_double_xm_b))) {
5669 cout <<
">>> Testing Double != with default tolerance: PASS\n";
5671 cout <<
">>> Testing Double != with default tolerance: ***FAIL***!\n"
5673 << test_double_xm_a << endl
5675 << test_double_xm_a << endl
5676 <<
" are different? " << std::boolalpha << (test_double_xm_a != test_double_xm_a) << endl;
5677 cout <<
"2) \n" << test_double_xm_a << endl <<
" and \n" << test_double_xm_b << endl <<
" are not different? " << std::boolalpha << ((test_double_xm_a != test_double_xm_b)) << endl;
5687 string chgcar1_file;
5688 string chgcar2_file;
5693 const bool LDEBUG = (
false ||
XHOST.DEBUG);
5698 const string usage_usage =
"aflow --chgdiff=CHGCAR1,CHGCAR2 [chgdiff_options]";
5705 if (vpflow.
flag(
"CHGDIFF::USAGE")) {
5711 vector<string> input_tokens;
5715 if (!vpflow.
flag(
"CHGDIFF")) {
5729 if (input_tokens.size() != 2) {
5731 oss <<
__AFLOW_FUNC__ <<
"ERROR: Incorrect input arguments. List two CHGCARs separated by commas." << endl;
5736 chgcar1_file = input_tokens.at(0);
5737 chgcar2_file = input_tokens.at(1);
5740 if (!vpflow.
flag(
"CHGDIFF::OUTPUT")) {
5741 output_file =
"aflow_CHGDIFF.out";
5749 CHGDIFF(chgcar1_file, chgcar2_file, output_file, oss);
5758 bool CHGDIFF(
const string& chgcar1_file,
const string& chgcar2_file,
const string& output_file, ostream& oss) {
5766 stringstream chgcar1_ss;
5767 stringstream chgcar2_ss;
5768 stringstream chgcar1_header;
5769 stringstream chgcar2_header;
5770 const double TOL = 1e-5;
5771 xstructure structure1;
5772 xstructure structure2;
5773 vector<int> ngrid1(3);
5774 vector<int> ngrid2(3);
5775 vector<int> format_dim1;
5776 vector<int> format_dim2;
5777 vector<double> chg_tot1;
5778 vector<double> chg_tot2;
5779 vector<double> chg_diff1;
5780 vector<double> chg_diff2;
5783 const bool LDEBUG = (
false ||
XHOST.DEBUG);
5791 oss <<
__AFLOW_FUNC__ <<
"ERROR: " << chgcar1_file <<
" does not exist." << endl;
5804 oss <<
__AFLOW_FUNC__ <<
"ERROR: " << chgcar2_file <<
" does not exist." << endl;
5815 oss <<
__AFLOW_FUNC__ <<
"CHECK FORMAT OF " << chgcar1_file << endl;
5817 if (!pflow::ReadCHGCAR(structure1, chgcar1_header, ngrid1, format_dim1, chg_tot1, chg_diff1, chgcar1_ss, oss)) {
5819 oss <<
__AFLOW_FUNC__ <<
"ERROR: Input " << chgcar1_file <<
" format not recognized." << endl;
5824 oss <<
__AFLOW_FUNC__ <<
"SUCCESSFULLY READ " << chgcar1_file << endl;
5827 oss <<
__AFLOW_FUNC__ <<
"CHECK FORMAT OF " << chgcar2_file << endl;
5829 if (!pflow::ReadCHGCAR(structure2, chgcar2_header, ngrid2, format_dim2, chg_tot2, chg_diff2, chgcar2_ss, oss)) {
5831 oss <<
__AFLOW_FUNC__ <<
"ERROR: Input " << chgcar2_file <<
" format not recognized." << endl;
5836 oss <<
__AFLOW_FUNC__ <<
"SUCCESSFULLY READ " << chgcar2_file << endl;
5843 oss <<
__AFLOW_FUNC__ <<
"CHECK IF FORMATS OF CHGCARS MATCH" << endl;
5845 if (format_dim1 != format_dim2) {
5847 oss <<
__AFLOW_FUNC__ <<
"WARNING: Format for input " << chgcar1_file <<
" does not match that of input " << chgcar2_file <<
"." << endl;
5848 oss <<
__AFLOW_FUNC__ <<
"WARNING: Using format from input " << chgcar1_file <<
"." << endl;
5852 oss <<
__AFLOW_FUNC__ <<
"CHECK IF GRIDS OF CHGCARS MATCH" << endl;
5854 if (ngrid1 != ngrid2) {
5856 oss <<
__AFLOW_FUNC__ <<
"ERROR: Grids for two CHGCAR's do not match. " << endl;
5857 oss <<
__AFLOW_FUNC__ <<
"ERROR: ngrid of " << chgcar1_file <<
": " << ngrid1.at(0) <<
" " << ngrid1.at(1) <<
" " << ngrid1.at(2) << endl;
5858 oss <<
__AFLOW_FUNC__ <<
"ERROR: ngrid of " << chgcar2_file <<
": " << ngrid2.at(0) <<
" " << ngrid2.at(1) <<
" " << ngrid2.at(2) << endl;
5859 oss <<
__AFLOW_FUNC__ <<
"ERROR: This will give nonsense. " << endl;
5864 oss <<
__AFLOW_FUNC__ <<
"CHECK IF LATTICE PARAMETERS OF CHGCARS MATCH" << endl;
5868 oss <<
__AFLOW_FUNC__ <<
"WARNING: Lattice parameters for two CHGCARs do not match. " << endl;
5869 oss <<
__AFLOW_FUNC__ <<
"WARNING: lattice of " << chgcar1_file <<
": " << endl;
5871 oss <<
__AFLOW_FUNC__ <<
"WARNING: lattice of " << chgcar2_file <<
": " << endl;
5872 oss << matrix2xmatrix(lat2) << endl;
5873 oss <<
__AFLOW_FUNC__ <<
"WARNING: This could give nonsense if there is much difference. " << endl;
5874 oss <<
__AFLOW_FUNC__ <<
"WARNING: Output will use lattice of " << chgcar1_file <<
"." << endl;
5878 oss <<
__AFLOW_FUNC__ <<
"OVERALL FORMAT OF CHGCARS LOOKS OK" << endl;
5882 const vector<double> chg_tot_2m1 =
pflow::VVdiff(chg_tot1, chg_tot2);
5883 const vector<double> chg_diff_2m1 =
pflow::VVdiff(chg_diff1, chg_diff2);
5885 oss <<
__AFLOW_FUNC__ <<
"PRINTING CHGDIFF TO " << output_file << endl;
5887 pflow::PrintCHGCAR(structure1, chgcar1_header, ngrid1, format_dim1, chg_tot_2m1, chg_diff_2m1, output_file, oss);
5902 ifstream chgfile(argv.at(2).c_str());
5904 vector<int> ngrid(3);
5906 vector<double> chg_tot;
5907 vector<double> chg_diff;
5908 pflow::ReadChg(str, ngrid, chg_tot, chg_diff, chgfile);
5910 vector<aurostd::matrix<double>> rad_chg_int;
5912 pflow::GetChgInt(rad_chg_int, vor_chg_int, str, ngrid, chg_tot, chg_diff);
5914 pflow::PrintChgInt(rad_chg_int, vor_chg_int, cout);
5926 vector<string> chgcar_files;
5931 const bool LDEBUG = (
false ||
XHOST.DEBUG);
5936 const string usage_usage =
"aflow --chgsum=CHGCAR1,CHGCAR2,... [chgsum_options]";
5943 if (vpflow.
flag(
"CHGSUM::USAGE")) {
5949 vector<string> input_tokens;
5953 if (!vpflow.
flag(
"CHGSUM")) {
5969 if (input_tokens.size() < 2) {
5971 oss <<
__AFLOW_FUNC__ <<
"ERROR: Incorrect input arguments. List at least two CHGCARs separated by commas." << endl;
5977 for (
size_t i = 0; i < input_tokens.size(); i++) {
5978 chgcar_files.push_back(input_tokens[i]);
5983 if (!vpflow.
flag(
"CHGSUM::OUTPUT")) {
5984 output_file =
"aflow_CHGSUM.out";
5991 CHGSUM(chgcar_files, output_file, oss);
6000 bool CHGSUM(
const string& chgcar_in1,
const string& chgcar_in2, ostream& oss) {
6002 const string output_file =
"aflow_chgsum.out";
6003 return CHGSUM(chgcar_in1, chgcar_in2, output_file, oss);
6011 bool CHGSUM(
string& species_header,
const string& chgcar_in1,
const string& chgcar_in2,
const string& output_file, ostream& oss) {
6013 vector<string> chgcar_files;
6014 chgcar_files.push_back(chgcar_in1);
6015 chgcar_files.push_back(chgcar_in2);
6016 return CHGSUM(species_header, chgcar_files, output_file, oss);
6024 bool CHGSUM(
const string& chgcar_in1,
const string& chgcar_in2,
const string& output_file, ostream& oss) {
6026 string species_header;
6027 return CHGSUM(species_header, chgcar_in1, chgcar_in2, output_file, oss);
6035 bool CHGSUM(
const vector<string>& chgcar_files, ostream& oss) {
6037 string species_header;
6038 return CHGSUM(species_header, chgcar_files, oss);
6046 bool CHGSUM(
const vector<string>& chgcar_files,
const string& output_file, ostream& oss) {
6048 string species_header;
6049 return CHGSUM(species_header, chgcar_files, output_file, oss);
6057 bool CHGSUM(
string& species_header,
const vector<string>& chgcar_files, ostream& oss) {
6059 const string output_file =
"aflow_chgsum.out";
6060 return CHGSUM(species_header, chgcar_files, output_file, oss);
6068 bool CHGSUM(
string& species_header,
const vector<string>& chgcar_files,
const string& output_file, ostream& oss) {
6075 const double TOL = 1e-5;
6076 xstructure structure1;
6077 xstructure structure2;
6078 stringstream chgcar_ss;
6079 stringstream chgcar1_header;
6080 stringstream chgcar2_header;
6083 const bool LDEBUG = (
false ||
XHOST.DEBUG);
6088 for (
size_t i = 0; i < chgcar_files.size(); i++) {
6091 oss <<
__AFLOW_FUNC__ <<
"ERROR: " << chgcar_files[i] <<
" does not exist." << endl;
6097 oss <<
__AFLOW_FUNC__ <<
"CHGCAR_IN_" << i + 1 <<
"=" << chgcar_files[i] << endl;
6102 vector<int> ngrid1(3);
6103 vector<int> ngrid2(3);
6104 vector<int> format_dim1;
6105 vector<int> format_dim2;
6106 vector<double> chg_tot1;
6107 vector<double> chg_tot2;
6108 vector<double> chg_diff1;
6109 vector<double> chg_diff2;
6117 if (!pflow::ReadCHGCAR(structure1, chgcar1_header, ngrid1, format_dim1, chg_tot1, chg_diff1, chgcar_ss, oss)) {
6119 oss <<
__AFLOW_FUNC__ <<
"ERROR: Input " << chgcar_files.at(0) <<
" format not recognized." << endl;
6125 oss <<
__AFLOW_FUNC__ <<
"SUCCESSFULLY READ " << chgcar_files.at(0) << endl;
6132 for (
size_t i = 1; i < chgcar_files.size(); i++) {
6135 chgcar2_header.str(
"");
6137 format_dim2.clear();
6145 if (!pflow::ReadCHGCAR(structure2, chgcar2_header, ngrid2, format_dim2, chg_tot2, chg_diff2, chgcar_ss, oss)) {
6147 oss <<
__AFLOW_FUNC__ <<
"ERROR: Input " << chgcar_files.at(i) <<
" format not recognized." << endl;
6153 oss <<
__AFLOW_FUNC__ <<
"SUCCESSFULLY READ CHGCAR_INPUT_" << i << endl;
6159 oss <<
__AFLOW_FUNC__ <<
"CHECK IF FORMATS OF " << chgcar_files.at(0) <<
" and " << chgcar_files.at(i) <<
" MATCH" << endl;
6161 if (format_dim1 != format_dim2) {
6163 oss <<
__AFLOW_FUNC__ <<
"WARNING: Format for " << chgcar_files.at(0) <<
" does not match that of " << chgcar_files.at(i) <<
"." << endl;
6164 oss <<
__AFLOW_FUNC__ <<
"WARNING: Using format from " << chgcar_files.at(0) <<
"." << endl;
6168 oss <<
__AFLOW_FUNC__ <<
"CHECK IF GRIDS OF " << chgcar_files.at(0) <<
" and " << chgcar_files.at(i) <<
" MATCH" << endl;
6170 if (ngrid1 != ngrid2) {
6172 oss <<
__AFLOW_FUNC__ <<
"ERROR: Grid for " << chgcar_files.at(0) <<
" does not match that of " << chgcar_files.at(i) <<
"." << endl;
6173 oss <<
__AFLOW_FUNC__ <<
"ERROR: ngrid of " << chgcar_files.at(0) <<
": " << ngrid1.at(0) <<
" " << ngrid1.at(1) <<
" " << ngrid1.at(2) << endl;
6174 oss <<
__AFLOW_FUNC__ <<
"ERROR: ngrid of " << chgcar_files.at(i) <<
": " << ngrid2.at(0) <<
" " << ngrid2.at(1) <<
" " << ngrid2.at(2) << endl;
6175 oss <<
__AFLOW_FUNC__ <<
"ERROR: This will give nonsense." << endl;
6181 oss <<
__AFLOW_FUNC__ <<
"CHECK IF LATTICE PARAMETERS OF " << chgcar_files.at(0) <<
" and " << chgcar_files.at(i) <<
" MATCH" << endl;
6185 oss <<
__AFLOW_FUNC__ <<
"WARNING: Lattice parameters for " << chgcar_files.at(0) <<
" and " << chgcar_files.at(i) <<
" do not match. " << endl;
6186 oss <<
__AFLOW_FUNC__ <<
"WARNING: lattice of " << chgcar_files.at(0) <<
": " << endl;
6188 oss <<
__AFLOW_FUNC__ <<
"WARNING: lattice " << chgcar_files.at(i) <<
": " << endl;
6189 oss << matrix2xmatrix(lat2) << endl;
6190 oss <<
__AFLOW_FUNC__ <<
"WARNING: This could give nonsense if there is much difference." << endl;
6191 oss <<
__AFLOW_FUNC__ <<
"WARNING: Output will use lattice of " << chgcar_files.at(0) <<
"." << endl;
6195 oss <<
__AFLOW_FUNC__ <<
"OVERALL FORMAT OF " << chgcar_files.at(i) <<
" LOOKS OK" << endl;
6204 oss <<
__AFLOW_FUNC__ <<
"PRINTING CHGSUM TO " << output_file << endl;
6208 if (!species_header.empty()) {
6209 bader_functions::adjust_header(species_header, chgcar1_header);
6213 pflow::PrintCHGCAR(structure1, chgcar1_header, ngrid1, format_dim1, chg_tot1, chg_diff1, output_file, oss);
6227 if (vpflow.
flag(
"CIF::USAGE")) {
6229 aurostd::liststring2string(
"aflow --cif[=<tolerance_value>|=tight|=loose] [--setting=1|2|aflow] [--no_symmetry] < POSCAR default: tolerance=(minimum_interatomic_distance)/100.0, "
6235 bool no_symmetry =
false;
6236 if (vpflow.
flag(
"CIF::NO_SYMMETRY")) {
6241 pflow::PrintCIF(cout, a, 1);
6244 double tolerance = pflow::getSymmetryTolerance(a, vpflow.
getattachedscheme(
"CIF::TOLERANCE"));
6246 if (vpflow.
flag(
"DATA::NO_SCAN")) {
6247 a.sym_eps_no_scan =
true;
6249 a.spacegroupnumber = a.SpaceGroup_ITC(tolerance, -1, setting, a.sym_eps_no_scan);
6250 a.lattice = a.standard_lattice_ITC;
6251 pflow::PrintCIF(cout, a, a.spacegroupnumber, setting);
6265 if (vpflow.
flag(
"CIF::USAGE")) {
6267 aurostd::liststring2string(
"aflow --cif[=<tolerance_value>|=tight|=loose] [--setting=1|2|aflow] [--no_symmetry] < POSCAR default: tolerance=(minimum_interatomic_distance)/100.0, "
6271 if (vpflow.
flag(
"CIF::NO_SYMMETRY")) {
6272 a.spacegroupnumber = 1;
6275 a.sym_eps = pflow::getSymmetryTolerance(a, vpflow.
getattachedscheme(
"CIF::TOLERANCE"));
6276 a.setting_ITC = pflow::getSpaceGroupSetting(vpflow.
getattachedscheme(
"CIF::SETTING"));
6277 if (vpflow.
flag(
"DATA::NO_SCAN")) {
6278 a.sym_eps_no_scan =
true;
6288 const bool LDEBUG = (
false ||
XHOST.DEBUG);
6292 vector<string> tokens;
6294 if (tokens.size() != 6) {
6298 if (!tokens.empty()) {
6301 if (tokens.size() >= 2) {
6304 if (tokens.size() >= 3) {
6307 if (tokens.size() >= 4) {
6310 if (tokens.size() >= 5) {
6313 if (tokens.size() >= 6) {
6317 pflow::PrintClat(data, cout);
6329 vector<string> vinput;
6331 for (
size_t iinput = 0; iinput < vinput.size(); iinput++) {
6332 cout << vinput[iinput] << endl;
6344 ifstream infile1(argv.at(2).c_str());
6345 ifstream infile2(argv.at(3).c_str());
6346 const double rcut = atof(argv.at(4).c_str());
6351 pflow::PrintCmpStr(str1, str2, rcut, cout);
6360 const bool LDEBUG = (
false ||
XHOST.DEBUG);
6364 vector<string> tokens;
6366 if (tokens.size() != 12) {
6367 init::ErrorOption(options,
__AFLOW_FUNC__,
"aflow --compare=a,b,c,d,e,f,g,h,k,j,i,l");
6370 for (
int i = 1; i <= 12; i++) {
6379 cout <<
"PERCENTAGES" <<
" ";
6380 cout << (bb1 = 100 * std::abs(aa(1) - aa(7)) / ((aa(1) + aa(7)) / 2.0)) <<
" ";
6381 cout << (bb2 = 100 * std::abs(aa(2) - aa(8)) / ((aa(2) + aa(8)) / 2.0)) <<
" ";
6382 cout << (bb3 = 100 * std::abs(aa(3) - aa(9)) / ((aa(3) + aa(9)) / 2.0)) <<
" ";
6383 cout << (bb4 = 100 * std::abs(aa(4) - aa(10)) / ((aa(4) + aa(10)) / 2.0)) <<
" ";
6384 cout << (bb5 = 100 * std::abs(aa(5) - aa(11)) / ((aa(5) + aa(11)) / 2.0)) <<
" ";
6385 cout << (bb6 = 100 * std::abs(aa(6) - aa(12)) / ((aa(6) + aa(12)) / 2.0)) <<
" ";
6387 cout <<
"MIN " <<
min(bb1,
min(bb2,
min(bb3,
min(bb4,
min(bb5, bb6))))) << endl;
6388 cout <<
"MAX " <<
max(bb1,
max(bb2,
max(bb3,
max(bb4,
max(bb5, bb6))))) << endl;
6410 cerr <<
XPID <<
"pflow::CPRIM: THIS IS A DEBUG FUNCTION FOR CODING PURPOSES" << endl;
6415 const bool full_sym =
false;
6416 LATTICE::Standard_Lattice_Structure(str_in, str_sp, str_sc, full_sym);
6417 cerr <<
"ORIGINAL" << endl;
6420 cerr <<
"STANDARD_PRIMITIVE" << endl;
6423 cerr <<
"STANDARD_CONVENTIONAL" << endl;
6440 const bool LDEBUG = (
false ||
XHOST.DEBUG);
6448 if (vpflow.
flag(
"DATA::USAGE")) {
6451 if (smode ==
"DATA") {
6452 usage =
"aflow --data";
6453 }
else if (smode ==
"CRYSTAL_POINT_GROUP") {
6454 usage =
"aflow --point_group_crystal_data|--pointgroup_crystal_data|--pgroupxtal_data|--pgroup_xtal_data[=<tolerance_value>|=tight|=loose]";
6455 }
else if (smode ==
"EDATA") {
6456 usage =
"aflow --edata[=<tolerance_value>|=tight|=loose]";
6457 }
else if (smode ==
"REAL_LATTICE") {
6458 usage =
"aflow --lattice_data|--data_lattice|--real_lattice_data|--data_real_lattice[=<tolerance_value>|=tight|=loose]";
6459 }
else if (smode ==
"RECIPROCAL_LATTICE") {
6460 usage =
"aflow --reciprocal_lattice_data|--reciprocallattice_data|--klattice_data|--data_reciprocal_lattice[=<tolerance_value>|=tight|=loose]";
6461 }
else if (smode ==
"SGDATA") {
6462 usage =
"aflow --sgdata|--space_group_data[=<tolerance_value>|=tight|=loose]";
6463 }
else if (smode ==
"SUPERLATTICE") {
6464 usage =
"aflow --superlattice_data|--data_superlattice[=<tolerance_value>|=tight|=loose]";
6468 string options =
"options: [--no_scan] [--print=txt|json]";
6469 if (smode ==
"EDATA" || smode ==
"SGDATA") {
6470 options +=
" [--setting=1|2|aflow] [--suppress_Wyckoff|--suppress_Wyckoff_printing|--suppress_wyckoff|--suppress_wyckoff_printing] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]]";
6472 vector<string> voptions;
6474 voptions.insert(voptions.begin(), usage);
6487 if (a.directory.empty()) {
6493 if (vpflow.
flag(
"DATA::MAGNETIC")) {
6500 const double tolerance = pflow::getSymmetryTolerance(a, vpflow.
getattachedscheme(
"DATA::TOLERANCE"));
6508 filetype ftype = txt_ft;
6509 if (
XHOST.vflag_control.flag(
"PRINT_MODE::TXT")) {
6511 }
else if (
XHOST.vflag_control.flag(
"PRINT_MODE::JSON")) {
6517 if (vpflow.
flag(
"DATA::NO_SCAN")) {
6518 a.sym_eps_no_scan =
true;
6523 const bool suppress_Wyckoff = (vpflow.
flag(
"DATA::SUPPRESS_WYCKOFF_PRINTING") ||
XHOST.vflag_control.flag(
"WWW"));
6527 if (ftype == txt_ft && !
XHOST.vflag_control.flag(
"WWW")) {
6533 const bool already_calculated =
false;
6534 const bool standalone =
true;
6535 if (smode ==
"EDATA" || smode ==
"DATA") {
6536 oss << PrintData(a, smode, ftype, already_calculated, tolerance, a.sym_eps_no_scan, setting);
6537 }
else if (smode ==
"REAL_LATTICE") {
6538 oss << PrintRealLatticeData(a,
"EDATA", ftype, standalone, already_calculated, tolerance);
6539 }
else if (smode ==
"CRYSTAL_POINT_GROUP") {
6540 oss << PrintCrystalPointGroupData(a, ftype, standalone, already_calculated, tolerance);
6541 }
else if (smode ==
"SUPERLATTICE") {
6542 oss << PrintSuperlatticeData(a, ftype, standalone, already_calculated, tolerance);
6543 }
else if (smode ==
"RECIPROCAL_LATTICE") {
6544 oss << PrintReciprocalLatticeData(a, ftype, standalone, already_calculated, tolerance);
6545 }
else if (smode ==
"SGDATA") {
6546 oss << pflow::PrintSGData(a, ftype, standalone, already_calculated, tolerance, a.sym_eps_no_scan, setting, suppress_Wyckoff);
6557 void DISP(
const string& options, istream& input) {
6558 const bool LDEBUG = (
false ||
XHOST.DEBUG);
6562 vector<string> tokens;
6564 if (tokens.size() != 1) {
6567 double cutoff = 0.0;
6568 if (!tokens.empty()) {
6573 pflow::PrintDisplacements(a, cutoff, cout);
6584 void DIST(
const string& options, istream& input) {
6585 const bool LDEBUG = (
false ||
XHOST.DEBUG);
6589 vector<string> tokens;
6591 if (tokens.size() != 1) {
6594 double cutoff = 0.0;
6595 if (!tokens.empty()) {
6600 pflow::PrintDistances(a, cutoff, cout);
6632#define _MAXSPECIES_ 10
6653 const int argc = argv.size();
6657 if (!(atoi(&argv.at(2)[0]) == 1 or atoi(&argv.at(2)[0]) == 2)) {
6686 ispin = atoi(&argv.at(2)[0]);
6687 if (!(ispin == 1 or ispin == 2)) {
6697 for (i = 3; i < argc; i++) {
6698 if (argv.at(i)[0] ==
's' or argv.at(i)[0] ==
'S') {
6701 if (argv.at(i)[0] ==
'p' or argv.at(i)[0] ==
'P') {
6704 if (argv.at(i)[0] ==
'd' or argv.at(i)[0] ==
'D') {
6707 if (argv.at(i)[0] ==
'f' or argv.at(i)[0] ==
'F') {
6714 for (i = 1; i <= 5; i++) {
6715 getline(pin, tmpstr);
6721 species[++i] = atoi(&tmpstr[0]);
6723 }
while (atoi(&tmpstr[0]) > 0);
6730 for (i = 1; i <= nspec; i++) {
6733 if (itmp != natom) {
6734 cerr <<
"DOSCAR is INcompatible with POSCAR\n";
6737 getline(din, tmpstr);
6738 getline(din, tmpstr);
6739 getline(din, tmpstr);
6740 getline(din, tmpstr);
6741 getline(din, tmpstr);
6742 din >> maxE >> minE >> nE >> Efermi;
6743 getline(din, tmpstr);
6749 ncol = 1 + 1 * nspec;
6752 ncol = 1 + 2 * nspec;
6755 ncol = 1 + 3 * nspec;
6758 ncol = 1 + 4 * nspec;
6765 for (i = 1; i <= nE; i++) {
6770 getline(din, tmpstr);
6790 if (maxOrbital > 0) {
6792 for (i = 1; i <= nspec; i++) {
6793 ioffset = (i - 1) * maxOrbital * ispin;
6794 for (j = 1; j <= species[i]; j++) {
6795 getline(din, tmpstr);
6796 for (k = 1; k <= nE; k++) {
6799 for (iorb = 1; iorb <= maxOrbital; iorb++) {
6801 EDOS[k][ioffset + iorb + 2] += ftmp;
6803 getline(din, tmpstr);
6806 for (iorb = 1; iorb <= maxOrbital; iorb++) {
6808 EDOS[k][ioffset + (iorb - 1) * 2 + 4] += ftmp;
6810 EDOS[k][ioffset + (iorb - 1) * 2 + 5] -= ftmp;
6812 getline(din, tmpstr);
6819 for (i = 1; i <= nE; i++) {
6820 cout <<
" " <<
EDOS[i][1];
6821 for (j = 1; j <= ispin; j++) {
6822 cout <<
" " <<
EDOS[i][j + 1];
6826 for (j = 1; j <= nspec; j++) {
6827 ioffset = (j - 1) * maxOrbital * ispin;
6828 for (k = 1; k <= ispin; k++) {
6829 cout <<
" " <<
EDOS[i][ioffset + k + 1 + ispin];
6835 for (j = 1; j <= nspec; j++) {
6836 ioffset = (j - 1) * maxOrbital * ispin + ispin;
6837 for (k = 1; k <= ispin; k++) {
6838 cout <<
" " <<
EDOS[i][ioffset + k + 1 + ispin];
6844 for (j = 1; j <= nspec; j++) {
6845 ioffset = (j - 1) * maxOrbital * ispin + 2 * ispin;
6846 for (k = 1; k <= ispin; k++) {
6847 cout <<
" " <<
EDOS[i][ioffset + k + 1 + ispin];
6853 for (j = 1; j <= nspec; j++) {
6854 ioffset = (j - 1) * maxOrbital * ispin + 3 * ispin;
6855 for (k = 1; k <= ispin; k++) {
6856 cout <<
" " <<
EDOS[i][ioffset + k + 1 + ispin];
6869 void EFFMASS(vector<string>& argv, ostream& oss) {
6870 const bool LDEBUG = (
false ||
XHOST.DEBUG);
6876 string WorkDir = argv.at(2);
6889 const bool LDEBUG = (
false ||
XHOST.DEBUG);
6890 stringstream message;
6895 const bool PRINT_SCREEN =
false;
6896 aflags.QUIET =
true;
6898 ofstream FileMESSAGE(
"/dev/null");
6902 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
6903 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
6904 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
true;
6905 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
true;
6906 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
6907 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON =
false;
6908 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
6909 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
true;
6910 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
6912 vector<string> tokens;
6914 if (tokens.size() == 1) {
6915 if (tokens[0] ==
"usage" || tokens[0] ==
"USAGE") {
6917 aurostd::liststring2string(
"aflow --equivalent|--equiv|--inequivalent|--inequiv|--iatoms|--eatoms[=<tolerance_value>|=tight|=loose] [--no_scan] [--print=txt|json] "
6918 "[--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR default: tolerance=(minimum_interatomic_distance)/100.0"));
6925 if (a.directory.empty()) {
6926 if (aflags.Directory !=
"./") {
6927 a.directory = aflags.Directory;
6930 aflags.Directory = a.directory;
6933 const string print_directory =
" [dir=" + a.directory +
"]";
6937 if (vpflow.
flag(
"SYMMETRY::MAGNETIC")) {
6943 double tolerance = pflow::getSymmetryTolerance(a, vpflow.
getattachedscheme(
"SYMMETRY::TOLERANCE"));
6946 string format =
"txt";
6947 if (
XHOST.vflag_control.flag(
"PRINT_MODE::TXT")) {
6949 }
else if (
XHOST.vflag_control.flag(
"PRINT_MODE::JSON")) {
6955 const bool force_perform =
true;
6956 if (vpflow.
flag(
"SYMMETRY::NO_SCAN")) {
6957 a.sym_eps_no_scan =
true;
6960 if (!
pflow::PerformFullSymmetry(a, tolerance, a.sym_eps_no_scan, force_perform, FileMESSAGE, aflags, kflags, PRINT_SCREEN, cout)) {
6961 message <<
"Could not find commensurate symmetry at tolerance = " << tolerance <<
" " << print_directory;
6974 if (format ==
"txt") {
6975 a.write_inequivalent_flag =
true;
6979 }
else if (format ==
"json") {
6981 KBIN_SymmetryToScreen(a, format, oss, mode);
6992 void EWALD(
const string& options, istream& input) {
6993 const bool LDEBUG = (
false ||
XHOST.DEBUG);
6997 vector<string> tokens;
6999 if (tokens.size() >= 2) {
7004 if (!tokens.empty()) {
7008 const double SUMTOL = 1.0e-16;
7015 pflow::Ewald(str, epoint, ereal, erecip, eewald, eta, SUMTOL);
7016 pflow::PrintEwald(str, epoint, ereal, erecip, eewald, eta, SUMTOL, cout);
7028 string EXTRACT_xcar(_aflags& aflags, vector<string> argv,
string mode,
string file) {
7029 const bool LDEBUG = (
false ||
XHOST.DEBUG);
7036 if (!argv.empty()) {
7039 ofstream FileMESSAGE(
"/dev/null");
7041 kflags.AFLOW_MODE_VASP =
true;
7051 aflags.QUIET =
true;
7053 if (mode ==
"POSCAR") {
7054 vflags = KBIN::VASP_Get_Vflags_from_AflowIN(AflowIn, aflags, kflags);
7055 KBIN::VASP_Produce_POSCAR(xvasp, AflowIn, FileMESSAGE, aflags, kflags, vflags);
7056 return xvasp.POSCAR.str();
7058 if (mode ==
"INCAR") {
7059 vflags = KBIN::VASP_Get_Vflags_from_AflowIN(AflowIn, aflags, kflags);
7060 KBIN::VASP_Produce_INCAR(xvasp, AflowIn, FileMESSAGE, aflags, kflags, vflags);
7061 KBIN::VASP_Modify_INCAR(xvasp, FileMESSAGE, aflags, kflags, vflags);
7062 return xvasp.INCAR.str();
7064 if (mode ==
"KPOINTS") {
7065 vflags = KBIN::VASP_Get_Vflags_from_AflowIN(AflowIn, aflags, kflags);
7066 KBIN::VASP_Produce_POSCAR(xvasp, AflowIn, FileMESSAGE, aflags, kflags, vflags);
7067 KBIN::VASP_Produce_KPOINTS(xvasp, AflowIn, FileMESSAGE, aflags, kflags, vflags);
7068 KBIN::VASP_Modify_KPOINTS(xvasp, FileMESSAGE, aflags, vflags);
7069 return xvasp.KPOINTS.str();
7071 if (mode ==
"POTCAR") {
7072 vflags = KBIN::VASP_Get_Vflags_from_AflowIN(AflowIn, aflags, kflags);
7073 KBIN::VASP_Produce_POTCAR(xvasp, AflowIn, FileMESSAGE, aflags, kflags, vflags);
7074 return xvasp.POTCAR.str();
7076 if (mode ==
"PARTCAR") {
7077 const xstructure xstr = pocc::extractPARTCAR(AflowIn);
7078 stringstream output;
7080 return output.str();
7090 void EIGCURV(
const string& options, ostream& oss) {
7091 const bool LDEBUG = (
false ||
XHOST.DEBUG);
7095 vector<string> tokens;
7097 if (tokens.size() != 1) {
7101 if (!tokens.empty()) {
7102 filename = (tokens[0]);
7104 string WorkDir = filename;
7118 ofstream FileMESSAGE(
"/dev/null");
7120 aflags.Directory =
".";
7121 aflags.QUIET =
true;
7125 const bool osswrite =
false;
7126 const bool see_output =
false;
7127 ostream& oss_empty = cout;
7129 oss_empty.setstate(std::ios_base::badbit);
7131 const bool sym_done =
PerformFullSymmetry(a, FileMESSAGE, aflags, kflags, osswrite, oss_empty);
7139 bool PerformFullSymmetry(xstructure& a, ofstream& FileMESSAGE,
const string& directory, _kflags& kflags,
bool osswrite, ostream& oss,
string format) {
7141 aflags.Directory = directory;
7145 bool PerformFullSymmetry(xstructure& a, ofstream& FileMESSAGE, _aflags& aflags, _kflags& kflags,
bool osswrite, ostream& oss,
string format) {
7146 double tolerance = a.sym_eps;
7147 const bool no_scan =
false;
7148 const bool force_perform =
true;
7149 return PerformFullSymmetry(a, tolerance, no_scan, force_perform, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7152 bool PerformFullSymmetry(xstructure& a,
double& tolerance,
bool no_scan,
bool force_perform, ofstream& FileMESSAGE, _aflags& aflags, _kflags& kflags,
bool osswrite, ostream& oss,
string format) {
7154 const xstructure b(a);
7156 const bool LDEBUG = (
false ||
XHOST.DEBUG);
7157 bool symmetry_commensurate =
false;
7159 const bool QUIET = (aflags.QUIET ||
XHOST.QUIET ||
XHOST.vflag_control.flag(
"WWW"));
7161 osswrite = (osswrite && !
XHOST.vflag_control.flag(
"WWW"));
7166 if (a.directory.empty()) {
7167 if (aflags.Directory !=
"./") {
7168 a.directory = aflags.Directory;
7171 aflags.Directory = a.directory;
7174 const string print_directory =
" [dir=" + a.directory +
"]";
7178 cerr <<
XPID <<
"pflow::PerformFullSymmetry: STRUCTURE" << endl;
7182 if (a.atoms.empty()) {
7183 cerr <<
__AFLOW_FUNC__ <<
" ERROR! No atoms found in the structure" << print_directory << endl;
7191 cerr <<
XPID <<
"pflow::PerformFullSymmetry: CALCULATING MIN DISTANCE" << print_directory << endl;
7195 cerr <<
XPID <<
"pflow::PerformFullSymmetry: MIN DISTANCE DONE" << print_directory << endl;
7198 double min_dist = a.dist_nn_min;
7201 cerr <<
XPID <<
"pflow::PerformFullSymmetry: ERROR! Atoms too close (min_dist=" << min_dist << print_directory << endl;
7209 a.sym_eps = tolerance;
7210 }
else if (!a.sym_eps_calculated || a.sym_eps ==
AUROSTD_NAN) {
7211 a.sym_eps = SYM::defaultTolerance(a);
7220 double orig_tolerance = a.sym_eps;
7221 if (!aflags.QUIET) {
7222 aus <<
XPID << (aflags.QUIET ?
"" :
"00000 MESSAGE ") <<
"Symmetry: starting tolerance " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7226 a.sym_eps_no_scan = no_scan;
7228 cerr <<
XPID <<
"pflow::PerformFullSymmetry: no_scan=" << a.sym_eps_no_scan << endl;
7231 while (symmetry_commensurate ==
false) {
7232 a.sym_eps_calculated =
true;
7234 if (kflags.KBIN_SYMMETRY_CALCULATE_PGROUP) {
7235 if (!SYM::CalculatePointGroup(FileMESSAGE, a, aflags, kflags.KBIN_SYMMETRY_PGROUP_WRITE, osswrite, oss, format)) {
7237 cerr <<
__AFLOW_FUNC__ <<
" WARNING: PGROUP calculation is inconsisent." << endl;
7239 if (!a.sym_eps_no_scan) {
7241 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7243 if (force_perform) {
7244 cerr <<
__AFLOW_FUNC__ <<
" Scan failed [0]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7245 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7251 aus <<
XPID <<
"00000 MESSAGE PGROUP Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7258 if (kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK) {
7259 if (!SYM::CalculatePointGroupKLattice(FileMESSAGE, a, aflags, kflags.KBIN_SYMMETRY_PGROUPK_WRITE, osswrite, oss, format)) {
7261 cerr <<
__AFLOW_FUNC__ <<
" WARNING: PGROUPK calculation is inconsisent." << endl;
7263 if (!a.sym_eps_no_scan) {
7265 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7267 if (force_perform) {
7268 cerr <<
__AFLOW_FUNC__ <<
" Scan failed [1]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7269 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7275 aus <<
XPID <<
"00000 MESSAGE PGROUPK Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7283 if (kflags.KBIN_SYMMETRY_CALCULATE_PGROUP && SYM::CheckForIdentity(a) ==
false) {
7285 cerr <<
__AFLOW_FUNC__ <<
" WARNING: Point group does not contain the identity element (impossible for a crystal)." << print_directory << endl;
7287 if (!a.sym_eps_no_scan) {
7289 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7291 if (force_perform) {
7292 cerr <<
__AFLOW_FUNC__ <<
" Scan failed [2]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7293 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7299 aus <<
XPID <<
"00000 MESSAGE PGROUP Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7306 if (kflags.KBIN_SYMMETRY_CALCULATE_FGROUP) {
7307 if (!SYM::CalculateFactorGroup(FileMESSAGE, a, aflags, kflags.KBIN_SYMMETRY_FGROUP_WRITE, osswrite, oss, format)) {
7309 cerr <<
__AFLOW_FUNC__ <<
" WARNING: FGROUP calculation is inconsisent." << endl;
7311 if (!a.sym_eps_no_scan) {
7313 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7315 if (force_perform) {
7316 cerr <<
__AFLOW_FUNC__ <<
" Scan failed [3]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7317 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7323 aus <<
XPID <<
"00000 MESSAGE FGROUP Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7331 if (kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL) {
7332 if (!SYM::CalculatePointGroupCrystal(FileMESSAGE, a, aflags, kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE, osswrite, oss, format)) {
7334 cerr <<
__AFLOW_FUNC__ <<
" WARNING: PGROUP_XTAL calculation is inconsisent." << endl;
7336 if (!a.sym_eps_no_scan) {
7338 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7340 if (force_perform) {
7341 cerr <<
XPID <<
"pflow::PerformFullSymmetry: Scan failed [4]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7342 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7348 aus <<
XPID <<
"00000 MESSAGE PGROUP_XTAL Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7356 if (kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL && a.point_group_Hermann_Mauguin.empty() ==
true) {
7358 cerr <<
__AFLOW_FUNC__ <<
" WARNING: Point group crystal operations did not match with any Hermann-Mauguin symbols. (i.e. The set of symmetry elements found are not allowed possible for a crystal.) "
7359 << print_directory << endl;
7362 if (!a.sym_eps_no_scan) {
7364 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7366 if (force_perform) {
7367 cerr <<
__AFLOW_FUNC__ <<
" Scan failed [5]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7368 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7374 aus <<
XPID <<
"00000 MESSAGE PGROUP_XTAL Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7381 int multiplicity_of_primitive = 0;
7382 if (kflags.KBIN_SYMMETRY_CALCULATE_FGROUP && kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL) {
7383 multiplicity_of_primitive = a.fgroup.size() / a.pgroup_xtal.size();
7384 if (a.fgroup.size() % a.pgroup_xtal.size() != 0) {
7386 cerr <<
__AFLOW_FUNC__ <<
" WARNING: Number of factor groups is not an integer multiple of the point group crystal (fgroup: " << a.fgroup.size() <<
" vs pgroup_xtal: " << a.pgroup_xtal.size()
7387 <<
")." << print_directory << endl;
7389 if (!a.sym_eps_no_scan) {
7391 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7393 if (force_perform) {
7394 cerr <<
__AFLOW_FUNC__ <<
" Scan failed [6]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7395 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7401 aus <<
XPID <<
"00000 MESSAGE PGROUP_XTAL Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7408 if (kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL) {
7409 if (!SYM::CalculatePointGroupKCrystal(FileMESSAGE, a, aflags, kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE, osswrite, oss, format)) {
7411 cerr <<
__AFLOW_FUNC__ <<
" WARNING: PGROUPK_XTAL calculation is inconsisent." << endl;
7413 if (!a.sym_eps_no_scan) {
7415 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7417 if (force_perform) {
7418 cerr <<
__AFLOW_FUNC__ <<
" Scan failed [7]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7419 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7425 aus <<
XPID <<
"00000 MESSAGE PGROUPK_XTAL Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7433 if (kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON) {
7434 if (!SYM::CalculatePointGroupKPatterson(FileMESSAGE, a, aflags, kflags.KBIN_SYMMETRY_PGROUPK_PATTERSON_WRITE, osswrite, oss, format)) {
7436 cerr <<
__AFLOW_FUNC__ <<
" WARNING: PGROUPK_PATTERSON calculation is inconsisent." << endl;
7438 if (!a.sym_eps_no_scan) {
7440 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7442 if (force_perform) {
7443 cerr <<
__AFLOW_FUNC__ <<
" Scan failed [0]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7444 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7450 aus <<
XPID <<
"00000 MESSAGE PGROUPK_PATTERSON Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7457 if (kflags.KBIN_SYMMETRY_CALCULATE_SGROUP) {
7458 if (kflags.KBIN_SYMMETRY_SGROUP_RADIUS > 0.0) {
7460 aus <<
XPID <<
"00000 MESSAGE POSCAR SGROUP: found RADIUS=" << kflags.KBIN_SYMMETRY_SGROUP_RADIUS <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7466 aus <<
XPID <<
"00000 MESSAGE POSCAR SGROUP: Default RADIUS=" << kflags.KBIN_SYMMETRY_SGROUP_RADIUS <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7470 a.sgroup_radius = kflags.KBIN_SYMMETRY_SGROUP_RADIUS;
7472 if (!SYM::CalculateSpaceGroup(FileMESSAGE, a, aflags, kflags.KBIN_SYMMETRY_SGROUP_WRITE, osswrite, oss, format)) {
7474 cerr <<
__AFLOW_FUNC__ <<
" WARNING: SGROUP calculation is inconsisent." << endl;
7476 if (!a.sym_eps_no_scan) {
7478 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7480 if (force_perform) {
7481 cerr <<
XPID <<
"pflow::PerformFullSymmetry: Scan failed [8]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7482 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7488 aus <<
XPID <<
"00000 MESSAGE SGROUP Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7496 if (kflags.KBIN_SYMMETRY_CALCULATE_IATOMS) {
7497 if (!SYM::CalculateInequivalentAtoms(FileMESSAGE, a, aflags, kflags.KBIN_SYMMETRY_IATOMS_WRITE, osswrite, oss, format)) {
7499 cerr <<
__AFLOW_FUNC__ <<
" WARNING: IATOMS calculation is inconsisent." << endl;
7501 if (!a.sym_eps_no_scan) {
7503 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7505 if (force_perform) {
7506 cerr <<
__AFLOW_FUNC__ <<
" Scan failed [9]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7507 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7513 aus <<
XPID <<
"00000 MESSAGE IATOMS ATOMS: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7520 bool iatoms_commensurate =
true;
7521 for (
size_t i = 0; i < a.iatoms.size(); i++) {
7522 if (a.iatoms[i].size() % multiplicity_of_primitive != 0) {
7523 iatoms_commensurate =
false;
7527 if (iatoms_commensurate ==
false) {
7529 cerr <<
__AFLOW_FUNC__ <<
" WARNING: Number of equivalent atoms is not an integer multiple of the number factor groups." << print_directory << endl;
7531 if (!a.sym_eps_no_scan) {
7533 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7535 if (force_perform) {
7536 cerr <<
XPID <<
"pflow::PerformFullSymmetry: Scan failed [10]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7537 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7543 aus <<
XPID <<
"00000 MESSAGE IATOMS ATOMS: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7551 if (kflags.KBIN_SYMMETRY_CALCULATE_AGROUP) {
7552 if (!SYM::CalculateSitePointGroup(FileMESSAGE, a, aflags, kflags.KBIN_SYMMETRY_AGROUP_WRITE, osswrite, oss, format)) {
7554 cerr <<
__AFLOW_FUNC__ <<
" WARNING: AGROUP calculation is inconsisent." << endl;
7556 if (!a.sym_eps_no_scan) {
7558 if (!SYM::change_tolerance(a, a.sym_eps, min_dist, a.sym_eps_no_scan)) {
7560 if (force_perform) {
7561 cerr <<
__AFLOW_FUNC__ <<
" Scan failed [11]. Reverting back to original tolerance and recalculating as is (with aforementioned inconsistencies)." << print_directory << endl;
7562 PerformFullSymmetry(a, orig_tolerance,
true,
false, FileMESSAGE, aflags, kflags, osswrite, oss, format);
7568 aus <<
XPID <<
"00000 MESSAGE AGROUP Symmetry: changing tolerance to " << a.sym_eps <<
" " <<
Message(
__AFLOW_FILE__, aflags) << endl;
7575 symmetry_commensurate =
true;
7578 a.lattice = b.lattice;
7582 cerr <<
__AFLOW_FUNC__ <<
" SYMMETRY CALCULATION IS COMPLETE." << endl;
7583 cerr <<
__AFLOW_FUNC__ <<
" # pgroup: " << a.pgroup.size() << endl;
7584 cerr <<
__AFLOW_FUNC__ <<
" # pgroupk: " << a.pgroupk.size() << endl;
7585 cerr <<
__AFLOW_FUNC__ <<
" # fgroup: " << a.fgroup.size() << endl;
7586 cerr <<
__AFLOW_FUNC__ <<
" # pgroup_xtal: " << a.pgroup_xtal.size() << endl;
7587 cerr <<
__AFLOW_FUNC__ <<
" # pgroupk_xtal: " << a.pgroupk_xtal.size() << endl;
7588 cerr <<
__AFLOW_FUNC__ <<
" # pgroupk_Patterson: " << a.pgroupk_Patterson.size() << endl;
7589 cerr <<
__AFLOW_FUNC__ <<
" # sgroup: " << a.sgroup.size() << endl;
7590 cerr <<
__AFLOW_FUNC__ <<
" # agroup: " << a.agroup.size() << endl;
7592 return symmetry_commensurate;
7598 kflags.KBIN_SYMMETRY_PGROUP_WRITE = write;
7599 kflags.KBIN_SYMMETRY_PGROUPK_WRITE = write;
7600 kflags.KBIN_SYMMETRY_FGROUP_WRITE = write;
7601 kflags.KBIN_SYMMETRY_PGROUP_XTAL_WRITE = write;
7602 kflags.KBIN_SYMMETRY_PGROUPK_XTAL_WRITE = write;
7603 kflags.KBIN_SYMMETRY_PGROUPK_PATTERSON_WRITE = write;
7604 kflags.KBIN_SYMMETRY_IATOMS_WRITE = write;
7605 kflags.KBIN_SYMMETRY_AGROUP_WRITE = write;
7606 kflags.KBIN_SYMMETRY_SGROUP_WRITE = write;
7609 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP = calc;
7610 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK = calc;
7611 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP = calc;
7612 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL = calc;
7613 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL = calc;
7614 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_PATTERSON = calc;
7615 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS = calc;
7616 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP = calc;
7617 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP = calc;
7626 if (
XHOST.vflag_control.flag(
"PRINT_MODE::PYTHON")) {
7627 SYM::writePythonScript(oss);
7635 aflags.Directory =
".";
7636 aflags.QUIET =
false;
7644 const bool osswrite =
true;
7651 const bool LDEBUG = (
false ||
XHOST.DEBUG);
7656 vector<string> tokens;
7658 if (tokens.size() == 1) {
7659 if (tokens[0] ==
"usage" || tokens[0] ==
"USAGE") {
7661 aurostd::liststring2string(
"aflow --aflow-sym|--AFLOW-SYM|--AFLOWSYM|--aflowSYM|--aflowsym|--full_symmetry|--full_sym|--fullsym[=<tolerance_value>|=tight|=loose] [--no_scan] "
7662 "[--print=txt|json] [--screen_only] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR default: "
7663 "tolerance=(minimum_interatomic_distance)/100.0, print=txt"));
7669 if (
XHOST.vflag_control.flag(
"PRINT_MODE::PYTHON")) {
7670 SYM::writePythonScript(oss);
7679 if (vpflow.
flag(
"FULLSYMMETRY::MAGNETIC")) {
7686 double tolerance = pflow::getSymmetryTolerance(a, vpflow.
getattachedscheme(
"FULLSYMMETRY::TOLERANCE"));
7689 string format =
"txt";
7690 if (
XHOST.vflag_control.flag(
"PRINT_MODE::TXT")) {
7692 }
else if (
XHOST.vflag_control.flag(
"PRINT_MODE::JSON")) {
7700 if (vpflow.
flag(
"FULLSYMMETRY::SCREEN_ONLY")) {
7728 if (vpflow.
flag(
"FULLSYMMETRY::NO_SCAN")) {
7729 a.sym_eps_no_scan =
true;
7732 bool tocompress =
true;
7733 ofstream FileMESSAGE(
"/dev/null");
7735 if (
XHOST.vflag_control.flag(
"DIRECTORY")) {
7736 directory =
XHOST.vflag_control.getattachedscheme(
"DIRECTORY");
7738 aflags.Directory = directory;
7740 oss <<
"pflow::CalculateFullSymmetry: ERROR: Unable to locate " << directory <<
". Exiting." << endl;
7748 if (format ==
"txt") {
7749 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
7758 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
7787 }
else if (format ==
"json") {
7788 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
7797 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
7829 if (!
pflow::PerformFullSymmetry(a, tolerance, a.sym_eps_no_scan,
true, FileMESSAGE, aflags, kflags, osswrite, oss, format)) {
7834 if (print ==
true) {
7835 KBIN_SymmetryToScreen(a, format, oss);
7841 if (format ==
"txt") {
7869 }
else if (format ==
"json") {
7912 xstr.fixEmptyAtomNames(force_fix);
7923 string directory = argv.at(2);
7924 bool tocompress =
false;
7926 aflags.Directory = directory;
7930 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
7938 for (
size_t iext = 1; iext <
XHOST.vext.size(); iext++) {
7991 ofstream FileMESSAGE(
"/dev/null");
7993 kflags.AFLOW_MODE_VASP =
true;
7997 ifstream FileAFLOWIN(
string(directory +
string(
"/" +
_AFLOWIN_)).c_str());
8002 while (FileAFLOWIN.get(c)) {
8005 FileAFLOWIN.close();
8007 aflags.QUIET =
true;
8009 vflags = KBIN::VASP_Get_Vflags_from_AflowIN(AflowIn, aflags, kflags);
8010 KBIN::VASP_Produce_POSCAR(xvasp, AflowIn, FileMESSAGE, aflags, kflags, vflags);
8012 bool PGROUPWRITE =
true;
8013 bool PGROUPKWRITE =
true;
8014 bool FGROUPWRITE =
true;
8015 bool SGROUPWRITE =
false;
8016 bool IATOMSWRITE =
true;
8017 bool AGROUPWRITE =
true;
8018 const bool OSSWRITE =
true;
8019 SYM::CalculatePointGroup(FileMESSAGE, xvasp.str, aflags, PGROUPWRITE, OSSWRITE, cout);
8020 SYM::CalculatePointGroupKLattice(FileMESSAGE, xvasp.str, aflags, PGROUPKWRITE, OSSWRITE, cout);
8021 SYM::CalculateFactorGroup(FileMESSAGE, xvasp.str, aflags, FGROUPWRITE, OSSWRITE, cout);
8022 SYM::CalculateSpaceGroup(FileMESSAGE, xvasp.str, aflags, SGROUPWRITE, OSSWRITE, cout);
8023 SYM::CalculateInequivalentAtoms(FileMESSAGE, xvasp.str, aflags, IATOMSWRITE, OSSWRITE, cout);
8024 SYM::CalculateSitePointGroup(FileMESSAGE, xvasp.str, aflags, AGROUPWRITE, OSSWRITE, cout);
8078 return string(
"AFLOW " +
string(AFLOW_VERSION) +
" Symmetry Fixed in " + directory +
" (need aflow>=2948)\n");
8086 void FGROUP(_aflags& aflags, istream& input) {
8088 aflags.QUIET =
true;
8090 const bool WRITE =
true;
8091 ofstream FileMESSAGE(
"/dev/null");
8095 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
8096 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
8097 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
true;
8098 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
false;
8099 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
8100 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
8101 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
8102 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
8112 const bool LDEBUG = (
false ||
XHOST.DEBUG);
8118 flag_name =
"FINDSYM_PRINT";
8121 flag_name =
"FINDSYM_EXEC";
8124 vector<string> tokens;
8126 if (tokens.size() >= 2) {
8133 if (vpflow.
flag(
"SG::TOLERANCE")) {
8135 vector<string> tol_tokens;
8137 if (tol_tokens.empty()) {
8140 if (tol_tokens.size() == 1) {
8146 cout << a.findsym2print(tolerance) << endl;
8149 cout << a.findsym2execute(tolerance) << endl;
8163 const bool LDEBUG = (
false ||
XHOST.DEBUG);
8165 vector<string> kpoints_old;
8166 vector<string> eigenval_old;
8167 vector<string> tokens;
8168 vector<string> kpoints_new_string;
8169 stringstream kpoints_new;
8170 stringstream eigenval_new;
8171 const string directory = aflags.Directory;
8172 cout <<
XPID <<
"pflow::FIXBANDS: aflow --fix_bands=POSCAR,KPOINTS.bands.old,EIGENVAL.bands.old,KPOINTS.bands.new,EIGENVAL.bands.new" << endl;
8175 uint eigenval_size = 0;
8180 vector<string> vopt;
8182 uint vopt_counter = 0;
8184 if (vopt.size() < 5) {
8188 const string FILE_POSCAR_IN = directory +
"/" + vopt.at(vopt_counter++);
8190 cout <<
XPID <<
"pflow::FIXBANDS: File POSCAR: " << FILE_POSCAR_IN <<
" not found, nothing to do" << endl;
8193 cout <<
XPID <<
"pflow::FIXBANDS: Load File POSCAR: " << FILE_POSCAR_IN << endl;
8195 ifstream File_POSCAR_IN(FILE_POSCAR_IN.c_str());
8197 File_POSCAR_IN.close();
8199 const string FILE_KPOINTS_BANDS_OLD_IN = directory +
"/" + vopt.at(vopt_counter++);
8201 cout <<
XPID <<
"pflow::FIXBANDS: File KPOINTS_BANDS_OLD: " << FILE_KPOINTS_BANDS_OLD_IN <<
" not found, nothing to do" << endl;
8204 cout <<
XPID <<
"pflow::FIXBANDS: Load File KPOINTS_BANDS_OLD: " << FILE_KPOINTS_BANDS_OLD_IN << endl;
8207 aus << kpoints_old.at(1);
8211 string LATTICE = tokens.at(0);
8212 if (LATTICE ==
"KPOINTS:" && tokens.size() > 1) {
8213 LATTICE = tokens[1];
8216 const string FILE_EIGENVAL_BANDS_OLD_IN = directory +
"/" + vopt.at(vopt_counter++);
8218 cout <<
XPID <<
"pflow::FIXBANDS: File EIGENVAL_BANDS_OLD: " << FILE_EIGENVAL_BANDS_OLD_IN <<
" not found, nothing to do" << endl;
8221 cout <<
XPID <<
"pflow::FIXBANDS: Load File EIGENVAL_BANDS_OLD: " << FILE_EIGENVAL_BANDS_OLD_IN << endl;
8228 eigenval_size = tokens.size() - 1;
8238 vector<xvector<double>> vbzpoint;
8239 vector<xmatrix<double>> vbzband;
8241 for (
uint ivbz = 0; ivbz < points_bz; ivbz++) {
8244 aus.str(eigenval_old.at(step++));
8246 aus >> bzpoint[1] >> bzpoint[2] >> bzpoint[3] >> pos4;
8247 vbzpoint.push_back(bzpoint);
8249 for (
uint ivbands = 0; ivbands < nbands; ivbands++) {
8251 aus.str(eigenval_old.at(step++));
8252 for (
uint ieig = 0; ieig < eigenval_size; ieig++) {
8253 aus >> bzband[ivbands + 1][ieig + 1];
8256 vbzband.push_back(bzband);
8260 for (
uint ivbz = 0; ivbz < points_bz; ivbz++) {
8266 cerr <<
"DEBUG eigenval_size=" << eigenval_size << endl;
8269 cerr <<
"DEBUG points_bz=" << points_bz << endl;
8272 cerr <<
"DEBUG nbands=" << nbands << endl;
8275 cerr <<
"DEBUG pos4=" << pos4 << endl;
8278 cout <<
XPID <<
"pflow::FIXBANDS: LATTICE=" << LATTICE << endl;
8279 string tmp_kpoints = LATTICE::KPOINTS_Directions(LATTICE, str.lattice, grid, str.iomode, foundBZ);
8283 cout <<
XPID <<
"pflow::FIXBANDS: PATH= " << kpoints_new_string.at(0) << endl;
8284 kpoints_new.clear();
8285 kpoints_new.str(std::string());
8286 for (
uint i = 0; i <= 3; i++) {
8287 kpoints_new << kpoints_new_string.at(i) << endl;
8289 eigenval_new.clear();
8290 eigenval_new.str(std::string());
8291 for (
uint i = 0; i <= 4; i++) {
8292 eigenval_new << eigenval_old.at(i) << endl;
8297 kpoints_NEW = (kpoints_new_string.size() - 3) * grid / 3;
8298 eigenval_new <<
" " << int(grid) <<
" " << kpoints_NEW <<
" " << nbands << endl;
8302 for (
size_t ikpz = 4; ikpz < kpoints_new_string.size();) {
8304 if (tokens.size() < 2) {
8305 kpoints_new << kpoints_new_string.at(ikpz++) << endl;
8311 aus.str(kpoints_new_string[ikpz]);
8312 string_from = kpoints_new_string.at(ikpz++);
8313 aus >> kpoint_from[1] >> kpoint_from[2] >> kpoint_from[3];
8318 aus.str(kpoints_new_string[ikpz]);
8319 string_to = kpoints_new_string.at(ikpz++);
8320 aus >> kpoint_to[1] >> kpoint_to[2] >> kpoint_to[3];
8323 kpoint_delta = (kpoint_to - kpoint_from) / (grid - 1.0);
8324 const double kpoins_delta_prec = 1.0 * modulus(kpoint_delta);
8325 for (
uint jkpz = 0; jkpz < (
uint) grid; jkpz++) {
8329 for (
size_t ivbz = 0; ivbz < vbzpoint.size(); ivbz++) {
8330 if (modulus(vbzpoint[ivbz] - kpoint_from) < err) {
8332 err = modulus(vbzpoint[ivbz] - kpoint_from);
8335 if (err > kpoins_delta_prec) {
8336 cerr <<
"************************************************" << endl;
8337 cerr <<
"kpoint_from: not found (" << kpoint_from <<
")" << endl;
8338 cerr <<
"closest is vbzpoint.at(index)=" << vbzpoint.at(index) <<
" with err=" << err << endl;
8339 cerr <<
"************************************************" << endl;
8344 eigenval_new << endl;
8345 eigenval_new.precision(7);
8346 eigenval_new.setf(std::ios::scientific, std::ios::floatfield);
8347 eigenval_new <<
" " << vbzpoint.at(index)[1] <<
" " << vbzpoint.at(index)[2] <<
" " << vbzpoint.at(index)[3] <<
" " << pos4 << endl;
8348 for (
uint ivbands = 1; ivbands <= nbands; ivbands++) {
8349 eigenval_new <<
" " << (int) vbzband.at(index)[ivbands][1];
8350 eigenval_new.precision(5);
8351 eigenval_new.setf(std::ios::fixed, std::ios::floatfield);
8352 for (
uint ieig = 2; ieig <= eigenval_size; ieig++) {
8353 eigenval_new <<
" " << vbzband.at(index)[ivbands][ieig];
8355 eigenval_new << endl;
8359 kpoint_from = kpoint_from + kpoint_delta;
8362 kpoints_new << string_from << endl;
8363 kpoints_new << string_to << endl;
8366 kpoints_new << endl;
8368 const string FILE_KPOINTS_BANDS_NEW_OUT = directory +
"/" + vopt.at(vopt_counter++);
8370 cout <<
XPID <<
"pflow::FIXBANDS: Save File KPOINTS_BANDS_NEW: " << FILE_KPOINTS_BANDS_NEW_OUT << endl;
8372 const string FILE_EIGENVAL_BANDS_NEW_OUT = directory +
"/" + vopt.at(vopt_counter++);
8374 cout <<
XPID <<
"pflow::FIXBANDS: Save File EIGENVAL_BANDS_NEW: " << FILE_EIGENVAL_BANDS_NEW_OUT << endl;
8399 oss.setf(std::ios::fixed, std::ios::floatfield);
8400 const uint _precision_ = 10;
8401 oss.precision(_precision_);
8403 vector<string> vinput;
8404 vector<string> tokens;
8405 vector<string> Mrefs;
8406 vector<double> Erefs;
8409 for (
size_t i = 0; i < tokens.size(); i++) {
8411 vinput.push_back(tokens[i]);
8415 for (
size_t i = 0; i < vinput.size(); i++) {
8418 Mrefs.push_back(tokens.at(0) +
"m");
8425 const double frozsl_eps = 1.0e-6;
8426 const double ev2hartree = 1.0 / 27.211383;
8427 for (
size_t i = 0; i < vinput.size(); i++) {
8428 for (
size_t j = 0; j < Mrefs.size(); j++) {
8433 oss << aurostd::PaddedPOST(aurostd::utype2string(1000 * ev2hartree * (aurostd::string2utype<double>(tokens.at(tokens.size() - 1)) - Erefs.at(j))), 23,
" ") <<
" ! ";
8435 oss << tokens.at(0) <<
" - " << Mrefs[j] <<
"0a0" << endl;
8449 oss.setf(std::ios::fixed, std::ios::floatfield);
8450 const uint _precision_ = 10;
8451 oss.precision(_precision_);
8453 vector<string> vinput;
8454 vector<string> tokens;
8457 for (
size_t i = 0; i < tokens.size(); i++) {
8459 vinput.push_back(tokens[i]);
8463 double minE = 1.0e6;
8464 for (
size_t i = 0; i < vinput.size(); i++) {
8468 const double frozsl_eps = 1.0e-6;
8469 const double ev2hartree = 1.0 / 27.211383;
8470 for (
size_t i = 0; i < vinput.size(); i++) {
8473 oss << 1000 * ev2hartree * (aurostd::string2utype<double>(tokens.at(tokens.size() - 1)) - minE) <<
" ! ";
8475 oss << tokens.at(0) << endl;
8488 aflags.Directory =
"./";
8492 string MESSAGE =
"pflow::FROZSL_INPUT ERROR";
8493 aflowin = string(aflags.Directory +
_AFLOWIN_);
8512 aflags.Directory =
"./";
8516 string MESSAGE =
"pflow::FROZSL_OUTPUT ERROR";
8517 aflowin = string(aflags.Directory +
_AFLOWIN_);
8544 if (argv.size() == 2) {
8573 const bool LDEBUG = (
false ||
XHOST.DEBUG);
8578 for (
size_t i = 0; i < outcar.
vmag.size(); i++) {
8579 vmag.push_back(outcar.
vmag[i]);
8582 cerr <<
XPID <<
"pflow::GetCollinearMagneticInfo: ERROR: OUTCAR file does not exist." << endl;
8589 vector<string> vcontent;
8591 bool magmom_found =
false;
8592 for (
size_t i = 0; i < vcontent.size(); i++) {
8593 if (vcontent[i].find(
"MAGMOM=") != std::string::npos) {
8595 if (vcontent[i].find(
"MAGMOM=") == std::string::npos) {
8596 cerr <<
XPID <<
"pflow::GetCollinearMagneticInfo: ERROR: MAGMOM tag is commented out." << endl;
8600 vector<string> mag_tokens;
8602 for (
size_t m = 0; m < mag_tokens.size(); m++) {
8604 if (mag_tokens[m].find(
"*") != std::string::npos) {
8605 vector<string> tokens;
8608 for (
uint n = 0; n < num_magmoms; n++) {
8611 }
else if (!mag_tokens[m].empty()) {
8615 magmom_found =
true;
8619 if (!magmom_found) {
8620 cerr <<
XPID <<
"pflow::GetCollinearMagneticInfo: ERROR: MAGMOM tag was not found in the INCAR." << endl;
8624 cerr <<
XPID <<
"pflow::GetCollinearMagneticInfo: ERROR: INCAR file does not exist." << endl;
8628 vector<string> mag_tokens;
8630 for (
size_t m = 0; m < mag_tokens.size(); m++) {
8632 if (mag_tokens[m].find(
"*") != std::string::npos) {
8633 vector<string> tokens;
8636 for (
uint n = 0; n < num_magmoms; n++) {
8644 if (vmag.size() != num_atoms) {
8646 cerr <<
XPID <<
"pflow::GetCollinearMagneticInfo: WARNING: Number of magnetic moments is not equivalent to the number of atoms." << endl;
8661 const bool LDEBUG = (
false ||
XHOST.DEBUG);
8666 for (
size_t i = 0; i < outcar.
vmag_noncoll.size(); i++) {
8670 cerr <<
XPID <<
"pflow::GetNonCollinearMagneticInfo: ERROR: OUTCAR file does not exist." << endl;
8677 vector<string> vcontent;
8679 bool magmom_found =
false;
8680 for (
size_t i = 0; i < vcontent.size(); i++) {
8681 if (vcontent[i].find(
"MAGMOM=") != std::string::npos) {
8683 if (vcontent[i].find(
"MAGMOM=") == std::string::npos) {
8684 cerr <<
XPID <<
"pflow::GetNonCollinearMagneticInfo: ERROR: MAGMOM tag is commented out." << endl;
8688 vector<string> mag_tokens;
8691 vector<double> all_magmom_tokens;
8692 for (
size_t m = 0; m < mag_tokens.size(); m++) {
8693 if (mag_tokens[m].find(
"*") != std::string::npos) {
8694 vector<string> tokens;
8697 for (
uint n = 0; n < num_magmoms; n++) {
8700 }
else if (!mag_tokens[m].empty()) {
8705 if (all_magmom_tokens.size() != 3 * num_atoms) {
8707 cerr <<
XPID <<
"pflow::GetNonCollinearMagneticInfo: WARNING: From INCAR. Number of magnetic moments not divisible by 3; not non-collinear system." << endl;
8713 for (
size_t m = 0; m < all_magmom_tokens.size(); m++) {
8714 mag_xyz(index) = all_magmom_tokens[m];
8717 vmag_noncoll.push_back(mag_xyz);
8721 magmom_found =
true;
8725 if (!magmom_found) {
8726 cerr <<
XPID <<
"pflow::GetNonCollinearMagneticInfo: ERROR: MAGMOM tag was not found in the INCAR." << endl;
8730 cerr <<
XPID <<
"pflow::GetNonCollinearMagneticInfo: ERROR: INCAR file does not exist." << endl;
8734 vector<string> mag_tokens;
8737 vector<double> all_magmom_tokens;
8738 for (
size_t m = 0; m < mag_tokens.size(); m++) {
8739 if (mag_tokens[m].find(
"*") != std::string::npos) {
8740 vector<string> tokens;
8743 for (
uint n = 0; n < num_magmoms; n++) {
8751 if (all_magmom_tokens.size() != 3 * num_atoms) {
8753 cerr <<
XPID <<
"pflow::GetNonCollinearMagneticInfo: WARNING: From manual input. Number of magnetic moments is not three times the number of atoms; not non-collinear system." << endl;
8759 for (
size_t m = 0; m < all_magmom_tokens.size(); m++) {
8760 mag_xyz(index) = all_magmom_tokens[m];
8763 vmag_noncoll.push_back(mag_xyz);
8780 double radius = 4.0;
8781 if (vpflow.
flag(
"ATOMIC_ENVIRONMENT::AUID")) {
8786 if (vpflow.
flag(
"ATOMIC_ENVIRONMENT::MODE")) {
8789 if (vpflow.
flag(
"ATOMIC_ENVIRONMENT::RADIUS")) {
8792 pflow::outputAtomicEnvironment(auid, ae_mode, radius);
8807 if (!vpflow.
flag(
"PFLOW::ALLOY")) {
8811 cout << endl <<
"Calculating glass-forming ability for " << alloy <<
"." << endl;
8813 if (!vpflow.
flag(
"GFA::AE_FILE")) {
8814 AE_file_read =
"none";
8816 <<
"No AE input file? That's ok, will calculate the atomic environments." << endl
8817 <<
"alternatively, set --ae_file= to specify a file of atomic environments to read; e.g.: --ae_file=All_atomic_environments_read.dat" << endl;
8819 cout << endl <<
"Can't find " << AE_file_read <<
". Will calculate all atomic environments." << endl;
8820 AE_file_read =
"none";
8822 cout << endl <<
"Reading atomic environments from file: " << AE_file_read <<
"." << endl;
8828 if (vpflow.
flag(
"GFA::FORMATION_ENTHALPY_CUTOFF")) {
8831 cout << endl <<
"Using " << fe_cut <<
" eV formation enthalpy cutoff for structures to include in the analysis." << endl;
8833 pflow::CalculateGFA(vpflow, alloy, AE_file_read, fe_cut);
8843 pflow::PrintGulp(a, cout);
8851 void HKL(
const string& options, _aflags& aflags, istream& input) {
8852 const bool LDEBUG = (
false ||
XHOST.DEBUG);
8856 vector<string> tokens;
8858 if (tokens.size() != 3 && tokens.size() != 4) {
8863 cerr <<
XPID <<
"pflow::HKL: a=" << a << endl;
8865 vector<vector<double>> planesreducible;
8866 vector<vector<double>> planesirreducible;
8869 cerr <<
XPID <<
"pflow::HKL: mode=" << tokens.size() << endl;
8872 if (!tokens.empty()) {
8875 if (tokens.size() > 1) {
8878 if (tokens.size() > 2) {
8881 if (tokens.size() > 3) {
8885 cerr <<
XPID <<
"pflow::HKL: iparams=" << iparams << endl;
8888 surface::GetSurfaceHKL(a, aflags, iparams, planesreducible, planesirreducible, cout);
8900 void HKLSearch(
const string& options, _aflags& aflags, istream& input,
const string& smode) {
8901 const bool LDEBUG =
true;
8905 vector<string> tokens;
8909 cerr <<
XPID <<
"pflow::HKLSearch: smode=" << smode << endl;
8912 cerr <<
XPID <<
"pflow::HKLSearch: tokens.size()=" << tokens.size() << endl;
8915 cerr <<
XPID <<
"pflow::HKLSearch: options=" << options << endl;
8918 if (smode ==
"HKL_SEARCH_TRIVIAL" && tokens.size() > 3) {
8921 if (smode ==
"HKL_SEARCH_SIMPLE" && tokens.size() > 4) {
8924 if (smode ==
"HKL_SEARCH_COMPLETE" && tokens.size() > 4) {
8929 vector<vector<double>> planesreducible;
8930 vector<vector<double>> planesirreducible;
8931 vector<vector<uint>> planesirreducible_images;
8934 cerr <<
XPID <<
"pflow::HKLSearch: tokens.size()=" << tokens.size() << endl;
8940 cerr <<
XPID <<
"pflow::HKLSearch: iparams.rows=" << iparams.
rows << endl;
8943 if (!tokens.empty()) {
8946 if (tokens.size() > 1) {
8949 if (tokens.size() > 2) {
8952 if (tokens.size() > 3) {
8956 cerr <<
XPID <<
"pflow::HKLSearch: iparams=" << iparams << endl;
8959 surface::GetSurfaceHKLSearch(a, aflags, iparams, planesreducible, planesirreducible, planesirreducible_images, cout, smode);
8960 cout <<
"REDUCIBLE_SIZE " << planesreducible.size() << endl;
8961 cout <<
"IRREDUCIBLE_SIZE " << planesirreducible.size() << endl;
8972 bool setPOCCTOL(xstructure& xstr,
const string& pocc_tol_string) {
8973 const bool LDEBUG = (
false ||
XHOST.DEBUG);
8976 cerr <<
__AFLOW_FUNC__ <<
" pocc_tol_string=" << pocc_tol_string << endl;
8978 if (pocc_tol_string.empty()) {
8981 stringstream message;
8983 message <<
"Cannot handle more than one pocc_tol specification";
8986 vector<string> tokens;
8989 if (!tokens.empty()) {
8991 message <<
"Input is not a float [input=" << tokens[0] <<
"]";
8996 message <<
"Tolerance is too small (0) [input=" << tokens[0] <<
"]";
8999 if (std::signbit(tol)) {
9000 xstr.neg_scale_second =
true;
9001 xstr.partial_occupation_HNF = -1 * (int) tol;
9004 xstr.partial_occupation_site_tol = xstr.partial_occupation_stoich_tol = tol;
9007 if (tokens.size() > 1) {
9009 message <<
"Input is not a float [input=" << tokens[1] <<
"]";
9014 message <<
"Tolerance is too small (0) [input=" << tokens[1] <<
"]";
9017 if (std::signbit(tol)) {
9018 message <<
"Tolerance cannot be negative [input=" << tokens[1] <<
"]";
9021 xstr.scale_third.isentry =
true;
9022 xstr.partial_occupation_stoich_tol = tol;
9034 if (!
XHOST.vflag_control.flag(
"WWW")) {
9038 if (vpflow.
flag(
"POCC_TOL")) {
9041 pocc::POccCalculator pcalc(xstr, vpflow, oss);
9042 pcalc.m_count_unique_fast = vpflow.
flag(
"POCC_COUNT_UNIQUE_FAST");
9043 if (!pcalc.m_initialized) {
9046 pcalc.calculateHNF();
9047 if (vpflow.
flag(
"HNF")) {
9048 return pcalc.m_initialized;
9050 pcalc.getTotalPermutationsCount();
9051 if (vpflow.
flag(
"POCC_COUNT_TOTAL")) {
9052 return pcalc.m_initialized;
9055 if (vpflow.
flag(
"POCC_COUNT_UNIQUE") || vpflow.
flag(
"POCC_COUNT_UNIQUE_FAST")) {
9056 return pcalc.m_initialized;
9059 oss <<
"Creating list of unique derivative supercells." << endl;
9060 for (
unsigned long long int i = 0; i < pcalc.getUniqueSuperCellsCount(); i++) {
9064 oss << pcalc.getUniqueSuperCell(i);
9068 return pcalc.m_initialized;
9073 string HNF(vector<string> argv, istream& input, ostream& oss) {
9081 str.CalculateSymmetryPointGroup();
9083 oss <<
"[AFLOW] CALCULATION OF HNF xstructures" << endl;
9084 oss <<
"[AFLOW] pgroup operations = " << str.pgroup.size() << endl;
9090 if (argv.size() >= 3) {
9095 vn.push_back(choice);
9098 for (
int i = 2; i <= -choice; i++) {
9106 vector<xmatrix<double>> sHNF;
9107 for (
size_t in = 0; in < vn.size(); in++) {
9108 const int n = vn[in];
9110 oss <<
"[AFLOW] n = " << n << endl;
9111 sHNF = CalculateHNF(str, n);
9156 oss <<
"[AFLOW] supercells = " << sHNF.size() << endl;
9159 for (
size_t j = 0; j < sHNF.size(); j++) {
9164 for (
uint ii = 1; ii <= 3; ii++) {
9165 for (
uint jj = 1; jj <= 3; jj++) {
9169 oss <<
"[VASP_POSCAR_MODE_EXPLICIT]START.HNF_" << n <<
"_" << j + 1 <<
"_" << sHNF.size() << endl;
9172 oss <<
"[VASP_POSCAR_MODE_EXPLICIT]STOP.HNF_" << n <<
"_" << j + 1 <<
"_" << sHNF.size() << endl;
9186 string HNFTOL(vector<string> argv, istream& input, ostream& oss) {
9196 oss <<
"[AFLOW] CALCULATION OF HNFTOL xstructures" << endl;
9203 uint digits2 = 2 * digits + 11;
9206 if (argv.size() >= 3) {
9209 if (argv.size() == 2) {
9210 tolerance = str.partial_occupation_site_tol;
9212 oss <<
"[AFLOW] hnf_tolerance=" << tolerance << endl;
9218 oss.precision(digits);
9222 vector<double> error_iatom;
9223 vector<double> effective_pocc_iatom;
9224 vector<uint> M_iatom;
9225 for (
size_t iatom = 0; iatom < str.atoms.size(); iatom++) {
9226 error_iatom.push_back(1.0);
9228 for (
size_t iatom = 0; iatom < str.atoms.size(); iatom++) {
9229 effective_pocc_iatom.push_back(0.0);
9231 for (
size_t iatom = 0; iatom < str.atoms.size(); iatom++) {
9232 M_iatom.push_back(0);
9236 for (
size_t iatom = 0; iatom < str.atoms.size(); iatom++) {
9237 if (str.atoms[iatom].partial_occupation_value < 1.0) {
9241 oss <<
" | " <<
"error" << endl;
9242 while (error > tolerance) {
9246 for (
size_t iatom = 0; iatom < str.atoms.size(); iatom++) {
9247 error_iatom.at(iatom) = 1.0;
9248 M_iatom.at(iatom) = 0;
9249 for (
int j = 0; j <= HNFi; j++) {
9250 eps = std::abs((
double) j / HNFi - str.atoms[iatom].partial_occupation_value);
9251 if (eps < error_iatom.at(iatom)) {
9252 error_iatom.at(iatom) = eps;
9253 M_iatom.at(iatom) = (
uint) j;
9254 effective_pocc_iatom.at(iatom) = (double) M_iatom.at(iatom) / HNFi;
9258 for (
size_t iatom = 0; iatom < str.atoms.size(); iatom++) {
9259 if (str.atoms[iatom].partial_occupation_value < 1.0) {
9261 aus.precision(digits);
9262 aus.setf(std::ios::fixed, std::ios::floatfield);
9263 aus << effective_pocc_iatom.at(iatom) <<
"," << error_iatom.at(iatom) <<
"," << M_iatom.at(iatom) <<
"/" << HNFi;
9268 oss <<
" | " << error << endl;
9317 const bool LDEBUG = (
false ||
XHOST.DEBUG);
9321 vector<string> tokens;
9323 if (tokens.size() != 4) {
9337 const string nearest_image_flag = tokens.at(3);
9338 PrintImages(strA, strB, nimages, nearest_image_flag);
9362 void JMOL(
const string& options, istream& input) {
9363 const bool LDEBUG = (
false ||
XHOST.DEBUG);
9367 string COLOR =
"white";
9374 vector<string> tokens;
9377 if (tokens.size() > 5) {
9381 if (!tokens.empty()) {
9384 if (tokens.size() >= 2) {
9387 if (tokens.size() >= 3) {
9390 if (tokens.size() >= 4) {
9393 if (tokens.size() >= 5) {
9394 if (tokens[4] ==
"true" || tokens[4] ==
"1") {
9396 cerr <<
XPID <<
"pflow::JMOL: saving output..." << endl;
9401 const string rasFILE =
"ras." +
XHOST.ostrPID.str() +
"." +
XHOST.ostrTID.str();
9402 ras.open(rasFILE.c_str(), std::ios::out);
9403 ras <<
"background " << COLOR << endl <<
"wireframe " << 0.05 << endl;
9407 ofstream FileOUTPUT;
9408 const string FileOUTPUTName =
"aflow.jmol.xyz." +
XHOST.ostrPID.str() +
"." +
XHOST.ostrTID.str();
9409 FileOUTPUT.open(FileOUTPUTName.c_str(), std::ios::out);
9412 if (
max(_ijk) == 0) {
9415 ostringstream aus_exec;
9417 if (_ijk(1) != 1 || _ijk(2) != 1 || _ijk(3) != 1) {
9420 pflow::PrintCIF(FileOUTPUT, a);
9423 aus_exec <<
XHOST.command(
"jmol") <<
" -s " << rasFILE <<
" " << FileOUTPUTName << endl;
9426 if (WRITE ==
false) {
9449 int const argc = argv.size();
9457 if (!(atoi(&argv.at(2)[0]) == 1 or atoi(&argv.at(2)[0]) == 2)) {
9485 ispin = atoi(&argv.at(2)[0]);
9486 kin.open(
"KPOINTS");
9487 getline(kin, tmpstr);
9489 getline(kin, tmpstr);
9490 getline(kin, tmpstr);
9491 getline(kin, tmpstr);
9493 while (!kin.eof()) {
9495 kin >> kseg[i][1] >> kseg[i][2] >> kseg[i][3];
9496 getline(kin, tmpstr);
9504 for (iseg = 1; iseg <= nseg; iseg++) {
9509 kx2 = kseg[i + 1][1];
9510 ky2 = kseg[i + 1][2];
9511 kz2 = kseg[i + 1][3];
9517 dk = (sqrt(dkx * dkx + dky * dky + dkz * dkz)) / (ngrid - 1);
9518 kline[ind++] = koffset;
9519 for (j = 2; j <= ngrid; j++) {
9520 kline[ind++] = koffset + (j - 1) * dk;
9522 koffset = koffset + dk * (ngrid - 1);
9531 ein.open(
"EIGENVAL");
9532 getline(ein, tmpstr);
9533 getline(ein, tmpstr);
9534 getline(ein, tmpstr);
9535 getline(ein, tmpstr);
9536 getline(ein, tmpstr);
9537 ein >> itmp >> itmp;
9538 if (nseg != itmp / ngrid) {
9539 cerr <<
"error nseg inconsistent between KPOINTS and EIGENVAL\n";
9543 getline(ein, tmpstr);
9545 for (i = 1; i <= nseg * ngrid; i++) {
9546 ein >> ftmp >> ftmp >> ftmp >> ftmp;
9547 kband[i][1] = kline[i];
9548 for (j = 1; j <= nband; j++) {
9549 ein >> ftmp >> kband[i][j + 1];
9551 ein >> kband[i][nband + j + 1];
9557 for (i = 1; i <= nseg * ngrid; i++) {
9558 for (j = 1; j <= nband * ispin + 1; j++) {
9559 cout <<
" " << kband[i][j];
9573 if (str_in.num_each_type.size() == 1) {
9576 return KPATH(input, grid, WWW);
9578 void KPATH(istream& input,
double grid,
bool WWW) {
9580 if (std::signbit(grid)) {
9582 if (str_in.num_each_type.size() == 1) {
9588 const bool full_sym =
false;
9589 LATTICE::Standard_Lattice_Structure(str_in, str_sp, str_sc, full_sym);
9590 string lattice_type;
9595 lattice_type = str_sp.bravais_lattice_variation_type;
9597 cout <<
"! STRUCTURE TO RUN ***********************************************************************" << endl;
9606 cout <<
"! KPOINTS TO RUN *************************************************************************" << endl;
9607 sss = LATTICE::KPOINTS_Directions(lattice_type, str_sp.lattice, grid, str_sp.iomode, foundBZ);
9616 cout <<
"// PATH ***********************************************************************************" << endl;
9619 cout <<
"</pre>" << endl;
9620 cout <<
"<img src=https://" <<
XHOST.AFLOW_MATERIALS_SERVER <<
"/SCIENCE/images/brillouin/" << lattice_type <<
".PNG><br>" << endl;
9626 cout <<
"<pre>" << endl;
9628 cout <<
"! END ************************************************************************************" << endl;
9636 xstructure
KPOINTS(
const string& options, istream& input, ostream& oss) {
9637 const bool LDEBUG = (
false ||
XHOST.DEBUG);
9641 vector<string> tokens;
9643 if (tokens.size() != 1) {
9653 const ofstream FileDUMMY;
9654 if (NK > 10000000) {
9657 oss << kintro <<
"KPPRA = " << NK <<
" (requested) " << endl;
9658 const double NK_tmp = (int) ((
double) NK / str.atoms.size() + 0.5);
9662 oss << kintro <<
"KPPRA/#AT = " << NK_tmp << endl;
9665 cerr <<
__AFLOW_FUNC__ <<
" str.kpoints_k1=" << str.kpoints_k1 << endl;
9666 cerr <<
__AFLOW_FUNC__ <<
" str.kpoints_k2=" << str.kpoints_k2 << endl;
9667 cerr <<
__AFLOW_FUNC__ <<
" str.kpoints_k3=" << str.kpoints_k3 << endl;
9670 oss << kintro <<
"DKGRID = [" << modulus(str.klattice(1)) / str.kpoints_k1 <<
"," << modulus(str.klattice(2)) / str.kpoints_k2 <<
"," << modulus(str.klattice(3)) / str.kpoints_k3 <<
"]" << endl;
9671 oss << kintro <<
"KPPRA = " << str.kpoints_kppra <<
" (found) " << endl;
9673 oss << kintro <<
"KPOINTS = " << str.kpoints_k1 <<
" " << str.kpoints_k2 <<
" " << str.kpoints_k3 << endl;
9687 const bool LDEBUG = (
false ||
XHOST.DEBUG);
9693 stringstream message;
9694 message <<
"--delta_kpoints=NUMBER: NUMBER must be bigger than zero (dk=" << DK <<
")";
9697 const ofstream FileDUMMY;
9698 oss << kintro <<
"DK = " << DK <<
" (requested) " << endl;
9701 oss << kintro <<
"DKGRID = [" << modulus(str.klattice(1)) / str.kpoints_k1 <<
"," << modulus(str.klattice(2)) / str.kpoints_k2 <<
"," << modulus(str.klattice(3)) / str.kpoints_k3 <<
"]" << endl;
9702 oss << kintro <<
"KPPRA = " << str.kpoints_kppra <<
" (found) " << endl;
9704 oss << kintro <<
"KPOINTS = " << str.kpoints_k1 <<
" " << str.kpoints_k2 <<
" " << str.kpoints_k3 << endl;
9718 ifstream list1_inf(argv.at(2).c_str());
9720 ifstream list2_inf(argv.at(3).c_str());
9722 std::vector<xstructure> str_vec_1(0);
9723 std::vector<xstructure> str_vec_2(0);
9724 std::vector<xstructure> str_vec_tot(0);
9725 pflow::ReadInStrVec(str_vec_1, list1_inf);
9726 pflow::ReadInStrVec(str_vec_2, list2_inf);
9727 pflow::JoinStrVec(str_vec_1, str_vec_2, str_vec_tot);
9728 pflow::PrintStrVec(str_vec_tot, cout);
9749 const double tolerance = pflow::getSymmetryTolerance(a, vpflow.
getattachedscheme(
"LATTICE::TOLERANCE"));
9750 a.sym_eps = tolerance;
9753 const bool full_sym =
false;
9754 LATTICE::Standard_Lattice_Structure(a, str_sp, str_sc, full_sym);
9759 sss << str_sp.bravais_lattice_type <<
"," << str_sp.bravais_lattice_variation_type << endl;
9772 const double tolerance = pflow::getSymmetryTolerance(a, vpflow.
getattachedscheme(
"LATTICE_LATTICE::TOLERANCE"));
9773 a.sym_eps = tolerance;
9776 const bool full_sym =
false;
9777 LATTICE::Bravais_Lattice_StructureDefault(a, str_sp, str_sc, full_sym);
9782 sss << str_sp.bravais_lattice_lattice_type <<
"," << str_sp.bravais_lattice_lattice_variation_type << endl;
9794 const anrl::ProtoData pd = anrl::ProtoData::get();
9806 string library =
"all";
9807 if (vpflow.
flag(
"LIST_PROTOTYPE_LABELS::LIBRARY")) {
9813 if (vpflow.
flag(
"LIST_PROTOTYPE_LABELS::ARITY")) {
9814 mode = Mode::n_nary;
9819 std::string stoichiometry_key;
9821 if (vpflow.
flag(
"LIST_PROTOTYPE_LABELS::STOICHIOMETRY")) {
9822 vector<string> tokens;
9823 stringstream message;
9824 vector<uint> stoichiometry;
9825 mode = Mode::stoichiometry;
9827 for (
size_t i = 0; i < tokens.size(); i++) {
9830 if (arity != 0 && arity != stoichiometry.size()) {
9831 message <<
"arity=" << arity <<
" and stoichiometry=" <<
aurostd::joinWDelimiter(stoichiometry,
",") <<
" do not match.";
9834 std::sort(stoichiometry.begin(), stoichiometry.end(), std::greater<>());
9839 uint space_group_number = 0;
9840 if (vpflow.
flag(
"LIST_PROTOTYPE_LABELS::SPACE_GROUP")) {
9841 mode = Mode::symmetry;
9847 vector<string> prototype_uid;
9851 case all: prototype_uid = pd.lookup[library];
break;
9853 case n_nary: prototype_uid = pd.lookup[
"number_of_species"][arity];
break;
9855 case stoichiometry: prototype_uid = pd.lookup[
"stoichiometry"][stoichiometry_key];
break;
9857 case symmetry: prototype_uid = pd.lookup[
"space_group_number"][space_group_number];
break;
9860 if (vpflow.
flag(
"LIST_PROTOTYPE_LABELS::JSON")) {
9862 for (
const auto& uid : prototype_uid) {
9863 output_json[uid] = pd.content[uid][
"label"];
9867 for (
const auto& uid : prototype_uid) {
9868 output +=
static_cast<string>(pd.content[uid][
"label"]) +
"(" + uid +
")\n";
9891 return (capital ?
string(
"N") :
string(
"n")) + string(
"ullar") + (plural ? string(
"ies") : string(
"y"));
9894 return (capital ?
string(
"U") :
string(
"u")) + string(
"nar") + (plural ? string(
"ies") : string(
"y"));
9897 return (capital ?
string(
"B") :
string(
"b")) + string(
"inar") + (plural ? string(
"ies") : string(
"y"));
9900 return (capital ?
string(
"T") :
string(
"t")) + string(
"ernar") + (plural ? string(
"ies") : string(
"y"));
9903 return (capital ?
string(
"Q") :
string(
"q")) + string(
"uaternar") + (plural ? string(
"ies") : string(
"y"));
9906 return (capital ?
string(
"Q") :
string(
"q")) + string(
"uinar") + (plural ? string(
"ies") : string(
"y"));
9909 return (capital ?
string(
"S") :
string(
"s")) + string(
"enar") + (plural ? string(
"ies") : string(
"y"));
9912 return (capital ?
string(
"S") :
string(
"s")) + string(
"eptenar") + (plural ? string(
"ies") : string(
"y"));
9915 return (capital ?
string(
"O") :
string(
"o")) + string(
"ctonar") + (plural ? string(
"ies") : string(
"y"));
9918 return (capital ?
string(
"N") :
string(
"n")) + string(
"ovenar") + (plural ? string(
"ies") : string(
"y"));
9921 return (capital ?
string(
"D") :
string(
"d")) + string(
"enar") + (plural ? string(
"ies") : string(
"y"));
9927 bool loadEntries(vector<string>& velements, vector<vector<vector<aflowlib::_aflowlib_entry>>>& entries, ostream& oss) {
9928 ofstream FileMESSAGE;
9929 return loadEntries(velements, entries, FileMESSAGE, oss);
9931 bool loadEntries(vector<string>& velements, vector<vector<vector<aflowlib::_aflowlib_entry>>>& entries, ofstream& FileMESSAGE, ostream& oss) {
9933 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
9934 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
9938 return loadEntries(velements, server, entries, FileMESSAGE, oss);
9940 bool loadEntries(vector<string>& velements,
string server, vector<vector<vector<aflowlib::_aflowlib_entry>>>& entries, ostream& oss) {
9941 ofstream FileMESSAGE;
9942 return loadEntries(velements, server, entries, FileMESSAGE, oss);
9944 bool loadEntries(vector<string>& velements,
string server, vector<vector<vector<aflowlib::_aflowlib_entry>>>& entries, ofstream& FileMESSAGE, ostream& oss) {
9947 return loadEntries(vpflow, velements, server, entries, FileMESSAGE, oss);
9951 ofstream FileMESSAGE;
9952 return loadEntries(vpflow, velements, entries, FileMESSAGE, oss);
9954 bool loadEntries(
aurostd::xoption& vpflow, vector<string>& velements, vector<vector<vector<aflowlib::_aflowlib_entry>>>& entries, ofstream& FileMESSAGE, ostream& oss) {
9956 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
9957 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
9961 return loadEntries(vpflow, velements, server, entries, FileMESSAGE, oss);
9965 ofstream FileMESSAGE;
9966 return loadEntries(vpflow, velements, server, entries, FileMESSAGE, oss);
9968 bool loadEntries(
aurostd::xoption& vpflow, vector<string>& velements,
string server, vector<vector<vector<aflowlib::_aflowlib_entry>>>& entries, ofstream& FileMESSAGE, ostream& oss) {
9970 stringstream message;
9974 aflags.Directory = chull::getPath();
9975 if (vpflow.
flag(
"CHULL::PATH")) {
9976 aflags.Directory = chull::getPath(vpflow, FileMESSAGE, oss);
9979 vpflow.
flag(
"PFLOW::LOAD_ENTRIES_COMING_FROM_LOADENTRIESX",
true);
9984 if (vpflow.
flag(
"PFLOW::LOAD_ENTRIES_NON_ALPHABETICAL")) {
9985 message <<
"Loading NON-alphabetized entries as well";
9989 vector<vector<string>> combinations;
9990 vector<vector<vector<aflowlib::_aflowlib_entry>>> _entries;
9998 if (load_from_common) {
9999 message <<
"Loading entries from COMMON";
10003 message <<
"Using " << server <<
" as server";
10013 string lib_count_string;
10014 string load_lib_flag_name;
10020 for (
size_t lib = 1; lib <= velements.size() && lib <=
_AFLOW_LIB_MAX_; lib++) {
10022 lib_name = std::string(
"LIB") + lib_count_string;
10023 load_lib_flag_name =
"PFLOW::LOAD_ENTRIES_LOAD_" + lib_name;
10024 if (vpflow.
flag(load_lib_flag_name)) {
10025 message <<
"Loading " + lib_name;
10028 for (
size_t i = 0; i < combinations.size(); i++) {
10029 if (!
loadAndMergeLIBX(vpflow, combinations[i], lib_count_string, server, _entries, FileMESSAGE, oss)) {
10030 message <<
"Merging entries for " + lib_name +
" failed";
10046 lib_name = std::string(
"ICSD");
10047 load_lib_flag_name =
"PFLOW::LOAD_ENTRIES_LOAD_" + lib_name;
10048 if (vpflow.
flag(load_lib_flag_name)) {
10049 message <<
"Loading " + lib_name;
10051 if (!
loadAndMergeLIBX(vpflow, velements, lib_name, server, _entries, FileMESSAGE, oss)) {
10052 message <<
"Merging entries for " + lib_name +
" failed";
10068 vector<string> vspecies;
10070 for (
size_t i = 0; i < velements.size(); i++) {
10071 entries.emplace_back(0);
10073 for (
size_t j = 0; j < combinations.size(); j++) {
10074 entries[i].emplace_back(0);
10076 for (
size_t j = 0; j < combinations.size(); j++) {
10078 if (_entries.size() > i) {
10079 for (
size_t k = 0; k < _entries[i].size() && !found; k++) {
10080 if (!_entries[i][k].empty()) {
10081 vspecies = _entries[i][k][0].vspecies;
10082 if (vpflow.
flag(
"PFLOW::LOAD_ENTRIES_NON_ALPHABETICAL")) {
10083 sort(vspecies.begin(), vspecies.end());
10085 if (vspecies == combinations[j]) {
10086 entries[i][j] = _entries[i][k];
10103 vector<uint> sizes;
10106 for (
size_t i = 0; i < entries.size(); i++) {
10107 sizes.push_back(0);
10108 for (
size_t j = 0; j < entries[i].size(); j++) {
10109 for (
size_t k = 0; k < entries[i][j].size(); k++) {
10113 totalNum += sizes.at(i);
10116 for (
size_t i = 0; i < entries.size(); i++) {
10117 message <<
"Loaded ";
10118 message << entries[i].size() <<
" " <<
pflow::arity_string(i + 1,
false,
true) <<
": " << sizes.at(i) <<
" entries";
10131 message <<
"Loaded " << totalNum <<
" entries total";
10147 bool loadEntries(vector<string>& velements, vector<vector<aflowlib::_aflowlib_entry>>& entries, ostream& oss) {
10148 ofstream FileMESSAGE;
10149 return loadEntries(velements, entries, FileMESSAGE, oss);
10151 bool loadEntries(vector<string>& velements, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10153 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10154 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10158 return loadEntries(velements, server, entries, FileMESSAGE, oss);
10160 bool loadEntries(vector<string>& velements,
string server, vector<vector<aflowlib::_aflowlib_entry>>& entries,
10162 ofstream FileMESSAGE;
10163 return loadEntries(velements, server, entries, FileMESSAGE, oss);
10165 bool loadEntries(vector<string>& velements,
string server, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10168 return loadEntries(vpflow, velements, server, entries, FileMESSAGE, oss);
10172 ofstream FileMESSAGE;
10173 return loadEntries(vpflow, velements, entries, FileMESSAGE, oss);
10175 bool loadEntries(
aurostd::xoption& vpflow, vector<string>& velements, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10177 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10178 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10182 return loadEntries(vpflow, velements, server, entries, FileMESSAGE, oss);
10186 ofstream FileMESSAGE;
10187 return loadEntries(vpflow, velements, server, entries, FileMESSAGE, oss);
10189 bool loadEntries(
aurostd::xoption& vpflow, vector<string>& velements,
string server, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10191 vector<vector<vector<aflowlib::_aflowlib_entry>>> naries;
10192 if (!
loadEntries(vpflow, velements, server, naries, FileMESSAGE, oss)) {
10195 if (!aflowlib::mergeEntries(entries, naries,
true)) {
10207 bool loadEntries(vector<string>& velements, vector<aflowlib::_aflowlib_entry>& entries, ostream& oss) {
10208 ofstream FileMESSAGE;
10209 return loadEntries(velements, entries, FileMESSAGE, oss);
10211 bool loadEntries(vector<string>& velements, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10213 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10214 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10218 return loadEntries(velements, server, entries, FileMESSAGE, oss);
10220 bool loadEntries(vector<string>& velements,
string server, vector<aflowlib::_aflowlib_entry>& entries, ostream& oss) {
10221 ofstream FileMESSAGE;
10222 return loadEntries(velements, server, entries, FileMESSAGE, oss);
10224 bool loadEntries(vector<string>& velements,
string server, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10227 return loadEntries(vpflow, velements, server, entries, FileMESSAGE, oss);
10231 ofstream FileMESSAGE;
10232 return loadEntries(vpflow, velements, entries, FileMESSAGE, oss);
10236 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10237 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10241 return loadEntries(vpflow, velements, server, entries, FileMESSAGE, oss);
10245 ofstream FileMESSAGE;
10246 return loadEntries(vpflow, velements, server, entries, FileMESSAGE, oss);
10248 bool loadEntries(
aurostd::xoption& vpflow, vector<string>& velements,
string server, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10250 vector<vector<vector<aflowlib::_aflowlib_entry>>> naries;
10251 if (!
loadEntries(vpflow, velements, server, naries, FileMESSAGE, oss)) {
10254 if (!aflowlib::mergeEntries(entries, naries)) {
10268 const bool load_from_common =
10270 return load_from_common;
10281 bool loadAndMergeLIBX(
string combination,
string LIB,
string server, vector<vector<vector<aflowlib::_aflowlib_entry>>>& naries, ostream& oss) {
10282 ofstream FileMESSAGE;
10283 return loadAndMergeLIBX(combination, LIB, server, naries, FileMESSAGE, oss);
10285 bool loadAndMergeLIBX(
string _combination,
string LIB,
string server, vector<vector<vector<aflowlib::_aflowlib_entry>>>& naries, ofstream& FileMESSAGE, ostream& oss) {
10286 vector<string> combination;
10287 combination.push_back(_combination);
10288 return loadAndMergeLIBX(combination, LIB, server, naries, FileMESSAGE, oss);
10290 bool loadAndMergeLIBX(vector<string>& combination,
string LIB,
string server, vector<vector<vector<aflowlib::_aflowlib_entry>>>& naries, ostream& oss) {
10291 ofstream FileMESSAGE;
10292 return loadAndMergeLIBX(combination, LIB, server, naries, FileMESSAGE, oss);
10294 bool loadAndMergeLIBX(vector<string>& combination,
string LIB,
string server, vector<vector<vector<aflowlib::_aflowlib_entry>>>& naries, ofstream& FileMESSAGE, ostream& oss) {
10300 ofstream FileMESSAGE;
10301 return loadAndMergeLIBX(vpflow, combination, LIB, server, naries, FileMESSAGE, oss);
10303 bool loadAndMergeLIBX(
aurostd::xoption& vpflow,
string _combination,
string LIB,
string server, vector<vector<vector<aflowlib::_aflowlib_entry>>>& naries, ofstream& FileMESSAGE, ostream& oss) {
10304 vector<string> combination;
10305 combination.push_back(_combination);
10306 return loadAndMergeLIBX(vpflow, combination, LIB, server, naries, FileMESSAGE, oss);
10309 ofstream FileMESSAGE;
10310 return loadAndMergeLIBX(vpflow, combination, LIB, server, naries, FileMESSAGE, oss);
10312 bool loadAndMergeLIBX(
aurostd::xoption& vpflow, vector<string>& combination,
string LIB,
string server, vector<vector<vector<aflowlib::_aflowlib_entry>>>& naries, ofstream& FileMESSAGE, ostream& oss) {
10313 stringstream message;
10317 aflags.Directory = chull::getPath();
10318 if (vpflow.
flag(
"CHULL::PATH")) {
10319 aflags.Directory = chull::getPath(vpflow, FileMESSAGE, oss);
10323 vector<vector<aflowlib::_aflowlib_entry>> v_temp;
10324 if (!
loadLIBX(vpflow, LIB, combination, server, v_temp, FileMESSAGE, oss)) {
10327 if (vpflow.
flag(
"PFLOW::LOAD_ENTRIES_NARIES_MINUS_ONE")) {
10328 for (
size_t i = 0; i < v_temp.size() - 1; i++) {
10329 if (!aflowlib::mergeEntries(naries, v_temp[i],
false)) {
10334 message <<
"Merging entries for LIB" + LIB +
" (" +
aurostd::utype2string(i + 1) +
"-naries) failed";
10341 if (!aflowlib::mergeEntries(naries, v_temp[v_temp.size() - 1],
true)) {
10344 message <<
"Merging entries for ICSD (" +
aurostd::utype2string(v_temp.size()) +
"-naries) failed";
10346 message <<
"Merging entries for LIB" + LIB +
" (" +
aurostd::utype2string(v_temp.size()) +
"-naries) failed";
10357 vector<string> vtokens;
10358 vector<string> _vtokens;
10360 for (
size_t i = 0; i < vtokens.size(); i++) {
10362 if (!_vtokens.empty()) {
10363 vsuburl.push_back(url +
"/" + vtokens[i]);
10367 return vsuburl.size();
10379 bool loadLIBX(
string LIB,
string elements, vector<aflowlib::_aflowlib_entry>& entries,
10381 ofstream FileMESSAGE;
10382 return loadLIBX(LIB, elements, entries, FileMESSAGE, oss);
10384 bool loadLIBX(
string LIB,
string elements, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10386 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10387 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10391 return loadLIBX(LIB, elements, server, entries, FileMESSAGE, oss);
10393 bool loadLIBX(
string LIB,
string elements,
string server, vector<aflowlib::_aflowlib_entry>& entries,
10395 ofstream FileMESSAGE;
10396 return loadLIBX(LIB, elements, server, entries, FileMESSAGE, oss);
10398 bool loadLIBX(
string LIB,
string elements,
string server, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10401 return loadLIBX(vpflow, LIB, elements, server, entries, FileMESSAGE, oss);
10405 ofstream FileMESSAGE;
10406 return loadLIBX(vpflow, LIB, elements, entries, FileMESSAGE, oss);
10408 bool loadLIBX(
aurostd::xoption& vpflow,
string LIB,
string elements, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10410 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10411 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10415 return loadLIBX(vpflow, LIB, elements, server, entries, FileMESSAGE, oss);
10419 ofstream FileMESSAGE;
10420 return loadLIBX(vpflow, LIB, elements, server, entries, FileMESSAGE, oss);
10422 bool loadLIBX(
aurostd::xoption& vpflow,
string LIB,
string elements,
string server, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10425 return loadLIBX(vpflow, LIB, velements, server, entries, FileMESSAGE, oss);
10432 bool loadLIBX(
string LIB, vector<string>& velements, vector<aflowlib::_aflowlib_entry>& entries,
10434 ofstream FileMESSAGE;
10435 return loadLIBX(LIB, velements, entries, FileMESSAGE, oss);
10437 bool loadLIBX(
string LIB, vector<string>& velements, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10439 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10440 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10444 return loadLIBX(LIB, velements, server, entries, FileMESSAGE, oss);
10446 bool loadLIBX(
string LIB, vector<string>& velements,
string server, vector<aflowlib::_aflowlib_entry>& entries,
10448 ofstream FileMESSAGE;
10449 return loadLIBX(LIB, velements, server, entries, FileMESSAGE, oss);
10451 bool loadLIBX(
string LIB, vector<string>& velements,
string server, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10454 return loadLIBX(vpflow, LIB, velements, server, entries, FileMESSAGE, oss);
10458 ofstream FileMESSAGE;
10459 return loadLIBX(vpflow, LIB, velements, entries, FileMESSAGE, oss);
10461 bool loadLIBX(
aurostd::xoption& vpflow,
string LIB, vector<string>& velements, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10463 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10464 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10468 return loadLIBX(vpflow, LIB, velements, server, entries, FileMESSAGE, oss);
10472 ofstream FileMESSAGE;
10473 return loadLIBX(vpflow, LIB, velements, server, entries, FileMESSAGE, oss);
10475 bool loadLIBX(
aurostd::xoption& vpflow,
string LIB, vector<string>& velements,
string server, vector<aflowlib::_aflowlib_entry>& entries, ofstream& FileMESSAGE, ostream& oss) {
10477 vector<vector<aflowlib::_aflowlib_entry>> naries;
10479 if (!
loadLIBX(vpflow, LIB, velements, server, naries, FileMESSAGE, oss)) {
10482 if (!aflowlib::mergeEntries(entries, naries)) {
10492 bool loadLIBX(
string LIB,
string elements, vector<vector<aflowlib::_aflowlib_entry>>& entries,
10494 ofstream FileMESSAGE;
10495 return loadLIBX(LIB, elements, entries, FileMESSAGE, oss);
10497 bool loadLIBX(
string LIB,
string elements, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10499 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10500 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10504 return loadLIBX(LIB, elements, server, entries, FileMESSAGE, oss);
10506 bool loadLIBX(
string LIB,
string elements,
string server, vector<vector<aflowlib::_aflowlib_entry>>& entries,
10508 ofstream FileMESSAGE;
10509 return loadLIBX(LIB, elements, server, entries, FileMESSAGE, oss);
10511 bool loadLIBX(
string LIB,
string elements,
string server, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10514 return loadLIBX(vpflow, LIB, elements, server, entries, FileMESSAGE, oss);
10518 ofstream FileMESSAGE;
10519 return loadLIBX(vpflow, LIB, elements, entries, FileMESSAGE, oss);
10521 bool loadLIBX(
aurostd::xoption& vpflow,
string LIB,
string elements, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10523 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10524 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10528 return loadLIBX(vpflow, LIB, elements, server, entries, FileMESSAGE, oss);
10532 ofstream FileMESSAGE;
10533 return loadLIBX(vpflow, LIB, elements, server, entries, FileMESSAGE, oss);
10535 bool loadLIBX(
aurostd::xoption& vpflow,
string LIB,
string elements,
string server, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10538 return loadLIBX(vpflow, LIB, velements, server, entries, FileMESSAGE, oss);
10545 bool loadLIBX(
string LIB, vector<string>& velements, vector<vector<aflowlib::_aflowlib_entry>>& entries,
10547 ofstream FileMESSAGE;
10548 return loadLIBX(LIB, velements, entries, FileMESSAGE, oss);
10550 bool loadLIBX(
string LIB, vector<string>& velements, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10552 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10553 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10557 return loadLIBX(LIB, velements, server, entries, FileMESSAGE, oss);
10559 bool loadLIBX(
string LIB, vector<string>& velements,
string server, vector<vector<aflowlib::_aflowlib_entry>>& entries,
10561 ofstream FileMESSAGE;
10562 return loadLIBX(LIB, velements, server, entries, FileMESSAGE, oss);
10564 bool loadLIBX(
string LIB, vector<string>& velements,
string server, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10567 return loadLIBX(vpflow, LIB, velements, server, entries, FileMESSAGE, oss);
10571 ofstream FileMESSAGE;
10572 return loadLIBX(vpflow, LIB, velements, entries, FileMESSAGE, oss);
10574 bool loadLIBX(
aurostd::xoption& vpflow,
string LIB, vector<string>& velements, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10576 if (
XHOST.vflag_control.flag(
"AFLOWLIB_SERVER")) {
10577 server =
XHOST.vflag_control.getattachedscheme(
"AFLOWLIB_SERVER");
10581 return loadLIBX(vpflow, LIB, velements, server, entries, FileMESSAGE, oss);
10583 bool loadLIBX(
aurostd::xoption& vpflow,
string LIB, vector<string>& velements,
string server, vector<vector<aflowlib::_aflowlib_entry>>& entries,
10585 ofstream FileMESSAGE;
10586 return loadLIBX(vpflow, LIB, velements, server, entries, FileMESSAGE, oss);
10588 bool loadLIBX(
aurostd::xoption& vpflow,
string LIB, vector<string>& velements,
string server, vector<vector<aflowlib::_aflowlib_entry>>& entries, ofstream& FileMESSAGE, ostream& oss) {
10589 const bool LDEBUG = (
false ||
XHOST.DEBUG);
10590 stringstream message;
10594 aflags.Directory = chull::getPath();
10595 if (vpflow.
flag(
"CHULL::PATH")) {
10596 aflags.Directory = chull::getPath(vpflow, FileMESSAGE, oss);
10600 for (
size_t i = 0; i < velements.size(); i++) {
10601 entries.emplace_back(0);
10606 const vector<string> symmetries{
"BCC",
"BCT",
"CUB",
"FCC",
"HEX",
"MCL",
"MCLC",
"ORC",
"ORCC",
"ORCF",
"ORCI",
"RHL",
"TET",
"TRI"};
10608 const bool isICSD = (LIB ==
"ICSD");
10613 string lib_count_string;
10619 lib_name =
"LIB" + LIB;
10620 lib_count_string = LIB;
10623 for (
size_t i = 0; i < lib_count_string.size(); i++) {
10624 if (!isdigit(lib_count_string[i])) {
10625 message <<
"Unknown LIB specification (" << LIB << R
"(), should be "LIB1", "LIB2", or "1", "2", etc.)";
10631 if (velements.size() != lib_count_uint) {
10632 message <<
"LIB" << lib_count_uint <<
" loads " << lib_count_uint <<
"-naries ONLY";
10642 bool override_load_from_common =
false;
10645 if (load_from_common) {
10646 if (!vpflow.
flag(
"PFLOW::LOAD_ENTRIES_COMING_FROM_LOADENTRIESX")) {
10647 message <<
"Loading entries from COMMON";
10650 LIB_path =
"/common/" + lib_name +
"/RAW";
10652 load_from_common =
false;
10653 message << LIB_path <<
" does not exist! Cannot load from COMMON, switching to API";
10655 override_load_from_common =
true;
10658 if (!load_from_common) {
10660 if (override_load_from_common || (!vpflow.
flag(
"PFLOW::LOAD_ENTRIES_COMING_FROM_LOADENTRIESX"))) {
10661 message <<
"Using " << server <<
" as server";
10670 LIB_path = server +
"/AFLOWDATA/ICSD_WEB";
10672 LIB_path = server +
"/AFLOWDATA/" + lib_name +
"_RAW";
10679 aflowlib::_aflowlib_entry _aflowlib_tmp;
10681 uint total_count = 0;
10682 string::size_type loc = 0;
10683 vector<string> input_velements;
10684 vector<double> input_vcomposition;
10685 vector<string> vloadpaths;
10687 const bool double_check_icsd =
false;
10688 string symmetry_path;
10690 vector<string> icsds;
10691 vector<string> tokens;
10692 vector<string> elements;
10693 for (
size_t i = 0; i < symmetries.size(); i++) {
10694 symmetry_path = LIB_path +
"/" + symmetries[i];
10699 if (load_from_common) {
10704 if (!icsds.empty() && icsds[0] ==
"<!DOCTYPE") {
10705 message <<
"REST-API appears to be down";
10709 for (
size_t j = 0; j < icsds.size(); j++) {
10710 loc = icsds[j].find(
"_ICSD_");
10711 if (loc != string::npos) {
10712 clean_icsd = icsds[j].substr(0, loc);
10713 if (
compoundsBelong(velements, clean_icsd, input_velements, input_vcomposition, FileMESSAGE, oss,
false, vpflow.
flag(
"PFLOW::LOAD_ENTRIES_NON_ALPHABETICAL"),
10716 vloadpaths.clear();
10717 if (load_from_common) {
10725 if (vloadpaths.size() > 1 && vloadpaths[1] ==
"<!DOCTYPE") {
10726 message <<
"REST-API appears to be down";
10730 for (
size_t k = 0; k < vloadpaths.size(); k++) {
10731 const string& load_path = vloadpaths[k];
10732 message <<
"Loading " << (load_from_common ?
"path" :
"url") <<
"=" << load_path;
10733 pflow::logger(
__AFLOW_FILE__, std::string(
"aurostd::") + std::string((load_from_common ?
"file" :
"url")) + std::string(
"2string():"), message, aflags, FileMESSAGE, oss, _LOGGER_MESSAGE_,
10734 !vpflow.
flag(
"PFLOW::LOAD_ENTRIES_ENTRY_OUTPUT"));
10736 if ((load_from_common) ?
10744 (double_check_icsd ?
compoundsBelong(velements, _aflowlib_tmp.vspecies, FileMESSAGE, oss, vpflow.
flag(
"PFLOW::LOAD_ENTRIES_NON_ALPHABETICAL"))
10751 ((_aflowlib_tmp.url2aflowlib(load_path, message,
false) > 0) &&
10752 (double_check_icsd ?
compoundsBelong(velements, _aflowlib_tmp.vspecies, FileMESSAGE, oss, vpflow.
flag(
"PFLOW::LOAD_ENTRIES_NON_ALPHABETICAL"))
10755 nary = _aflowlib_tmp.vspecies.size();
10756 if (entries.size() < nary) {
10759 entries[nary - 1].push_back(_aflowlib_tmp);
10761 if (vpflow.
flag(
"PFLOW::LOAD_ENTRIES_LOAD_XSTRUCTURES")) {
10762 if (!
loadXstructures(entries[nary - 1].back(), FileMESSAGE, oss, vpflow.
flag(
"PFLOW::LOAD_ENTRIES_LOAD_XSTRUCTURES_RELAXED_ONLY"))) {
10763 entries[nary - 1].pop_back();
10775 const bool double_check_lib =
true;
10776 string clean_system;
10777 string calculation_path;
10778 string clean_calculation;
10779 vector<string> systems;
10780 vector<string> calculations;
10781 if (load_from_common) {
10786 if (!systems.empty() && systems[0] ==
"<!DOCTYPE") {
10787 message <<
"REST-API appears to be down";
10791 for (
size_t i = 0; i < systems.size(); i++) {
10792 calculation_path = LIB_path +
"/" + systems[i];
10796 loc = systems[i].find(
":");
10797 clean_system = systems[i].substr(0, loc);
10798 if (
compoundsBelong(velements, clean_system, input_velements, input_vcomposition, FileMESSAGE, oss,
false, vpflow.
flag(
"PFLOW::LOAD_ENTRIES_NON_ALPHABETICAL"),
pp_string,
10800 if (load_from_common) {
10805 if (!calculations.empty() && calculations[0] ==
"<!DOCTYPE") {
10806 message <<
"REST-API appears to be down";
10810 for (
size_t j = 0; j < calculations.size(); j++) {
10815 vloadpaths.clear();
10816 if (load_from_common) {
10824 if (vloadpaths.size() > 1 && vloadpaths[1] ==
"<!DOCTYPE") {
10825 message <<
"REST-API appears to be down";
10829 for (
size_t k = 0; k < vloadpaths.size(); k++) {
10830 const string& load_path = vloadpaths[k];
10831 message <<
"Loading " << (load_from_common ?
"path" :
"url") <<
"=" << load_path;
10832 pflow::logger(
__AFLOW_FILE__, std::string(
"aurostd::") + std::string((load_from_common ?
"file" :
"url")) + std::string(
"2string():"), message, aflags, FileMESSAGE, oss, _LOGGER_MESSAGE_,
10833 !vpflow.
flag(
"PFLOW::LOAD_ENTRIES_ENTRY_OUTPUT"));
10835 if ((load_from_common) ?
10843 (double_check_lib ?
compoundsBelong(velements, _aflowlib_tmp.vspecies, FileMESSAGE, oss, vpflow.
flag(
"PFLOW::LOAD_ENTRIES_NON_ALPHABETICAL")) :
true)
10849 ((_aflowlib_tmp.url2aflowlib(load_path, message,
false) > 0) &&
10850 (double_check_lib ?
compoundsBelong(velements, _aflowlib_tmp.vspecies, FileMESSAGE, oss, vpflow.
flag(
"PFLOW::LOAD_ENTRIES_NON_ALPHABETICAL")) :
true)
10852 nary = _aflowlib_tmp.vspecies.size();
10853 if (entries.size() < nary) {
10856 entries[nary - 1].push_back(_aflowlib_tmp);
10858 if (vpflow.
flag(
"PFLOW::LOAD_ENTRIES_LOAD_XSTRUCTURES")) {
10859 if (!
loadXstructures(entries[nary - 1].back(), FileMESSAGE, oss, vpflow.
flag(
"PFLOW::LOAD_ENTRIES_LOAD_XSTRUCTURES_RELAXED_ONLY"))) {
10860 entries[nary - 1].pop_back();
10876 if (velements.size() == 2) {
10877 if (!entries.empty() && !entries[0].empty()) {
10878 for (
size_t j = 0; j < entries[0].size(); j++) {
10879 if (entries[0][j].vstoichiometry.size() == 1) {
10880 if (entries[0][j].species == velements[0]) {
10881 entries[0][j].pureA =
true;
10882 }
else if (entries[0][j].species == velements[1]) {
10883 entries[0][j].pureB =
true;
10894 message <<
"Loaded " << total_count <<
" entries";
10915 const bool LDEBUG = (
false ||
XHOST.DEBUG);
10916 vector<vector<string>> combos;
10922 for (
size_t i = 0; i < combos.back().size(); i++) {
10923 cerr << combos.back()[i];
10941 bool compoundsBelong(
const vector<string>& velements2check,
const string& input, ostream& oss,
bool clean,
bool sort_elements,
elements_string_type e_str_type,
bool shortcut_pp_string_AFLOW_database) {
10942 ofstream FileMESSAGE;
10943 return compoundsBelong(velements2check, input, FileMESSAGE, oss, clean, sort_elements, e_str_type, shortcut_pp_string_AFLOW_database);
10945 bool compoundsBelong(
const vector<string>& velements2check,
const string& input, vector<string>& input_velements, vector<double>& input_vcomposition, ostream& oss,
bool clean,
bool sort_elements,
elements_string_type e_str_type,
bool shortcut_pp_string_AFLOW_database) {
10946 ofstream FileMESSAGE;
10947 return compoundsBelong(velements2check, input, input_velements, input_vcomposition, FileMESSAGE, oss, clean, sort_elements, e_str_type, shortcut_pp_string_AFLOW_database);
10949 bool compoundsBelong(
const vector<string>& velements2check,
const string& input, ofstream& FileMESSAGE, ostream& oss,
bool clean,
bool sort_elements,
elements_string_type e_str_type,
bool shortcut_pp_string_AFLOW_database) {
10950 vector<string> input_velements;
10951 vector<double> input_vcomposition;
10952 return compoundsBelong(velements2check, input, input_velements, input_vcomposition, FileMESSAGE, oss, clean, sort_elements, e_str_type, shortcut_pp_string_AFLOW_database);
10955 const string& input,
10956 vector<string>& input_velements,
10957 vector<double>& input_vcomposition,
10958 ofstream& FileMESSAGE,
10961 bool sort_elements,
10963 bool shortcut_pp_string_AFLOW_database) {
10964 const bool LDEBUG = (
false ||
XHOST.DEBUG);
10965 if (e_str_type ==
pp_string && shortcut_pp_string_AFLOW_database ==
true) {
10972 string input_new = input;
10977 input_velements =
aurostd::getElements(input, input_vcomposition, e_str_type, FileMESSAGE, clean, sort_elements,
false, oss);
10982 return compoundsBelong(velements2check, input_velements, FileMESSAGE, oss,
false);
10984 bool compoundsBelong(
const vector<string>& velements2check,
const vector<string>& input_velements, ostream& oss,
bool sort_elements) {
10985 ofstream FileMESSAGE;
10986 return compoundsBelong(velements2check, input_velements, FileMESSAGE, oss, sort_elements);
10988 bool compoundsBelong(
const vector<string>& velements2check,
const vector<string>& input_velements, ofstream& FileMESSAGE, ostream& oss,
bool sort_elements) {
10989 stringstream message;
10990 if (velements2check.empty() || input_velements.empty()) {
10991 message <<
"Invalid input (velements2check.size()==" << velements2check.size() <<
",input_velements.size()==" << input_velements.size() <<
")";
10995 if (input_velements.size() > velements2check.size()) {
10998 if (sort_elements) {
10999 vector<string> velements2check_sorted;
11000 vector<string> input_velements_sorted;
11001 for (
size_t i = 0; i < velements2check.size(); i++) {
11002 velements2check_sorted.push_back(velements2check[i]);
11004 for (
size_t i = 0; i < input_velements.size(); i++) {
11005 input_velements_sorted.push_back(input_velements[i]);
11007 sort(velements2check_sorted.begin(), velements2check_sorted.end());
11008 sort(input_velements_sorted.begin(), input_velements_sorted.end());
11009 return compoundsBelong(velements2check_sorted, input_velements_sorted, FileMESSAGE, oss,
false);
11013 uint starting_index = 0;
11014 for (
size_t i = 0; i < input_velements.size(); i++) {
11016 for (
size_t j = starting_index; j < velements2check.size() && !found; j++) {
11017 if (input_velements[i] == velements2check[j]) {
11019 starting_index = j + 1;
11038 bool loadXstructures(aflowlib::_aflowlib_entry& entry, ostream& oss,
bool relaxed_only,
string path,
bool is_url_path) {
11039 ofstream FileMESSAGE;
11040 vector<string> structure_files;
11041 return loadXstructures(entry, structure_files, FileMESSAGE, oss, relaxed_only, path, is_url_path);
11043 bool loadXstructures(aflowlib::_aflowlib_entry& entry, ofstream& FileMESSAGE, ostream& oss,
bool relaxed_only,
string path,
bool is_url_path) {
11044 vector<string> structure_files;
11045 return loadXstructures(entry, structure_files, FileMESSAGE, oss, relaxed_only, path, is_url_path);
11047 bool loadXstructures(aflowlib::_aflowlib_entry& entry, vector<string>& structure_files, ofstream& FileMESSAGE, ostream& oss,
bool relaxed_only,
string path,
bool is_url_path) {
11048 const bool LDEBUG = (
false ||
XHOST.DEBUG);
11049 stringstream message;
11052 if (path.empty()) {
11053 path = entry.getPathAURL(FileMESSAGE, oss,
true);
11054 is_url_path =
false;
11059 if (path.empty()) {
11060 path = entry.getPathAURL(FileMESSAGE, oss,
false);
11061 is_url_path =
true;
11063 if (path.empty()) {
11064 message <<
"Path cannot be loaded from entry, skipping loadXstructure()";
11072 vector<string> vspecies = entry.vspecies;
11074 if (vspecies.empty()) {
11075 vspecies = entry.getSpecies();
11081 xstructure xstrAux;
11083 vector<string> files;
11092 const vector<string> poscar_files_orig{
"POSCAR.orig",
"POSCAR.relax1"};
11093 const vector<string> poscar_files_relax_mid{
"POSCAR.relax2",
"CONTCAR.relax1"};
11095 const vector<string> poscar_files_relax_final{
"CONTCAR.relax",
"CONTCAR.relax2",
"POSCAR.static",
"POSCAR.bands",
"CONTCAR.static",
"CONTCAR.bands"};
11103 if (entry.prototype.find(
"POCC") != string::npos) {
11104 message <<
"path=" << path <<
" is a POCC-structure and has no structure files. Ignoring entry";
11108 message <<
"path=" << path <<
" missing structure files. Ignoring entry";
11113 if (!relaxed_only) {
11118 for (
size_t i = 0; i < poscar_files_orig.size() && xstrAux.atoms.empty(); i++) {
11121 cerr <<
__AFLOW_FUNC__ <<
" looking for " << path +
"/" + efile << endl;
11129 if (!ss.str().empty()) {
11132 if (xstrAux.GetElementsFromAtomNames().empty()) {
11133 if (vspecies.empty()) {
11140 cerr << xstrAux << endl;
11142 structure_files.push_back(poscar_files_orig[i]);
11146 message << poscar_files_orig[i] <<
": Path exists, but could not load structure (e.g., URL timeout or bad structure file).";
11152 if (xstrAux.atoms.empty()) {
11156 entry.vstr.push_back(xstrAux);
11170 for (
size_t i = 0; i < poscar_files_relax_mid.size() && xstrAux.atoms.empty(); i++) {
11173 cerr <<
__AFLOW_FUNC__ <<
" looking for " << path +
"/" + efile << endl;
11181 if (!ss.str().empty()) {
11184 if (xstrAux.GetElementsFromAtomNames().empty()) {
11185 if (vspecies.empty()) {
11192 cerr << xstrAux << endl;
11194 structure_files.push_back(poscar_files_relax_mid[i]);
11198 message << poscar_files_relax_mid[i] <<
": Path exists, but could not load structure (e.g., URL timeout or bad structure file).";
11204 if (xstrAux.atoms.empty()) {
11208 entry.vstr.push_back(xstrAux);
11223 for (
size_t i = 0; i < poscar_files_relax_final.size() && xstrAux.atoms.empty(); i++) {
11226 cerr <<
__AFLOW_FUNC__ <<
" looking for " << path +
"/" + efile << endl;
11234 if (!ss.str().empty()) {
11237 if (xstrAux.GetElementsFromAtomNames().empty()) {
11238 if (vspecies.empty()) {
11245 cerr << xstrAux << endl;
11247 structure_files.push_back(poscar_files_relax_final[i]);
11251 message << poscar_files_relax_final[i] <<
": Path exists, but could not load structure (e.g., URL timeout or bad structure file).";
11257 if (xstrAux.atoms.empty()) {
11261 entry.vstr.push_back(xstrAux);
11264 cerr <<
__AFLOW_FUNC__ <<
" loaded FULLY-RELAXED structure" << endl;
11281 if (entry.positions_cartesian.empty()) {
11284 new_structure.title =
"Relaxed AFLUX: " + entry.aurl;
11285 new_structure.scale = 1.0;
11286 new_structure.neg_scale =
false;
11288 std::vector<double> geometry;
11290 new_structure.a = geometry[0];
11291 new_structure.b = geometry[1];
11292 new_structure.c = geometry[2];
11293 new_structure.alpha = geometry[3];
11294 new_structure.beta = geometry[4];
11295 new_structure.gamma = geometry[5];
11296 new_structure.lattice =
GetClat(new_structure.a, new_structure.b, new_structure.c, new_structure.alpha, new_structure.beta, new_structure.gamma);
11297 new_structure.spacegroupnumber = entry.spacegroup_relax;
11299 if (new_structure.spacegroupnumber > 0 && new_structure.spacegroupnumber <= 230) {
11300 new_structure.spacegroup =
GetSpaceGroupName(new_structure.spacegroupnumber, new_structure.directory);
11302 new_structure.spacegroup =
"";
11305 strcpy(new_structure.coord_type,
"D");
11306 new_structure.FixLattices();
11308 std::vector<int> composition;
11310 uint num_atoms = 0;
11311 std::vector<std::vector<double>> positions_fractional;
11312 std::vector<double> positions_fractional_raw;
11313 std::vector<std::string> positions_fractional_raw_str;
11315 for (std::vector<std::string>::const_iterator pf_str = positions_fractional_raw_str.begin(); pf_str != positions_fractional_raw_str.end(); pf_str++) {
11316 positions_fractional_raw.clear();
11318 positions_fractional.emplace_back(positions_fractional_raw);
11321 std::vector<std::string> species;
11325 for (
size_t type_idx = 0; type_idx < composition.size(); type_idx++) {
11326 for (
int atom_idx = 0; atom_idx < composition[type_idx]; atom_idx++) {
11329 v(1) = positions_fractional[num_atoms][0];
11330 v(2) = positions_fractional[num_atoms][1];
11331 v(3) = positions_fractional[num_atoms][2];
11333 atom.cpos = new_structure.f2c * atom.fpos;
11334 atom.basis = num_atoms;
11338 atom.corigin(1) = 0.0;
11339 atom.corigin(2) = 0.0;
11340 atom.corigin(3) = 0.0;
11341 atom.coord(1) = 0.0;
11342 atom.coord(2) = 0.0;
11343 atom.coord(3) = 0.0;
11345 atom.noncoll_spin.
clear();
11346 atom.type = type_idx;
11347 atom.order_parameter_value = 0;
11348 atom.order_parameter_atom =
false;
11349 atom.partial_occupation_value = 1.0;
11350 atom.partial_occupation_flag =
false;
11351 atom.name = species[type_idx];
11352 atom.cleanname = species[type_idx];
11353 atom.name_is_given =
true;
11354 new_structure.AddAtom(atom,
false);
11368 ofstream FileMESSAGE;
11372 stringstream message;
11376 aflags.Directory = chull::getPath();
11377 if (vpflow.
flag(
"CHULL::PATH")) {
11378 aflags.Directory = chull::getPath(vpflow, FileMESSAGE, oss);
11382 if (entry_output) {
11383 vpflow.
flag(
"PFLOW::LOAD_ENTRIES_ENTRY_OUTPUT",
true);
11385 message <<
"PFLOW::LOAD_ENTRIES_ENTRY_OUTPUT set to true";
11391 message <<
"PFLOW::LOAD_ENTRIES_NON_ALPHABETICAL set to true";
11394 vpflow.
flag(
"PFLOW::LOAD_ENTRIES_NARIES_MINUS_ONE",
true);
11396 message <<
"PFLOW::LOAD_ENTRIES_NARIES_MINUS_ONE set to true";
11401 if (!(input ==
"A" || input ==
"ICSD"))
11404 string load_lib_flag_name;
11409 lib_name =
"LIB" + input;
11411 load_lib_flag_name =
"PFLOW::LOAD_ENTRIES_LOAD_" + lib_name;
11412 vpflow.
flag(load_lib_flag_name,
true);
11414 message << load_lib_flag_name <<
" set to true";
11418 if (input ==
"A") {
11422 string lib_count_string;
11423 string load_lib_flag_name;
11428 load_lib_flag_name =
"PFLOW::LOAD_ENTRIES_LOAD_LIB" + lib_count_string;
11429 vpflow.
flag(load_lib_flag_name,
true);
11431 message << load_lib_flag_name <<
" set to true";
11436 if (input ==
"A" || input ==
"ICSD")
11438 vpflow.
flag(
"PFLOW::LOAD_ENTRIES_LOAD_ICSD",
true);
11440 message <<
"PFLOW::LOAD_ENTRIES_LOAD_ICSD set to true";
11457 if (proto_database == proto_search) {
11460 if (proto_database.size() < (proto_search.size() + 1)) {
11463 if (proto_database.substr(0, proto_search.size()) != proto_search) {
11466 if (proto_database[proto_search.size()] ==
'.' || proto_database[proto_search.size()] ==
':') {
11486 if (
XHOST.QUIET ||
XHOST.QUIET_GLOBAL ||
XHOST.vflag_control.flag(
"WWW")) {
11489 if ((&oss == &cout) &&
XHOST.QUIET_COUT) {
11492 if ((&oss == &cerr) &&
XHOST.QUIET_CERR) {
11496 const double progress = (double) current / (
double) end;
11503 }
else if (i == pos) {
11509 oss <<
"] " << int(progress * 100.0) <<
" %\r";
11511 if (current == end) {
11527 void logger(
const string& filename,
const string& function_name, stringstream& message,
const char& type, ostream& oss,
bool silent,
const string& message_metadata) {
11528 const string _message = message.str();
11529 logger(filename, function_name, _message, oss, type, silent, message_metadata);
11533 void logger(
const string& filename,
const string& function_name, stringstream& message, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11534 const string _message = message.str();
11535 logger(filename, function_name, _message, oss, type, silent, message_metadata);
11539 void logger(
const string& filename,
const string& function_name, stringstream& message, ofstream& FileMESSAGE, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11540 const string _message = message.str();
11541 logger(filename, function_name, _message, FileMESSAGE, oss, type, silent, message_metadata);
11545 void logger(
const string& filename,
const string& function_name, stringstream& message,
const string& directory, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11546 const string _message = message.str();
11547 logger(filename, function_name, _message, directory, oss, type, silent, message_metadata);
11551 void logger(
const string& filename,
const string& function_name, stringstream& message,
const string& directory, ofstream& FileMESSAGE, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11552 const string _message = message.str();
11553 logger(filename, function_name, _message, directory, FileMESSAGE, oss, type, silent, message_metadata);
11557 void logger(
const string& filename,
const string& function_name, stringstream& message,
const _aflags& aflags, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11558 const string _message = message.str();
11559 logger(filename, function_name, _message, aflags, oss, type, silent, message_metadata);
11563 void logger(
const string& filename,
const string& function_name, stringstream& message,
const _aflags& aflags, ofstream& FileMESSAGE, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11564 const string _message = message.str();
11565 logger(filename, function_name, _message, aflags, FileMESSAGE, oss, type, silent, message_metadata);
11569 void logger(
const string& filename,
const string& function_name,
const string& _message,
const char& type, ostream& oss,
bool silent,
const string& message_metadata) {
11570 ofstream FileMESSAGE;
11571 logger(filename, function_name, _message, FileMESSAGE, oss, type, silent, message_metadata);
11574 void logger(
const string& filename,
const string& function_name,
const string& _message, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11575 ofstream FileMESSAGE;
11576 logger(filename, function_name, _message, FileMESSAGE, oss, type, silent, message_metadata);
11579 void logger(
const string& filename,
const string& function_name,
const string& _message, ofstream& FileMESSAGE, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11581 if (
XHOST.vflag_control.flag(
"DIRECTORY_CLEAN")) {
11582 aflags.Directory =
XHOST.vflag_control.getattachedscheme(
"DIRECTORY_CLEAN");
11584 logger(filename, function_name, _message, aflags, FileMESSAGE, oss, type, silent, message_metadata);
11587 void logger(
const string& filename,
const string& function_name,
const string& _message,
const string& directory, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11588 ofstream FileMESSAGE;
11589 logger(filename, function_name, _message, directory, FileMESSAGE, oss, type, silent, message_metadata);
11592 void logger(
const string& filename,
const string& function_name,
const string& _message,
const _aflags& aflags, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11593 ofstream FileMESSAGE;
11594 logger(filename, function_name, _message, aflags, FileMESSAGE, oss, type, silent, message_metadata);
11597 void logger(
const string& filename,
const string& function_name,
const string& _message,
const string& directory, ofstream& FileMESSAGE, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11599 aflags.Directory = directory;
11600 logger(filename, function_name, _message, aflags, FileMESSAGE, oss, type, silent, message_metadata);
11603 void logger(
const string& filename,
const string& function_name,
const string& _message,
const _aflags& aflags, ofstream& FileMESSAGE, ostream& oss,
const char& type,
bool silent,
const string& message_metadata) {
11609 if (message.empty()) {
11613 vector<string> message_parts;
11614 vector<string> _message_parts;
11616 for (
size_t i = 0; i < _message_parts.size(); i++) {
11618 message_parts.push_back(_message_parts[i]);
11621 if (message_parts.empty()) {
11625 string tag_code =
"00000";
11626 string tag_message =
"MESSAGE";
11627 if (type == _LOGGER_ERROR_) {
11628 tag_code =
"EEEEE";
11629 tag_message =
"ERROR";
11630 }
else if (type == _LOGGER_WARNING_) {
11631 tag_code =
"WWWWW";
11632 tag_message =
"WARNING";
11633 }
else if (type == _LOGGER_COMPLETE_) {
11634 tag_code =
"CCCCC";
11635 tag_message =
"COMPLETE";
11636 }
else if (type == _LOGGER_OPTION_) {
11637 tag_code =
"-OPT-";
11638 tag_message =
"MESSAGE-OPTION";
11639 }
else if (type == _LOGGER_RAW_) {
11642 }
else if (type == _LOGGER_NOTICE_) {
11643 tag_code =
"00000";
11644 tag_message =
"NOTICE";
11647 ostringstream stream;
11648 if (type == _LOGGER_RAW_) {
11649 for (
size_t i = 0; i < message_parts.size(); i++) {
11650 stream << message_parts[i] << endl;
11652 }
else if (
XHOST.vflag_control.flag(
"WWW")) {
11653 for (
size_t i = 0; i < message_parts.size(); i++) {
11654 stream << tag_code;
11656 stream << tag_message;
11658 stream << message_parts[i];
11662 for (
size_t i = 0; i < message_parts.size(); i++) {
11664 stream << tag_code;
11666 stream << tag_message;
11668 stream << function_name;
11670 stream << message_parts[i];
11671 stream <<
Message(filename, aflags, message_metadata);
11679 bool quiet =
XHOST.QUIET;
11689 const bool osswrite = !silent;
11690 if (type == _LOGGER_ERROR_) {
11693 else if (type == _LOGGER_WARNING_) {
11706 xstructure
LTCELL(
const string& options, istream& input) {
11707 const bool LDEBUG = (
false ||
XHOST.DEBUG);
11712 vector<string> tokens;
11716 if (tokens.size() != 9 && tokens.size() != 3 && tokens.size() != 1 && tokens.size() != 4) {
11718 aurostd::liststring2string(
"aflow --ltcell=a11,a12,a13,a21,a22,a23,a31,a32,a33 < POSCAR",
"aflow --ltcell=a11,a22,a33 < POSCAR",
"aflow --ltcell=file < POSCAR",
11719 "aflow --ltcellfv=v1,v2,v3,phi < POSCAR"));
11722 if (tokens.size() == 9) {
11724 cerr <<
XPID <<
"pflow::LTCELL: 9 entries" << endl;
11735 if (std::abs(
det(mlt)) < 0.01) {
11744 if (tokens.size() == 3) {
11746 cerr <<
XPID <<
"pflow::LTCELL: 3 entries" << endl;
11751 if (std::abs(
det(mlt)) < 0.01) {
11760 if (tokens.size() == 1) {
11762 cerr <<
XPID <<
"pflow::LTCELL: 1 entries" << endl;
11764 ifstream infile(tokens[0].c_str());
11766 for (
int i = 1; i <= 3; i++) {
11767 for (
int j = 1; j <= 3; j++) {
11768 infile >> mlt(i, j);
11771 if (std::abs(
det(mlt)) < 0.01) {
11780 if (tokens.size() == 4) {
11782 cerr <<
XPID <<
"pflow::LTCELL: 4 entries => LTCELLFV mode" << endl;
11803 string directory(_directory);
11804 if (directory.empty()) {
11809 bool found =
false;
11810 const vector<string> vtype{
".static",
".relax1",
".relax2"};
11812 vector<string> vfiles;
11815 for (
size_t i = 0; i < vtype.size(); i++) {
11816 for (
size_t iext = 0; iext <
XHOST.vext.size(); iext++) {
11822 for (
size_t i = 0; i < vfiles.size() && !found; i++) {
11826 oss <<
"pflow::MagneticParameters : using file=" << vfiles[i] << endl;
11828 oss <<
"MAGNETIC MOMENTUM CELL : " << outcar.
mag_cell << endl;
11829 oss <<
"MAGNETIC MOMENTUM ATOM : " << outcar.
mag_atom << endl;
11830 oss <<
"VOLUME CELL : " << outcar.
volume_cell << endl;
11831 oss <<
"VOLUME ATOM : " << outcar.
volume_atom << endl;
11832 if (outcar.
vmag.size() > 1) {
11833 oss <<
"SPIN DECOMPOSITION : " << outcar.
vmag[0];
11834 for (
size_t i = 1; i < outcar.
vmag.size(); i++) {
11835 oss <<
"," << outcar.
vmag[i];
11844 for (
size_t iext = 0; iext <
XHOST.vext.size(); iext++) {
11850 for (
size_t i = 0; i < vfiles.size() && !found; i++) {
11854 oss <<
"pflow::MagneticParameters : using file=" << vfiles[i] << endl;
11855 oss <<
"POLARIZATION FERMI : " << doscar.
spinF << endl;
11866 ifstream outcar_inf(argv.at(2).c_str());
11868 ifstream xdatcar_inf(argv.at(3).c_str());
11870 const vector<xstructure> str_vec = pflow::GetStrVecFromOUTCAR_XDATCAR(outcar_inf, xdatcar_inf);
11871 pflow::PrintStrVec(str_vec, cout);
11882 b.MinkowskiBasisReduction();
11893 stringstream output;
11894 for (
size_t i = 2; i < argv.size(); i++) {
11895 string system = string(argv[i]);
11896 XATOM_AlphabetizationSpecies(system);
11900 output << system <<
" " <<
"MISCIBILITY_SYSTEM_NOMIX" << endl;
11903 output << system <<
" " <<
"MISCIBILITY_SYSTEM_MISCIBLE" << endl;
11906 output << system <<
" " <<
"MISCIBILITY_SYSTEM_UNKNOWN" << endl;
11909 return output.str();
11921 cout.setf(std::ios::left, std::ios::adjustfield);
11922 cout.setf(std::ios::fixed, std::ios::floatfield);
11923 cout <<
" Moment 1 : " << setw(15) << setprecision(10) << m(1) << setw(15) << setprecision(10) << m(2) << setw(15) << setprecision(10) << m(3) << endl;
11925 cout <<
" (unscaled) " << setw(15) << setprecision(10) << m(1) << setw(15) << setprecision(10) << m(2) << setw(15) << setprecision(10) << m(3) << endl;
11935 PrintMSI(str, cout);
11945 return a.atoms.size();
11954 string NBONDXX(istream& input,
bool aflowlib_legacy_format) {
11956 return NBONDXX(a, aflowlib_legacy_format);
11959 string NBONDXX(
const xstructure& a,
bool aflowlib_legacy_format) {
11966 bool atom_names =
true;
11967 for (
size_t i = 0; i < a.atoms.size() && atom_names; i++) {
11968 if (a.atoms[i].name.empty()) {
11969 atom_names =
false;
11975 vector<int> first_itypes;
11976 first_itypes.push_back(0);
11978 for (
size_t i = 1; i < a.atoms.size(); i++) {
11980 for (
size_t j = 0; j < first_itypes.size() && !found; j++) {
11981 if (a.atoms[i].type == a.atoms[first_itypes[j]].type) {
11986 first_itypes.push_back(i);
11990 if (aflowlib_legacy_format) {
11991 atom_names =
false;
11994 vector<string> names;
11997 for (
size_t i = 0; i < first_itypes.size(); i++) {
11998 names.push_back(a.atoms[first_itypes[i]].name);
12001 for (
size_t i = 0; i < first_itypes.size(); i++) {
12003 ss << char(
'A' + iat++);
12004 names.push_back(ss.str());
12009 stringstream output;
12011 if (aflowlib_legacy_format) {
12012 for (
size_t itype = 0; itype < first_itypes.size(); itype++) {
12013 for (
size_t jtype = itype; jtype < first_itypes.size(); jtype++) {
12018 for (
size_t itype = 0; itype < first_itypes.size(); itype++) {
12019 for (
size_t jtype = itype; jtype < first_itypes.size(); jtype++) {
12025 return output.str();
12045 return a.num_each_type.size();
12053 xstructure
NAMES(vector<string> argv, istream& input) {
12055 if (argv.size() != a.num_each_type.size() + 2) {
12060 for (
size_t itype = 0; itype < a.num_each_type.size(); itype++) {
12061 const string species = string(argv.at(2 + b.atoms.at(iatom).type));
12062 b.species.at(itype) = species;
12063 for (
int j = 0; j < a.num_each_type[itype]; j++) {
12064 b.atoms.at(iatom).name = species;
12065 b.atoms.at(iatom).CleanName();
12066 b.atoms.at(iatom).CleanSpin();
12067 b.atoms.at(iatom).name_is_given =
true;
12080 const bool LDEBUG = (
false ||
XHOST.DEBUG);
12084 if (iparams.
rows >= 1) {
12085 radius = iparams[1];
12087 if (iparams.
rows >= 2) {
12088 distance = iparams[2];
12103 while (!b.atoms.empty()) {
12110 for (
int i = 1; i <= 3; i++) {
12111 ucell(i) = ceil((2.0 * radius + distance) / modulus(b.lattice(i)));
12113 cerr <<
__AFLOW_FUNC__ <<
" ucell(i=" << i <<
")=" << ucell(i) << endl;
12115 for (
int j = 1; j <= 3; j++) {
12116 b.lattice(i, j) = b.lattice(i, j) * ucell(i);
12120 for (
size_t iat = 0; iat < a.atoms.size(); iat++) {
12121 for (
int i = -dims(1); i <= dims(1); i++) {
12122 for (
int j = -dims(2); j <= dims(2); j++) {
12123 for (
int k = -dims(3); k <= dims(3); k++) {
12124 _atom atom = a.atoms[iat];
12125 atom.cpos = ((double) i) * a.lattice(1) + ((double) j) * a.lattice(2) + ((double) k) * a.lattice(3) + a.atoms[iat].cpos;
12126 atom.fpos =
C2F(b.lattice, atom.cpos);
12127 if (modulus(atom.cpos) <= radius) {
12128 b.AddAtom(atom,
false);
12134 cerr <<
"atoms=" << b.atoms.size() << endl;
12147 PrintNdata(a, cout);
12167 a.order_parameter_structure =
false;
12168 a.order_parameter_atoms.clear();
12169 for (
size_t i = 0; i < a.atoms.size(); i++) {
12170 a.atoms[i].order_parameter_atom =
false;
12171 a.atoms[i].order_parameter_value = 0;
12196 if (argv.size() != a.num_each_type.size() + 2) {
12201 for (
size_t itype = 0; itype < a.num_each_type.size(); itype++) {
12202 const string species = string(argv.at(2 + b.atoms.at(iatom).type));
12203 b.species.at(itype) = species;
12204 for (
int j = 0; j < a.num_each_type[itype]; j++) {
12206 aus << species << j + 1;
12207 b.atoms.at(iatom).name = aus.str();
12208 b.atoms.at(iatom).CleanName();
12209 b.atoms.at(iatom).CleanSpin();
12210 b.atoms.at(iatom).name_is_given =
true;
12233 cerr <<
"# WARNING: THIS REQUIRES AN ALTERED VERSION OF VASP - SEE aflow --help" << endl;
12234 const int only_occ = 0;
12235 pflow::projdata prd;
12236 pflow::pdosdata pdd;
12237 prd.PROOUTinfile = argv.at(3);
12238 pdd.PDOSinfile = argv.at(2);
12239 pflow::ReadInProj(prd);
12240 pflow::CalcNeatProj(prd, only_occ);
12241 pflow::ReadInPDOSData(prd, pdd);
12242 pflow::CalcPDOS(prd, pdd);
12243 pdd.PrintPDOS(cout, prd.sp);
12244 if (pdd.print_params) {
12245 pdd.PrintParams(cout, prd.LLMnames);
12262 const bool LDEBUG = (
false ||
XHOST.DEBUG);
12269 if (vpflow.
flag(
"PEARSON_SYMBOL::USAGE")) {
12270 const string usage =
"aflow --pearson_symbol|--pearson|--Pearson_symbol|--Pearson[=<tolerance_value>|=tight|=loose]";
12271 const string options =
"options: [--no_scan] [--tolerance_spectrum=<start>,<stop>,<nsteps>]";
12272 vector<string> voptions;
12274 voptions.insert(voptions.begin(), usage);
12290 const double tolerance = pflow::getSymmetryTolerance(a, vpflow.
getattachedscheme(
"PEARSON_SYMBOL::TOLERANCE"));
12294 if (vpflow.
flag(
"PEARSON_SYMBOL::NO_SCAN")) {
12295 a.sym_eps_no_scan =
true;
12300 bool tolerance_spectrum_analysis =
false;
12301 vector<double> tolerance_spectrum;
12302 if (vpflow.
flag(
"PEARSON_SYMBOL::TOLERANCE_SPECTRUM")) {
12303 tolerance_spectrum_analysis =
true;
12304 tolerance_spectrum = pflow::getSymmetryToleranceSpectrum(vpflow.
getattachedscheme(
"PEARSON_SYMBOL::TOLERANCE_SPECTRUM"));
12305 }
else if (vpflow.
flag(
"PEARSON_SYMBOL::TOLERANCE") && vpflow.
flag(
"PEARSON_SYMBOL::TOLERANCE_SPECTRUM")) {
12306 sss <<
__AFLOW_FUNC__ <<
" ERROR: Cannot specify a single tolerance value and perform the tolerance spectrum at the same time. Please choose one or the other.";
12312 if (vpflow.
flag(
"PEARSON_SYMBOL::MAGNETIC")) {
12313 const string magmom_info = vpflow.
getattachedscheme(
"PEARSON_SYMBOL::MAGNETIC");
12317 if (!tolerance_spectrum_analysis) {
12318 a.GetRealLatticeType(tolerance);
12321 cerr <<
" Real space lattice primitive = " << a.bravais_lattice_type << endl;
12322 cerr <<
" Real space lattice variation = " << a.bravais_lattice_variation_type << endl;
12323 cerr <<
" Real space Pearson symbol = " << a.pearson_symbol << endl;
12325 sss << a.pearson_symbol << endl;
12328 const xstructure a_orig = a;
12329 const uint ntolerances = tolerance_spectrum.size();
12330 for (
uint i = 0; i < ntolerances; i++) {
12332 a.GetRealLatticeType(tolerance_spectrum[i]);
12333 sss <<
"tol=" << tolerance_spectrum[i] <<
": " << a.pearson_symbol << endl;
12347 ifstream chgfile(argv.at(3).c_str());
12348 vector<int> ngrid(3);
12349 vector<double> chg_tot;
12350 vector<double> chg_diff;
12351 pflow::ReadChg(str, ngrid, chg_tot, chg_diff, chgfile);
12353 pflow::pd_params pdp;
12354 ifstream pdfile(argv.at(2).c_str());
12355 pflow::ReadPlaneDensParams(str, pdp, pdfile);
12357 vector<double> dens2d_tot;
12358 vector<double> dens2d_diff;
12359 pflow::GetPlaneDens(pdp, dens2d_tot, dens2d_diff, str, ngrid, chg_tot, chg_diff);
12360 pflow::PrintPlaneDens(pdp, dens2d_tot, dens2d_diff, str);
12368 string PLATON(
const string& options, istream& input) {
12369 const bool LDEBUG = (
false ||
XHOST.DEBUG);
12373 vector<string> tokens;
12375 if (tokens.size() == 1) {
12376 if (tokens[0] ==
"usage" || tokens[0] ==
"USAGE") {
12387 cerr <<
XPID <<
"pflow::PLATON: tokens.size()=" << tokens.size() << endl;
12400 if ((!tokens.empty() && tokens[0] ==
"EQUAL") || (tokens.size() >= 2 && tokens[1] ==
"EQUAL")) {
12401 Platon_EQUAL =
true;
12403 if ((!tokens.empty() && tokens[0] ==
"EXACT") || (tokens.size() >= 2 && tokens[1] ==
"EXACT")) {
12404 Platon_EXACT =
true;
12406 if (tokens.size() >= 3) {
12412 a.DecorateWithElements();
12413 return a.platon2print(Platon_EQUAL, Platon_EXACT, Platon_ang, Platon_d1, Platon_d2, Platon_d3);
12435 cerr <<
"# WARNING: THIS REQUIRES AN ALTERED VERSION OF VASP - SEE aflow --help" << endl;
12436 const int only_occ = 1;
12437 pflow::projdata proj_dat;
12438 proj_dat.PROOUTinfile = argv.at(2);
12439 pflow::ReadInProj(proj_dat);
12440 pflow::CalcNeatProj(proj_dat, only_occ);
12441 PrintNeatProj(proj_dat, cout);
12452 void RENDER(istream& input,
const fs::path& output) {
12454 const fs::path save_path = output /
"structure.html";
12456 const std::string html = w.
toHTML();
12458 for (
int axis_idx = 0; axis_idx < 3; axis_idx++) {
12487 oss << str.findsym2print();
12489 vector<string> stroutput;
12497 for (
size_t i = 0; i < stroutput.size(); i++) {
12503 cout << stroutput[i] << endl;
12517 aflags.QUIET =
true;
12519 const bool WRITE =
true;
12520 ofstream File(
"/dev/null");
12522 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
12523 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
12524 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
false;
12525 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
false;
12526 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
12527 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
12528 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
12529 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
12541 aflags.QUIET =
true;
12543 const bool WRITE =
true;
12544 ofstream File(
"/dev/null");
12547 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
12548 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
true;
12549 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
false;
12550 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
false;
12551 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
12552 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
12553 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
12554 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
12565 aflags.QUIET =
true;
12567 const bool WRITE =
true;
12568 ofstream File(
"/dev/null");
12577 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP =
true;
12578 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK =
false;
12579 kflags.KBIN_SYMMETRY_CALCULATE_FGROUP =
true;
12580 kflags.KBIN_SYMMETRY_CALCULATE_PGROUP_XTAL =
true;
12581 kflags.KBIN_SYMMETRY_CALCULATE_PGROUPK_XTAL =
false;
12582 kflags.KBIN_SYMMETRY_CALCULATE_SGROUP =
false;
12583 kflags.KBIN_SYMMETRY_CALCULATE_IATOMS =
false;
12584 kflags.KBIN_SYMMETRY_CALCULATE_AGROUP =
false;
12625 const bool LDEBUG = (
false ||
XHOST.DEBUG);
12627 const uint nspeciesHTQC = species.size();
12629 cerr <<
__AFLOW_FUNC__ <<
" species.size()=" << species.size() << endl;
12632 cerr <<
__AFLOW_FUNC__ <<
" species_pp.size()=" << species_pp.size() << endl;
12635 cerr <<
__AFLOW_FUNC__ <<
" vvolume.size()=" << vvolume.size() << endl;
12638 cerr <<
__AFLOW_FUNC__ <<
" vmass.size()=" << vmass.size() << endl;
12641 cerr <<
__AFLOW_FUNC__ <<
" nspeciesHTQC=" << nspeciesHTQC << endl;
12649 deque<string> rnd_species;
12650 deque<string> rnd_species_pp;
12651 deque<string> rnd_label1;
12652 deque<string> rnd_label2;
12653 deque<double> rnd_vvolume;
12654 deque<double> rnd_vmass;
12655 if (nspeciesHTQC != species.size()) {
12658 if (nspeciesHTQC != species_pp.size()) {
12661 if (nspeciesHTQC != vvolume.size()) {
12664 if (nspeciesHTQC != vmass.size()) {
12667 for (
uint i = 0; i < nspeciesHTQC; i++) {
12668 rnd_species.push_back(species[i]);
12669 rnd_species_pp.push_back(species_pp[i]);
12670 rnd_vvolume.push_back(vvolume[i]);
12671 rnd_vmass.push_back(vmass[i]);
12674 rnd_label1.push_back(A);
12675 rnd_label2.push_back(A);
12677 aurostd::sort(rnd_species, rnd_species_pp, rnd_vvolume, rnd_vmass, rnd_label1);
12679 label = label +
".";
12680 for (
size_t i = 0; i < rnd_label2.size(); i++) {
12681 label = label + rnd_label2[i];
12686 for (
uint i = 0; i < nspeciesHTQC; i++) {
12688 cerr <<
__AFLOW_FUNC__ <<
" BEFORE species.at(" << i <<
")=" << species.at(i) <<
" species_pp.at(" << i <<
")=" << species_pp.at(i) <<
" vvolume.at(" << i <<
")=" << vvolume.at(i) <<
" vmass.at(" << i
12689 <<
")=" << vmass.at(i) << endl;
12692 for (
uint i = 0; i < nspeciesHTQC; i++) {
12693 species[i] = rnd_species.at(i);
12695 for (
uint i = 0; i < nspeciesHTQC; i++) {
12696 species_pp[i] = rnd_species_pp.at(i);
12698 for (
uint i = 0; i < nspeciesHTQC; i++) {
12699 vvolume[i] = rnd_vvolume.at(i);
12701 for (
uint i = 0; i < nspeciesHTQC; i++) {
12702 vmass[i] = rnd_vmass.at(i);
12704 for (
uint i = 0; i < nspeciesHTQC; i++) {
12706 cerr <<
__AFLOW_FUNC__ <<
" AFTER species.at(" << i <<
")=" << species.at(i) <<
" species_pp.at(" << i <<
")=" << species_pp.at(i) <<
" vvolume.at(" << i <<
")=" << vvolume.at(i) <<
" vmass.at(" << i
12707 <<
")=" << vmass.at(i) << endl;
12717 deque<double> vvolume;
12718 for (
size_t i = 0; i < species.size(); i++) {
12719 vvolume.push_back(
double(0));
12721 deque<double> vmass;
12722 for (
size_t i = 0; i < species.size(); i++) {
12723 vmass.push_back(
double(0));
12729 deque<string> species_pp;
12730 for (
size_t i = 0; i < species.size(); i++) {
12731 species_pp.push_back(species[i]);
12733 deque<double> vmass;
12734 for (
size_t i = 0; i < species.size(); i++) {
12735 vmass.push_back(
double(0));
12741 deque<string> species_pp;
12742 for (
size_t i = 0; i < species.size(); i++) {
12743 species_pp.push_back(species[i]);
12745 deque<double> vvolume;
12746 for (
size_t i = 0; i < species.size(); i++) {
12747 vvolume.push_back(
double(0));
12749 deque<double> vmass;
12750 for (
size_t i = 0; i < species.size(); i++) {
12751 vmass.push_back(
double(0));
12757 const bool LDEBUG = (
false ||
XHOST.DEBUG);
12759 string label = argv.at(2);
12762 cerr <<
"AlphabetizePrototypeLabelSpeciesArgv: nspeciesHTQC=" << nspeciesHTQC << endl;
12765 cerr <<
"AlphabetizePrototypeLabelSpeciesArgv: label=" << label << endl;
12767 deque<string> species;
12768 for (
uint i = 0; i < nspeciesHTQC; i++) {
12769 species.push_back(argv.at(3 + i));
12772 for (
uint i = 0; i < nspeciesHTQC; i++) {
12773 argv.at(3 + i) = species.at(i);
12775 argv.at(2) = label;
12780 const bool LDEBUG = (
false ||
XHOST.DEBUG);
12782 string label = tokens.at(0);
12785 cerr <<
"AlphabetizePrototypeLabelSpeciesTokens: nspeciesHTQC=" << nspeciesHTQC << endl;
12788 cerr <<
"AlphabetizePrototypeLabelSpeciesTokens: label=" << label << endl;
12790 deque<string> species;
12791 for (
uint i = 0; i < nspeciesHTQC; i++) {
12792 species.push_back(tokens.at(1 + i));
12795 for (
uint i = 0; i < nspeciesHTQC; i++) {
12796 tokens.at(1 + i) = species.at(i);
12798 tokens.at(0) = label;
12806 bool PROTO_PARSE_INPUT(
const vector<string>& params, vector<vector<string>>& vvstr, vector<vector<double>>& vvnum,
bool ignore_label,
bool reverse) {
12807 stringstream message;
12808 for (
size_t i = 0; i < vvstr.size(); i++) {
12812 for (
size_t i = 0; i < vvnum.size(); i++) {
12816 if (params.empty()) {
12819 if (ignore_label && params.size() == 1) {
12822 vector<string> tokens;
12825 const bool ignore_first = (ignore_label && !reverse);
12826 const bool ignore_last = (ignore_label && reverse);
12827 for (
size_t i = (ignore_first ? 1 : 0); i < params.size() - (ignore_last ? 1 : 0); i++) {
12829 if (tokens.empty()) {
12830 message <<
"No inputs found in params[" << i <<
"]";
12835 vvnum.emplace_back(0);
12837 vvstr.emplace_back(0);
12839 for (
size_t j = 0; j < tokens.size(); j++) {
12841 if (isfloat1 != isfloat2) {
12842 message <<
"Mixed string/number input at params[" << i <<
"]=" << params[i];
12848 vvstr.back().push_back(tokens[j]);
12860 bool PROTO_TEST_INPUT(
const vector<vector<string>>& vvstr,
const vector<vector<double>>& vvnum,
uint& nspeciesHTQC,
bool patch_nspecies) {
12861 stringstream message;
12863 uint nspecies = nspeciesHTQC;
12864 if (patch_nspecies) {
12865 nspecies = vvstr.size();
12869 const bool check_volumes = (!vvnum.empty() && !(vvnum.size() == 1 && vvnum[0].size() == 1));
12870 if (!vvstr.empty() && vvstr.size() != nspecies) {
12871 message <<
"Invalid input specification, mismatch between nspecies and species inputs (nspecies==" << nspecies <<
", vvstr.size()==" << vvstr.size() <<
")" << endl;
12872 message <<
"aflow --aflow_proto[=]label*:specieA*[:specieB*][:volumeA*[:volumeB*] | :volume]" << endl;
12875 if (check_volumes) {
12877 if (vvnum.size() != nspecies) {
12878 message <<
"Invalid input specification, mismatch between nspecies and volume inputs (nspecies==" << nspecies <<
", vvnum.size()==" << vvnum.size() <<
")" << endl;
12879 message <<
"aflow --aflow_proto[=]label*:specieA*[:specieB*][:volumeA*[:volumeB*] | :volume]" << endl;
12883 if (vvstr.size() != vvnum.size()) {
12884 message <<
"Invalid input specification, mismatch between species and volume inputs (vvstr.size()==" << vvstr.size() <<
", vvnum.size()==" << vvnum.size() <<
")" << endl;
12885 message <<
"aflow --aflow_proto[=]label*:specieA*[:specieB*][:volumeA*[:volumeB*] | :volume]" << endl;
12888 for (
size_t i = 0; i < vvstr.size(); i++) {
12889 if (vvstr[i].size() != vvnum[i].size()) {
12890 message <<
"Invalid input specification, mismatch between combo species and volume inputs (vvstr[" << i <<
"].size()==" << vvstr[i].size() <<
", vvnum[" << i <<
"].size()==" << vvnum[i].size() <<
")" << endl;
12891 message <<
"aflow --aflow_proto[=]label*:specieA*[:specieB*][:volumeA*[:volumeB*] | :volume]" << endl;
12897 for (
size_t i = 0; i < vvnum.size(); i++) {
12898 for (
size_t j = 0; j < vvnum[i].size(); j++) {
12899 if (vvnum[i][j] <= 0) {
12900 message <<
"Invalid input specification, negative/zero number input found (vvnum[" << i <<
"][" << j <<
"]=" << vvnum[i][j] <<
")" << endl;
12901 message <<
"aflow --aflow_proto[=]label*:specieA*[:specieB*][:volumeA*[:volumeB*] | :volume]" << endl;
12912 stringstream message;
12913 vector<string> tokens;
12914 string designation1;
12915 string designation2;
12924 if (tokens.empty()) {
12925 message <<
"No occupants specified for [designation=" << p1 <<
"]";
12928 designation1 = tokens[0];
12929 if (designation1.empty()) {
12930 message <<
"No mode specified [designation=" << p1 <<
"]";
12933 mode1 = designation1[0];
12934 _site1 = designation1;
12935 _site1.erase(_site1.begin());
12937 message <<
"Designation ill-written, no site provided [designation=" << p1 <<
"]";
12943 if (tokens.empty()) {
12944 message <<
"No occupants specified for [designation=" << p2 <<
"]";
12947 designation2 = tokens[0];
12948 if (designation2.empty()) {
12949 message <<
"No mode specified [designation=" << p2 <<
"]";
12952 mode2 = designation2[0];
12953 _site2 = designation2;
12954 _site2.erase(_site2.begin());
12956 message <<
"Designation ill-written, no site provided [designation=" << p2 <<
"]";
12961 if (site1 != site2) {
12962 return site1 < site2;
12965 if (mode1 != mode2) {
12966 if (mode1 ==
'P') {
12973 message <<
"Double specification for the same site [designation1=" << p1 <<
",designation2=" << p2 <<
"]";
12978 const bool LDEBUG = (
false ||
XHOST.DEBUG);
12979 stringstream message;
12980 vector<string> tokens;
12981 string _occupancy1;
12983 string _occupancy2;
12991 if (tokens.size() != 2) {
12992 message <<
"Occupancy x Occupant pair ill-defined for [occupation=" << occ1 <<
"]";
12995 _occupancy1 = tokens[0];
12996 _occupant1 = tokens[1];
12997 occupant1 = (int) _occupant1[0] - 65;
12999 cerr <<
__AFLOW_FUNC__ <<
" occupant to int conversion: " << _occupant1 <<
" == " << occupant1 << endl;
13002 message <<
"Occupancy is not a float for [occupation=" << occ1 <<
"]";
13008 if (tokens.size() != 2) {
13009 message <<
"Occupancy x Occupant pair ill-defined for [occupation=" << occ2 <<
"]";
13012 _occupancy2 = tokens[0];
13013 _occupant2 = tokens[1];
13014 occupant2 = (int) _occupant2[0] - 65;
13016 cerr <<
__AFLOW_FUNC__ <<
" occupant to int conversion: " << _occupant2 <<
" == " << occupant2 << endl;
13019 message <<
"Occupancy is not a float for [occupation=" << occ2 <<
"]";
13023 if (occupant1 != occupant2) {
13024 return occupant1 < occupant2;
13026 if (occupancy1 != occupancy2) {
13027 return occupancy1 > occupancy2;
13029 message <<
"Double specification for the same occupant [occupation1=" << occ1 <<
",occupation2=" << occ2 <<
"]";
13034 const bool LDEBUG = (
false ||
XHOST.DEBUG);
13036 stringstream message;
13037 vector<string> tokens;
13043 if (tokens.size() != 2) {
13044 message <<
"Occupancy x Occupant pair ill-defined for [occupation=" << occ <<
"]";
13047 _occupancy = tokens[0];
13048 _occupant = tokens[1];
13049 occupant = (int) _occupant[0] - 65;
13051 cerr <<
__AFLOW_FUNC__ <<
" occupant to int conversion: " << _occupant <<
" == " << occupant << endl;
13054 message <<
"Occupancy is not a float for [occupation=" << occ <<
"]";
13059 if (occupancy < default_pocc_tol) {
13060 message <<
"Cannot set desired precision (" << default_pocc_tol <<
") for [occupation=" << occ <<
"]" << endl;
13061 message <<
"Doping is VERY small, requiring MANY representative ordered structures (not recommended)" << endl;
13066 const int prec = (int) ceil(log10(1.0 / default_pocc_tol));
13076 const bool LDEBUG = (
false ||
XHOST.DEBUG);
13080 for (
size_t i = 0; i < pocc_sites.size(); i++) {
13081 cerr << pocc_sites[i] << (i < pocc_sites.size() - 1 ?
"," :
"");
13085 stringstream message;
13086 vector<POCCSiteSpecification> vpss;
13087 if (pocc_sites.empty()) {
13090 vector<string> tokens;
13091 vector<string> tokenstmp;
13092 string designation;
13098 vector<string> pocc_designations;
13099 for (
size_t i = 0; i < pocc_sites.size(); i++) {
13100 const string& ps = pocc_sites[i];
13102 message <<
"POCC_site[i=" << i <<
"] empty";
13106 if (tokens.empty()) {
13107 message <<
"No occupants specified for [designation=" << ps <<
"]";
13110 designation = tokens[0];
13111 if (designation.empty()) {
13112 message <<
"No mode specified [designation=" << ps <<
"]";
13116 message <<
"Duplicate POCC designation: " << designation;
13119 pocc_designations.push_back(designation);
13120 mode = designation[0];
13121 _site = designation;
13122 _site.erase(_site.begin());
13124 message <<
"Designation ill-written, no site provided [designation=" << ps <<
"]";
13132 if (pss.
mode ==
'S') {
13135 for (
size_t ii = 0; ii < xstr.num_each_type.size(); ii++) {
13136 for (
uint jj = 0; jj < (
uint) xstr.num_each_type[ii]; jj++) {
13145 message <<
"No positions found: " << ps;
13154 for (
size_t it = 1; it < tokens.size(); it++) {
13155 tokenstmp.push_back(tokens[it]);
13161 cerr <<
__AFLOW_FUNC__ <<
" creating new POCCSiteSpecification():" << endl;
13166 vpss.push_back(pss);
13171 stringstream message;
13183 if (p1.
mode ==
'S' && p2.
mode ==
'P') {
13187 }
else if (p1.
mode ==
'P' && p2.
mode ==
'S') {
13192 message <<
"Unknown modes: p1.mode=" << p1.
mode <<
", p2.mode=" << p2.
mode;
13196 return position1 < position2;
13200 if (pocc_params.empty()) {
13204 const bool LDEBUG = (
false ||
XHOST.DEBUG);
13208 stringstream message;
13209 vector<string> tokens0;
13210 vector<string> tokens1;
13211 vector<string> _tokens2;
13212 vector<string> tokens2;
13213 vector<string> tokens2_save;
13218 bool fix_precision_occupancy =
true;
13219 vector<POCCSiteSpecification> vpss;
13220 for (
size_t i = 0; i < tokens0.size(); i++) {
13226 for (
size_t ip = 0; ip < vpss.size(); ip++) {
13227 tokens1.push_back(vpss[ip].input_string);
13230 for (
size_t ip = 0; ip < tokens1.size(); ip++) {
13231 cerr <<
__AFLOW_FUNC__ <<
" tokens1[" << ip <<
"]=" << tokens1[ip] <<
" (NEW ORDER)" << endl;
13234 for (
size_t j = 0; j < tokens1.size(); j++) {
13237 if (_tokens2.size() < 2) {
13238 message <<
"No occupants specified for [designation=" << tokens1[j] <<
"]";
13242 tokens2_save.clear();
13243 fix_precision_occupancy =
true;
13244 for (
size_t k = 1; k < _tokens2.size(); k++) {
13245 tokens2_save.push_back(_tokens2[k]);
13248 occ = new_occ = tokens2_save.back();
13249 fix_precision_occupancy = (fix_precision_occupancy &&
FIX_PRECISION_POCC(occ, new_occ));
13250 tokens2.push_back(new_occ);
13252 if (!fix_precision_occupancy) {
13254 for (
size_t k = 0; k < tokens2_save.size(); k++) {
13255 tokens2.push_back(tokens2_save[k]);
13258 std::sort(tokens2.begin(), tokens2.end(),
sortPOCCOccs);
13259 tokens2.insert(tokens2.begin(), _tokens2[0]);
13274 const bool LDEBUG = (
false ||
XHOST.DEBUG);
13275 vector<string> vanions;
13277 vector<vector<string>> voccupants;
13278 vector<xvector<double>> vsites;
13279 vector<bool> vanions_found;
13282 bool found =
false;
13283 for (i = 0; i < xstr.atoms.size(); i++) {
13285 for (j = 0; j < voccupants.size() && !found; j++) {
13288 voccupants[j].push_back(xstr.atoms[i].cleanname);
13290 vanions_found[j] =
true;
13297 vsites.push_back(xstr.atoms[i].cpos);
13298 voccupants.emplace_back(0);
13299 voccupants.back().push_back(xstr.atoms[i].cleanname);
13303 if (vsites.size() != voccupants.size()) {
13306 if (vsites.size() != vanions_found.size()) {
13310 for (j = 0; j < voccupants.size(); j++) {
13314 for (j = 0; j < voccupants.size(); j++) {
13315 if (vanions_found[j]) {
13316 for (i = 0; i < voccupants[j].size(); i++) {
13319 cerr <<
__AFLOW_FUNC__ <<
" found non-anion in anion_sublattice: " << voccupants[j][i] << endl;
13335 bool convertXStr2POCC(xstructure& xstr,
const string& pocc_params,
const vector<string>& _vspecies,
const vector<double>& vvolumes) {
13336 if (pocc_params.empty()) {
13339 vector<string> vspecies;
13340 if (_vspecies.empty()) {
13341 for (
uint i = 0; i < 26; i++) {
13342 vspecies.push_back(
string() +
char(
'A' + i));
13345 for (
size_t i = 0; i < _vspecies.size(); i++) {
13346 vspecies.push_back(_vspecies[i]);
13349 const bool LDEBUG = (
false ||
XHOST.DEBUG);
13350 stringstream message;
13351 xstructure xstr_orig(xstr);
13353 vector<string> tokens1;
13354 vector<string> tokens2;
13355 vector<string> tokens3;
13356 string designation;
13367 vector<uint> atoms2remove;
13368 vector<_atom> atoms2add;
13369 vector<uint> positions_already_added;
13370 vector<uint> positions_already_added_tmp;
13371 for (
size_t i = 0; i < tokens1.size(); i++) {
13374 if (tokens2.empty()) {
13375 message <<
"No occupants specified for [designation=" << tokens1[i] <<
"]";
13378 designation = tokens2[0];
13379 tokens2.erase(tokens2.begin());
13380 if (designation.empty()) {
13381 message <<
"Designation empty [i=" << i <<
"]";
13384 mode = designation[0];
13385 _site = designation;
13386 _site.erase(_site.begin());
13388 message <<
"Designation ill-written, no site provided [designation=" << designation <<
"]";
13394 if (site >= xstr_orig.atoms.size()) {
13395 message <<
"Invalid position index " << site <<
" >= xstr.atoms.size()=" << xstr_orig.atoms.size();
13398 atoms2remove.push_back(site);
13399 }
else if (mode ==
'S') {
13400 if (site >= xstr_orig.num_each_type.size()) {
13401 message <<
"Invalid type index " << site <<
" >= xstr.num_each_type.size()=" << xstr_orig.num_each_type.size();
13405 for (
size_t ii = 0; ii < xstr_orig.num_each_type.size(); ii++) {
13406 for (
uint jj = 0; jj < (
uint) xstr_orig.num_each_type[ii]; jj++) {
13408 atoms2remove.push_back(iatom);
13414 message <<
"Unknown POCC designation mode [designation=" << designation <<
"]";
13417 positions_already_added_tmp.clear();
13418 for (
size_t j = 0; j < tokens2.size(); j++) {
13421 if (tokens3.size() != 2) {
13422 message <<
"Occupancy x Occupant pair ill-defined for [designation=" << tokens1[i] <<
",occupant=" << j <<
"]";
13425 _occupancy = tokens3[0];
13426 _occupant = tokens3[1];
13427 occupant = (int) _occupant[0] - 65;
13429 cerr <<
__AFLOW_FUNC__ <<
" occupant to int conversion: " << _occupant <<
" == " << occupant << endl;
13431 if (occupant >= vspecies.size()) {
13432 message <<
"Invalid occupant specification: occupant[char=" << _occupant <<
",int=" << occupant <<
"] vs. vspecies.size()=" << vspecies.size();
13436 message <<
"Occupancy is not a float for [designation=" << tokens1[i] <<
",occupant=" << j <<
"]";
13447 atom = xstr_orig.atoms[site];
13448 positions_already_added_tmp.push_back(site);
13449 atom.type = occupant;
13450 atom.name = vspecies[occupant];
13453 atom.name_is_given =
true;
13454 atom.partial_occupation_value = occupancy;
13456 if (atom.partial_occupation_flag) {
13457 xstr.partial_occupation_flag =
true;
13459 atoms2add.push_back(atom);
13464 for (
size_t ii = 0; ii < xstr_orig.num_each_type.size(); ii++) {
13465 for (
uint jj = 0; jj < (
uint) xstr_orig.num_each_type[ii]; jj++) {
13468 atom = xstr_orig.atoms[iatom];
13469 positions_already_added_tmp.push_back(iatom);
13470 atom.type = occupant;
13471 atom.name = vspecies[occupant];
13474 atom.name_is_given =
true;
13475 atom.partial_occupation_value = occupancy;
13477 if (atom.partial_occupation_flag) {
13478 xstr.partial_occupation_flag =
true;
13480 atoms2add.push_back(atom);
13491 positions_already_added.insert(positions_already_added.end(), positions_already_added_tmp.begin(), positions_already_added_tmp.end());
13493 xstr.RemoveAtom(atoms2remove);
13494 std::stable_sort(atoms2add.begin(), atoms2add.end(), sortAtomsTypes);
13495 for (
size_t i = 0; i < atoms2add.size(); i++) {
13496 xstr.AddAtom(atoms2add[i],
false);
13500 if (vvolumes.size() == xstr.species_volume.size()) {
13501 for (
size_t i = 0; i < vvolumes.size(); i++) {
13502 xstr.species_volume[i] = vvolumes[i];
13506 if (vvolumes.size() == 1) {
13507 for (
size_t i = 0; i < xstr.atoms.size(); i++) {
13508 volume += vvolumes[0] * xstr.atoms[i].partial_occupation_value;
13511 for (
size_t i = 0; i < xstr.atoms.size(); i++) {
13512 for (
size_t j = 0; j < xstr.num_each_type.size(); j++) {
13513 if (xstr.atoms[i].name == xstr.species[j]) {
13514 volume += xstr.species_volume[j] * xstr.atoms[i].partial_occupation_value;
13519 xstr.SetVolume(volume);
13520 xstr.neg_scale =
true;
13522 vector<string> tokens;
13524 if (!tokens.empty()) {
13525 const string tobereplaced = tokens[0];
13527 if (tokens.size() == 2) {
13528 string pp = tokens[0];
13529 string proto = tokens[1];
13531 proto = proto +
":POCC_" + pocc_params;
13544 ofstream FileMESSAGE;
13545 return POccInputs2Xstr(pocc_input, pocc_settings, xstr, FileMESSAGE, oss);
13548 const bool LDEBUG = (
false ||
XHOST.DEBUG);
13549 stringstream message;
13556 message <<
"No TAG_TITLE_POCC found [" <<
TAG_TITLE_POCC <<
"], using generic SYSTEM name as title";
13562 const string elements_prototype_str = pocc_input.substr(0, loc1);
13563 const string pocc_params_tol_arun_str = pocc_input.substr(loc1 +
TAG_TITLE_POCC.length(), string::npos);
13565 cerr <<
__AFLOW_FUNC__ <<
" elements_prototype_str=" << elements_prototype_str << endl;
13566 cerr <<
__AFLOW_FUNC__ <<
" pocc_params_tol_arun_str=" << pocc_params_tol_arun_str << endl;
13572 loc1 = elements_prototype_str.find(
'.');
13575 vector<string> velements;
13576 string tmp_str =
"";
13577 string tmp_str2 =
"";
13578 string pocc_params;
13581 string module_arun;
13582 string::size_type loc2 = 0;
13583 while (loc1 != string::npos && (loc1 + 1) < elements_prototype_str.length()) {
13584 pps = elements_prototype_str.substr(0, loc1);
13585 proto = elements_prototype_str.substr(loc1 + 1, string::npos);
13596 tmp_str = pocc_params_tol_arun_str;
13597 pocc_params = tmp_str;
13599 if (loc2 != string::npos && (loc2 + 1) < tmp_str.length()) {
13600 pocc_params = tmp_str.substr(0, loc2);
13601 tmp_str = tmp_str.substr(loc2 + 1, string::npos);
13602 pocc_tol = tmp_str;
13607 cerr <<
__AFLOW_FUNC__ <<
" pocc_params=" << pocc_params << endl;
13610 cerr <<
__AFLOW_FUNC__ <<
" module_arun=" << module_arun << endl;
13614 if (loc2 != string::npos && (loc2 + 1) < tmp_str.length()) {
13615 tmp_str2 = tmp_str.substr(0, loc2);
13617 pocc_tol = tmp_str2;
13619 pocc_params = tmp_str2;
13621 tmp_str = tmp_str.substr(loc2 + 1, string::npos);
13622 pocc_arun = tmp_str;
13627 cerr <<
__AFLOW_FUNC__ <<
" pocc_params=" << pocc_params << endl;
13630 cerr <<
__AFLOW_FUNC__ <<
" module_arun=" << module_arun << endl;
13635 if (loc2 != string::npos && (loc2 + 1) < tmp_str.length()) {
13636 tmp_str2 = tmp_str.substr(0, loc2);
13638 pocc_arun = tmp_str2;
13640 pocc_tol = tmp_str2;
13642 pocc_params = tmp_str2;
13644 tmp_str = tmp_str.substr(loc2 + 1, string::npos);
13645 module_arun = tmp_str;
13650 cerr <<
__AFLOW_FUNC__ <<
" pocc_params=" << pocc_params << endl;
13653 cerr <<
__AFLOW_FUNC__ <<
" module_arun=" << module_arun << endl;
13656 loc2 = tmp_str.find(
":");
13657 if (loc2 != string::npos && (loc2 + 1) < tmp_str.length()) {
13658 tmp_str2 = tmp_str.substr(0, loc2);
13660 pocc_arun = tmp_str2;
13663 module_arun = tmp_str2;
13665 pocc_tol = tmp_str2;
13667 pocc_params = tmp_str.substr(0, loc2);
13669 tmp_str = pocc_arun.substr(loc2 + 1, string::npos);
13675 cerr <<
__AFLOW_FUNC__ <<
" pocc_params=" << pocc_params << endl;
13678 cerr <<
__AFLOW_FUNC__ <<
" module_arun=" << module_arun << endl;
13685 if (!pocc_tol.empty()) {
13686 tmp_str = pocc_tol;
13687 if (tmp_str.find(
TAG_TOL) != string::npos) {
13706 loc1 = elements_prototype_str.find(
'.', loc1 + 1);
13711 if (xstr.atoms.empty()) {
13712 message <<
"Cannot extract identifiable prototype from SYSTEM [" << pocc_input <<
"], using generic SYSTEM name as title";
13719 cerr << xstr << endl;
13722 if (xstr.species.size() != xstr.comp_each_type.size()) {
13723 message <<
"Cannot extract composition from prototype [" << proto <<
"], using generic SYSTEM name as title";
13728 pocc_settings.
clear();
13745 const bool LDEBUG = (
false ||
XHOST.DEBUG);
13746 stringstream message;
13751 vector<string> tokens;
13752 vector<string> params;
13753 vector<string> vstr;
13754 vector<string> vstr_orig;
13755 vector<double> vnum;
13756 vector<double> vnum_orig;
13757 vector<vector<string>> vvstr;
13758 vector<vector<double>> vvnum;
13760 cerr <<
XPID <<
"pflow::PROTO: vpflow.getattachedscheme(\"PROTO\")=" << vpflow.
getattachedscheme(
"PROTO") << endl;
13763 cerr <<
XPID <<
"pflow::PROTO: vpflow.getattachedscheme(\"PROTO_ICSD_AFLOW\")=" << vpflow.
getattachedscheme(
"PROTO_ICSD_AFLOW") << endl;
13766 cerr <<
XPID <<
"pflow::PROTO: vpflow.flag(\"PROTO\")=" << vpflow.
flag(
"PROTO") << endl;
13769 cerr <<
XPID <<
"pflow::PROTO: vpflow.flag(\"PARAMS\")=" << vpflow.
flag(
"PARAMS") << endl;
13772 cerr <<
XPID <<
"pflow::PROTO: vpflow.flag(\"POCC_PARAMS\")=" << vpflow.
flag(
"POCC_PARAMS") << endl;
13775 cerr <<
XPID <<
"pflow::PROTO: vpflow.flag(\"POCC_TOL\")=" << vpflow.
flag(
"POCC_TOL") << endl;
13778 cerr <<
XPID <<
"pflow::PROTO: vpflow.flag(\"PROTO_ICSD_AFLOW\")=" << vpflow.
flag(
"PROTO_ICSD_AFLOW") << endl;
13781 cerr <<
XPID <<
"pflow::PROTO: vpflow.flag(\"PROTO::USE_ANRL_LATTICE_PARAM\")=" << vpflow.
flag(
"PROTO::USE_ANRL_LATTICE_PARAM") << endl;
13785 if (params.empty()) {
13788 "aflow [options] --proto=label*[:speciesA*[:speciesB*]..[:volumeA*[:volumeB*].. | :volume]] [--params=..... [--hex]]",
13789 " --proto[_icsd]=ICSD_number.{ABC}[:speciesA*[:speciesB*]..[:volumeA*[:volumeB*].. | :volume]]",
" --proto_icsd=label_ICSD_number",
13790 "options = [--server=xxxxxxx] [--vasp | --itc | --qe | --abinit | --aims | --cif | --abccar] [--params=... | --hex]]",
"To get the list of prototypes --protos or --protos_icsd ."));
13794 const string labels_raw = params.at(0);
13796 if (tokens.size() != 1) {
13797 message <<
"Too many labels provided, --proto can only handle one label at at time: labels.size()==" << tokens.size();
13801 if (!tokens.empty()) {
13809 for (
size_t i = 0; i < vvstr.size(); i++) {
13810 if (!vvstr[i].empty()) {
13811 vstr.push_back(vvstr[i][0]);
13812 vstr_orig.push_back(vvstr[i][0]);
13817 for (
size_t i = 0; i < vvnum.size(); i++) {
13818 if (!vvnum[i].empty()) {
13819 vnum.push_back(vvnum[i][0]);
13820 vnum_orig.push_back(vvnum[i][0]);
13828 const std::string uid = anrl::getPrototypeUID(label);
13829 const anrl::ProtoData pd = anrl::ProtoData::get();
13834 if (!parameters.empty() && vpflow.
flag(
"PROTO::USE_ANRL_LATTICE_PARAM")) {
13835 message <<
"Cannot have both --params=<...> and --use_anrl_lattice_param at the same time; use one or the other.";
13837 }
else if (parameters.empty() && vpflow.
flag(
"PROTO::USE_ANRL_LATTICE_PARAM")) {
13838 parameters =
"use_anrl_lattice_param";
13845 if (!(tokens.empty() || tokens.size() == 1)) {
13846 message <<
"Too many sets of pocc_parameters provided, --proto can only handle one set of pocc_parameters at at time: pocc_parameters.size()==" << tokens.size();
13849 string pocc_parameters;
13850 if (!tokens.empty()) {
13851 pocc_parameters = tokens[0];
13853 const bool pocc = (!pocc_parameters.empty());
13858 deque<string> atomX;
13859 deque<double> volumeX;
13861 bool alphabetic =
true;
13868 label =
static_cast<string>(pd.content[uid][
"label"]);
13869 nspecies =
static_cast<uint>(pd.content[uid][
"number_of_species"]);
13870 if (parameters.empty()) {
13871 parameters =
static_cast<string>(pd.content[uid][
"parameter_values"]);
13876 bool found =
false;
13885 cerr <<
__AFLOW_FUNC__ <<
" params.size()=" << params.size() << endl;
13888 cerr <<
__AFLOW_FUNC__ <<
" vstr.size()=" << vstr.size() << endl;
13891 cerr <<
__AFLOW_FUNC__ <<
" vnum.size()=" << vnum.size() << endl;
13909 cerr <<
__AFLOW_FUNC__ <<
" pocc_parameters=" << pocc_parameters << endl;
13915 for (
size_t i = 0; i < nspecies && i < vstr_orig.size(); i++) {
13916 vstr.push_back(vstr_orig[i]);
13919 for (
size_t i = 0; i < nspecies && i < vnum_orig.size(); i++) {
13920 vnum.push_back(vnum_orig[i]);
13924 const int mode = 0;
13925 if (vstr.empty()) {
13934 for (
size_t i = 0; i < nspecies && i < vstr.size(); i++) {
13935 atomX.push_back(vstr[i]);
13938 if (!found && vstr.size() == nspecies && vnum.empty()) {
13943 for (
size_t i = 0; i < atomX.size(); i++) {
13944 cerr <<
__AFLOW_FUNC__ <<
" atomX[" << i <<
"]=" << atomX[i] << endl;
13951 if (!found && vstr.size() == nspecies && (vnum.size() == 1 || vstr.size() == vnum.size())) {
13953 if (vnum.size() == 1) {
13955 cerr <<
__AFLOW_FUNC__ <<
" label:species:species...:volume" << endl;
13958 for (
size_t i = 0; i < nspecies && i < atomX.size(); i++) {
13959 volumeX.push_back(0);
13963 cerr <<
__AFLOW_FUNC__ <<
" label:species:species...:volume:volume..." << endl;
13966 for (
size_t i = 0; i < nspecies && i < vnum.size(); i++) {
13967 volumeX.push_back(vnum[i]);
13971 for (
size_t i = 0; i < volumeX.size(); i++) {
13972 cerr <<
__AFLOW_FUNC__ <<
" volumeX[" << i <<
"]=" << volumeX[i] << endl;
13983 message <<
"Unknown label+input specification (label=" << label <<
",nspecies=" << nspecies <<
",ninput=" << params.size() - 1 <<
")";
13993 if (!
XHOST.vflag_control.flag(
"FORCE_POCC")) {
14000 for (
size_t i = 0; i < str.species.size(); i++) {
14001 if (!str.species[i].empty()) {
14002 cerr <<
"DEBUG specie(" << i <<
")=" << str.species[i] << endl;
14010 if (vpflow.
flag(
"PROTO::QE")) {
14011 str.xstructure2qe();
14015 if (vpflow.
flag(
"PROTO::ABINIT")) {
14016 str.xstructure2abinit();
14020 if (vpflow.
flag(
"PROTO::AIMS")) {
14021 str.xstructure2aims();
14025 if (vpflow.
flag(
"PROTO::ELK")) {
14026 str.xstructure2elk();
14030 if (vpflow.
flag(
"PROTO::LMP")) {
14031 str.xstructure2lmp();
14035 if (vpflow.
flag(
"PROTO::ITC")) {
14036 str.xstructure2itc();
14042 if (vpflow.
flag(
"PROTO::CIF")) {
14043 str.xstructure2cif();
14047 if (vpflow.
flag(
"PROTO::ABCCAR")) {
14048 str.xstructure2abccar();
14071 const bool LDEBUG = (
false ||
XHOST.DEBUG);
14077 _AVASP_PROTO PARAMS;
14078 PARAMS.ucell.clear();
14085 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.ucell.size()=" << PARAMS.ucell.size() << endl;
14092 if (vpflow.
flag(
"PROTO_AFLOW::USAGE") || PARAMS.ucell.empty()) {
14095 "aflow [options] --aflow_proto[|_icsd]=label*:speciesA*[:speciesB*][:volumeA*[:volumeB*]|:volume] [--params=... [--hex]]",
" options:",
" --usage",
14096 " --potential=pot_LDA | pot_GGA | potpaw_LDA | potpaw_GGA | potpaw_PBE | potpaw_LDA_KIN | potpaw_PBE_KIN ",
" --potential_complete",
14097 " --module=[APL|QHA|AAPL]",
" --apl_supercell=NxNxN",
" --usage",
" --missing",
" --noautopp",
14098 " --bader (default: DEFAULT_VASP_FORCE_OPTION_BADER)",
" --spin_remove_relax_1 (default: DEFAULT_VASP_FORCE_OPTION_SPIN_REMOVE_RELAX_1)",
14099 " --spin_remove_relax_2 (default: DEFAULT_VASP_FORCE_OPTION_SPIN_REMOVE_RELAX_2)",
14100 " --kscheme=[M | G] (default: DEFAULT_KSCHEME in .aflow.rc) --kscheme_static=[M | G] (default: DEFAULT_KSCHEME_STATIC in .aflow.rc)",
14101 " --kppra=NNNN (default: DEFAULT_KPPRA in .aflow.rc) --kppra_static=NNNN (default: DEFAULT_KPPRA_STATIC in .aflow.rc) --bands_grid=NNNN (default: "
14102 "DEFAULT_BANDS_GRID in .aflow.rc)",
14103 " --enmax_multiply=NNNN (default:VASP_PREC_ENMAX_XXXX in .aflow.rc)",
" --pressure=0,1,2 (kB) (default:0.0)",
14104 " --potim=XXX (default 0.05) (VASP) ",
" --relax_type=[ALL | IONS | CELL_SHAPE | CELL_VOLUME | IONS_CELL_VOLUME] ",
14105 " --relax_mode=[ENERGY | FORCES | ENERGY_FORCES | FORCES_ENERGY] (default: DEFAULT_VASP_FORCE_OPTION_RELAX_MODE_SCHEME in .aflow.rc) (VASP) ",
14106 " --relax_count=XX (default: DEFAULT_VASP_FORCE_OPTION_RELAX_COUNT in .aflow.rc) (VASP) ",
" --run_relax_static",
14107 " --run_relax_static_bands",
" --run_static",
" --run_static_bands",
14108 " --precision=[(LOW | MEDIUM | NORMAL | HIGH | ACCURATE), PRESERVED] (default: DEFAULT_VASP_FORCE_OPTION_PREC_SCHEME in .aflow.rc) (VASP) ",
14109 " --algorithm=[(NORMAL | VERYFAST | FAST | ALL | DAMPED), PRESERVED] (default: DEFAULT_VASP_FORCE_OPTION_ALGO_SCHEME in .aflow.rc) (VASP) ",
14110 " --metagga=[TPSS | RTPSS | M06L | MBJL | SCAN | MS0 | MS1 | MS2 | NONE] (default: DEFAULT_VASP_FORCE_OPTION_METAGGA_SCHEME in .aflow.rc) (VASP) ",
14111 " --ivdw=[number_for_VASP_see_manual_for_IVDW | 0] (default: DEFAULT_VASP_FORCE_OPTION_IVDW_SCHEME in .aflow.rc) (VASP) ",
14112 " --type=[METAL | INSULATOR | SEMICONDUCTOR | DEFAULT] (default: DEFAULT_VASP_FORCE_OPTION_TYPE_SCHEME in .aflow.rc) (VASP) ",
14113 " --convert_unit_cell= [SPRIM, SCONV, NIGGLI, MINK, INCELL, COMPACT, WS, CART, FRAC, PRES] ",
" --volume_plus_equal=XXX ",
14114 " --volume_multiply_equal=XXX ",
" --volume_preserved ",
" --ediffg=XXX (default: DEFAULT_VASP_PREC_EDIFFG in .aflow.rc) (VASP) ",
14115 " --ldau2",
" --noldau2",
" --neglect_nomix",
" --stdout",
" --qe",
" --abinit",
14116 " --aims",
" --list",
" --params=.... { check aflow --readme=anrl }",
" --hex { check aflow --readme=anrl }"));
14120 cerr <<
__AFLOW_FUNC__ <<
" vpflow.getattachedscheme(\"PROTO_AFLOW::USAGE\")=" << vpflow.
flag(
"PROTO_AFLOW::USAGE") << endl;
14124 string string_LABEL = PARAMS.ucell.at(0);
14145 if (params_potential ==
"LDA") {
14148 if (params_potential ==
"GGA") {
14151 if (params_potential ==
"PBE") {
14154 if (params_potential ==
"PAWLDA") {
14157 if (params_potential ==
"PAWGGA") {
14160 if (params_potential ==
"PAWPBE") {
14163 if (params_potential ==
"PAWLDAKIN") {
14166 if (params_potential ==
"PAWPBEKIN") {
14170 cerr <<
__AFLOW_FUNC__ <<
" string_POTENTIAL=" << string_POTENTIAL << endl;
14180 if (vpflow.
flag(
"PROTO_AFLOW::POTENTIAL_TYPE")) {
14184 cerr <<
__AFLOW_FUNC__ <<
" vpflow.getattachedscheme(\"PROTO_AFLOW::POTENTIAL_TYPE\")=" << vpflow.
flag(
"PROTO_AFLOW::POTENTIAL_TYPE") << endl;
14191 if (vpflow.
flag(
"PROTO_AFLOW::POTENTIAL_COMPLETE")) {
14195 cerr <<
__AFLOW_FUNC__ <<
" vpflow.getattachedscheme(\"PROTO_AFLOW::POTENTIAL_COMPLETE\")=" << vpflow.
flag(
"PROTO_AFLOW::POTENTIAL_COMPLETE") << endl;
14199 cerr <<
__AFLOW_FUNC__ <<
" string_POTENTIAL=" << string_POTENTIAL << endl;
14201 PARAMS.vparams.push_attached(
"AFLOWIN_STRING::POTENTIAL", string_POTENTIAL);
14207 PARAMS.vparams.flag(
"AFLOWIN_FLAG::REVERSE", flag_REVERSE);
14209 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::REVERSE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::REVERSE") << endl;
14216 PARAMS.vparams.flag(
"AFLOWIN_FLAG::MISSING", vpflow.
flag(
"PROTO_AFLOW::MISSING"));
14218 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::MISSING\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::MISSING") << endl;
14225 PARAMS.vparams.flag(
"AFLOWIN_FLAG::NOAUTOPP", vpflow.
flag(
"PROTO_AFLOW::NOAUTOPP"));
14227 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::NOAUTOPP\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::NOAUTOPP") << endl;
14234 PARAMS.vparams.flag(
"AFLOWIN_FLAG::BADER", vpflow.
flag(
"PROTO_AFLOW::BADER"));
14236 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::BADER\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::BADER") << endl;
14243 PARAMS.vparams.flag(
"AFLOWIN_FLAG::SPIN_REMOVE_RELAX_1", vpflow.
flag(
"PROTO_AFLOW::SPIN_REMOVE_RELAX_1"));
14245 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::SPIN_REMOVE_RELAX_1\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::SPIN_REMOVE_RELAX_1") << endl;
14252 PARAMS.vparams.flag(
"AFLOWIN_FLAG::SPIN_REMOVE_RELAX_2", vpflow.
flag(
"PROTO_AFLOW::SPIN_REMOVE_RELAX_2"));
14254 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::SPIN_REMOVE_RELAX_2\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::SPIN_REMOVE_RELAX_2") << endl;
14261 PARAMS.vparams.flag(
"AFLOWIN_FLAG::AUTOLDAU", vpflow.
flag(
"PROTO_AFLOW::LDAU"));
14263 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::AUTOLDAU\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::AUTOLDAU") << endl;
14270 PARAMS.vparams.flag(
"AFLOWIN_FLAG::AUTONOLDAU", vpflow.
flag(
"PROTO_AFLOW::NOLDAU"));
14272 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::AUTONOLDAU\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::AUTONOLDAU") << endl;
14279 PARAMS.vparams.flag(
"AFLOWIN_FLAG::NEGLECT_NOMIX", vpflow.
flag(
"PROTO_AFLOW::NEGLECT_NOMIX"));
14281 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::NEGLECT_NOMIX\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::NEGLECT_NOMIX") << endl;
14288 PARAMS.vparams.flag(
"AFLOWIN_FLAG::STDOUT", vpflow.
flag(
"PROTO_AFLOW::STDOUT"));
14290 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::STDOUT\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::STDOUT") << endl;
14297 PARAMS.vparams.flag(
"AFLOWIN_FLAG::MODULE", vpflow.
flag(
"AFLOW::MODULE"));
14298 if (vpflow.
flag(
"AFLOW::MODULE")) {
14299 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::MODULE", vpflow.
getattachedscheme(
"AFLOW::MODULE"));
14302 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::MODULE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::MODULE") << endl;
14309 PARAMS.vparams.flag(
"AFLOWIN_FLAG::APL_SUPERCELL", vpflow.
flag(
"PROTO_AFLOW::APL_SUPERCELL"));
14310 if (vpflow.
flag(
"PROTO_AFLOW::APL_SUPERCELL")) {
14311 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::APL_SUPERCELL", vpflow.
getattachedscheme(
"PROTO_AFLOW::APL_SUPERCELL"));
14314 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::APL_SUPERCELL\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::APL_SUPERCELL") << endl;
14321 PARAMS.vparams.flag(
"AFLOWIN_FLAG::POTIM", vpflow.
flag(
"PROTO_AFLOW::POTIM"));
14322 if (vpflow.
flag(
"PROTO_AFLOW::POTIM")) {
14323 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::POTIM", vpflow.
getattachedscheme(
"PROTO_AFLOW::POTIM"));
14326 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::POTIM\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::POTIM") << endl;
14333 PARAMS.vparams.flag(
"AFLOWIN_FLAG::PRECISION", vpflow.
flag(
"PROTO_AFLOW::PRECISION"));
14334 if (vpflow.
flag(
"PROTO_AFLOW::PRECISION")) {
14335 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::PRECISION", vpflow.
getattachedscheme(
"PROTO_AFLOW::PRECISION"));
14338 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::PRECISION\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::PRECISION") << endl;
14345 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ALGORITHM", vpflow.
flag(
"PROTO_AFLOW::ALGORITHM"));
14346 if (vpflow.
flag(
"PROTO_AFLOW::ALGORITHM")) {
14347 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::ALGORITHM", vpflow.
getattachedscheme(
"PROTO_AFLOW::ALGORITHM"));
14350 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ALGORITHM\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ALGORITHM") << endl;
14357 PARAMS.vparams.flag(
"AFLOWIN_FLAG::METAGGA", vpflow.
flag(
"PROTO_AFLOW::METAGGA"));
14358 if (vpflow.
flag(
"PROTO_AFLOW::METAGGA")) {
14359 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::METAGGA", vpflow.
getattachedscheme(
"PROTO_AFLOW::METAGGA"));
14362 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::METAGGA\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::METAGGA") << endl;
14369 PARAMS.vparams.flag(
"AFLOWIN_FLAG::IVDW", vpflow.
flag(
"PROTO_AFLOW::IVDW"));
14370 if (vpflow.
flag(
"PROTO_AFLOW::IVDW")) {
14371 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::IVDW", vpflow.
getattachedscheme(
"PROTO_AFLOW::IVDW"));
14374 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::IVDW\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::IVDW") << endl;
14381 PARAMS.vparams.flag(
"AFLOWIN_FLAG::RELAX_TYPE", vpflow.
flag(
"PROTO_AFLOW::RELAX_TYPE"));
14382 if (vpflow.
flag(
"PROTO_AFLOW::RELAX_TYPE")) {
14383 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::RELAX_TYPE", vpflow.
getattachedscheme(
"PROTO_AFLOW::RELAX_TYPE"));
14386 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RELAX_TYPE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RELAX_TYPE") << endl;
14393 PARAMS.vparams.flag(
"AFLOWIN_FLAG::RELAX_MODE", vpflow.
flag(
"PROTO_AFLOW::RELAX_MODE"));
14394 if (vpflow.
flag(
"PROTO_AFLOW::RELAX_MODE")) {
14395 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::RELAX_MODE", vpflow.
getattachedscheme(
"PROTO_AFLOW::RELAX_MODE"));
14398 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RELAX_MODE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RELAX_MODE") << endl;
14405 PARAMS.vparams.flag(
"AFLOWIN_FLAG::RELAX_COUNT", vpflow.
flag(
"PROTO_AFLOW::RELAX_COUNT"));
14406 if (vpflow.
flag(
"PROTO_AFLOW::RELAX_COUNT")) {
14407 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::RELAX_COUNT", vpflow.
getattachedscheme(
"PROTO_AFLOW::RELAX_COUNT"));
14410 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RELAX_COUNT\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RELAX_COUNT") << endl;
14413 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::RELAX_COUNT\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::RELAX_COUNT") << endl;
14420 PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_RELAX_STATIC", vpflow.
flag(
"PROTO_AFLOW::RUN_RELAX_STATIC"));
14422 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_RELAX_STATIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_RELAX_STATIC") << endl;
14427 cerr <<
__AFLOW_FUNC__ <<
" CHECK RUN_RELAX_STATIC_BANDS" << endl;
14429 PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_RELAX_STATIC_BANDS", vpflow.
flag(
"PROTO_AFLOW::RUN_RELAX_STATIC_BANDS"));
14431 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_RELAX_STATIC_BANDS\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_RELAX_STATIC_BANDS") << endl;
14436 cerr <<
__AFLOW_FUNC__ <<
" CHECK RUN_RELAX_STATIC_DIELECTRIC" << endl;
14438 PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_RELAX_STATIC_DIELECTRIC", vpflow.
flag(
"PROTO_AFLOW::RUN_RELAX_STATIC_DIELECTRIC"));
14440 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_RELAX_STATIC_DIELECTRIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_RELAX_STATIC_DIELECTRIC") << endl;
14447 PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_STATIC", vpflow.
flag(
"PROTO_AFLOW::RUN_STATIC"));
14449 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_STATIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_STATIC") << endl;
14456 PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_STATIC_BANDS", vpflow.
flag(
"PROTO_AFLOW::RUN_STATIC_BANDS"));
14458 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_STATIC_BANDS\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_STATIC_BANDS") << endl;
14462 cerr <<
__AFLOW_FUNC__ <<
" CHECK RUN_STATIC_DIELECTRIC" << endl;
14464 PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_STATIC_DIELECTRIC", vpflow.
flag(
"PROTO_AFLOW::RUN_STATIC_DIELECTRIC"));
14466 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_STATIC_DIELECTRIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_STATIC_DIELECTRIC") << endl;
14473 PARAMS.vparams.flag(
"AFLOWIN_FLAG::TYPE", vpflow.
flag(
"PROTO_AFLOW::TYPE"));
14474 if (vpflow.
flag(
"PROTO_AFLOW::TYPE")) {
14475 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::TYPE", vpflow.
getattachedscheme(
"PROTO_AFLOW::TYPE"));
14478 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::TYPE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::TYPE") << endl;
14485 PARAMS.vparams.flag(
"AFLOWIN_FLAG::CONVERT_UNIT_CELL", vpflow.
flag(
"PROTO_AFLOW::CONVERT_UNIT_CELL"));
14486 if (vpflow.
flag(
"PROTO_AFLOW::CONVERT_UNIT_CELL")) {
14487 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::CONVERT_UNIT_CELL", vpflow.
getattachedscheme(
"PROTO_AFLOW::CONVERT_UNIT_CELL"));
14490 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::CONVERT_UNIT_CELL\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::CONVERT_UNIT_CELL") << endl;
14497 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VOLUME_PLUS_EQUAL", vpflow.
flag(
"PROTO_AFLOW::VOLUME_PLUS_EQUAL"));
14498 if (vpflow.
flag(
"PROTO_AFLOW::VOLUME_PLUS_EQUAL")) {
14499 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::VOLUME_PLUS_EQUAL", vpflow.
getattachedscheme(
"PROTO_AFLOW::VOLUME_PLUS_EQUAL"));
14502 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::VOLUME_PLUS_EQUAL\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::VOLUME_PLUS_EQUAL") << endl;
14507 cerr <<
__AFLOW_FUNC__ <<
" CHECK VOLUME_MULTIPLY_EQUAL" << endl;
14509 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VOLUME_MULTIPLY_EQUAL", vpflow.
flag(
"PROTO_AFLOW::VOLUME_MULTIPLY_EQUAL"));
14510 if (vpflow.
flag(
"PROTO_AFLOW::VOLUME_MULTIPLY_EQUAL")) {
14511 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::VOLUME_MULTIPLY_EQUAL", vpflow.
getattachedscheme(
"PROTO_AFLOW::VOLUME_MULTIPLY_EQUAL"));
14514 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::VOLUME_MULTIPLY_EQUAL\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::VOLUME_MULTIPLY_EQUAL") << endl;
14521 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VOLUME_PRESERVED", vpflow.
flag(
"PROTO_AFLOW::VOLUME_PRESERVED"));
14523 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::VOLUME_PRESERVED\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::VOLUME_PRESERVED") << endl;
14530 PARAMS.vparams.flag(
"AFLOWIN_FLAG::EDIFFG", vpflow.
flag(
"PROTO_AFLOW::EDIFFG"));
14531 if (vpflow.
flag(
"PROTO_AFLOW::EDIFFG")) {
14532 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::EDIFFG", vpflow.
getattachedscheme(
"PROTO_AFLOW::EDIFFG"));
14535 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::EDIFFG\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::EDIFFG") << endl;
14542 PARAMS.vparams.flag(
"AFLOWIN_FLAG::KSCHEME", vpflow.
flag(
"PROTO_AFLOW::KSCHEME"));
14543 if (vpflow.
flag(
"PROTO_AFLOW::KSCHEME")) {
14544 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::KSCHEME", vpflow.
getattachedscheme(
"PROTO_AFLOW::KSCHEME"));
14547 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::KSCHEME\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::KSCHEME") << endl;
14554 PARAMS.vparams.flag(
"AFLOWIN_FLAG::KSCHEME_STATIC", vpflow.
flag(
"PROTO_AFLOW::KSCHEME_STATIC"));
14555 if (vpflow.
flag(
"PROTO_AFLOW::KSCHEME_STATIC")) {
14556 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::KSCHEME_STATIC", vpflow.
getattachedscheme(
"PROTO_AFLOW::KSCHEME_STATIC"));
14559 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::KSCHEME_STATIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::KSCHEME_STATIC") << endl;
14566 PARAMS.vparams.flag(
"AFLOWIN_FLAG::KSCHEME_DIELECTRIC", vpflow.
flag(
"PROTO_AFLOW::KSCHEME_DIELECTRIC"));
14567 if (vpflow.
flag(
"PROTO_AFLOW::KSCHEME_DIELECTRIC")) {
14568 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::KSCHEME_DIELECTRIC", vpflow.
getattachedscheme(
"PROTO_AFLOW::KSCHEME_DIELECTRIC"));
14571 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::KSCHEME_DIELECTRIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::KSCHEME_DIELECTRIC") << endl;
14578 PARAMS.vparams.flag(
"AFLOWIN_FLAG::KPPRA", vpflow.
flag(
"PROTO_AFLOW::KPPRA"));
14579 if (vpflow.
flag(
"PROTO_AFLOW::KPPRA")) {
14580 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::KPPRA", vpflow.
getattachedscheme(
"PROTO_AFLOW::KPPRA"));
14583 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::KPPRA\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::KPPRA") << endl;
14590 PARAMS.vparams.flag(
"AFLOWIN_FLAG::KPPRA_STATIC", vpflow.
flag(
"PROTO_AFLOW::KPPRA_STATIC"));
14591 if (vpflow.
flag(
"PROTO_AFLOW::KPPRA_STATIC")) {
14592 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::KPPRA_STATIC", vpflow.
getattachedscheme(
"PROTO_AFLOW::KPPRA_STATIC"));
14595 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::KPPRA_STATIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::KPPRA_STATIC") << endl;
14602 PARAMS.vparams.flag(
"AFLOWIN_FLAG::KPPRA_DIELECTRIC", vpflow.
flag(
"PROTO_AFLOW::KPPRA_DIELECTRIC"));
14603 if (vpflow.
flag(
"PROTO_AFLOW::KPPRA_DIELECTRIC")) {
14604 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::KPPRA_DIELECTRIC", vpflow.
getattachedscheme(
"PROTO_AFLOW::KPPRA_DIELECTRIC"));
14607 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::KPPRA_DIELECTRIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::KPPRA_DIELECTRIC") << endl;
14614 PARAMS.vparams.flag(
"AFLOWIN_FLAG::BANDS_GRID", vpflow.
flag(
"PROTO_AFLOW::BANDS_GRID"));
14615 if (vpflow.
flag(
"PROTO_AFLOW::BANDS_GRID")) {
14616 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::BANDS_GRID", vpflow.
getattachedscheme(
"PROTO_AFLOW::BANDS_GRID"));
14619 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::BANDS_GRID\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::BANDS_GRID") << endl;
14626 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ENMAX_MULTIPLY", vpflow.
flag(
"PROTO_AFLOW::ENMAX_MULTIPLY"));
14627 if (vpflow.
flag(
"PROTO_AFLOW::ENMAX_MULTIPLY")) {
14628 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::ENMAX_MULTIPLY", vpflow.
getattachedscheme(
"PROTO_AFLOW::ENMAX_MULTIPLY"));
14631 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ENMAX_MULTIPLY\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ENMAX_MULTIPLY") << endl;
14636 cerr <<
__AFLOW_FUNC__ <<
" CHECK VASP/ABCCAR/ITC/QE/ABINIT/AIMS/CIF/ELK/LMP" << endl;
14638 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP",
true);
14639 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ITC", vpflow.
flag(
"PROTO_AFLOW::ITC"));
14640 PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE", vpflow.
flag(
"PROTO_AFLOW::QE"));
14641 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR", vpflow.
flag(
"PROTO_AFLOW::ABCCAR"));
14642 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT", vpflow.
flag(
"PROTO_AFLOW::ABINIT"));
14643 PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS", vpflow.
flag(
"PROTO_AFLOW::AIMS"));
14644 PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF", vpflow.
flag(
"PROTO_AFLOW::CIF"));
14645 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK", vpflow.
flag(
"PROTO_AFLOW::ELK"));
14646 PARAMS.vparams.flag(
"AFLOWIN_FLAG::LMP", vpflow.
flag(
"PROTO_AFLOW::LMP"));
14647 if (PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS")) {
14648 PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE",
false);
14649 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP",
false);
14650 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT",
false);
14651 PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF",
false);
14652 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR",
false);
14653 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK",
false);
14654 PARAMS.vparams.flag(
"AFLOWIN_FLAG::LMP",
false);
14656 if (PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT")) {
14657 PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE",
false);
14658 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP",
false);
14659 PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS",
false);
14660 PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF",
false);
14661 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR",
false);
14662 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK",
false);
14663 PARAMS.vparams.flag(
"AFLOWIN_FLAG::LMP",
false);
14666 if (PARAMS.vparams.flag(
"AFLOWIN_FLAG::ITC")) {
14670 if (PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR")) {
14671 PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE",
false);
14672 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP",
false);
14673 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT",
false);
14674 PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS",
false);
14675 PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF",
false);
14676 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK",
false);
14677 PARAMS.vparams.flag(
"AFLOWIN_FLAG::LMP",
false);
14681 if (PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF")) {
14682 PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE",
false);
14683 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP",
false);
14684 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT",
false);
14685 PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS",
false);
14686 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR",
false);
14687 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK",
false);
14688 PARAMS.vparams.flag(
"AFLOWIN_FLAG::LMP",
false);
14691 if (PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE")) {
14692 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP",
false);
14693 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT",
false);
14694 PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS",
false);
14695 PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF",
false);
14696 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR",
false);
14697 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK",
false);
14698 PARAMS.vparams.flag(
"AFLOWIN_FLAG::LMP",
false);
14700 if (PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP")) {
14701 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT",
false);
14702 PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE",
false);
14703 PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS",
false);
14704 PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF",
false);
14705 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR",
false);
14706 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK",
false);
14707 PARAMS.vparams.flag(
"AFLOWIN_FLAG::LMP",
false);
14710 if (PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK")) {
14711 PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE",
false);
14712 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP",
false);
14713 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT",
false);
14714 PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS",
false);
14715 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR",
false);
14716 PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF",
false);
14720 if (PARAMS.vparams.flag(
"AFLOWIN_FLAG::LMP")) {
14721 PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE",
false);
14722 PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP",
false);
14723 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT",
false);
14724 PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS",
false);
14725 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR",
false);
14726 PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF",
false);
14727 PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK",
false);
14731 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::AIMS\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS") << endl;
14734 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ABINIT\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT") << endl;
14737 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::QE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE") << endl;
14740 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::VASP\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP") << endl;
14743 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ITC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ITC") << endl;
14746 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::CIF\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF") << endl;
14749 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ABCCAR\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR") << endl;
14752 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ELK\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK") << endl;
14755 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::LMP\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::LMP") << endl;
14762 PARAMS.vparams.flag(
"AFLOWIN_FLAG::STDOUT", vpflow.
flag(
"PROTO_AFLOW::STDOUT"));
14764 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::STDOUT\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::STDOUT") << endl;
14771 PARAMS.vparams.flag(
"AFLOWIN_FLAG::LIST", vpflow.
flag(
"PROTO_AFLOW::LIST"));
14772 if (PARAMS.vparams.flag(
"AFLOWIN_FLAG::LIST")) {
14773 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::LIST_VCMD", vpflow.
getattachedscheme(
"PROTO_AFLOW::LIST_VCMD"));
14776 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::LIST\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::LIST") << endl;
14779 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme((\"AFLOWIN_FLAG::LIST_VCMD\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::LIST_VCMD") << endl;
14787 PARAMS.vparams.flag(
"AFLOWIN_FLAG::PARAMS", vpflow.
flag(
"PARAMS"));
14788 if (vpflow.
flag(
"PARAMS")) {
14789 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::PARAMS", vpflow.
getattachedscheme(
"PARAMS"));
14792 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::PARAMS\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::PARAMS") << endl;
14797 PARAMS.vparams.flag(
"AFLOWIN_FLAG::USE_ANRL_LATTICE_PARAM", vpflow.
flag(
"PROTO::USE_ANRL_LATTICE_PARAM"));
14799 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::USE_ANRL_LATTICE_PARAM\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::USE_ANRL_LATTICE_PARAM") << endl;
14809 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::HTQC_ICSD\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::HTQC_ICSD") << endl;
14813 vector<string> params_pressure;
14818 PARAMS.vpressure.clear();
14819 if (!params_pressure.empty()) {
14820 for (
size_t i = 0; i < params_pressure.size(); i++) {
14829 PARAMS.vparams.flag(
"AFLOWIN_FLAG::POCC_PARAMS", vpflow.
flag(
"POCC_PARAMS"));
14830 if (vpflow.
flag(
"POCC_PARAMS")) {
14831 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::POCC_PARAMS", vpflow.
getattachedscheme(
"POCC_PARAMS"));
14834 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::POCC_PARAMS\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::POCC_PARAMS") << endl;
14841 PARAMS.vparams.flag(
"AFLOWIN_FLAG::POCC_TOL", vpflow.
flag(
"POCC_TOL"));
14842 if (vpflow.
flag(
"POCC_TOL")) {
14843 PARAMS.vparams.push_attached(
"AFLOWIN_FLAG::POCC_TOL", vpflow.
getattachedscheme(
"POCC_TOL"));
14846 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::POCC_TOL\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::POCC_TOL") << endl;
14855 PARAMS.vparams.push_attached(
"AFLOWIN_STRING::LABEL", string_LABEL);
14858 cerr <<
__AFLOW_FUNC__ <<
" nspeciesHTQC=" << nspeciesHTQC << endl;
14864 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vpressure.size()=" << PARAMS.vpressure.size() << endl;
14867 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vkppra.size()=" << PARAMS.vkppra.size() <<
" " << endl;
14870 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme((\"AFLOWIN_STRING::LABEL\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_STRING::LABEL") << endl;
14873 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme((\"AFLOWIN_STRING::POTENTIAL\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_STRING::POTENTIAL") << endl;
14876 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::MODULE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::MODULE") << endl;
14879 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::MODULE\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::MODULE") << endl;
14882 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::APL_SUPERCELL\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::APL_SUPERCELL") << endl;
14885 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::APL_SUPERCELL\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::APL_SUPERCELL") << endl;
14888 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::POTIM\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::POTIM") << endl;
14891 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::POTIM\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::POTIM") << endl;
14894 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::PRECISION\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::PRECISION") << endl;
14897 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::PRECISION\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::PRECISION") << endl;
14900 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ALGORITHM\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ALGORITHM") << endl;
14903 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::ALGORITHM\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::ALGORITHM") << endl;
14906 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::METAGGA\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::METAGGA") << endl;
14909 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::METAGGA\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::METAGGA") << endl;
14912 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::IVDW\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::IVDW") << endl;
14915 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::IVDW\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::IVDW") << endl;
14918 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RELAX_TYPE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RELAX_TYPE") << endl;
14921 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::RELAX_TYPE\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::RELAX_TYPE") << endl;
14924 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RELAX_MODE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RELAX_MODE") << endl;
14927 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::RELAX_MODE\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::RELAX_MODE") << endl;
14930 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RELAX_COUNT\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RELAX_COUNT") << endl;
14933 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::RELAX_COUNT\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::RELAX_COUNT") << endl;
14936 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_RELAX_STATIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_RELAX_STATIC") << endl;
14939 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_RELAX_STATIC_BANDS\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_RELAX_STATIC_BANDS") << endl;
14942 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_RELAX_STATIC_DIELECTRIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_RELAX_STATIC_DIELECTRIC") << endl;
14945 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_STATIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_STATIC") << endl;
14948 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_STATIC_BANDS\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_STATIC_BANDS") << endl;
14951 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::RUN_STATIC_DIELECTRIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::RUN_STATIC_DIELECTRIC") << endl;
14954 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::TYPE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::TYPE") << endl;
14957 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::TYPE\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::TYPE") << endl;
14960 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::CONVERT_UNIT_CELL\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::CONVERT_UNIT_CELL") << endl;
14963 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::CONVERT_UNIT_CELL\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::CONVERT_UNIT_CELL") << endl;
14966 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::VOLUME_PLUS_EQUAL\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::VOLUME_PLUS_EQUAL") << endl;
14969 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::VOLUME_PLUS_EQUAL\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::VOLUME_PLUS_EQUAL") << endl;
14972 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::VOLUME_MULTIPLY_EQUAL\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::VOLUME_MULTIPLY_EQUAL") << endl;
14975 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::VOLUME_MULTIPLY_EQUAL\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::VOLUME_MULTIPLY_EQUAL") << endl;
14978 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::VOLUME_PRESERVED\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::VOLUME_PRESERVED") << endl;
14981 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::EDIFFG\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::EDIFFG") << endl;
14984 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::EDIFFG\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::EDIFFG") << endl;
14987 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::KPPRA\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::KPPRA") << endl;
14990 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::KPPRA\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::KPPRA") << endl;
14993 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::KPPRA_STATIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::KPPRA_STATIC") << endl;
14996 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::KPPRA_STATIC\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::KPPRA_STATIC") << endl;
14999 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::KPPRA_DIELECTRIC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::KPPRA_DIELECTRIC") << endl;
15002 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::KPPRA_DIELECTRIC\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::KPPRA_DIELECTRIC") << endl;
15005 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::BANDS_GRID\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::BANDS_GRID") << endl;
15008 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::BANDS_GRID\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::BANDS_GRID") << endl;
15011 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ENMAX_MULTIPLY\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ENMAX_MULTIPLY") << endl;
15014 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme(\"AFLOWIN_FLAG::ENMAX_MULTIPLY\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::ENMAX_MULTIPLY") << endl;
15017 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::USAGE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::USAGE") << endl;
15020 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::REVERSE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::REVERSE") << endl;
15023 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::MISSING\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::MISSING") << endl;
15026 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::NOAUTOPP\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::NOAUTOPP") << endl;
15029 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::AUTOLDAU\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::AUTOLDAU") << endl;
15032 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::AUTONOLDAU\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::AUTONOLDAU") << endl;
15035 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::STDOUT\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::STDOUT") << endl;
15038 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::LIST\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::LIST") << endl;
15041 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::PARAMS\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::PARAMS") << endl;
15044 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::POCC_PARAMS\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::POCC_PARAMS") << endl;
15047 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::POCC_TOL\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::POCC_TOL") << endl;
15050 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.getattachedscheme((\"AFLOWIN_FLAG::LIST_VCMD\")=" << PARAMS.vparams.getattachedscheme(
"AFLOWIN_FLAG::LIST_VCMD") << endl;
15053 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::HTQC_ICSD\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::HTQC_ICSD") << endl;
15056 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::NEGLECT_NOMIX\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::NEGLECT_NOMIX") << endl;
15059 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::VASP\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::VASP") << endl;
15062 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ITC\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ITC") << endl;
15065 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ABINIT\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABINIT") << endl;
15068 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::AIMS\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::AIMS") << endl;
15071 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::QE\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::QE") << endl;
15074 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::CIF\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::CIF") << endl;
15077 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ABCCAR\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ABCCAR") << endl;
15080 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::ELK\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::ELK") << endl;
15083 cerr <<
__AFLOW_FUNC__ <<
" PARAMS.vparams.flag(\"AFLOWIN_FLAG::LMP\")=" << PARAMS.vparams.flag(
"AFLOWIN_FLAG::LMP") << endl;
15086 if (PARAMS.ucell.size() == 1 &&
aurostd::substring2bool(PARAMS.vparams.getattachedscheme(
"AFLOWIN_STRING::LABEL"),
"_ICSD_") && !PARAMS.vparams.flag(
"AFLOWIN_FLAG::HTQC_ICSD")) {
15088 cerr <<
__AFLOW_FUNC__ <<
" running AVASP_MakePrototypeICSD_AFLOWIN" << endl;
15091 return AVASP_MakePrototypeICSD_AFLOWIN((&PARAMS),
false);
15095 cerr <<
__AFLOW_FUNC__ <<
" running AVASP_MakePrototype_AFLOWIN" << endl;
15097 return AVASP_MakePrototype_AFLOWIN((&PARAMS));
15109 const bool LDEBUG = (
false ||
XHOST.DEBUG);
15113 cerr <<
__AFLOW_FUNC__ <<
" metal_arity=" << metal_arity << endl;
15115 if (_vnonmetals.empty()) {
15118 if (_vmetals.empty()) {
15121 vector<string> vnonmetals(_vnonmetals);
15122 vector<string> vmetals(_vmetals);
15123 std::sort(vnonmetals.begin(), vnonmetals.end());
15124 std::sort(vmetals.begin(), vmetals.end());
15130 vector<string> vmix = vnonmetals;
15131 vmix.insert(vmix.end(), vmetals.begin(), vmetals.end());
15132 std::sort(vmix.begin(), vmix.end());
15135 vector<uint> vind_nm;
15139 std::vector<string>::iterator it;
15140 for (i = 0; i < vnonmetals.size(); i++) {
15141 it = std::find(vmix.begin(), vmix.end(), vnonmetals[i]);
15142 vind_nm.push_back(it - vmix.begin());
15149 vector<vector<string>> vvinbetween;
15150 vvinbetween.resize(vnonmetals.size() + 1);
15151 for (i = 0, j = 0; i < vmix.size(); i++) {
15156 vvinbetween[j].push_back(vmix[i]);
15159 for (i = 0; i < vvinbetween.size(); i++) {
15164 vector<uint> vNinbetween;
15165 vNinbetween.assign(vvinbetween.size(), 0);
15166 uint sum_species = 0;
15169 for (i = 0; i < vvinbetween.size() && sum_species < metal_arity; i++) {
15170 for (j = 0; j < vvinbetween[i].size() && sum_species < metal_arity; j++) {
15180 vector<uint> vNinbetween_std;
15181 vNinbetween_std.assign(vNinbetween.size(), 0);
15182 vNinbetween_std.back() = metal_arity;
15185 vector<string> vcommands;
15186 vector<string> vtmp;
15187 string command =
"";
15189 while (vcommands.size() < 1e4) {
15192 for (i = 0, k = 0; i < vNinbetween.size(); i++) {
15195 if (vNinbetween[i] > 0) {
15196 if (!command.empty()) {
15199 for (j = 0; j < vNinbetween[i]; j++) {
15200 vtmp.push_back(tmp);
15204 if (k < vnonmetals.size()) {
15205 if (!command.empty()) {
15208 command += vnonmetals[k++];
15215 vcommands.push_back(command);
15216 if (vNinbetween == vNinbetween_std) {
15221 for (i = 0; i < vNinbetween.size() - 1; i++) {
15222 if (vNinbetween[i] == 0) {
15226 vNinbetween[i + 1]++;
15236 vector<string> vnonmetals;
15237 vector<string> vmetals;
15238 const string nonmetals = vpflow.
getattachedscheme(
"GENERATE_CERAMICS::NON_METALS");
15256 const bool LDEBUG = (
false ||
XHOST.DEBUG);
15265 if (vpflow.
flag(
"PSEUDOPOTENTIALS_CHECK::USAGE") || file.empty()) {
15268 "|.bz2|.gz|.xz] | --pp_check= | --ppk=",
15269 " options:",
" --usage"));
15273 cerr <<
__AFLOW_FUNC__ <<
" vpflow.getattachedscheme(\"PSEUDOPOTENTIALS_CHECK::USAGE\")=" << vpflow.
flag(
"PSEUDOPOTENTIALS_CHECK::USAGE") << endl;
15280 XHOST.DEBUG =
false;
15281 XHOST.PSEUDOPOTENTIAL_GENERATOR =
false;
15283 oss << xPOT << endl;
15286 XHOST.DEBUG =
false;
15287 XHOST.PSEUDOPOTENTIAL_GENERATOR =
false;
15290 oss <<
" FROM OUTCAR" << endl;
15291 oss <<
" vTITEL.size()=" << xOUT.
vTITEL.size() <<
": ";
15292 for (
size_t i = 0; i < xOUT.
vTITEL.size(); i++) {
15293 oss << xOUT.
vTITEL[i] <<
" ";
15296 oss <<
" SYSTEM=" << xOUT.
SYSTEM << endl;
15297 oss <<
" pp_type=" << xOUT.
pp_type << endl;
15298 oss <<
" species.size()=" << xOUT.
species.size() <<
": ";
15299 for (
size_t i = 0; i < xOUT.
species.size(); i++) {
15300 oss << xOUT.
species[i] <<
" ";
15303 oss <<
" species_pp.size()=" << xOUT.
species_pp.size() <<
": ";
15304 for (
size_t i = 0; i < xOUT.
species_pp.size(); i++) {
15308 oss <<
" species_Z.size()=" << xOUT.
species_Z.size() <<
": ";
15309 for (
size_t i = 0; i < xOUT.
species_Z.size(); i++) {
15313 oss <<
" species_pp_type.size()=" << xOUT.
species_pp_type.size() <<
": ";
15323 oss <<
" species_pp_AUID.size()=" << xOUT.
species_pp_AUID.size() <<
": ";
15348 ofstream FileMESSAGE;
15353 vector<string> vmodules;
15359 ofstream FileMESSAGE;
15363 void PYTHON_MODULES(
const vector<string>& vmodules_in, ofstream& FileMESSAGE, ostream& oss) {
15364 string directory =
XHOST.vflag_control.getattachedscheme(
"DIRECTORY");
15365 if (directory.empty()) {
15369 vector<string> vmodules;
15370 vector<string> vskip;
15371 const vector<string> vavailable{
"aflow_cce",
"aflow_chull",
"aflow_chull_plotter",
"aflow_sym",
"aflow_xtal_finder"};
15374 if (!vmodules_in.empty()) {
15375 for (
size_t i = 0; i < vmodules_in.size(); i++) {
15376 if (
aurostd::WithinList(vavailable, vmodules_in[i]) || (vmodules_in[i] ==
"aflow_xtalfinder")) {
15377 vmodules.push_back(vmodules_in[i]);
15379 vskip.push_back(vmodules_in[i]);
15383 vmodules = vavailable;
15386 stringstream message;
15387 if (!vskip.empty()) {
15392 if (!vmodules.empty()) {
15395 vmodules.emplace_back(
"aflow_chull");
15397 for (
size_t i = 0; i < vmodules.size(); i++) {
15398 const string&
mod = vmodules[i];
15404 if (
mod ==
"aflow_cce") {
15406 }
else if (
mod ==
"aflow_chull") {
15408 }
else if (
mod ==
"aflow_chull_plotter") {
15410 }
else if (
mod ==
"aflow_sym") {
15412 }
else if ((
mod ==
"aflow_xtal_finder") || (
mod ==
"aflow_xtalfinder")) {
15419 message <<
"No modules left to write.";
15433 if (argv.size() != 3) {
15436 outcar = argv.at(2);
15437 KBIN::GetStatDiel(outcar, real, imag);
15438 printf(
"%11.6f %11.6f %11.6f ", real(1), real(2), real(3));
15439 printf(
"%11.6f %11.6f %11.6f \n", imag(1), imag(2), imag(3));
15450 const bool LDEBUG = (
false ||
XHOST.DEBUG);
15452 if (vpflow.
flag()) {
15458 if (
XHOST.vflag_control.flag(
"DIRECTORY")) {
15459 directory =
XHOST.vflag_control.getattachedscheme(
"DIRECTORY");
15461 if (directory.empty()) {
15470 const vector<string> vruns{
".relax1",
".relax2",
".relax3",
".relax4",
".static",
".bands"};
15473 const vector<string> vCARs{
"CONTCAR",
"OUTCAR",
"INCAR",
"vasprun.xml"};
15476 for (
size_t k = 0; k <
XHOST.vext.size(); k++) {
15481 bool found_run =
false;
15484 string vCAR_compressed =
"";
15486 xvasp.Directory = directory;
15487 for (
size_t j = 0; j < vruns.size(); j++) {
15494 for (
size_t i = 0; i < vCARs.size() && found_run ==
true; i++) {
15495 vCAR = directory +
"/" + vCARs[i] + vruns[j];
15501 cerr <<
__AFLOW_FUNC__ <<
" " << directory +
"/" + vCAR <<
" NOT found" << endl;
15510 for (
size_t i = 0; i < vCARs.size(); i++) {
15512 cerr <<
__AFLOW_FUNC__ << directory +
"/" + vCARs[i] <<
" already exists, cannot overwrite with relax1/relax2/static variant. ";
15513 cerr <<
"Do not want to overwrite. Please delete: " << directory +
"/" + vCARs[i] << endl;
15518 for (
size_t i = 0; i < vCARs.size(); i++) {
15519 vCAR = directory +
"/" + vCARs[i] + vruns[j];
15524 xvasp.AnalyzeLabel = ext;
15525 xvasp.str = xstructure(directory +
"/CONTCAR",
IOAFLOW_AUTO);
15526 KBIN::VASP_Analyze(xvasp,
true);
15531 for (
size_t i = 0; i < vCARs.size(); i++) {
15537 for (
size_t i = 0; i < vCARs.size(); i++) {
15538 for (
size_t j = 0; j < vruns.size(); j++) {
15539 for (
size_t k = 0; k <
XHOST.vext.size(); k++) {
15541 if (!
XHOST.vzip.at(k).empty()) {
15559 pflow::RayTraceManager(argv);
15567 void RASMOL(
const string& options, istream& input) {
15568 const bool LDEBUG = (
false ||
XHOST.DEBUG);
15576 vector<string> tokens;
15579 if (tokens.size() > 3) {
15583 if (!tokens.empty()) {
15586 if (tokens.size() >= 2) {
15589 if (tokens.size() >= 3) {
15593 ofstream FileOUTPUT;
15594 const string FileOUTPUTName =
"aflow.rasmol.xyz." +
XHOST.ostrPID.str() +
"." +
XHOST.ostrTID.str();
15595 FileOUTPUT.open(FileOUTPUTName.c_str(), std::ios::out);
15598 if (
max(_ijk) == 0) {
15601 ostringstream aus_exec;
15603 PrintXYZ(a, _ijk, FileOUTPUT);
15604 FileOUTPUT.close();
15606 aus_exec <<
XHOST.command(
"rasmol") <<
" -xyz " << FileOUTPUTName << endl;
15611 FileOUTPUT.close();
15620 void RSM(vector<string> argv, istream& input) {
15624 string strtmp =
"";
15625 string AtomSymbol =
"";
15626 bool Z_flag =
false;
15632 for (i = 1; i < (int) argv.size(); i++) {
15634 if (strtmp ==
"--Z" or strtmp ==
"--z") {
15640 Ntypes = (int) argv.size() - iargv;
15641 cerr <<
"Ntypes = " << Ntypes << endl;
15642 for (j = 0; j < Ntypes; j++) {
15643 AtomSymbol = argv.at(j + iargv);
15644 cerr << AtomSymbol <<
"(";
15645 if (AtomSymbol[0] <
'0' || AtomSymbol[0] >
'9') {
15646 Z[j] = (int) GetAtomNumber(AtomSymbol);
15650 cerr << Z[j] <<
") ";
15658 Ntypes = a.num_each_type.size();
15660 if ((
int) a.num_each_type.size() != Ntypes) {
15661 cerr <<
"STOP: inconsistency in number of types in POSCAR and --z" << endl <<
"a.num_each_type.size() = " << a.num_each_type.size() << endl <<
"Ntypes = " << Ntypes << endl;
15665 for (i = 0; i < Ntypes; i++) {
15673 for (i = 0; i < Ntypes; i++) {
15674 for (j = 0; j < a.num_each_type.at(i); j++) {
15676 for (k = 0; k < i + 1; k++) {
15677 ptr = ptr + a.num_each_type.at(k);
15679 ptr = ptr - a.num_each_type.at(i) + j;
15680 a.atoms.at(ptr).type = Z[i];
15699 const int nim = atoi(argv.at(2).c_str());
15700 const string path_flag(argv.at(3));
15701 PrintRBAnal(nim, path_flag, cout);
15712 ifstream infileA(argv.at(2).c_str());
15713 ifstream infileB(argv.at(3).c_str());
15716 const string path_flag(argv.at(4).c_str());
15719 xstructure diffstr;
15720 pflow::RBPoscarDisp(strA, strB, diffstr, totdist, cm, path_flag);
15721 PrintRBPoscarDisp(diffstr, totdist, cm, path_flag, cout);
15729 void RDF(
const string& options, istream& input,
bool raw_counts) {
15730 const bool LDEBUG = (
false ||
XHOST.DEBUG);
15734 vector<string> tokens;
15736 if (tokens.size() > 4) {
15741 if (a.species.empty()) {
15747 int window_gaussian = 0;
15749 cerr <<
__AFLOW_FUNC__ <<
" tokens.size()=" << tokens.size() << endl;
15751 if (!tokens.empty()) {
15754 if (tokens.size() >= 2) {
15757 if (tokens.size() >= 3) {
15760 if (tokens.size() >= 4) {
15765 pflow::GetRDF(a, rdf_all, rmax, nbins, raw_counts, sigma, window_gaussian);
15769 PrintRDF(a, rmax, nbins, rdf_all, cout);
15785 const bool LDEBUG = (
false ||
XHOST.DEBUG);
15789 vector<string> tokens;
15791 if (tokens.size() != 6) {
15817 pflow::GetRDFShells(strA, rmax, nbins, smooth_width, rdf_all_A_sm, rdfsh_all_A, rdfsh_loc_A);
15818 pflow::GetRDFShells(strB, rmax, nbins, smooth_width, rdf_all_B_sm, rdfsh_all_B, rdfsh_loc_B);
15819 vector<int> best_match;
15821 pflow::CmpRDFShells(strA, strB, rdfsh_all_A, rdfsh_all_B, nsh, best_match, rms_mat);
15822 PrintRDFCmp(strA, strB, rmax, nbins, smooth_width, nsh, rdfsh_all_A, rdfsh_all_B, best_match, rms_mat, cout);
15833 xstructure
RMATOM(istream& input,
const int& iatom) {
15835 a.RemoveAtom(iatom);
15855 xstructure
SCALE(
const string& options, istream& input) {
15856 const bool LDEBUG = (
false ||
XHOST.DEBUG);
15860 vector<string> tokens;
15862 if (tokens.size() != 1) {
15869 double scale = 0.0;
15870 if (!tokens.empty()) {
15875 cerr <<
"DEBUG b.scale=" << b.scale << endl;
15879 cerr <<
"DEBUG b.scale=" << b.scale << endl;
15881 b.neg_scale =
false;
15894 const bool LDEBUG = (
false ||
XHOST.DEBUG);
15895 vector<string> tokens;
15897 if (tokens.size() != 1) {
15904 double coefficient = 0.0;
15905 if (!tokens.empty()) {
15909 cerr <<
"DEBUG b.scale=" << b.scale << endl;
15913 cerr <<
"DEBUG b.scale=" << b.scale << endl;
15915 b.neg_scale =
false;
15928 const bool LDEBUG = (
false ||
XHOST.DEBUG);
15929 vector<string> tokens;
15931 if (tokens.size() != 1) {
15938 double coefficient = 0.0;
15939 if (!tokens.empty()) {
15943 cerr <<
"DEBUG b.scale=" << b.scale << endl;
15947 cerr <<
"DEBUG b.scale=" << b.scale << endl;
15949 b.neg_scale =
false;
15961 xstructure
SD(vector<string> argv, istream& input) {
15967 const int num_types = a.num_each_type.size();
15968 vector<string> sd(num_types);
15969 for (
int i = 0; i < num_types; i++) {
15973 for (
int i = 0; i <
min(((
int) argv.size() - 2), num_types); i++) {
15974 sd[i] = string(argv.at(i + 2));
15989 str =
ShiftCPos(str, (newcm - oldcm) / str.scale);
16005 str =
ShiftCPos(str, -(neworigin - oldorigin));
16008 str =
ShiftFPos(str, -(neworigin - oldorigin));
16021 if (natom < (
int) str.atoms.size()) {
16037 void SEWALD(vector<string> argv, istream& input) {
16039 double Ks = atof(argv.at(2).c_str());
16040 const double SUMTOL = 1.0e-16;
16043 double epoint = 0.0;
16044 double ereal = 0.0;
16045 double erecip = 0.0;
16046 double eewald = 0.0;
16047 ereal = pflow::ScreenedESEner(str, Ks, SUMTOL);
16049 pflow::PrintEwald(str, epoint, ereal, erecip, eewald, Ks, SUMTOL, cout);
16058 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16059 string flag_name =
"SG::" + mode;
16060 stringstream message;
16061 if (print ==
"LABEL" || print ==
"NUMBER") {
16062 flag_name +=
"_" + print;
16066 cerr <<
XPID <<
"pflow::SG: mode=" << mode << endl;
16069 vector<string> tokens;
16071 if (tokens.size() == 1) {
16072 if (tokens[0] ==
"usage" || tokens[0] ==
"USAGE") {
16074 aurostd::liststring2string(
"aflow --aflowSG[=<tolerance_value>|=tight|=loose] [--mag|--magnetic|--magmom=[m1,m2,...|INCAR|OUTCAR]] < POSCAR default: "
16075 "(minimum_interatomic_distance)/100.0",
16086 cerr <<
XPID <<
"pflow::SG: tokens.size()=" << tokens.size() << endl;
16092 if (input.peek() == EOF) {
16093 message <<
"File is empty. Check POSCAR.";
16098 if (a.directory.empty()) {
16104 if (mode ==
"AFLOW" || mode ==
"aflow") {
16106 cerr <<
XPID <<
"pflow::SG: aflow" << endl;
16111 if (vpflow.
flag(
"SG::MAGNETIC")) {
16119 double tolerance = pflow::getSymmetryTolerance(a, vpflow.
getattachedscheme(
"SG::TOLERANCE"));
16121 bool tolerance_spectrum_analysis =
false;
16122 vector<double> tolerance_spectrum;
16124 if (vpflow.
flag(
"SG::TOLERANCE_SPECTRUM")) {
16125 tolerance_spectrum_analysis =
true;
16126 tolerance_spectrum = pflow::getSymmetryToleranceSpectrum(vpflow.
getattachedscheme(
"SG::TOLERANCE_SPECTRUM"));
16127 }
else if (vpflow.
flag(
"SG::TOLERANCE") && vpflow.
flag(
"SG::TOLERANCE_SPECTRUM")) {
16128 message <<
"pflow::SG::ERROR: Cannot specify a single tolerance value and perform the tolerance spectrum at the same time. Please choose one or the other.";
16133 if (vpflow.
flag(
"SG::NO_SCAN")) {
16134 a.sym_eps_no_scan =
true;
16137 if (!tolerance_spectrum_analysis) {
16138 const uint sgroup = a.SpaceGroup_ITC(tolerance, a.sym_eps_no_scan);
16142 for (
size_t i = 0; i < tolerance_spectrum.size(); i++) {
16143 const uint sgroup = a.SpaceGroup_ITC(tolerance_spectrum[i], a.sym_eps_no_scan);
16148 cout <<
"tol=" << tolerance_spectrum[i] <<
": -" << endl;
16156 if (mode ==
"PLATON" || mode ==
"platon") {
16158 cerr <<
XPID <<
"pflow::SG: platon" << endl;
16170 if (vpflow.
flag(
"SG::TOLERANCE")) {
16172 vector<string> tol_tokens;
16177 if ((!tol_tokens.empty() && tol_tokens[0] ==
"EQUAL") || (tol_tokens.size() >= 2 && tol_tokens[1] ==
"EQUAL")) {
16178 Platon_EQUAL =
true;
16180 if ((!tol_tokens.empty() && tol_tokens[0] ==
"EXACT") || (tol_tokens.size() >= 2 && tol_tokens[1] ==
"EXACT")) {
16181 Platon_EXACT =
true;
16183 if (tol_tokens.size() >= 3) {
16191 a.platon2sg(Platon_EQUAL, Platon_EXACT, Platon_ang, Platon_d1, Platon_d2, Platon_d3);
16195 if (mode ==
"FINDSYM" || mode ==
"findsym") {
16197 cerr <<
XPID <<
"pflow::SG: findsym" << endl;
16201 if (vpflow.
flag(
"SG::TOLERANCE")) {
16203 vector<string> tol_tokens;
16205 if (tol_tokens.empty()) {
16208 if (tol_tokens.size() == 1) {
16212 a.findsym2sg(tolerance);
16218 if (print ==
"LABEL" || print ==
"label") {
16222 if (print ==
"NUMBER" || print ==
"number") {
16226 return a.spacegroup;
16236 void SHELL(
const string& options, istream& input) {
16237 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16241 vector<string> tokens;
16243 if (tokens.size() != 5) {
16251 const int dens = 20;
16252 if (!tokens.empty()) {
16255 if (tokens.size() >= 2) {
16258 if (tokens.size() >= 3) {
16261 if (tokens.size() >= 4) {
16264 if (tokens.size() >= 5) {
16271 PrintShell(a, ns, r1, r2, name, dens, cout);
16283 xstructure
SHIFT(
const string& options, istream& input) {
16284 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16288 vector<string> tokens;
16290 if (tokens.size() != 3 && tokens.size() != 4) {
16296 for (
int ic = 1; ic <= 3; ic++) {
16301 if (tokens.size() == 3) {
16302 cerr <<
"WARNING - pflow::SHIFT: 4th argument can be [cCfFdD], defaulting to [cC]=Cartesian shift" << endl;
16304 if (tokens.at(3) ==
"c" || tokens.at(3) ==
"C") {
16307 if (tokens.at(3) ==
"d" || tokens.at(3) ==
"D" || tokens.at(3) ==
"f" || tokens.at(3) ==
"F") {
16310 cerr <<
"WARNING - pflow::SHIFT: 4th argument can be [cCfFdD], Defaulting to [cC]=Cartesian shift" << endl;
16331 a.CalculateSymmetryFactorGroup(
true);
16332 spacegroup::SpaceGroupInitialize();
16333 cerr << a.pgroup.size() <<
"," << a.fgroup.size() << endl;
16340 for (
size_t i = 0; i < a.fgroup.size(); i++) {
16341 U = a.fgroup[i].Uf;
16342 tau = a.fgroup[i].ftau;
16344 if (std::abs(
det(A)) > 0.01) {
16345 cerr << inverse(A) * tau << endl;
16356 void SGROUP(_aflags& aflags, istream& input,
double radius) {
16358 aflags.QUIET =
true;
16360 const bool WRITE =
true;
16361 ofstream File(
"/dev/null");
16362 SYM::CalculatePointGroup(File, a, aflags, WRITE,
true, cout);
16363 SYM::CalculatePointGroupKLattice(File, a, aflags, WRITE,
true, cout);
16364 SYM::CalculateFactorGroup(File, a, aflags, WRITE,
true, cout);
16365 SYM::CalculatePointGroupCrystal(File, a, aflags, WRITE,
true, cout);
16366 a.sgroup_radius = radius;
16367 SYM::CalculateSpaceGroup(File, a, aflags, WRITE,
true, cout);
16377 string strout = a.SpeciesString() +
"\n";
16393 while (cin >> p >> q) {
16396 cin.getline(dum, 500);
16398 const int npts = atoi(argv.at(2).c_str());
16408 cerr <<
"# WARNING: THIS REQUIRES THAT YOU HAVE PDOS IN DOSCAR FILE - THIS IS OBTAINED BY RUNNING WITH LORBIT=2 - SEE aflow --h" << endl;
16409 ifstream SumPDOSParams_infile(argv.at(2).c_str());
16411 ifstream PDOS_infile(argv.at(3).c_str());
16413 pflow::pdosdata pdd;
16415 pflow::ReadSumDOSParams(SumPDOSParams_infile, pdd);
16418 pflow::ReadInPDOSData(allpdos, pdd, PDOS_infile);
16419 SumPDOS(allpdos, pdd);
16428 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16433 vector<string> tokens;
16437 if (tokens.size() != 9 && tokens.size() != 3 && tokens.size() != 1) {
16439 aurostd::liststring2string(
"aflow --supercell=a11,a12,a13,a21,a22,a23,a31,a32,a33 < POSCAR",
"aflow --supercell=a11,a22,a33 < POSCAR",
"aflow --supercell=file < POSCAR"));
16442 if (tokens.size() == 9) {
16455 if (std::abs(
det(msc)) < 0.01) {
16464 if (tokens.size() == 3) {
16471 if (std::abs(
det(msc)) < 0.01) {
16480 if (tokens.size() == 1) {
16484 ifstream infile(tokens[0].c_str());
16486 for (
int i = 1; i <= 3; i++) {
16487 for (
int j = 1; j <= 3; j++) {
16488 infile >> msc(i, j);
16491 if (std::abs(
det(msc)) < 0.01) {
16508 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16512 vector<string> tokens;
16516 string infile_name;
16518 if (tokens.size() != 10 && tokens.size() != 4 && tokens.size() != 2) {
16521 aurostd::liststring2string(
"aflow --supercell_strlist=a11,a12,a13,a21,a22,a23,a31,a32,a33,strlist",
"aflow --supercell_strlist=a11,a22,a33,strlist",
"aflow --supercell_strlist=file,strlist"));
16524 if (tokens.size() == 10) {
16537 infile_name = tokens[9];
16538 if (std::abs(
det(msc)) < 0.01) {
16542 if (tokens.size() == 4) {
16549 infile_name = tokens[3];
16550 if (std::abs(
det(msc)) < 0.01) {
16554 if (tokens.size() == 2) {
16558 ifstream infile(tokens[0].c_str());
16560 for (
int i = 1; i <= 3; i++) {
16561 for (
int j = 1; j <= 3; j++) {
16562 infile >> msc(i, j);
16565 infile_name = tokens[1];
16566 if (std::abs(
det(msc)) < 0.01) {
16576 ifstream list_inf(infile_name.c_str());
16578 vector<xstructure> vstr;
16579 vector<xstructure> vstr_sc;
16580 pflow::ReadInStrVec(vstr, list_inf);
16581 for (
size_t i = 0; i < vstr.size(); i++) {
16582 vstr_sc.push_back(vstr[i]);
16584 pflow::SuperCellStrVec(vstr_sc, mmsc);
16585 pflow::PrintStrVec(vstr_sc, cout);
16586 cerr <<
__AFLOW_FUNC__ <<
" vstr_sc.size()=" << vstr_sc.size() << endl;
16598 if (speciesA < 0) {
16601 if (speciesA >= (
int) a.num_each_type.size()) {
16604 if (speciesB < 0) {
16607 if (speciesB >= (
int) a.num_each_type.size()) {
16610 a.SpeciesSwap(speciesA, speciesB);
16619 xstructure
VOLUME(
const string& options, istream& input) {
16620 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16624 vector<string> tokens;
16626 if (tokens.size() != 2) {
16630 if (tokens.at(0) ==
"VOLUME::EQUAL") {
16633 if (tokens.at(0) ==
"VOLUME::MULTIPLY_EQUAL") {
16636 if (tokens.at(0) ==
"VOLUME::PLUS_EQUAL") {
16652 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16658 vector<string> tokens;
16660 if (vpflow.
flag(
"WYCKOFF_POSITIONS::USAGE")) {
16662 aurostd::liststring2string(
"aflow --Wyckoff|--Wyckoff_positions|--wyckoff|--wyckoff_positions|--wyccar[=<tolerance_value>|=tight|=loose] [--no_scan] [--setting=1|2|aflow] "
16663 "[--magmom=[m1,m2,...|INCAR|OUTCAR]] < file default: tolerance=(minimum_interatomic_distance)/100.0, setting=1"));
16667 const bool wyccar = vpflow.
flag(
"WYCKOFF_POSITIONS::PRINT_WYCCAR");
16668 const bool letters_only = vpflow.
flag(
"WYCKOFF_POSITIONS::PRINT_LETTERS_ONLY");
16669 const bool site_symmetries_only = vpflow.
flag(
"WYCKOFF_POSITIONS::PRINT_SITE_SYMMETRIES_ONLY");
16670 const bool multiplicities_only = vpflow.
flag(
"WYCKOFF_POSITIONS::PRINT_MULTIPLICITIES_ONLY");
16677 double tolerance = pflow::getSymmetryTolerance(str, vpflow.
getattachedscheme(
"WYCKOFF_POSITIONS::TOLERANCE"));
16681 const uint setting = pflow::getSpaceGroupSetting(vpflow.
getattachedscheme(
"WYCKOFF_POSITIONS::SETTING"));
16684 if (vpflow.
flag(
"WYCKOFF_POSITIONS::MAGNETIC")) {
16685 const string magmom_info = vpflow.
getattachedscheme(
"WYCKOFF_POSITIONS::MAGNETIC");
16690 if (vpflow.
flag(
"WYCKOFF_POSITIONS::NO_SCAN")) {
16691 str.sym_eps_no_scan =
true;
16694 const uint space_group_number = str.SpaceGroup_ITC(tolerance, -1, setting, str.sym_eps_no_scan);
16697 stringstream ss_output;
16700 return ss_output.str();
16701 }
else if (letters_only) {
16702 const string letters = SYM::ExtractWyckoffLettersString(str.wyccar_ITC);
16705 }
else if (site_symmetries_only) {
16706 const string site_symmetries = SYM::ExtractWyckoffSiteSymmetriesString(str.wyccar_ITC);
16709 }
else if (multiplicities_only) {
16710 const string multiplicities = SYM::ExtractWyckoffMultiplicitiesString(str.wyccar_ITC);
16715 const bool already_calculated =
true;
16718 filetype ftype = txt_ft;
16719 if (
XHOST.vflag_control.flag(
"PRINT_MODE::TXT")) {
16721 }
else if (
XHOST.vflag_control.flag(
"PRINT_MODE::JSON")) {
16725 return PrintWyckoffData(str, ftype, already_calculated);
16733 xstructure
WYCKOFF(vector<string> argv, istream& input) {
16736 a = WyckoffPOSITIONS(sg, a);
16737 cerr << a.spacegroup << endl;
16738 cerr << a.spacegroupnumber << endl;
16739 cerr << a.spacegroupoption << endl;
16748 void XRAY(
const string& options, istream& input) {
16749 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16753 vector<string> tokens;
16755 if (tokens.size() != 1) {
16759 if (!tokens.empty()) {
16765 PrintXray(a, l, cout);
16771 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16788 vector<double> v_twotheta;
16789 vector<double> v_intensity;
16790 vector<double> v_intensity_smooth;
16791 vector<uint> peak_indices = GetXrayPeaks(a, v_twotheta, v_intensity, v_intensity_smooth, lambda);
16792 if (v_twotheta.size() != v_intensity.size()) {
16795 if (v_twotheta.size() != v_intensity_smooth.size()) {
16800 vector<double> v_amplitude;
16801 vector<double> v_peaks_amplitude;
16802 double intmax = 1e-8;
16803 for (
size_t i = 0; i < v_intensity.size(); i++) {
16804 if (v_intensity[i] > intmax) {
16805 intmax = v_intensity[i];
16808 for (
size_t i = 0; i < v_intensity.size(); i++) {
16809 v_amplitude.push_back(100 * v_intensity[i] / intmax);
16813 vector<double> v_peaks_twotheta;
16814 vector<double> v_peaks_intensity;
16815 for (
size_t i = 0; i < peak_indices.size(); i++) {
16816 v_peaks_twotheta.push_back(v_twotheta[peak_indices[i]]);
16817 v_peaks_intensity.push_back(v_intensity[peak_indices[i]]);
16818 v_peaks_amplitude.push_back(v_amplitude[peak_indices[i]]);
16820 if (v_peaks_twotheta.size() != v_peaks_intensity.size()) {
16824 cout <<
"X-Ray Peaks:" << endl;
16833 void READ_XRAY_DATA(
const string& filename, vector<double>& v_twotheta, vector<double>& v_intensity) {
16834 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16839 if (filename.empty()) {
16849 vector<string> data_file_lines;
16852 string::size_type loc;
16853 vector<double> tokens;
16854 for (
size_t i = 0; i < data_file_lines.size(); i++) {
16855 line = data_file_lines[i];
16856 loc = line.find(
"#");
16857 line = line.substr(0, loc);
16860 if (!line.empty()) {
16863 if (tokens.size() != 2) {
16866 v_twotheta.push_back(tokens[0]);
16867 v_intensity.push_back(tokens[1]);
16871 cerr <<
__AFLOW_FUNC__ <<
" v_twotheta.size()=" << v_twotheta.size() << endl;
16872 cerr <<
__AFLOW_FUNC__ <<
" v_intensity.size()=" << v_intensity.size() << endl;
16875#define XRAY_DATA_PLOT_FILE "aflow_xray_data_plot_file.txt"
16876#define XRAY_DATA_PEAKS_FILE "aflow_xray_data_peaks_file.txt"
16883 const string directory = vpflow.
getattachedscheme(
"PRINT_XRAY_DATA_PLOT::DIRECTORY");
16891 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16902 vector<double> v_twotheta;
16903 vector<double> v_intensity;
16904 GetXray2ThetaIntensity(str, v_twotheta, v_intensity, lambda);
16905 if (v_twotheta.size() != v_intensity.size()) {
16912 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16922 vector<double> v_twotheta;
16923 vector<double> v_intensity;
16927 void PRINT_XRAY_DATA_PLOT(
const vector<double>& v_twotheta,
const vector<double>& v_intensity,
const string& _directory) {
16928 const bool LDEBUG = (
false ||
XHOST.DEBUG);
16930 string directory = _directory;
16931 if (directory.empty()) {
16940 vector<double> v_intensity_smooth;
16941 vector<uint> peak_indices = GetXrayPeaks(v_twotheta, v_intensity, v_intensity_smooth);
16942 if (v_twotheta.size() != v_intensity_smooth.size()) {
16947 vector<double> v_amplitude;
16948 vector<double> v_peaks_amplitude;
16949 double intmax = 1e-8;
16950 for (
size_t i = 0; i < v_intensity.size(); i++) {
16951 if (v_intensity[i] > intmax) {
16952 intmax = v_intensity[i];
16955 for (
size_t i = 0; i < v_intensity.size(); i++) {
16956 v_amplitude.push_back(100 * v_intensity[i] / intmax);
16960 vector<double> v_peaks_twotheta;
16961 vector<double> v_peaks_intensity;
16962 for (
size_t i = 0; i < peak_indices.size(); i++) {
16963 v_peaks_twotheta.push_back(v_twotheta[peak_indices[i]]);
16964 v_peaks_intensity.push_back(v_intensity[peak_indices[i]]);
16965 v_peaks_amplitude.push_back(v_amplitude[peak_indices[i]]);
16967 if (v_peaks_twotheta.size() != v_peaks_intensity.size()) {
16971 stringstream data_file_ss;
16975 data_file_ss.str(
"");
16980 data_file_ss << endl;
16981 for (
size_t i = 0; i < v_twotheta.size(); i++) {
16982 data_file_ss << aurostd::PaddedPOST<double>(v_twotheta[i], 20) <<
" ";
16983 data_file_ss << aurostd::PaddedPOST<double>(v_intensity[i], 20) <<
" ";
16984 data_file_ss << aurostd::PaddedPOST<double>(v_amplitude[i], 20) <<
" ";
16985 data_file_ss << aurostd::PaddedPOST<double>(v_intensity_smooth[i], 20) <<
" ";
16986 data_file_ss << endl;
16993 data_file_ss.str(
"");
16997 data_file_ss << endl;
16998 for (
size_t i = 0; i < v_peaks_twotheta.size(); i++) {
16999 data_file_ss << aurostd::PaddedPOST<double>(v_peaks_twotheta[i], 20) <<
" ";
17000 data_file_ss << aurostd::PaddedPOST<double>(v_peaks_intensity[i], 20) <<
" ";
17001 data_file_ss << aurostd::PaddedPOST<double>(v_peaks_amplitude[i], 20) <<
" ";
17002 data_file_ss << endl;
17017 const bool force_generic_title = vpflow.
flag(
"PLOT_XRAY::FORCE_GENERIC_TITLE");
17020 const bool keep_gp = vpflow.
flag(
"PLOT_XRAY::KEEP_GP");
17021 return PLOT_XRAY(str, lambda, directory, keep_gp, force_generic_title);
17023 void PLOT_XRAY(istream& input,
double lambda,
const string& directory,
bool keep_gp,
bool force_generic_title) {
17025 return PLOT_XRAY(str, lambda, directory, keep_gp, force_generic_title);
17027 void PLOT_XRAY(
const xstructure& str,
double lambda,
const string& directory,
bool keep_gp,
bool force_generic_title) {
17028 const bool LDEBUG = (
false ||
XHOST.DEBUG);
17039 vector<double> v_twotheta;
17040 vector<double> v_intensity;
17041 GetXray2ThetaIntensity(str, v_twotheta, v_intensity, lambda);
17042 if (v_twotheta.size() != v_intensity.size()) {
17047 if (
false || force_generic_title) {
17050 if (title.empty()) {
17051 title = getGenericTitleXStructure(str,
true);
17057 return PLOT_XRAY(v_twotheta, v_intensity, title, directory, keep_gp);
17061 const bool LDEBUG = (
false ||
XHOST.DEBUG);
17068 return PLOT_XRAY(filename, title, directory, keep_gp);
17070 void PLOT_XRAY(
const string& filename,
const string& title,
const string& directory,
bool keep_gp) {
17071 vector<double> v_twotheta;
17072 vector<double> v_intensity;
17074 return PLOT_XRAY(v_twotheta, v_intensity, title, directory, keep_gp);
17076 void PLOT_XRAY(
const vector<double>& v_twotheta,
const vector<double>& v_intensity,
const string& _title,
const string& _directory,
bool keep_gp) {
17077 const bool LDEBUG = (
false ||
XHOST.DEBUG);
17078 stringstream message;
17084 message <<
"gnuplot is not available, please put in path" << endl;
17088 message <<
"pdflatex is not available, please put in path" << endl;
17092 string directory = _directory;
17093 if (directory.empty()) {
17103 fs::current_path(PLOT_tmp_dir.c_str());
17106 const bool plot_intensity =
true;
17108 vector<string> data_file_lines;
17113 vector<double> tokens;
17114 string::size_type loc;
17116 double y_max = 0.0;
17117 for (
size_t i = 0, fl_size_i = data_file_lines.size(); i < fl_size_i; i++) {
17118 line = data_file_lines[i];
17119 loc = line.find(
"#");
17120 line = line.substr(0, loc);
17122 if (!line.empty()) {
17124 x.push_back(tokens[0]);
17125 y1.push_back(tokens[(plot_intensity ? 1 : 2)]);
17126 y2.push_back(tokens[3]);
17127 if (y1.back() > y_max) {
17130 if (y2.back() > y_max) {
17134 cerr <<
__AFLOW_FUNC__ <<
" x=" << x.back() <<
" y1=" << y1.back() <<
" y2=" << y2.back() << endl;
17139 const int exp = (int) floor(log10(y_max));
17146 if (title.empty()) {
17147 title =
"X-Ray Plot";
17153 stringstream plot_file_ss;
17154 const string xray_tex =
"aflow_xray_plot.tex";
17155 string xray_pdf = xray_tex;
17158 plot_file_ss <<
"set terminal epslatex color standalone" << endl;
17159 plot_file_ss <<
"set output \"" + xray_tex +
"\"" << endl;
17160 plot_file_ss << endl;
17162 plot_file_ss <<
"set yrange [0:*]" << endl;
17163 plot_file_ss <<
"set xrange [0:180]" << endl;
17164 plot_file_ss <<
"set xlabel \"2$\\\\theta$ (degrees)\"" << endl;
17165 plot_file_ss <<
"set ylabel \"" << (plot_intensity ? string(
"intensity") : string(
"amplitude")) << R
"( $\\left[\\times 10^{)" << exp << "}\\\\right]$" <<
"\"" << endl;
17167 plot_file_ss <<
"set title \"" << title <<
"\"" << endl;
17168 plot_file_ss << endl;
17170 bool plot_smooth =
true;
17171 const bool plot_peaks =
true;
17172 plot_smooth = (plot_smooth && plot_intensity);
17174 plot_file_ss <<
"plot \\" << endl;
17175 plot_file_ss <<
"\"" + string(
XRAY_DATA_PLOT_FILE) +
"\" using 1:(10**(-" << exp <<
")*$" << (plot_intensity ? 2 : 3) << R
"() with lines lc rgb "blue" lw 4 title ")"
17176 << (plot_intensity ? string(
"intensity") :
string(
"amplitude")) <<
"\"" << (plot_smooth || plot_peaks ? string(
", \\") : string(
"")) << endl;
17178 plot_file_ss <<
"\"" + string(
XRAY_DATA_PLOT_FILE) +
"\" using 1:(10**(-" << exp <<
")*$" << 4 << R
"() with lines lc rgb "red" lw 4 title "smoothed")" << (plot_peaks ? string(", \\") : string(
"")) << endl;
17181 plot_file_ss <<
"\"" + string(
XRAY_DATA_PEAKS_FILE) +
"\" using 1:(10**(-" << exp <<
")*$" << (plot_intensity ? 2 : 3) << R
"() lt 2 lc rgb "#006400" ps 2 lw 4 title "peaks")" << endl;
17184 const string plot_file =
"aflow_xray_plot.gp";
17189 vector<string> files2move;
17191 ostream& oss = cout;
17192 ofstream FileMESSAGE;
17194 aflags.Directory = directory;
17196 if (
false || keep_gp) {
17210 files2move.push_back(PLOT_tmp_dir +
"/" + plot_file);
17212 message << plot_file <<
" was not created";
17217 files2move.push_back(PLOT_tmp_dir +
"/" + xray_pdf);
17219 message << xray_pdf <<
" was not created";
17223 fs::current_path(curdir.c_str());
17227 string destination = directory +
"/" + xray_pdf;
17229 message <<
"Done. See " << destination <<
"." << endl;
17242 void XYZ(
const string& options, istream& input) {
17243 const bool LDEBUG = (
false ||
XHOST.DEBUG);
17251 vector<string> tokens;
17254 if (tokens.size() > 3) {
17258 if (!tokens.empty()) {
17261 if (tokens.size() >= 2) {
17264 if (tokens.size() >= 3) {
17269 PrintXYZ(a, ijk, cout);
17283 PrintXYZInSphere(a, radius, cout);
17294 PrintXYZws(a, cout);
17303 const bool LDEBUG = (
false ||
XHOST.DEBUG);
17307 vector<string> tokens;
17309 if (tokens.empty() || tokens.size() > 2) {
17313 if (tokens.size() == 1) {
17316 if (tokens.size() == 2) {
17317 Directory = tokens[1];
17320 vector<double> vZVAL;
17321 vector<double> sZVAL;
17322 vector<double> vPOMASS;
17323 vector<double> sPOMASS;
17324 if (tokens.at(0) ==
"ZVAL") {
17325 cout <<
"Total ZVAL (from PP) = " <<
GetZVAL(Directory, vZVAL) << endl;
17327 if (tokens.at(0) ==
"ZVAL::CELL") {
17328 cout <<
"Total ZVAL_CELL (from PP and xstructure) = " <<
GetCellAtomZVAL(Directory, vZVAL, sZVAL,
"CELL") << endl;
17330 if (tokens.at(0) ==
"ZVAL::ATOM") {
17331 cout <<
"Total ZVAL_ATOM (from PP and xstructure) = " <<
GetCellAtomZVAL(Directory, vZVAL, sZVAL,
"ATOM") << endl;
17333 if (tokens.at(0) ==
"POMASS") {
17334 cout <<
"Total POMASS (from PP) = " <<
GetPOMASS(Directory, vPOMASS) << endl;
17336 if (tokens.at(0) ==
"POMASS::CELL") {
17337 cout <<
"Total POMASS_CELL (from PP and xstructure) = " <<
GetCellAtomPOMASS(Directory, vPOMASS, sPOMASS,
"CELL") << endl;
17339 if (tokens.at(0) ==
"POMASS::ATOM") {
17340 cout <<
"Total POMASS_ATOM (from PP and xstructure) = " <<
GetCellAtomPOMASS(Directory, vPOMASS, sPOMASS,
"ATOM") << endl;
17352bool AreAtomsEquivalent(
const deque<_atom>& atoms1,
const deque<_atom>& atoms2,
bool oparameter_check,
bool poccupation_check) {
17353 double epsilon = 0.0001;
17354 double epsilon_pocc = 0.05;
17355 if (atoms1.size() != atoms2.size()) {
17358 for (
size_t iat1 = 0; iat1 < atoms1.size(); iat1++) {
17359 bool found =
false;
17360 for (
size_t iat2 = 0; iat2 < atoms2.size() && found ==
false; iat2++) {
17361 if (atoms1[iat1].type == atoms2[iat2].type &&
aurostd::isequal(atoms1[iat1].fpos, atoms2[iat2].fpos, epsilon)) {
17362 if (oparameter_check ==
false && poccupation_check ==
false) {
17365 if (oparameter_check ==
true && poccupation_check ==
false) {
17366 if (atoms1[iat1].order_parameter_value == atoms2[iat2].order_parameter_value) {
17371 if (oparameter_check ==
false && poccupation_check ==
true) {
17372 if (
aurostd::isequal(atoms1[iat1].partial_occupation_value, atoms2[iat2].partial_occupation_value, epsilon_pocc)) {
17377 if (oparameter_check ==
true && poccupation_check ==
true) {
17378 if (atoms1[iat1].order_parameter_value == atoms2[iat2].order_parameter_value &&
aurostd::isequal(atoms1[iat1].partial_occupation_value, atoms2[iat2].partial_occupation_value, epsilon_pocc)) {
17386 if (found ==
false) {
17411 bool operator()(
const xstructure& str1,
const xstructure& str2)
const {
return (
bool) (str1.order_parameter_orbit < str2.order_parameter_orbit); }
17416 bool operator()(
const xstructure& str1,
const xstructure& str2)
const {
return (
bool) (str1.order_parameter_orbit > str2.order_parameter_orbit); }
17421 for (
size_t iat = 0; iat < str.order_parameter_atoms.size(); iat++) {
17422 _sum += (int) str.atoms.at(str.order_parameter_atoms[iat]).order_parameter_value;
17435 stringstream help_file;
17438 bool help_found =
false;
17439 string option = argv.at(2);
17441 const string seperation_line_pattern =
"******";
17446 option.append(
" ");
17447 option.insert(0,
"--");
17449 bool output_flag =
false;
17450 bool begin_section_flag =
false;
17451 while (getline(help_file, line)) {
17456 size_t pos = line.find(option);
17457 const string program_name =
"aflow";
17458 const string option_prefix =
"--";
17459 const size_t pos2 = line.find(program_name);
17460 const size_t pos3 = line.find(option_prefix);
17461 string::iterator str_itr;
17463 if ((pos2 < pos3) && (pos3 != string::npos)) {
17464 for (str_itr = line.begin() + pos2 + program_name.size(); str_itr < line.begin() + pos3; str_itr++) {
17465 if (*str_itr !=
' ') {
17466 begin_section_flag =
false;
17470 begin_section_flag =
true;
17472 begin_section_flag =
false;
17475 if (begin_section_flag && (pos != string::npos) && (!output_flag)) {
17480 const int last_space_pos = line.find_first_not_of(
" ");
17481 line.erase(line.begin(), line.begin() + last_space_pos);
17482 cout << line << endl;
17483 output_flag =
true;
17486 }
else if (begin_section_flag && output_flag) {
17490 pos = line.find(option);
17491 if ((pos != string::npos)) {
17492 const int last_space_pos = line.find_first_not_of(
" ");
17493 line.erase(line.begin(), line.begin() + last_space_pos);
17494 cout << line << endl;
17495 output_flag =
true;
17497 output_flag =
false;
17499 }
else if (!begin_section_flag && output_flag) {
17503 if (line.find(seperation_line_pattern) == string::npos) {
17505 const int last_space_pos = line.find_first_not_of(
" ");
17506 line.erase(line.begin(), line.begin() + last_space_pos);
17507 cout <<
" " << line << endl;
17514 const size_t pos = option.find_last_of(
" ");
17515 const string option_raw = option.substr(2, pos - 2);
17516 cerr <<
"No option \"" << option_raw <<
"\" is found." << endl;
17517 cerr <<
"Try \"aflow --help\" to see all supported options." << endl;
17685 const bool LDEBUG = (
false ||
XHOST.DEBUG);
17689 vector<string> tokens;
17691 if (tokens.size() != 3) {
17698 if (!tokens.empty()) {
17701 if (tokens.size() >= 2) {
17704 if (tokens.size() >= 3) {
17709 aflags.QUIET =
true;
17711 const double tol = 1e-6;
17725 if (h > tol && k > tol && l > tol) {
17726 A = (1 / h) * a.lattice(1);
17727 B = (1 / k) * a.lattice(2);
17728 C = (1 / l) * a.lattice(3);
17731 if (h < tol && k > tol && l > tol) {
17732 B = (1 / k) * a.lattice(2);
17733 A = a.lattice(1) + B;
17734 C = (1 / l) * a.lattice(3);
17736 if (h > tol && k < tol && l > tol) {
17737 A = (1 / h) * a.lattice(1);
17738 B = a.lattice(2) + A;
17739 C = (1 / l) * a.lattice(3);
17741 if (h > tol && k > tol && l < tol) {
17742 A = (1 / h) * a.lattice(1);
17743 B = (1 / k) * a.lattice(2);
17744 C = a.lattice(3) + B;
17747 if (h < tol && k < tol && l > tol) {
17748 C = (1 / l) * a.lattice(3);
17749 A = a.lattice(1) + C;
17750 B = a.lattice(2) + C;
17752 if (h < tol && k > tol && l < tol) {
17753 B = (1 / k) * a.lattice(2);
17754 A = a.lattice(1) + B;
17755 C = a.lattice(3) + B;
17757 if (h > tol && k < tol && l < tol) {
17758 A = (1 / h) * a.lattice(1);
17759 B = a.lattice(2) + A;
17760 C = a.lattice(3) + A;
17766 cout << setprecision(6) << dist << endl;
17777 for (
size_t i = 0; i < str.size(); i++) {
17788 bool contains =
false;
17789 for (
uint i = 0; i < str_in.length(); i++) {
17790 if (str_in[i] == c) {
17800 uint i = str.size() - 1;
17801 while (str[i] ==
' ') {
17804 str.erase(i + 1, str.size() - 1);
17806 while (str[i] ==
' ') {
17818 if (str[0] ==
'-') {
17820 str.erase(str.begin(), str.begin() + 1);
17822 if (str[0] ==
'+') {
17823 str.erase(str.begin(), str.begin() + 1);
17827 double denominator;
17831 for (
uint i = 0; i < slash; i++) {
17834 for (
size_t i = 0; i < (str.size() - slash); i++) {
17835 den[i] = str[i + slash + 1];
17837 numerator = atof(num);
17838 denominator = atof(den);
17840 out = -numerator / denominator;
17842 out = numerator / denominator;
17845 out = atof(str.c_str());
utype mod(utype x, utype y)
xstructure InflateVolume(const xstructure &a, const double &coefficient)
xstructure ShiftCPos(const xstructure &a, const xvector< double > &shift)
std::string KPPRA(int &k1, int &k2, int &k3, const xmatrix< double > &rlattice, const int &NK)
double GetCellAtomPOMASS(const std::stringstream &sss, std::vector< double > &vPOMASS, const std::stringstream &sstr, std::vector< double > &sPOMASS, std::string mode)
bool PrintEffectiveMass(std::string &WorkDir, std::ostream &oss)
xstructure GetPrimitive3(const xstructure &a)
double NearestNeighbor(const xstructure &str_in)
std::vector< double > GetNBONDXX(const xstructure &a)
xstructure InflateLattice(const xstructure &a, const double &coefficient)
xstructure ReScale(const xstructure &a, const double &in_scale)
std::string KPPRA_DELTA(int &k1, int &k2, int &k3, const xmatrix< double > &rlattice, const double &DK)
xstructure GetSuperCell(const xstructure &a, const xmatrix< double > &sc)
int MiscibilityCheck(int speciesA, int speciesB)
utype max(const vector< utype > vec)
xstructure GetPrimitive1(const xstructure &a)
bool PrintBandGap_DOS(std::string &WorkDir, std::ostream &oss)
xstructure SetSDTypes(const xstructure &a, const std::vector< std::string > &in_sd)
std::string GetSpaceGroupLabel(int spacegroupnumber)
double BringInCell(double, double=_ZERO_TOL_, double=1.0, double=0.0)
xstructure GetPrimitive2(const xstructure &a)
xstructure GetLTFVCell(const xvector< double > &nvec, const double phi, const xstructure &str)
bool PrintEigCurv(std::string &WorkDir, std::ostream &oss)
bool PrintBandGap(std::string &WorkDir, std::ostream &oss)
std::string GetSpaceGroupName(int spacegroupnumber, const std::string &directory="")
xstructure SetVolume(const xstructure &a, const double &in_volume)
double GetPOMASS(const std::stringstream &sss, std::vector< double > &vPOMASS)
xstructure ShiftFPos(const xstructure &a, const xvector< double > &shift)
xstructure BringInWignerSeitz(const xstructure &a)
static const std::string SEP_TAG2
double GetCellAtomZVAL(const std::stringstream &sss, std::vector< double > &vZVAL, const std::stringstream &sstr, std::vector< double > &sZVAL, std::string mode)
utype min(const vector< utype > vec)
xstructure LatticeReduction(const xstructure &a)
double GetZVAL(const std::stringstream &sss, std::vector< double > &vZVAL)
xstructure GetLTCell(const xmatrix< double > <, const xstructure &str)
double det(const xvector< double > &v1, const xvector< double > &v2, const xvector< double > &v3)
xstructure IdenticalAtoms(const xstructure &a)
static const std::string TAG_TITLE_POCC_TOL
xvector< double > C2F(const double &scale, const xmatrix< double > &lattice, const xvector< double > &cpos)
xvector< double > GetMom1(const xstructure &a)
xstructure GetNiggliStr(const xstructure &in_str)
xvector< int > LatticeDimensionSphere(const xmatrix< double > &lattice, double radius, double scale=1.0)
static const std::string TAG_TITLE_POCC
xstructure ShiftPos(const xstructure &a, const xvector< double > &shift, bool is_frac)
static const std::string TAG_TOL
xstructure PutInCompact(const xstructure &a)
xmatrix< double > GetClat(const xvector< double > &abc_angles)
static const std::string TAG_TITLE_ARUN
static const std::string TAG_TITLE_POCC_ARUN
xstructure GetPrimitive(const xstructure &a)
#define XRAY_DATA_PLOT_FILE
bool RequestedAlphabeticLabeling(string &label)
void helpIndividualOption(vector< string > &argv)
bool AreAtomsOrderEquivalent(const deque< _atom > &atoms1, const deque< _atom > &atoms2)
bool AreAtomsOccupationEquivalent(const deque< _atom > &atoms1, const deque< _atom > &atoms2)
double NearestNeighbor(const xstructure &a)
string AlphabetizePrototypeLabelSpeciesTokens(vector< string > &tokens)
bool AlphabetizePrototypeLabelSpecies(deque< string > &species, deque< string > &species_pp, deque< double > &vvolume, deque< double > &vmass, string &label)
string AlphabetizePrototypeLabelSpeciesArgv(vector< string > &argv)
#define XRAY_DATA_PEAKS_FILE
bool AreAtomsEquivalent(const deque< _atom > &atoms1, const deque< _atom > &atoms2, bool oparameter_check, bool poccupation_check)
bool AreAtomsOccupationOrderEquivalent(const deque< _atom > &atoms1, const deque< _atom > &atoms2)
int order_parameter_sum(const xstructure &str)
uint PflowARGs(vector< string > &argv, vector< string > &cmds, aurostd::xoption &vpflow)
#define DEFAULT_AFLOW_PGROUP_XTAL_JSON
#define DEFAULT_AFLOW_PGROUPK_PATTERSON_JSON
#define DEFAULT_PLATON_P_ANG
#define DEFAULT_AFLOW_PGROUPK_XTAL_JSON
#define DEFAULT_VASP_POTCAR_DIR_POTPAW_PBE_KIN
#define DEFAULT_AFLOW_IATOMS_OUT
#define DEFAULT_VASP_POTCAR_DIR_POT_PBE
#define DEFAULT_AFLOW_FGROUP_OUT
#define DEFAULT_AFLOW_DB_LOCK_FILE
#define DEFAULT_PLATON_P_D1
#define DEFAULT_AFLOW_PGROUPK_XTAL_OUT
#define DEFAULT_AFLOW_IATOMS_JSON
#define DEFAULT_FINDSYM_TOL
#define DEFAULT_VASP_POTCAR_DIR_POTPAW_PBE
#define DEFAULT_PLATON_P_D3
#define DEFAULT_AFLOW_PGROUPK_JSON
#define DEFAULT_AFLOW_SGROUP_OUT
#define DEFAULT_AFLOW_PGROUP_JSON
#define DEFAULT_AFLOW_PGROUPK_PATTERSON_OUT
#define DEFAULT_POCC_STOICH_TOL
#define DEFAULT_AFLOW_AGROUP_JSON
#define DEFAULT_AFLOW_PGROUPK_OUT
#define DEFAULT_AFLOW_PGROUP_OUT
#define DEFAULT_PLATON_P_EXACT
#define DEFAULT_VASP_POTCAR_DIR_POTPAW_LDA_KIN
#define DEFAULT_VASP_POTCAR_DIR_POTPAW_GGA
#define DEFAULT_AFLOW_AGROUP_OUT
#define DEFAULT_AFLOW_SGROUP_JSON
#define DEFAULT_VASP_POTCAR_DIR_POTPAW_LDA
#define DEFAULT_BANDS_GRID
#define DEFAULT_AFLOW_DB_STATS_FILE
#define DEFAULT_AFLOW_DB_DATA_PATH
#define DEFAULT_POCC_SITE_TOL
#define DEFAULT_AFLOW_QMVASP_OUT
#define DEFAULT_AFLOW_DB_FILE
#define DEFAULT_VASP_POTCAR_DIR_POT_GGA
#define DEFAULT_UNARY_BANDS_GRID
#define DEFAULT_PLATON_P_EQUAL
#define DEFAULT_AFLOW_FROZSL_EIGEN_OUT
#define DEFAULT_GFA_FORMATION_ENTHALPY_CUTOFF
#define DEFAULT_AFLOW_PGROUP_XTAL_OUT
#define DEFAULT_VASP_POTCAR_DIR_POT_LDA
#define DEFAULT_FILE_AFLOWLIB_ENTRY_OUT
#define DEFAULT_PLATON_P_D2
#define DEFAULT_AFLOW_FGROUP_JSON
#define _VASP_POSCAR_MODE_EXPLICIT_START_
#define _PGROUPK_PATTERSON_
#define _AVASP_PSEUDOPOTENTIAL_DELIMITER_
#define NANOPARTICLE_DISTANCE_DEFAULT
#define _AVASP_PSEUDOPOTENTIAL_POTENTIAL_COMPLETE_
#define AFLOWLIB_SERVER_DEFAULT
#define MISCIBILITY_SYSTEM_NOMIX
#define ATOM_ENVIRONMENT_MODE_1
#define MISCIBILITY_SYSTEM_UNKNOWN
#define _AVASP_PSEUDOPOTENTIAL_AUTO_
#define AFLOW_MATERIALS_SERVER_DEFAULT
#define _VASP_POSCAR_MODE_EXPLICIT_STOP_
#define _FROZSL_VASPSETUP_FILE_
#define _AVASP_PSEUDOPOTENTIAL_POTENTIAL_TYPE_
#define MISCIBILITY_SYSTEM_MISCIBLE
#define _AFLOW_POCC_ZERO_TOL_
#define _COORDS_CARTESIAN_
#define AFLOWIN_SEPARATION_LINE
#define KBIN_SYMMETRY_SGROUP_RADIUS_DEFAULT
#define NANOPARTICLE_RADIUS_DEFAULT
#define _COORDS_FRACTIONAL_
#define LIBRARY_MODE_PROTOTYPE
string Message(const string &filename, const string &list2print)
uint AFLOW_getTEMP(const vector< string > &argv)
#define _FILE_WRONG_FORMAT_
bool operator()(const xstructure &str1, const xstructure &str2) const
bool operator()(const xstructure &str1, const xstructure &str2) const
tools to create 3D scence and export them in different
int tachyon_lattice_views_idx
active lattice view (-1 default tachyon viewpoint is used)
std::string toHTML()
save scene as x3d and embed it in a html file
std::string toTachyon()
save scene for the tachyon renderer use tachyon to render the generated file
std::vector< utype > applyCombo(const std::vector< utype > &v_items) const
std::vector< std::string > vxscheme
uint push_attached(const std::string &scheme, const std::string &attached)
bool flag(const std::string &, bool)
bool args2addattachedscheme(std::vector< std::string > &argv, const std::string scheme, const std::string &_s_search, std::string string_default)
utype getattachedutype(const std::string &scheme) const
uint addattachedscheme(const std::string &scheme, const std::string &attached, bool flag)
std::string getattachedscheme(const std::string &scheme) const
bool GetPropertiesFile(const std::string &fileIN, bool=true)
std::vector< std::string > vTITEL
bool GetPropertiesFile(const std::string &fileIN, bool=true)
std::vector< std::string > species_pp_type
std::vector< std::string > species
std::vector< std::string > species_pp
std::vector< std::string > species_pp_AUID_collisions
std::vector< std::string > species_pp_version
std::vector< std::string > species_pp_AUID
std::vector< double > vmag
std::vector< int > species_Z
std::vector< xvector< double > > vmag_noncoll
bool Write(const std::string &filename, const std::string &directory)
bool WGET_INPUT(std::ofstream &FileMESSAGE, std::string AflowIn, _aflags &aflags, _kflags &kflags)
bool Delete(const std::string &filename, const std::string &directory)
bool WGET_OUTPUT(std::ofstream &FileMESSAGE, _aflags &aflags, _kflags &kflags)
void Clean(const _aflags &aflags)
void setModules(_xvasp &)
string Banner(string type)
void WriteFileIAPCFG(const aurostd::xoption &vpflow)
string PrototypesIcsdHelp(const string &options)
uint PrototypeLibrariesSpeciesNumber(const string &label)
xstructure PrototypeLibraries(ostream &oss, const string &label, const string ¶meters, int mode)
string CALCULATED_ICSD_RANDOM()
void save_to_file(const std::string &filename, const std::string &collection, const std::string &target_path)
write a embedded file into the filesystem
std::string get_content(const std::string &filename, const std::string &collection)
get the content of an embedded file
bool string2file(const string &StringOUTPUT, const std::string &FileNameRawOUTPUT, const compression_type ct, const string &mode)
write string into a file
std::string httpGetCompressedFileContent(const string &url, long &response_code, std::map< std::string, std::string > &header)
get the content of a file from the web, decompress locally if needed
void CompressFile(const string &file_raw, const compression_type ct, const bool keep)
compress file
utype scalar_product(const xvector< utype > &a, const xvector< utype > &b)
bool DirectoryLS(const string &directory_raw, vector< string > &vfiles)
returns the content of a directory
string fixStringLatex(const string &input, bool double_back_slash=false, bool symmetry_string=false)
string RemoveSubString(const string &str_orig, const string &str_rm) __xprototype
void PrintMessageStream(ostringstream &stream, bool quiet, std::ostream &oss=cout)
bool RemoveDirectory(const string &directory)
remove a file
void PrintWarningStream(ostringstream &stream, bool quiet)
vector< string > xvecDouble2vecString(const xvector< double > &vin, int precision=AUROSTD_DEFAULT_PRECISION, bool roff=false, double tol=(double) AUROSTD_ROUNDOFF_TOL, char FORMAT=DEFAULT_STREAM)
vector< string > wrapVecEntries(const vector< string > &vin, const string &wrap)
bool file2directory(const string &file, const string &destination)
move file to directory
void StringSubstInPlace(string &work_string, const string &old_string, const string &new_string)
substitute parts of a strings in place
string TmpFileCreate(const string &identifier, const string &tmpdir, const bool hidden)
create a string pointing to the location of a unique temp file
xmatrix< utype > inverse(const xmatrix< utype > &a)
calculates inverse of a square matrix
xvector< utype > vector_product(const xvector< utype > &a, const xvector< utype > &b)
utype modulus(const xmatrix< utype > &a)
string ostream2string(std::ostream &oss)
bool WithinList(const vector< utype > &list, const utype &input, size_t &index, bool sorted=false)
Determines whether a specific value exists inside a list.
vector< string > vecDouble2vecString(const vector< double > &vin, int precision=AUROSTD_DEFAULT_PRECISION, bool roff=false, double tol=(double) AUROSTD_ROUNDOFF_TOL, char FORMAT=DEFAULT_STREAM)
string RemoveComments(const string &s) __xprototype
deque< utype > vector2deque(const vector< utype > &vin)
void VASP_PseudoPotential_CleanName_InPlace(string &species, bool capital_letters_only, bool remove_floats)
bool CompressFileExist(const string &FileName)
check if a file or its compressed variant exits
string CleanFileName(const string &fileIN)
cleans file names from obvious things
uint string2tokens(const string &str, vector< string > &tokens, const string &delimiters=" ", bool consecutive=false) __xprototype
size_t file2string(const string &FileNameIN, string &StringIN)
read the content of a file into a string
void InFileExistCheck(const string &routine, const string &FileNameRaw, const ifstream &file_to_check)
checks if a filestream is empty
bool RemoveControlCodeCharactersFromString(const string &in, string &out)
size_t httpGetTokens(const string &url, vector< utype > &tokens, const string &delimiters)
get the data split into tokens
string PaddedPOST(utype, int, string=" ")
bool isequal(const xcomplex< utype > &a, const xcomplex< utype > &b, utype _tol_)
utype max(const vector< utype > vec)
bool IsCommandAvailable(const string &command)
bool DirectoryMake(const string &directory_raw)
create a directory
utype string2utype(const string &from, const uint base=10)
xmatrix< utype > eye(int nrh, int nch, int nrl, int ncl) __xprototype
bool args2flag(const vector< string > &argv, const string &s0)
string utype2string(const utype &from, int precision=AUROSTD_DEFAULT_PRECISION, char FORMAT=DEFAULT_STREAM) __xprototype
size_t string2vectorstring(const string &stringIN, vector< string > &vstringout, bool consecutive=false, bool trim_edges=false)
string RemoveCharacter(const string &s, const char character) __xprototype
string RemoveWhiteSpacesFromTheFrontAndBack(const string &s) __xprototype
bool FileExist(const string &FileName)
check if file exists
string liststring2string(string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="", string="")
void compressfile2stringstream(const string &file_raw, stringstream &content)
write the content of a compressed file into a stringstream
bool FileEmpty(const string &FileNameRaw)
check if file is empty
string TmpDirectoryCreate(const string &identifier, const string &tmpdir, const bool hidden)
create a string pointing to the location of a unique temp directory
bool FileNotEmpty(const string &FileName)
check if file is not empty
string PaddedPRE(utype, int, string=" ")
string args2string(const vector< string > &argv, const string &s0, const string &s_def)
string RemoveWhiteSpacesFromTheBack(const string &s) __xprototype
bool isfloat(const string &in)
string args2attachedutype(const vector< string > &argv, const string &s0, const string &s_def)
utype args2utype(const vector< string > &argv, const string &s0, utype def_out)
bool CompressFileWithinList(const vector< string > &list, const string &input)
Determines whether a compressed file is within the list.
bool Chmod(const uint chmod, const string &path, const std::filesystem::perm_options perm_opt=std::filesystem::perm_options::replace)
change permissions of the path
string execute2string(ostringstream &command)
void sort(vector< utype1 > &arr)
bool IsDirectory(const string &path)
check if path is a directory
bool SubDirectoryLS(const string &directory_raw, vector< string > &vsubd)
returns all the subdirectories of a directory, including itself
size_t stream2vectorstring(std::istream &istreamIN, vector< string > &vstringout)
string RemoveSubStringFirst(const string &str_orig, const string &str_rm) __xprototype
bool substringlist2bool(const string &strin, const vector< string > &substrings, bool match_all=true)
matrix< utype > xmatrix2matrix(const xmatrix< utype > &_xmatrix)
bool file2file(const string &file, const string &destination)
move file to another file
bool args2attachedflag(const vector< string > &argv, const string &s0)
string getPWD()
returns the current directory
void DecompressFile(const string &file_raw, const string &outfile_raw, const bool keep)
decompress file
bool stringstream2file(const stringstream &StringstreamOUTPUT, const string &FileNameOUTPUT, const compression_type ct, const string &mode)
write stringstream into a file
string toupper(const string &in) __xprototype
string args2attachedstring(const vector< string > &argv, const string &s0, string s_def)
void StringstreamClean(ostringstream &stream)
bool RemoveFile(const string &file)
remove a file
string RemoveWhiteSpaces(const string &s) __xprototype
size_t file2vectorstring(const string &FileNameIN, vector< string > &vline, bool consecutive, bool trim_edges)
write the content of a file into a vector of strings
void PrintErrorStream(ostringstream &stream, bool quiet)
void file2stringstream(const string &FileNameIN, stringstream &StringstreamIN)
write the content of a file into a stringstream 20241216 | Hagen Eckert - add transparent compression...
bool substring2bool(const string &strstream, const string &strsub1, bool RemoveWS=false, bool RemoveComments=true)
string joinWDelimiter(const xvector< utype > &ientries, const char delimiter)
vector< string > getElements(const string &input)
bool execute(ostringstream &command)
void PLOT_PEDOSALL(string options)
void PLOT_BAND2(string options)
void PLOT_PEDOS(string options)
bool DOSDATA_JSON(xoption &vpflow, ostream &oss=cout)
void PLOT_DOSWEB(string options)
void PLOT_BAND_SPINSPLIT(string options)
void PLOT_PEDOSALL_AFLOWLIB(string options, _aflags &aflags)
bool BANDSDATA_JSON(xoption &vpflow, ostream &oss=cout)
void ErrorOption(const string &options, const string &routine, vector< string > vusage)
void MessageOption(const string &options, const string &routine, vector< string > vusage)
void CIF(istream &input, aurostd::xoption &vpflow)
void cleanupstring(string &str)
void DISP(const string &options, istream &input)
bool DATA(istream &input, const aurostd::xoption &vpflow, const string &smode, ostream &oss)
void XYZINSPHERE(istream &input, double radius)
void BANDGAP(aurostd::xoption &vpflow, ostream &oss)
xstructure NANOPARTICLE(istream &input, const xvector< double > &iparams)
void ANGLES(const string &options, istream &input)
void ProcessAndAddSpinToXstructure(xstructure &a, const string &magmom_info)
string AFLOWIN(istream &input)
xstructure INCELL(istream &input)
string BZDirectionsLATTICE(const string &options)
void logger(const string &filename, const string &function_name, stringstream &message, const char &type, ostream &oss, bool silent, const string &message_metadata)
void AGROUP(_aflags &aflags, istream &input)
bool loadAndMergeLIBX(string combination, string LIB, string server, vector< vector< vector< aflowlib::_aflowlib_entry > > > &naries, ostream &oss)
void RDFCMP(const string &options)
bool CheckCommands(vector< string > argv, const vector< string > &cmds)
xstructure MINKOWSKIBASISREDUCTION(istream &input)
void SPLINE(vector< string > argv)
bool loadLIBX(string LIB, string elements, vector< aflowlib::_aflowlib_entry > &entries, ostream &oss)
void INTPOL(const string &options)
string PEARSON_SYMBOL(istream &input)
string CHGDIFF(aurostd::xoption vpflow)
void RBDIST(vector< string > argv)
void PLANEDENS(vector< string > argv)
xstructure SETCM(istream &input, const xvector< double > &newcm)
bool AddSpinToXstructure(xstructure &a, vector< double > &vmag)
xstructure NIGGLI(istream &input)
string listPrototypeLabels(aurostd::xoption &vpflow)
xstructure POSCAR(istream &input)
string FROZSL_VASPSETUP(vector< string > argv, int mode)
string EXTRACT_Symmetry(_aflags &aflags, vector< string > argv)
bool convertXStr2POCC(xstructure &xstr, const string &pocc_params, const vector< string > &_vspecies, const vector< double > &vvolumes)
void XYZ(const string &options, istream &input)
string ALPHASpecies(const string &options)
int whereischar(string str, char c)
string arity_string(uint arity, bool capital, bool plural)
string EQUIVALENT(_aflags &aflags, istream &input, aurostd::xoption &vpflow)
bool setPOCCTOL(xstructure &xstr, const string &pocc_tol_string)
void PrintSpline(const vector< double > &x, const vector< double > &y, const int &npts, ostream &outf)
xstructure WYCKOFF(vector< string > argv, istream &input)
void GULP(istream &input)
vector< POCCSiteSpecification > poccString2POCCSiteSpecification(const xstructure &xstr, const vector< string > pocc_sites)
xstructure CART(istream &input)
void FGROUP(_aflags &aflags, istream &input)
bool sortPOCCSiteSpecifications(const POCCSiteSpecification &p1, const POCCSiteSpecification &p2)
bool sortPOCCSites(const string &p1, const string &p2)
bool POCC_COMMAND_LINE(aurostd::xoption &vpflow, istream &input, ostream &oss)
bool GetCollinearMagneticInfo(uint num_atoms, const string &magmom_info, vector< double > &vmag)
vector< double > VVdiff(const vector< double > &a, const vector< double > &b)
uint SubLayersRestAPILS(const string &url, vector< string > &vsuburl)
void NDATA(istream &input)
double norm(const vector< double > &v)
string MISCIBILITY(vector< string > argv)
bool havechar(string str_in, char c)
void PGROUPK(_aflags &aflags, istream &input)
void PYTHON_MODULES(const string &modules, ostream &oss)
void COMPARE(const string &options)
xstructure LTCELL(const string &options, istream &input)
bool FIX_PRECISION_POCC(const string &occ, string &new_occ)
void defaultKFlags4SymWrite(_kflags &kflags, bool write)
xstructure VOLUME(const string &options, istream &input)
void GLASS_FORMING_ABILITY(aurostd::xoption &vpflow)
void KBAND(vector< string > argv)
void FIX_POCC_PARAMS(const xstructure &xstr, string &pocc_params)
xstructure KPOINTS_DELTA(aurostd::xoption &vpflow, istream &input, ostream &oss)
xstructure RMATOM(istream &input, const int &iatom)
bool PROTO_AFLOW(aurostd::xoption vpflow, bool flag_REVERSE)
void POCC(vector< string > argv)
bool loadXstructureLibEntry(const aflowlib::_aflowlib_entry &entry, xstructure &new_structure)
load a xstructure directly from a AFLOW lib entry
xstructure INFLATE_LATTICE(const string &options, istream &input)
void FINDSYM(aurostd::xoption &vpflow, uint mode, istream &input)
string NBONDXX(istream &input, bool aflowlib_legacy_format)
void PDOS(vector< string > argv)
void SEWALD(vector< string > argv, istream &input)
void PGROUPXTAL(_aflags &aflags, istream &input)
string BZDirectionsSTRUCTURE(istream &input, aurostd::xoption &vpflow)
bool QMVASP(aurostd::xoption &vpflow)
string GENERATE_CERAMICS_PRINT(const aurostd::xoption &vpflow)
bool GetNonCollinearMagneticInfo(uint num_atoms, const string &magmom_info, vector< xvector< double > > &vmag_noncoll)
aurostd::matrix< double > GetScaledLat(const xstructure &a)
xstructure SCALE(const string &options, istream &input)
double NNDIST(istream &input)
void DIST(const string &options, istream &input)
void getCIFOptions(xstructure &a, aurostd::xoption &vpflow)
Extract command-line options to generate a CIF.
string HNF(vector< string > argv, istream &input, ostream &oss)
string SG(aurostd::xoption &vpflow, istream &input, string mode, string print)
void PGROUP(_aflags &aflags, istream &input)
void RSM(vector< string > argv, istream &input)
bool PerformFullSymmetry(xstructure &a)
void SHELL(const string &options, istream &input)
xstructure INFLATE_VOLUME(const string &options, istream &input)
void ATOMIC_ENVIRONMENT(const aurostd::xoption &vpflow)
uint NATOMS(istream &input)
bool loadEntries(vector< string > &velements, vector< vector< vector< aflowlib::_aflowlib_entry > > > &entries, ostream &oss)
void BANDSTRUCTURE(_aflags &aflags)
bool SYMMETRY_GROUPS(_aflags &aflags, istream &input, aurostd::xoption &vpflow, ostream &oss)
xstructure NOORDERPARAMETER(istream &input)
string GEOMETRY(istream &input)
void defaultKFlags4SymCalc(_kflags &kflags, bool calc)
string HNFTOL(vector< string > argv, istream &input, ostream &oss)
void SUMPDOS(vector< string > argv)
xstructure CORNERS(istream &input)
void AGROUP2(istream &input)
xstructure INWS(istream &input)
xstructure KPOINTS(const string &options, istream &input, ostream &oss)
void CHGINT(vector< string > argv)
bool PSEUDOPOTENTIALS_CHECK(const aurostd::xoption &vpflow, const string &file, ostream &oss)
void RDF(const string &options, istream &input, bool raw_counts)
void EIGCURV(const string &options, ostream &oss)
void JMOL(const string &options, istream &input)
double frac2dbl(string str)
void POSCAR2WYCKOFF(istream &input)
void RBANAL(vector< string > argv)
bool CalculateFullSymmetry(istream &input, aurostd::xoption &vpflow, ostream &oss)
void CLEANALL(istream &input)
int main(vector< string > &argv, vector< string > &cmds)
bool PROTO_PARSE_INPUT(const vector< string > ¶ms, vector< vector< string > > &vvstr, vector< vector< double > > &vvnum, bool ignore_label, bool reverse)
string ALPHACompound(const string &options)
string EXTRACT_xcar(_aflags &aflags, vector< string > argv, string mode, string file)
void HKL(const string &options, _aflags &aflags, istream &input)
xstructure ALPHABETIC(istream &input)
double GetAtomicPlaneDist(const string &options, istream &cin)
void CMPSTR(vector< string > argv)
void CAGES(_aflags &aflags, const string &options, istream &input)
void EDOS(vector< string > argv)
xstructure PRIM(istream &input, uint mode)
xstructure NUMNAMES(vector< string > argv, istream &input)
xstructure FRAC(istream &input)
bool sortPOCCOccs(const string &occ1, const string &occ2)
xstructure SHIFT(const string &options, istream &input)
void AGROUP2m(istream &input)
void CLAT(const string &options)
void BANDGAP_DOS(aurostd::xoption &vpflow, ostream &oss)
bool loadFromCommon(aurostd::xoption &vpflow)
xstructure LATTICEREDUCTION(istream &input)
bool PROTO_TEST_INPUT(const vector< vector< string > > &vvstr, const vector< vector< double > > &vvnum, uint &nspeciesHTQC, bool patch_nspecies)
bool loadXstructures(aflowlib::_aflowlib_entry &entry, ostream &oss, bool relaxed_only, string path, bool is_url_path)
void defaultLoadEntriesFlags(aurostd::xoption &vpflow, ostream &oss, string input, bool entry_output, bool silent)
string FROZSL_ANALYZE_old(istream &input)
void XRAY_PEAKS(const aurostd::xoption &vpflow, istream &input)
xstructure ABCCAR(istream &input)
string SPECIES(istream &input)
xstructure xstrSWAP(vector< string > argv, istream &input)
string Intro_pflow(string x)
xstructure SETORIGIN(istream &input, const xvector< double > &neworigin)
xstructure INCOMPACT(istream &input)
bool POccInputs2Xstr(const string &pocc_input, aurostd::xoption &pocc_settings, xstructure &xstr, ostream &oss)
void PRINT_XRAY_DATA_PLOT(const aurostd::xoption &vpflow, istream &input)
xstructure IDENTICAL(istream &input)
vector< string > GENERATE_CERAMICS(const vector< string > &_vnonmetals, const vector< string > &_vmetals, uint metal_arity)
string WyckoffPositions(aurostd::xoption &vpflow, istream &input)
bool fixEmptyAtomNames(xstructure &xstr, bool force_fix)
bool prototypeMatch(string proto_database, string proto_search)
void HKLSearch(const string &options, _aflags &aflags, istream &input, const string &smode)
void JOINSTRLIST(vector< string > argv)
void RASMOL(const string &options, istream &input)
void MagneticParameters(string _directory, ostream &oss)
xstructure RMCOPIES(istream &input)
void RENDER(istream &input, const fs::path &output)
allow to render any structure from the command line
void updateProgressBar(unsigned long long int current, unsigned long long int end, ostream &oss)
void PLOT_XRAY(const aurostd::xoption &vpflow, istream &input)
void EFFMASS(vector< string > &argv, ostream &oss)
void XRAY(const string &options, istream &input)
xstructure CPRIM(istream &input)
void EWALD(const string &options, istream &input)
vector< double > VVsum(const vector< double > &a, const vector< double > &b)
void ZVAL(const string &options)
string CHGSUM(aurostd::xoption vpflow)
string LATTICE_LATTICE_TYPE(istream &input, aurostd::xoption &vpflow)
void KPATH(istream &input, bool WWW)
string PLATON(const string &options, istream &input)
bool FIXBANDS(_aflags &aflags, string opts)
uint NSPECIES(istream &input)
string ATOMSMAX(const string &options, istream &input)
bool checkAnionSublattice(const xstructure &xstr)
aurostd::matrix< double > GetLat(const xstructure &a)
void ChangeSuffix(const string &_operation)
string POSCAR2AFLOWIN(istream &input, const string &module)
void STATDIEL(vector< string > &argv)
vector< vector< string > > elementalCombinations(const vector< string > &velements, uint nary)
string LATTICE_TYPE(istream &input, aurostd::xoption &vpflow)
xstructure SUPERCELL(const string &options, istream &input)
void BANDS(const string &options, istream &input)
xstructure NOSD(istream &input)
void RAYTRACE(vector< string > argv)
vector< double > Getabc_angles(const aurostd::matrix< double > &lat)
void READ_XRAY_DATA(const string &filename, vector< double > &v_twotheta, vector< double > &v_intensity)
xstructure NAMES(vector< string > argv, istream &input)
bool compoundsBelong(const vector< string > &velements2check, const string &input, ostream &oss, bool clean, bool sort_elements, elements_string_type e_str_type, bool shortcut_pp_string_AFLOW_database)
void SUPERCELLSTRLIST(const string &options)
void XYZWS(istream &input)
xstructure SD(vector< string > argv, istream &input)
xstructure PROTO_LIBRARIES(aurostd::xoption vpflow)
void SGROUP(_aflags &aflags, istream &input, double radius)
void MAKESTRLIST(vector< string > argv)
string FROZSL_ANALYZE(istream &input)
void PLOT_THERMO(aurostd::xoption &, ostream &oss=cout)
void PLOT_PHDISP(aurostd::xoption &, ostream &oss=cout)
void PLOT_BANDDOS(aurostd::xoption &, ostream &oss=cout)
aurostd::xoption getPlotOptionsQHAthermo(const aurostd::xoption &xopt, const string &key)
void PLOT_PHDOS(aurostd::xoption &, ostream &oss=cout)
void PLOT_DOS(aurostd::xoption &, ostream &oss=cout)
void PLOT_BAND(aurostd::xoption &, ostream &oss=cout)
void PLOT_PHDISPDOS(aurostd::xoption &, ostream &oss=cout)
void PLOT_PDOS(aurostd::xoption &, ostream &oss=cout)
void PLOT_TCOND(aurostd::xoption &, ostream &oss=cout)
aurostd::xoption getPlotOptionsPhonons(const aurostd::xoption &, const string &)
void PLOT_THERMO_QHA(aurostd::xoption &, ostream &oss=cout)
aurostd::xoption getPlotOptionsEStructure(const aurostd::xoption &, const string &, bool=false)
void PLOT_GRUENEISEN_DISPERSION(aurostd::xoption &, ostream &oss=cout)
aurostd::xoption getPlotOptions(const aurostd::xoption &, const string &, bool=false)
void UFFENERGY(std::istream &input)
void run_cmd(aurostd::xoption &vpflow, std::istream &input)
storge container for a JSON object
std::string toString(bool json_format=true, bool escape_unicode=true) const
converts a JSON::object into a string