Keywords¶
- class qcdb.Keywords[source]¶
Bases:
objectAttributes Summary
Methods Summary
add(package, key)Register single new keyword
keyof domainpackageinto the keyword set.add_alias(package, key)Register single new alias keyword
keyof domainpackageinto 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
keyin domainpackageshould havevalue.suggest(package, key, value, accession[, ...])Propose that Keyword with name
keyin domainpackageshould 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
keyof domainpackageinto 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
keyin domainpackageshould havevalue. Used by driver or harnesses to translate specifications into package options. Use this function to insist uponvaluesuch that contrary should raise an error. Seesugguestfor 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 otherrequirecalls 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
keyin domainpackageshould havevalue. Used by driver or harnesses to translate specifications into package options. Use this function to urgevaluebut contrary should not raise an error. Seerequirefor stronger touch.