Keyword

class qcdb.Keyword(keyword, default, validator, glossary='', expert=False)[source]

Bases: object

Attributes Summary

mark_of_the_default

mark_of_the_user

value

value2

Methods Summary

disputed()

Whether value candidates other than the initial value have been proposed.

disputed2()

Whether value candidates other than the initial value have been proposed for exactly the keyword, not a partial overlap keyword.

inherit(other, transform[, suggests_too])

is_default()

Whether the present evaluated value matches the initial value (set at definition time, so default)

is_required([score_cutoff])

Whether the present evaluated value was suggested or required (approximately).

require(value[, overlap, accession, verbose])

type value:

Any

shortstr()

suggest(value[, overlap, accession, verbose])

Attributes Documentation

mark_of_the_default = 'ffffffff'
mark_of_the_user = '00000000'
value
value2

Methods Documentation

disputed()[source]

Whether value candidates other than the initial value have been proposed.

Return type:

bool

disputed2()[source]

Whether value candidates other than the initial value have been proposed for exactly the keyword, not a partial overlap keyword.

Return type:

bool

inherit(other, transform, suggests_too=True)[source]
is_default()[source]

Whether the present evaluated value matches the initial value (set at definition time, so default)

Return type:

bool

is_required(score_cutoff=100)[source]

Whether the present evaluated value was suggested or required (approximately).

Return type:

bool

Parameters:

score_cutoff (int) –

require(value, overlap=None, accession=None, verbose=1)[source]
Parameters:
  • value (Any) – Asserted value for keyword self. Will be checked against self.validator before function returns. May still be incompatible with other require calls of same priority, but that won’t be checked until self.value is accessed.

  • overlap (Optional[int]) – Specificity of assertion. If self.keyword=’CC_MAXITER’ and value is set for MAXITER, overlap=7, whereas if set for CC_MAXITER, overlap=10.

  • accession (Optional[str]) – Tag of who is setting this option.

  • verbose (int) –

Return type:

None

shortstr()[source]
suggest(value, overlap=None, accession=None, verbose=1)[source]