-
Notifications
You must be signed in to change notification settings - Fork 21
Some cli renames #241
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
base: main
Are you sure you want to change the base?
Some cli renames #241
Changes from 4 commits
cd86fa8
1e8760e
1ac8d91
b885969
c481bef
58221c1
8833b86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| from wfl.cli import cli_options as opt | ||
| from wfl.calculators import generic | ||
| from wfl.utils import configs | ||
| import wfl.descriptors.quippy | ||
|
|
||
|
|
||
| @click.command("gap") | ||
|
|
@@ -16,7 +17,7 @@ | |
| @opt.prop_prefix | ||
| @opt.num_inputs_per_python_subprocess | ||
| def gap(ctx, inputs, outputs, param_fname, prop_prefix, num_inputs_per_python_subprocess): | ||
| """evaluates GAP""" | ||
| """evaluate GAP""" | ||
|
|
||
| if prop_prefix is None: | ||
| prop_prefix="gap_" | ||
|
|
@@ -44,7 +45,7 @@ def pyjulip_ace(param_fname): | |
| @opt.prop_prefix | ||
| @opt.num_inputs_per_python_subprocess | ||
| def ace(ctx, inputs, outputs, param_fname, prop_prefix, num_inputs_per_python_subprocess): | ||
| """evaluates ACE""" | ||
| """evaluate ACE""" | ||
|
|
||
| if prop_prefix is None: | ||
| prop_prefix = 'ace_' | ||
|
|
@@ -68,7 +69,7 @@ def ace(ctx, inputs, outputs, param_fname, prop_prefix, num_inputs_per_python_su | |
| @opt.prop_prefix | ||
| @opt.num_inputs_per_python_subprocess | ||
| def mace(ctx, inputs, outputs, param_fname, prop_prefix, num_inputs_per_python_subprocess, dtype): | ||
| """evaluates MACE""" | ||
| """evaluate MACE""" | ||
|
|
||
| from mace.calculators.mace import MACECalculator | ||
|
|
||
|
|
@@ -93,7 +94,8 @@ def mace(ctx, inputs, outputs, param_fname, prop_prefix, num_inputs_per_python_s | |
| help="``atoms.info`` key on which to select isolated atoms") | ||
| @click.option("--isolated-atom-info-value", "-v", default="default", | ||
| help="``atoms.info['isolated_atom_info_key']`` value for isolated atoms. Defaults to \"IsolatedAtom\" or \"isolated_atom\"") | ||
| def atomization_energy(inputs, outputs, prop_prefix, prop, isolated_atom_info_key, isolated_atom_info_value): | ||
| def atomization_energy(ctx, inputs, outputs, prop_prefix, prop, isolated_atom_info_key, isolated_atom_info_value): | ||
| """Calculte atomization energy""" | ||
|
gelzinyte marked this conversation as resolved.
Outdated
|
||
| configs.atomization_energy( | ||
| inputs=inputs, | ||
| outputs=outputs, | ||
|
|
@@ -104,3 +106,22 @@ def atomization_energy(inputs, outputs, prop_prefix, prop, isolated_atom_info_ke | |
| ) | ||
|
|
||
|
|
||
| @click.command("quippy") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this already under "descriptors" somehow? If not, we should possibly move it under such a category, first because quippy also provides potentials, and 2nd, because people might want to calculate ACE descriptors some day.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yes, this is the reason for this renaming. Currently I've merged what was in "eval" and "descriptors" into "calc", because things in both categories could be "calculated" (@gabor1 pointed out). Didn't think about quippy/ace doing both, properties and descriptors. Maybe instead should rename "eval" -> "calc-prop" & "descriptors" -> "calc-desc" or "calc-properties" & "calc-descriptors"? Just
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this is now "calc quippy"? Can you briefly list the relevant part of the nested command tree structure that's available now (as of this PR)?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes; edited the PR description |
||
| @click.pass_context | ||
| @click.option("--local", is_flag=True, help="calculate a local (per-atom) descriptor") | ||
| @click.option("--force", is_flag=True, help="overwrite existing info or arrays item if present") | ||
| @click.option("--descriptor", type=click.STRING, required=True, help="quippy.descriptors.Descriptor arg string") | ||
| @click.option("--key", required=True, type=click.STRING, help="Atoms.info (global) or Atoms.arrays (local) for descriptor vector") | ||
| @opt.inputs | ||
| @opt.outputs | ||
| def quippy(ctx, inputs, outputs, descriptor, key, local, force): | ||
| """Calculate quippy descriptors""" | ||
| wfl.descriptors.quippy.calc( | ||
| inputs=inputs, | ||
| outputs=outputs, | ||
| descs=descriptor, | ||
| key=key, | ||
| per_atom=local, | ||
| force=force | ||
| ) | ||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.