Skip to content

Commit

Permalink
Merge branch 'species_interface' into 'master'
Browse files Browse the repository at this point in the history
Renamed species pseudo-set to species set in the interface

See merge request npneq/inq!1182
  • Loading branch information
xavierandrade committed Dec 18, 2024
2 parents 4bf7cbc + 80c3a76 commit 765c2ee
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions src/interface/species.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <set name>`
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()`
Expand All @@ -76,6 +66,17 @@ These are the options available:
Python example: `pinq.species.list_sets()`
- Shell: `species set <set name>`
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 <element>`
Python: `species.add("element")`
Expand Down Expand Up @@ -107,14 +108,14 @@ These are the options available:
Python example: `pinq.species.add_by_atomic_number("C14", 6)`
- Shell: `species <symbol> pseudo-set <set name>`
- Shell: `species <symbol> set <set name>`
Python: `species.pseudo_set("symbol", "set_name")`
Sets the pseudopotential set that will be used for the species
given by <symbol>.
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 <symbol> file <filename>`
Expand Down Expand Up @@ -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{};
}
}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -301,7 +302,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
Expand Down

0 comments on commit 765c2ee

Please sign in to comment.