From cc2c0e6f404ef7a678c17a47c62e4051ed674212 Mon Sep 17 00:00:00 2001 From: Xavier Andrade Date: Tue, 17 Dec 2024 10:28:52 -0800 Subject: [PATCH 1/2] Add an error message to the species command. --- src/interface/species.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interface/species.hpp b/src/interface/species.hpp index be62b45a..d851a913 100644 --- a/src/interface/species.hpp +++ b/src/interface/species.hpp @@ -301,7 +301,8 @@ These are the options available: status(); actions::normal_exit(); } - + + if(input::environment::global().comm().root()) actions::error(input::environment::global().comm(), "Invalid syntax in the species command"); } #ifdef INQ_PYTHON_INTERFACE From 80c3a76f979b4781c6501a95ec40de75404a7988 Mon Sep 17 00:00:00 2001 From: Xavier Andrade Date: Tue, 17 Dec 2024 11:30:12 -0800 Subject: [PATCH 2/2] Renamed species pseudo-set to species set. --- src/interface/species.hpp | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/interface/species.hpp b/src/interface/species.hpp index d851a913..945d2bab 100644 --- a/src/interface/species.hpp +++ b/src/interface/species.hpp @@ -47,26 +47,16 @@ These are the options available: Python example: `pinq.species.status()` -- Shell: `species pseudo-set` +- Shell: `species set` Python: `species.pseudo_set()` Returns the current pseudopotential set that will be used by default for all species in the simulation. - Shell example: `inq species pseudo-set` + Shell example: `inq species set` Python example: `pinq.species.pseudo_set()` -- Shell: `species pseudo-set ` - Python: `species.pseudo_set("set_name")` - - Sets the pseudopotential set that will be used by default for all - species in the simulation. - - Shell example: `inq species pseudo-set sg15` - Python example: `pinq.species.pseudo-set("sg15")` - - - Shell: `species list-sets` Python: `species.list_sets()` @@ -76,6 +66,17 @@ These are the options available: Python example: `pinq.species.list_sets()` +- Shell: `species set ` + Python: `species.pseudo_set("set_name")` + + Selects the pseudopotential set that will be used by default for + all species in the simulation. The name must be one those returned + by the `list-sets` command. + + Shell example: `inq species set sg15` + Python example: `pinq.species.set("sg15")` + + - Shell: `species add ` Python: `species.add("element")` @@ -107,14 +108,14 @@ These are the options available: Python example: `pinq.species.add_by_atomic_number("C14", 6)` -- Shell: `species pseudo-set ` +- Shell: `species set ` Python: `species.pseudo_set("symbol", "set_name")` Sets the pseudopotential set that will be used for the species given by . - Shell example: `inq species He pseudo-set sg15` - Python example: `pinq.species.pseudo-set("He", "sg15")` + Shell example: `inq species He set sg15` + Python example: `pinq.species.set("He", "sg15")` - Shell: `species file ` @@ -149,7 +150,7 @@ These are the options available: return set; } catch(...) { - actions::error(input::environment::global().comm(), "Unknown pseudo-set '" + set_name + "'."); + actions::error(input::environment::global().comm(), "Unknown set '" + set_name + "'."); return pseudo::set_id{}; } } @@ -250,12 +251,12 @@ These are the options available: actions::normal_exit(); } - if(args.size() == 1 and args[0] == "pseudo-set") { + if(args.size() == 1 and args[0] == "set") { pseudo_set(); actions::normal_exit(); } - if(args.size() == 2 and args[0] == "pseudo-set") { + if(args.size() == 2 and args[0] == "set") { pseudo_set(args[1]); status(); actions::normal_exit(); @@ -284,7 +285,7 @@ These are the options available: actions::normal_exit(); } - if(args.size() == 3 and args[1] == "pseudo-set") { + if(args.size() == 3 and args[1] == "set") { pseudo_set(args[0], args[2]); status(); actions::normal_exit();