Keywords¶
- class qcdb.Keywords[source]¶
Bases:
object
Attributes Summary
Methods Summary
add
(package, key)Register single new keyword
key
of domainpackage
into the keyword set.add_alias
(package, key)Register single new alias keyword
key
of domainpackage
into the keyword set.print_changed
([history])Compose a printout of default & current values for all packages & all keywords.
require
(package, key, value, accession[, ...])Propose that Keyword with name
key
in domainpackage
should havevalue
.suggest
(package, key, value, accession[, ...])Propose that Keyword with name
key
in domainpackage
should havevalue
.unwind_by_accession
(accession)Attributes Documentation
- mark_of_the_default = 'ffffffff'¶
- mark_of_the_user = '00000000'¶
Methods Documentation
- add_alias(package, key)[source]¶
Register single new alias keyword
key
of domainpackage
into the keyword set.- Return type:
- Parameters:
package (str) –
key (AliasKeyword) –
- print_changed(history=True)[source]¶
Compose a printout of default & current values for all packages & all keywords. If
history=True
, includes intermediate values, too.
- require(package, key, value, accession, verbose=1)[source]¶
Propose that Keyword with name
key
in domainpackage
should havevalue
. Used by driver or harnesses to translate specifications into package options. Use this function to insist uponvalue
such that contrary should raise an error. Seesugguest
for lighter touch.- Parameters:
package (
str
) – Domain (QC program) containing keyword for which to propose a value.key (
str
) – Keyword name for which to propose a value.value (
str
) – Proposed keyword value. Will be checked against the validator before function returns. May still be incompatible with otherrequire
calls of the same priority, but that won’t be checked until self.scroll[“package”][“key”].value is accessed.accession (
str
) – Tag of who (function, person, etc.) is setting this keyword.verbose (
int
) – If >1, print line upon being added to history.
- Return type:
- suggest(package, key, value, accession, verbose=1)[source]¶
Propose that Keyword with name
key
in domainpackage
should havevalue
. Used by driver or harnesses to translate specifications into package options. Use this function to urgevalue
but contrary should not raise an error. Seerequire
for stronger touch.