Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Mapping with deformation score #315

Open
wants to merge 2 commits into
base: 1.X
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/casm/clex/MappedProperties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ jsonParser &to_json(const ScoreMappedProperties &score, jsonParser &json) {
break;
case ScoreMappedProperties::Method::deformation_cost:
json["method"] = "deformation_cost";
json["lattice_weight"] = score.option().lattice_weight;
break;
case ScoreMappedProperties::Method::direct_selection:
json["method"] = "direct_selection";
Expand All @@ -196,6 +197,7 @@ jsonParser const &from_json(ScoreMappedProperties &score,
} else if (method == "deformation_cost") {
opt.method = ScoreMappedProperties::Method::deformation_cost;
opt.name = "";
opt.lattice_weight = json["lattice_weight"].get<double>();
} else if (method == "direct_selection") {
opt.method = ScoreMappedProperties::Method::direct_selection;
opt.name = json["name"].get<std::string>();
Expand Down
4 changes: 2 additions & 2 deletions src/casm/completer/Handlers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,9 @@ void OptionHandlerBase::add_configlist_suboption(const fs::path &_default) {
->value_name(ArgHandler::path()),
(std::string("Only consider the selected configurations "
"of the given selection file. ") +
singleline_help<DB::SELECTION_TYPE>())
standard_singleline_enum_help<DB::SELECTION_TYPE>(_default.string(), "filename"))
.c_str());
return;
return;
}

void OptionHandlerBase::add_selections_suboption(const fs::path &_default) {
Expand Down