Keywords

class qcdb.Keywords[source]

Bases: object

Attributes Summary

mark_of_the_default

mark_of_the_user

Methods Summary

add(package, key)

Register single new keyword key of domain package into the keyword set.

add_alias(package, key)

Register single new alias keyword key of domain package 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 domain package should have value.

suggest(package, key, value, accession[, ...])

Propose that Keyword with name key in domain package should have value.

unwind_by_accession(accession)

Attributes Documentation

mark_of_the_default = 'ffffffff'
mark_of_the_user = '00000000'

Methods Documentation

add(package, key)[source]

Register single new keyword key of domain package into the keyword set.

Return type:

None

Parameters:
add_alias(package, key)[source]

Register single new alias keyword key of domain package into the keyword set.

Return type:

None

Parameters:
print_changed(history=True)[source]

Compose a printout of default & current values for all packages & all keywords. If history=True, includes intermediate values, too.

Return type:

str

Parameters:

history (bool) –

require(package, key, value, accession, verbose=1)[source]

Propose that Keyword with name key in domain package should have value. Used by driver or harnesses to translate specifications into package options. Use this function to insist upon value such that contrary should raise an error. See sugguest 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 other require 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:

None

suggest(package, key, value, accession, verbose=1)[source]

Propose that Keyword with name key in domain package should have value. Used by driver or harnesses to translate specifications into package options. Use this function to urge value but contrary should not raise an error. See require for stronger touch.

Return type:

None

Parameters:
  • package (str) –

  • key (str) –

  • value (str) –

  • accession (str) –

  • verbose (int) –

unwind_by_accession(accession)[source]