Пример #1
0
def JOBKIND(x):
    return Constraint(1, 'jobkind', s(x), '=')
Пример #2
0
def LAUNCHDIR(x):
    return Constraint(1, 'launchdir', s(x), '=')
Пример #3
0
def LAUNCHDIRS(x):
    return Constraint(1, 'launchdir', [s(y) for y in x], 'in')
Пример #4
0
def ADSORBATES(x):
    return Constraint(
        1, 'stradsorbates', s(x), '='
    )  #  https://stackoverflow.com/questions/603572/how-to-properly-escape-a-single-quote-for-a-sqlite-database
Пример #5
0
def EXISTS(filename):
    return Constraint(1, filename.replace('.', '_'), s(True), '=')
Пример #6
0
def INITPOS(x):
    return Constraint(1, 'strinitpos', s(x), '=')
Пример #7
0
def SYMMETRIC(x):
    return Constraint(1, 'symmetric', s(str(x)), '=')
Пример #8
0
def STATUS(x):
    return Constraint(1, 'status', s(x), '=')
Пример #9
0
def KIND(x):
    return Constraint(1, 'kind', s(x), '=')
Пример #10
0
def XC(x):
    return Constraint(1, 'xc', s(x), '=')
Пример #11
0
def PSP(x):
    return Constraint(1, 'psp', s(x), '=')
Пример #12
0
def DFTCODE(x):
    return Constraint(1, 'dftcode', s(x), '=')
Пример #13
0
def MAGMOMINIT(x):
    return Constraint(1, 'strmagmominit', s(x), '=')
Пример #14
0
def INITCELL(x):
    return Constraint(1, 'strinitcell', s(x), '=')
Пример #15
0
def SYMBOLS(x):
    return Constraint(1, 'strsymbols', s(x), '=')
Пример #16
0
def STRUCTURE(x):
    return Constraint(1, 'structure', s(x), '=')
Пример #17
0
def NUMBERS(x):
    return Constraint(1, 'strnumbers', s(x), '=')
Пример #18
0

def STATUS(x):
    return Constraint(1, 'status', s(x), '=')


READY = STATUS('ready')
QUEUED = STATUS('queued')
FIZZLED = STATUS('fizzled')
TIMEOUT = STATUS('timeout')
CANCELLED = STATUS('cancelled')
FAILED = STATUS('failed')
COMPLETED = STATUS('completed')
RUNNING = STATUS('running')

NOTCOMPLETED = Constraint(1, 'status', s('completed'), '!=')

# 'unlocked' means that we presently INTEND to eventually update the row
# a job that has not finished should be unlocked
# if a job is finished, then it should be unlocked

##########
# ELEMENTS
##########
AG = Constraint(1, 'name', s('%Ag-fcc%'), 'like')
AL = Constraint(1, 'name', s('%Al-fcc%'), 'like')
AU = Constraint(1, 'name', s('%Au-fcc%'), 'like')
BA = Constraint(1, 'name', s('%Ba-bcc%'), 'like')
BE = Constraint(1, 'name', s('%Be-hcp%'), 'like')
C = Constraint(1, 'name', s('%C-diamond%'), 'like')
CA = Constraint(1, 'name', s('%Ca-fcc%'), 'like')