Skip to content

Commit 1d5e2ec

Browse files
authored
Merge pull request #231 from jcthomas/v0.2a2_fix_status
Fixing minor bug in 'casm status'
2 parents 9023d9e + 1651138 commit 1d5e2ec

2 files changed

Lines changed: 10 additions & 50 deletions

File tree

src/casm/app/format.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@ namespace CASM {
8181
std::cout << " The expected CASM project directory structure with VASP settings \n";
8282
std::cout << " files: \n";
8383
std::cout << " \n";
84-
std::cout << " $ROOT/.casm \n";
85-
std::cout << " project_settings.json \n";
86-
std::cout << " config_list.json \n";
8784
std::cout << " $ROOT/ \n";
8885
std::cout << " prim.json \n";
8986
std::cout << " (PRIM) \n";
9087
std::cout << " LOG \n";
88+
std::cout << " $ROOT/.casm \n";
89+
std::cout << " project_settings.json \n";
90+
std::cout << " config_list.json \n";
91+
std::cout << " composition_axes.json \n";
9192
std::cout << " $ROOT/symmetry/ \n";
9293
std::cout << " lattice_point_group.json \n";
9394
std::cout << " factor_group.json \n";
@@ -105,7 +106,6 @@ namespace CASM {
105106
std::cout << " KPOINTS \n";
106107
std::cout << " POSCAR \n";
107108
std::cout << " $ROOT/training_data/settings/$CURR_CALCTYPE/$CURR_REF/ \n";
108-
std::cout << " composition_axes.json \n";
109109
std::cout << " chemical_reference.json \n";
110110
std::cout << " $ROOT/training_data/$SCELNAME/ \n";
111111
std::cout << " LAT \n";
@@ -632,7 +632,7 @@ LCHARG = .FALSE.\n";
632632
std::cout << "\n### composition_axes.json ##################\n\n";
633633

634634
std::cout << "LOCATION WHEN GENERATED:\n";
635-
std::cout << "$ROOT/training_data/settings/$CURR_CALCTYPE/$CURR_REF/composition_axes.json\n";
635+
std::cout << "$ROOT/.casm/composition_axes.json\n";
636636
std::cout << "\n\n";
637637

638638
std::cout << "DESCRIPTION:\n";

src/casm/app/status.cc

Lines changed: 5 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -31,35 +31,15 @@ namespace CASM {
3131
- See 'casm format' for descriptions and locations of the 'prim.json' file.\n";
3232
}
3333

34-
void standard_composition_uncalculated() {
35-
36-
std::cout << "NEXT STEPS:\n\n";
37-
38-
std::cout <<
39-
"Calculate standard composition axes\n\
40-
- Execute: 'casm composition --calc' \n\
41-
- If successful, standard composition axes will be printed to screen and \n\
42-
saved in the 'composition_axes.json' file. \n\
43-
- Then execute 'casm composition -s key' to select one of the listed axes.\n\
44-
- If none of the composition axes are satisfactory, edit the file \n\
45-
'composition_axes.json' to add your own custom composition axes to the \n\
46-
'custom_axes' JSON object.\n\n";
47-
48-
std::cout <<
49-
"- See 'casm format' for a description and the location of \n\
50-
the 'composition_axes.json' file.\n\n";
51-
52-
}
53-
5434
void composition_unselected() {
5535

5636
std::cout << "NEXT STEPS:\n\n";
5737

5838
std::cout <<
5939
"Select composition axes\n\
60-
- Execute: 'casm composition -d' to display composition axes. \n\
61-
- Then execute 'casm composition -s N' to select one of the listed axes. \n\
62-
- If none of the composition axes are satisfactory, edit the file \n\
40+
- Execute: 'casm composition -d' to display standard composition axes. \n\
41+
- Then execute 'casm composition -s <#>' to select one of the listed axes.\n\
42+
- If no standard composition axis is satisfactory, edit the file \n\
6343
'composition_axes.json' to add your own custom composition axes to the \n\
6444
'custom_axes' JSON object.\n\n";
6545

@@ -367,12 +347,11 @@ Instructions for fitting ECI: \n\n\
367347
std::cout << "\n#################################\n\n";
368348

369349
std::cout << "CASM status:\n\n";
370-
std::cout << "1) Project initialized: ";
371350

372351
const fs::path &root = args.root;
373352

374353
if(root.empty()) {
375-
std::cout << " FALSE\n\n";
354+
std::cout << "1) Project initialized: FALSE\n\n";
376355

377356
if(vm.count("next")) {
378357
std::cout << "\n#################################\n\n";
@@ -416,7 +395,7 @@ Instructions for fitting ECI: \n\n\
416395
std::string eci = desc.eci;
417396

418397

419-
std::cout << "TRUE\n";
398+
std::cout << "1) Project initialized: TRUE\n\n";
420399
std::cout << "- Project name: " << primclex.name() << std::endl;
421400
std::cout << "- Project location: " << primclex.get_path().string() << std::endl;
422401

@@ -441,25 +420,6 @@ Instructions for fitting ECI: \n\n\
441420

442421
std::cout << "2) Composition axes \n";
443422

444-
std::cout << "- Standard composition axes calculated: ";
445-
446-
if(!fs::is_regular_file(primclex.dir().composition_axes())) {
447-
std::cout << "FALSE\n\n";
448-
449-
if(vm.count("next")) {
450-
std::cout << "\n#################################\n\n";
451-
452-
standard_composition_uncalculated();
453-
}
454-
else {
455-
std::cout << "For next steps, run 'casm status -n'\n\n";
456-
}
457-
458-
return 0;
459-
}
460-
461-
std::cout << "TRUE\n";
462-
463423
std::cout << "- Composition axes selected: ";
464424

465425
if(!primclex.has_composition_axes()) {

0 commit comments

Comments
 (0)