示例#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')